|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Best first iterator. More...

Public Member Functions | |
| VRPiteratorBestFirst (String[] variables, AddableInteger[][] domains, VehicleRoutingSpace< U > space) | |
| Constructor. | |
| VRPiteratorBestFirst (String[] variables, AddableInteger[][] domains, VehicleRoutingSpace< U > space, String[] fixedVariables, AddableInteger[] fixedValues) | |
| 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 () |
Private Member Functions | |
| void | iter () |
| Generates the next solution. | |
Private Attributes | |
| String[] | variables |
| Variables over which to iterate. | |
| boolean[] | fixed |
| For each variable, when true, it's value is fixed. | |
| AddableInteger[][] | domains |
| The domains for the iteration variables. | |
| AddableInteger[] | currentSolution |
| The current solution. | |
| U | currentUtility |
| The utility of the current solution. | |
| PriorityQueue< CustomerAssignment< U > > | orderedAssignments |
| The set of assignments already. | |
| HashSet< CustomerAssignment< U > > | alreadyGenerated |
| Map of already generated assignments. | |
| AddableInteger | one = new AddableInteger(1) |
| All variables are binary, and will be either 0 or 1. | |
| VehicleRoutingSpace< U > | space |
| The space over which we are iterating. | |
| long | numberOfSolutionsLeft |
| The number of solutions left to iterate over. | |
| final long | nbrSolutions |
| The total number of solutions. | |
Best first iterator.
The best solution is the one where no customer is served.
The generator is based on the idea that a solution serving a set of customers A will always be better than any solution whose set of customers is a proper superset of A. Thus, whenever a solution s is released, a new set of solutions is generated, based on s, where a customer is added.
| frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.VRPiteratorBestFirst | ( | String[] | variables, |
| AddableInteger | domains[][], | ||
| VehicleRoutingSpace< U > | space ) |
Constructor.
| variables | variables over which to iterate |
| domains | domains for the iteration variables |
| space | the space over which to iterate |
References alreadyGenerated, domains, fixed, numberOfSolutionsLeft, orderedAssignments, space, variables, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VehicleRoutingSpace().

| frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.VRPiteratorBestFirst | ( | String[] | variables, |
| AddableInteger | domains[][], | ||
| VehicleRoutingSpace< U > | space, | ||
| String[] | fixedVariables, | ||
| AddableInteger[] | fixedValues ) |
Constructor.
| variables | variables over which to iterate |
| domains | domains for the iteration variables |
| space | the space over which to iterate |
| fixedVariables | the variables who's values should be fixed |
| fixedValues | the values of the fixed variables |
References alreadyGenerated, domains, fixed, numberOfSolutionsLeft, orderedAssignments, space, variables, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VehicleRoutingSpace().

| AddableInteger[] frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getCurrentSolution | ( | ) |
| U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getCurrentUtility | ( | ) |
| U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getCurrentUtility | ( | U | bound, |
| final boolean | minimize ) |
References getCurrentUtility().

| AddableInteger[][] frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getDomains | ( | ) |
| long frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getNbrSolutions | ( | ) |
| String[] frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.getVariablesOrder | ( | ) |
| boolean frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.hasNext | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.
Referenced by nextUtility().
|
private |
Generates the next solution.
References alreadyGenerated, currentSolution, currentUtility, fixed, frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.CustomerAssignment< U extends Addable< U > >.generateAssignmentList(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.CustomerAssignment< U extends Addable< U > >.getAssignment(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.CustomerAssignment< U extends Addable< U > >.getUtility(), numberOfSolutionsLeft, one, orderedAssignments, space, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.zero.
Referenced by nextSolution(), and nextUtility().

| U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.maximalCut | ( | ) |
| AddableInteger[] frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.nextSolution | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.
References currentSolution, and iter().

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

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

| void frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.setCurrentUtility | ( | U | util | ) |
| void frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiteratorBestFirst.update | ( | ) |
|
private |
Map of already generated assignments.
Referenced by iter(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
The current solution.
Referenced by getCurrentSolution(), iter(), nextSolution(), and nextUtility().
|
private |
The utility of the current solution.
Referenced by getCurrentUtility(), iter(), and nextUtility().
|
private |
The domains for the iteration variables.
Referenced by getDomains(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
For each variable, when true, it's value is fixed.
Referenced by iter(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
The total number of solutions.
|
private |
The number of solutions left to iterate over.
Referenced by iter(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
All variables are binary, and will be either 0 or 1.
Referenced by iter().
|
private |
The set of assignments already.
Referenced by iter(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
The space over which we are iterating.
Referenced by iter(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().
|
private |
Variables over which to iterate.
Referenced by getVariablesOrder(), VRPiteratorBestFirst(), and VRPiteratorBestFirst().