Package solver.constraints.nary.automata.FA.utils

Examples of solver.constraints.nary.automata.FA.utils.CounterState


    public List<ICounter> getCounters() {
        return counters;
    }

    public static ICostAutomaton makeSingleResource(IAutomaton pi, int[][][] costs, int inf, int sup) {
        ICounter c = new CounterState(costs, inf, sup);
        ArrayList<ICounter> tmp = new ArrayList<ICounter>();
        tmp.add(c);
        return (pi == null) ? null :
                new CostAutomaton(pi, tmp);
    }
View Full Code Here


                    if (ordered[k][i][j].length == 1) stateDependant = false;
                }
            }

            if (stateDependant)
                tmp.add(new CounterState(ordered[k], infs[k], sups[k]));
            else
                tmp.add(new Counter(ordered[k], infs[k], sups[k]));
        }
        return (pi == null) ? null :
                new CostAutomaton(pi, tmp);
View Full Code Here

        for (int i = 0; i < costs.length; i++) {
            costs[i][0][1] = 1;
            costs[i][1][1] = 1;
        }

        ICounter c = new CounterState(costs, 3, 4);

        auto.addCounter(c);

        solver.post(IntConstraintFactory.cost_regular(vars, cost, auto));
        solver.set(IntStrategyFactory.lexico_LB(vars));
View Full Code Here

                costs[i][0][k] = 1;
                costs[i][1][k] = 1;
            }
        }

        auto.addCounter(new CounterState(costs, 10, 10));

        solver.post(IntConstraintFactory.cost_regular(vars, cost, auto));
        solver.set(IntStrategyFactory.lexico_LB(vars));

        solver.findAllSolutions();
View Full Code Here

        for (int i = 0; i < costs.length; i++) {
            costs[i][0][1] = 1;
            costs[i][1][1] = 1;
        }

        auto.addCounter(new CounterState(costs, 4, 6));

        solver.post(IntConstraintFactory.cost_regular(vars, cost, auto));
        solver.set(IntStrategyFactory.lexico_LB(vars));

        solver.findAllSolutions();
View Full Code Here

TOP

Related Classes of solver.constraints.nary.automata.FA.utils.CounterState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.