|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Best first iterator for the combination of a VehicleRoutingSpace with a collection of sum constraints. More...

Public Member Functions | |
| BestFirstIterator (VehicleRoutingSpace< U > vrpSpace, List< UtilitySolutionSpace< AddableInteger, U > > spaces, String[] variablesOrder, String ownVariable) | |
| Constructor. | |
| U | getCurrentUtility () |
| U | getCurrentUtility (U bound, final boolean minimize) |
| U | nextUtility () |
| U | nextUtility (U bound, final boolean minimize) |
| void | setCurrentUtility (U util) |
| AddableInteger[] | getCurrentSolution () |
| AddableInteger[][] | getDomains () |
| long | getNbrSolutions () |
| String[] | getVariablesOrder () |
| boolean | hasNext () |
| AddableInteger[] | nextSolution () |
| void | update () |
| U | maximalCut () |
Protected Member Functions | |
| void | combineVRPAndSum () |
| Method to combine the nandAssignment and the packetAssignment in the currentAssignment variable. | |
Protected Attributes | |
| HashMap< String, Integer > | variablePointer |
| For each variable its position in the assignment array. | |
Private Member Functions | |
| void | iter () |
| Method used to iterate over the assignments in a best first order. | |
| void | iterateSumVars () |
| Iterate of the possible combinations of NAND variables. | |
Private Attributes | |
| AddableInteger[] | currentSolution |
| The current solution. | |
| U | currentUtility |
| The utility of the current solution. | |
| String[] | vehicleRoutingVariables |
| The variables occuring in the VRP problem. | |
| String[] | sumVariables |
| The variables occuring in the sum constraints. | |
| boolean | hasVehicleRoutingProblem |
true when this space contains a VRP space, and false otherwise | |
| boolean | hasSumVariables |
true when this space contrains sum variables, and false otherwise | |
| Iterator< AddableInteger, U > | vehicleIterBestFirst |
| An iterator over the VRP space. | |
| int | nbrSolsLeft |
| The number of solutions left. | |
| int | nbrSumSolsLeft |
| The number of possible assignments for the sum variables left. | |
| int | nbrSumSols |
| the total number of possible assignments to the sum variables | |
| int | nbrSumVariables |
| The total number of sum variables. | |
| int | nbrVRPvariables |
| The total number of VRP variables. | |
| AddableInteger | one = new AddableInteger(1) |
| Domain value 1. | |
| AddableInteger | zero = new AddableInteger(0) |
| Domain value 0. | |
| AddableInteger[] | sumAssignment |
| The current assignment to the sum variables. | |
| AddableInteger[] | vrpAssignment |
| The current assignment to the VRP variables. | |
| int | ownVariableAssignmentVRPIndex |
| The index of the own variable in the list of variables for the VRP problem. | |
| U | zeroUtil |
| The zero utility. | |
Best first iterator for the combination of a VehicleRoutingSpace with a collection of sum constraints.
| frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.BestFirstIterator | ( | VehicleRoutingSpace< U > | vrpSpace, |
| List< UtilitySolutionSpace< AddableInteger, U > > | spaces, | ||
| String[] | variablesOrder, | ||
| String | ownVariable ) |
Constructor.
| vrpSpace | the vehicle routing space |
| spaces | the sum constraint spaces |
| variablesOrder | the order in which the variables should be reported to the outside world |
| ownVariable | The ID of the variable that owns this constraint |
References currentSolution, hasSumVariables, hasVehicleRoutingProblem, nbrSolsLeft, nbrSumSolsLeft, nbrSumVariables, nbrVRPvariables, one, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.ownVariable, ownVariableAssignmentVRPIndex, sumAssignment, sumVariables, variablePointer, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.variables, vehicleIterBestFirst, vehicleRoutingVariables, vrpAssignment, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.vrpSpace, and zeroUtil.
|
protected |
Method to combine the nandAssignment and the packetAssignment in the currentAssignment variable.
References currentSolution, sumAssignment, sumVariables, variablePointer, vehicleRoutingVariables, and vrpAssignment.
Referenced by iter().
| AddableInteger[] frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getCurrentSolution | ( | ) |
| U frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getCurrentUtility | ( | ) |
| U frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getCurrentUtility | ( | U | bound, |
| final boolean | minimize ) |
References getCurrentUtility().

| AddableInteger[][] frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getDomains | ( | ) |
| long frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getNbrSolutions | ( | ) |
| String[] frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.getVariablesOrder | ( | ) |
| boolean frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.hasNext | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.
Referenced by nextUtility().
|
private |
Method used to iterate over the assignments in a best first order.
References combineVRPAndSum(), currentUtility, hasSumVariables, hasVehicleRoutingProblem, iterateSumVars(), nbrSolsLeft, nbrSumSols, nbrSumSolsLeft, one, ownVariableAssignmentVRPIndex, sumAssignment, vehicleIterBestFirst, vrpAssignment, and zero.
Referenced by nextSolution(), and nextUtility().

|
private |
Iterate of the possible combinations of NAND variables.
References nbrSumSolsLeft, nbrSumVariables, one, sumAssignment, and zero.
Referenced by iter().
| U frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.maximalCut | ( | ) |
| AddableInteger[] frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.nextSolution | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.
References currentSolution, and iter().

| U frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.nextUtility | ( | ) |
References currentUtility, and iter().
Referenced by nextUtility().

| U frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.nextUtility | ( | U | bound, |
| final boolean | minimize ) |
References getCurrentUtility(), hasNext(), and nextUtility().

| void frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.setCurrentUtility | ( | U | util | ) |
| void frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >.BestFirstIterator.update | ( | ) |
|
private |
The current solution.
Referenced by BestFirstIterator(), combineVRPAndSum(), getCurrentSolution(), and nextSolution().
|
private |
The utility of the current solution.
Referenced by getCurrentUtility(), iter(), and nextUtility().
|
private |
true when this space contrains sum variables, and false otherwise
Referenced by BestFirstIterator(), and iter().
|
private |
true when this space contains a VRP space, and false otherwise
Referenced by BestFirstIterator(), and iter().
|
private |
The number of solutions left.
Referenced by BestFirstIterator(), and iter().
|
private |
the total number of possible assignments to the sum variables
Referenced by iter().
|
private |
The number of possible assignments for the sum variables left.
Referenced by BestFirstIterator(), iter(), and iterateSumVars().
|
private |
The total number of sum variables.
Referenced by BestFirstIterator(), and iterateSumVars().
|
private |
The total number of VRP variables.
Referenced by BestFirstIterator().
|
private |
Domain value 1.
Referenced by BestFirstIterator(), iter(), and iterateSumVars().
|
private |
The index of the own variable in the list of variables for the VRP problem.
Referenced by BestFirstIterator(), and iter().
|
private |
The current assignment to the sum variables.
Referenced by BestFirstIterator(), combineVRPAndSum(), iter(), and iterateSumVars().
|
private |
The variables occuring in the sum constraints.
Referenced by BestFirstIterator(), and combineVRPAndSum().
|
protected |
For each variable its position in the assignment array.
Referenced by BestFirstIterator(), and combineVRPAndSum().
|
private |
An iterator over the VRP space.
Referenced by BestFirstIterator(), and iter().
|
private |
The variables occuring in the VRP problem.
Referenced by BestFirstIterator(), and combineVRPAndSum().
|
private |
The current assignment to the VRP variables.
Referenced by BestFirstIterator(), combineVRPAndSum(), and iter().
|
private |
Domain value 0.
Referenced by iter(), and iterateSumVars().
|
private |
The zero utility.
Referenced by BestFirstIterator(), and maximalCut().