FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator Class Reference

Iterator. More...

Inheritance diagram for frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator:

Public Member Functions

 VRPiterator (String[] variables, AddableInteger[][] domains, U skippedUtil)
 Constructor.
AddableInteger[] nextSolution ()
U nextUtility ()
U nextUtility (U bound, final boolean minimize)
U getCurrentUtility ()
U getCurrentUtility (U bound, final boolean minimize)
Public Member Functions inherited from frodo2.solutionSpaces.hypercube.ScalarSpaceIter< V extends Addable< V >, U extends Addable< U > >
 ScalarSpaceIter (U utility, U infeasibleUtil, U skippedUtil)
 Constructor.
 ScalarSpaceIter (U utility, String[] variables, V[][] domains, U infeasibleUtil, U skippedUtil)
 Constructor.
String toString ()
Public Member Functions inherited from frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >
long getNbrSolutions ()
V[] nextSolution ()
U nextUtility ()
V[] getCurrentSolution ()
U getCurrentUtility ()
void setCurrentUtility (U util)
 Sets the utility of the current solution.
String[] getVariablesOrder ()
V[][] getDomains ()
boolean hasNext ()
void update ()
Public Member Functions inherited from frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >
void setCurrentUtility (U util)
 Sets the utility of the current solution.
Public Member Functions inherited from frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >
V[] getCurrentSolution ()
String[] getVariablesOrder ()
V[][] getDomains ()
void update ()
 It is supposed to be called if the solution space upon which the iterator is based has changed.
Public Member Functions inherited from frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >
long getNbrSolutions ()
boolean hasNext ()

Private Member Functions

AddableInteger[] nextSolBlind ()

Private Attributes

final U minCost
 The optimal cost for serving only the already selected customers.

Additional Inherited Members

Protected Member Functions inherited from frodo2.solutionSpaces.hypercube.ScalarSpaceIter< V extends Addable< V >, U extends Addable< U > >
 ScalarSpaceIter ()
 Empty constructor.
 ScalarSpaceIter (U utility, String[] variables, V[][] domains, V[] assignment, U infeasibleUtil, U skippedUtil)
 Constructor.
Protected Member Functions inherited from frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >
 ScalarBasicSpaceIter ()
 Empty constructor.
void init (U utility, String[] variables, V[][] domains, V[] assignment)
 Helper method called by the constructor.
void iter ()
 Moves to the next solution.
Protected Attributes inherited from frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >
U utility
 Current utility value.
V[] solution
 Current variable assignments.
long nbrSolLeft
 The number of solutions left to iterate over.
U skippedUtil
 The utility value that should be skipped, if any.
U inf
 The infeasible utility.

Detailed Description

Constructor & Destructor Documentation

◆ VRPiterator()

Member Function Documentation

◆ getCurrentUtility() [1/2]

◆ getCurrentUtility() [2/2]

U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator.getCurrentUtility ( U bound,
final boolean minimize )
See also
Iterator.getCurrentUtility(java.lang.Object, boolean)

Reimplemented from frodo2.solutionSpaces.hypercube.ScalarSpaceIter< V extends Addable< V >, U extends Addable< U > >.

References getCurrentUtility(), and minCost.

Here is the call graph for this function:

◆ nextSolBlind()

AddableInteger[] frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator.nextSolBlind ( )
private
Returns
the next solution, regardless of whether it is feasible or not

References frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >.iter(), frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >.nbrSolLeft, and frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V, U >.solution.

Referenced by nextSolution().

Here is the call graph for this function:

◆ nextSolution()

◆ nextUtility() [1/2]

◆ nextUtility() [2/2]

U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator.nextUtility ( U bound,
final boolean minimize )
See also
Iterator.nextUtility(java.lang.Object, boolean)

Reimplemented from frodo2.solutionSpaces.hypercube.ScalarSpaceIter< V extends Addable< V >, U extends Addable< U > >.

References minCost, and nextUtility().

Here is the call graph for this function:

Member Data Documentation

◆ minCost

final U frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator.minCost
private

The optimal cost for serving only the already selected customers.

Referenced by getCurrentUtility(), and nextUtility().


The documentation for this class was generated from the following file: