FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > > Interface Template Reference

This interface defines common functionalities in utility solution spaces in which the utilities are Addable. More...

Inheritance diagram for frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >:

Classes

class  ProjOutput
 The result of a projection. More...
interface  SparseIterator
 A UtilitySolutionSpace iterator that skips infeasible solutions. More...
interface  Iterator
 A UtilitySolutionSpace iterator that does NOT skip infeasible solutions. More...
interface  IteratorBestFirst
 A BasicUtilitySolutionSpace iterator that returns items in a best first order. More...

Public Member Functions

UtilitySolutionSpace< V, U > clone ()
UtilitySolutionSpace< V, U > resolve ()
UtilitySolutionSpace< V, U > resolve (boolean sparse)
Hypercube< V, U > toHypercube ()
boolean isIncludedIn (UtilitySolutionSpace< V, U > space)
 Checks if this UtilitySolutionSpace is included in the provided UtilitySolutionSpace.
UtilitySolutionSpace< V, U > changeVariablesOrder (String[] variables_order)
UtilitySolutionSpace< V, U > join (UtilitySolutionSpace< V, U > space, String[] total_variables)
 Returns a UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace object with the one provided as a parameter.
UtilitySolutionSpace< V, U > slice (String[] variables_names, V[][] sub_domains)
 Returns a slice of this UtilitySolutionSpace.
UtilitySolutionSpace< V, U > slice (String[] variables_names, V[] values)
 Returns a slice of this UtilitySolutionSpace.
UtilitySolutionSpace< V, U > slice (String var, V[] subDomain)
 Slices this UtilitySolutionSpace over a single variable.
UtilitySolutionSpace< V, U > slice (String var, V val)
 Slices this UtilitySolutionSpace over a single variable-value assignment.
UtilitySolutionSpace< V, U > slice (V[] variables_values)
 Returns a slice of this UtilitySolutionSpace.
UtilitySolutionSpace< V, U > join (UtilitySolutionSpace< V, U > space)
 Computes the join of this UtilitySolutionSpace with the input UtilitySolutionSpace.
UtilitySolutionSpace< V, U > joinMinNCCCs (UtilitySolutionSpace< V, U > space)
 A version of the join method that minimizes the utility lookups in the caller space and the input spaces.
UtilitySolutionSpace< V, U > join (UtilitySolutionSpace< V, U >[] spaces)
 Returns a UtilitySolutionSpace object obtained by joining the UtilitySolutionSpace for which this method is called and the UtilitySolutionSpace present in the array of UtilitySolutionSpace given to this method as a parameter.
UtilitySolutionSpace< V, U > joinMinNCCCs (UtilitySolutionSpace< V, U >[] spaces)
 A version of the join method that minimizes the utility lookups in the caller space and the input spaces.
UtilitySolutionSpace< V, U > multiply (UtilitySolutionSpace< V, U > space, String[] total_variables)
 Returns a UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace object with the one provided as a parameter.
UtilitySolutionSpace< V, U > multiply (UtilitySolutionSpace< V, U > space)
 Computes the join of this UtilitySolutionSpace with the input UtilitySolutionSpace.
UtilitySolutionSpace< V, U > multiply (UtilitySolutionSpace< V, U >[] spaces)
 Returns a UtilitySolutionSpace object obtained by joining the UtilitySolutionSpace for which this method is called and the UtilitySolutionSpace present in the array of UtilitySolutionSpace given to this method as a parameter.
ProjOutput< V, U > consensus (String varOut, Map< String, UtilitySolutionSpace< V, U > > distributions, boolean maximum)
 A projection operation that uses the consensus approach.
ProjOutput< V, U > consensusExpect (String varOut, Map< String, UtilitySolutionSpace< V, U > > distributions, boolean maximum)
 The composition of the consensus and expectation operations.
ProjOutput< V, U > consensusAllSols (String varOut, Map< String, UtilitySolutionSpace< V, U > > distributions, boolean maximum)
 A projection operation that uses the advanced consensus approach.
ProjOutput< V, U > consensusAllSolsExpect (String varOut, Map< String, UtilitySolutionSpace< V, U > > distributions, boolean maximum)
 The composition of the consensusAllSols and expectation operations.
ProjOutput< V, U > project (String[] variables_names, boolean maximum)
 Projects variables out of this UtilitySolutionSpace.
ProjOutput< V, U > project (int number_to_project, boolean maximum)
 Projects a given number of variables out of this UtilitySolutionSpace.
ProjOutput< V, U > projectAll (boolean maximum)
 Projects all variables.
ProjOutput< V, U > projectAll (boolean maximum, String[] order)
 Projects all variables.
ProjOutput< V, U > project (String variable_name, boolean maximum)
 Projects a single variable out of this UtilitySolutionSpace.
UtilitySolutionSpace< V, U > blindProject (String varOut, boolean maximize)
UtilitySolutionSpace< V, U > blindProject (String[] varsOut, boolean maximize)
blindProjectAll (boolean maximize)
UtilitySolutionSpace< V, U > min (String variable)
UtilitySolutionSpace< V, U > max (String variable)
UtilitySolutionSpace< V, U > split (U threshold, boolean maximum)
 Returns a UtilitySolutionSpace containing all solutions corresponding to utility values bigger/smaller than the provided threshold.
UtilitySolutionSpace< V, U > compose (String[] vars, BasicUtilitySolutionSpace< V, ArrayList< V > > substitution)
UtilitySolutionSpace< V, U > expectation (Map< String, UtilitySolutionSpace< V, U > > distributions)
 Computes the expectation of this utility space over the input random variables, conditioned on the input probability space.
ProjOutput< V, U > projExpectMonotone (String varOut, Map< String, UtilitySolutionSpace< V, U > > distributions, boolean maximum)
 An optimize expectation().project() operator that assumes that all costs are non-negative (or all utilities non-positive).
Map< V, Double > sample (int nbrSamples)
 Samples this single-variable probability space.
UtilitySolutionSpace< V, U > rescale (U add, U multiply)
 Rescales the utilities in this space.
IteratorBestFirst< V, U > iteratorBestFirst (boolean maximize)
IteratorBestFirst< V, U > iteratorBestFirst (boolean maximize, String[] fixedVariables, V[] fixedValues)
SparseIterator< V, U > sparseIter ()
SparseIterator< V, U > sparseIter (String[] order)
SparseIterator< V, U > sparseIter (String[] variables, V[][] domains)
SparseIterator< V, U > sparseIter (String[] variables, V[][] domains, V[] assignment)
Iterator< V, U > iterator ()
Iterator< V, U > iterator (String[] order)
Iterator< V, U > iterator (String[] variables, V[][] domains)
Iterator< V, U > iterator (String[] variables, V[][] domains, V[] assignment)
Public Member Functions inherited from frodo2.solutionSpaces.UtilitySolutionSpaceLimited< V, U, U >
UtilitySolutionSpaceLimited< V, U, UL > join (UtilitySolutionSpace< V, U > space)
 Binary join operation.
UtilitySolutionSpaceLimited< V, U, UL > joinMinNCCCs (UtilitySolutionSpace< V, U > space)
 A version of the join method that minimizes the utility lookups in the caller space and the input space.
UtilitySolutionSpaceLimited< V, U, UL > blindProject (String varOut, boolean maximize)
 Projects out the input variable without computing the corresponding optimal assignments.
UL blindProjectAll (boolean maximize)
 Projects out all variables without computing the corresponding optimal assignments.
UtilitySolutionSpaceLimited< V, U, UL > min (String variable)
 Project out a variable by minimizing over it, without computing the argmin.
UtilitySolutionSpaceLimited< V, U, UL > max (String variable)
 Project out a variable by maximizing over it, without computing the argmax.
UtilitySolutionSpaceLimited< V, U, UL > slice (String var, V val)
UtilitySolutionSpaceLimited< V, U, UL > resolve ()

Detailed Description

This interface defines common functionalities in utility solution spaces in which the utilities are Addable.

Author
Radoslaw Szymanek, Thomas Leaute
Parameters
<V>the type used for variable values
<U>the type used for utility values

Member Function Documentation

◆ blindProject() [1/2]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.blindProject ( String varOut,
boolean maximize )
See also
UtilitySolutionSpaceLimited.blindProject(String, boolean)

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

Referenced by frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.blindProject(), frodo2.algorithms.adopt.test.testPreprocessing.calculateDP1(), frodo2.algorithms.adopt.test.testPreprocessing.calculateDP2(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.algorithms.maxsum.MaxSum< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP2< Val extends Addable< Val >, U extends Addable< U > >.processDFSOutput(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.projectAndSend(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendOutput(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendToParent(), frodo2.algorithms.adopt.test.testADOPT.simulateUTIL(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.Listener.simulateUTIL(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().

◆ blindProject() [2/2]

◆ blindProjectAll()

◆ changeVariablesOrder()

◆ clone()

◆ compose()

◆ consensus()

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensus ( String varOut,
Map< String, UtilitySolutionSpace< V, U > > distributions,
boolean maximum )

A projection operation that uses the consensus approach.

When choosing the "best" value for the variable that is projected out, instead of choosing, for each case, the optimal value, this method chooses the value that is optimal in most cases, when the values of the random variables are allowed to vary.

Parameters
varOutthe variable that is projected out
distributionsfor each random variable, its weighted samples/probability distribution
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project().

◆ consensusAllSols()

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusAllSols ( String varOut,
Map< String, UtilitySolutionSpace< V, U > > distributions,
boolean maximum )

A projection operation that uses the advanced consensus approach.

The normal consensus approach computes one optimal solution per scenario, risking to miss very promising optimal solutions. This advanced consensus approach compute ALL optimal solutions for each scenario.

Parameters
varOutthe variable that is projected out
distributionsfor each random variable, its weighted samples/probability distribution
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments
See also
UtilitySolutionSpace#consensus(String, Map, boolean)

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project().

◆ consensusAllSolsExpect()

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusAllSolsExpect ( String varOut,
Map< String, UtilitySolutionSpace< V, U > > distributions,
boolean maximum )

The composition of the consensusAllSols and expectation operations.

See also
UtilitySolutionSpace#consensusAllSols(String, Map, boolean)
Parameters
varOutthe variable that is projected out
distributionsfor each random variable, its weighted samples/probability distribution
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), and frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project().

◆ consensusExpect()

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusExpect ( String varOut,
Map< String, UtilitySolutionSpace< V, U > > distributions,
boolean maximum )

The composition of the consensus and expectation operations.

See also
UtilitySolutionSpace#consensus(String, Map, boolean)
Parameters
varOutthe variable that is projected out
distributionsfor each random variable, its weighted samples/probability distribution
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), and frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project().

◆ expectation()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.expectation ( Map< String, UtilitySolutionSpace< V, U > > distributions)

◆ isIncludedIn()

boolean frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.isIncludedIn ( UtilitySolutionSpace< V, U > space)

Checks if this UtilitySolutionSpace is included in the provided UtilitySolutionSpace.

"Inclusion" means that both spaces contain the same variables, and all assignments in this UtilitySolutionSpace appear with the same utility values in the input UtilitySolutionSpace.

Note
This function uses the compareTo() functionality of the type U.
Parameters
spaceUtilitySolutionSpace object
Returns
true if this UtilitySolutionSpace is included in the provided UtilitySolutionSpace object, and false otherwise
See also
BasicUtilitySolutionSpace#isIncludedIn(BasicUtilitySolutionSpace)

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ iterator() [1/4]

Iterator< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator ( )
See also
BasicUtilitySolutionSpace.iterator()

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

Referenced by frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.blindProject(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.compose(), frodo2.solutionSpaces.hypercube.ExpectationOutput< V extends Addable< V >, U extends Addable< U > >.ExpectationOutput(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.projectAndSend(), frodo2.solutionSpaces.hypercube.BlindProjectOutput< V extends Addable< V >, U extends Addable< U > >.resolve(), frodo2.solutionSpaces.hypercube.ExpectationOutput< V extends Addable< V >, U extends Addable< U > >.resolve(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sliceSpaces(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), and frodo2.algorithms.dpop.count.test.TestCountSolutions.testRandom().

◆ iterator() [2/4]

◆ iterator() [3/4]

Iterator< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator ( String[] variables,
V domains[][] )

◆ iterator() [4/4]

Iterator< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator ( String[] variables,
V domains[][],
V[] assignment )

◆ iteratorBestFirst() [1/2]

IteratorBestFirst< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iteratorBestFirst ( boolean maximize)

◆ iteratorBestFirst() [2/2]

IteratorBestFirst< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iteratorBestFirst ( boolean maximize,
String[] fixedVariables,
V[] fixedValues )
Parameters
maximizetrue when the order is from high to low utility, and false when the order is from low to high cost
fixedVariablesvariables whose values are fixed
fixedValuesthe values to which the variables are fixed
Returns
an iterator which allows to iterate over the solutions and their utilities in best first order

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ join() [1/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join ( UtilitySolutionSpace< V, U > space)

Computes the join of this UtilitySolutionSpace with the input UtilitySolutionSpace.

Utilities are added to each other.

The order of the variables in the resulting UtilitySolutionSpace is not defined.

Parameters
spacethe UtilitySolutionSpace to join with this one
Returns
The UtilitySolutionSpace resulting from the join of the input one with this one

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ join() [2/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join ( UtilitySolutionSpace< V, U > space,
String[] total_variables )

Returns a UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace object with the one provided as a parameter.

Utilities are added to each other.

Parameters
spacethe UtilitySolutionSpace to join with this one
total_variablesthe order of the variables to be used in the resulting UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace with the one provided as a parameter

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.blindProject(), frodo2.algorithms.adopt.test.testPreprocessing.calculateDP1(), frodo2.algorithms.adopt.test.testPreprocessing.calculateDP2(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.compose(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.expectation(), frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.getLocalSpace(), frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.h(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.init(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.solutionSpaces.hypercube.ScalarHypercube< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.join(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.joinMinNCCCs(), frodo2.algorithms.dpop.param.ParamUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.notifyIn(), frodo2.algorithms.maxsum.MaxSum< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.projectAndSend(), frodo2.algorithms.adopt.test.testADOPT.simulateUTIL(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.Listener.simulateUTIL(), frodo2.algorithms.dpop.param.test.ParamVALUEtest< U extends Addable< U > >.Listener.simulateUTILslice(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.simulateUTILslice(), frodo2.algorithms.adopt.test.testADOPT.startADOPT(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.startUTIL(), frodo2.algorithms.adopt.ADOPT< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo< Val extends Addable< Val >, U extends Serializable &Addable< U > >.storeConstraint(), frodo2.algorithms.duct.Sampling< V extends Addable< V > >.VariableInfo.storeConstraint(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testCompoundBestFirstIterator(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testJoinRandom(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testProjectionRandom(), frodo2.algorithms.dpop.count.test.TestCountSolutions.testRandom(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testSmartJoinRandom().

◆ join() [3/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join ( UtilitySolutionSpace< V, U >[] spaces)

Returns a UtilitySolutionSpace object obtained by joining the UtilitySolutionSpace for which this method is called and the UtilitySolutionSpace present in the array of UtilitySolutionSpace given to this method as a parameter.

Utilities are added to each other.

The order of the variables in the resulting UtilitySolutionSpace is not defined.

Parameters
spacesan array of the UtilitySolutionSpaces to be added to this UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace with all the UtilitySolutionSpaces in the array of UtilitySolutionSpaces
Todo
Implement joinMutable(), which modifies one of its inputs if it is big enough to contain the output.

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ joinMinNCCCs() [1/2]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.joinMinNCCCs ( UtilitySolutionSpace< V, U > space)

A version of the join method that minimizes the utility lookups in the caller space and the input spaces.

Parameters
spacethe UtilitySolutionSpace to join with this one
Returns
The UtilitySolutionSpace resulting from the join of the input one with this one
See also
UtilitySolutionSpace#join(UtilitySolutionSpace)

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.joinMinNCCCs(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.joinMinNCCCs(), and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.joinMinNCCCs().

◆ joinMinNCCCs() [2/2]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.joinMinNCCCs ( UtilitySolutionSpace< V, U >[] spaces)

A version of the join method that minimizes the utility lookups in the caller space and the input spaces.

Parameters
spacesan array of the UtilitySolutionSpaces to be added to this UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace with all the UtilitySolutionSpaces in the array of UtilitySolutionSpaces
See also
UtilitySolutionSpace#join(UtilitySolutionSpace[])

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ max()

◆ min()

◆ multiply() [1/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.multiply ( UtilitySolutionSpace< V, U > space)

Computes the join of this UtilitySolutionSpace with the input UtilitySolutionSpace.

Utilities are multiplied with each other.

The order of the variables in the resulting UtilitySolutionSpace is not defined.

Parameters
spacethe UtilitySolutionSpace to join with this one
Returns
The UtilitySolutionSpace resulting from the join of the input one with this one

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ multiply() [2/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.multiply ( UtilitySolutionSpace< V, U > space,
String[] total_variables )

Returns a UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace object with the one provided as a parameter.

Utilities are multiplied with each other.

Parameters
spacethe UtilitySolutionSpace to join with this one
total_variablesthe order of the variables to be used in the resulting UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace with the one provided as a parameter

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.blindProject(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.compose(), frodo2.solutionSpaces.hypercube.JoinOutputHypercube< V extends Addable< V >, U extends Addable< U > >.expectation(), frodo2.solutionSpaces.hypercube.ExpectationOutput< V extends Addable< V >, U extends Addable< U > >.ExpectationOutput(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.multiply(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.multiply(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.projExpectMonotone(), rescale(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testSmartJoinRandom().

◆ multiply() [3/3]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.multiply ( UtilitySolutionSpace< V, U >[] spaces)

Returns a UtilitySolutionSpace object obtained by joining the UtilitySolutionSpace for which this method is called and the UtilitySolutionSpace present in the array of UtilitySolutionSpace given to this method as a parameter.

Utilities are multiplied to each other.

The order of the variables in the resulting UtilitySolutionSpace is not defined.

Parameters
spacesan array of the UtilitySolutionSpaces to be multiplied with this UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by joining this UtilitySolutionSpace with all the UtilitySolutionSpaces in the array of UtilitySolutionSpaces

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ project() [1/3]

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project ( int number_to_project,
boolean maximum )

Projects a given number of variables out of this UtilitySolutionSpace.

The variables projected out are the last number_to_project variables in the UtilitySolutionSpace

Parameters
number_to_projectnumber of variables to project out
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments
See also
UtilitySolutionSpace.project(String[], boolean)

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

◆ project() [2/3]

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project ( String variable_name,
boolean maximum )

Projects a single variable out of this UtilitySolutionSpace.

Parameters
variable_namethe variable to project out
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments
See also
UtilitySolutionSpace.project(String[], boolean)
Todo
When a single variable is projected out, it is more efficient to represent the conditional optimal assignments as a BasicUtilitySolutionSpace < V, V > rather than a BasicUtilitySolutionSpace <V, ArrayList<V>>.

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

◆ project() [3/3]

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project ( String[] variables_names,
boolean maximum )

Projects variables out of this UtilitySolutionSpace.

"Projecting" a variable means that this variable is removed, by optimizing over its domain. The projection methods actually have two outputs: the UtilitySolutionSpace that results from projecting over the given variables, and the conditional optimal assignments to the projected variables, which can be represented using a BasicUtilitySolutionSpace whose utility values are optimal assignments.

Parameters
variables_namesthe variables to be projected out
maximumtrue if we should maximize the utility; false if it should be minimized
Returns
a ProjOutput object that represents the pair resulting space - conditional optimal assignments

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.project(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testProjectionRandom().

◆ projectAll() [1/2]

◆ projectAll() [2/2]

◆ projExpectMonotone()

ProjOutput< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.projExpectMonotone ( String varOut,
Map< String, UtilitySolutionSpace< V, U > > distributions,
boolean maximum )

An optimize expectation().project() operator that assumes that all costs are non-negative (or all utilities non-positive).

Parameters
varOutthe variable to project out
distributionsfor each random variable, its weighted samples/probability distribution
maximumwhether to maximize of minimize
Returns
the output of the projection

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), and frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project().

◆ rescale()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.rescale ( U add,
U multiply )

Rescales the utilities in this space.

Author
Brammert Ottens, 9 mrt. 2012
Parameters
addadd this value to all utilities
multiplymultiply all utilities with this value
Returns
a rescaled utility space
Note
The multiplication is performed after the addition.

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

References multiply().

Here is the call graph for this function:

◆ resolve() [1/2]

◆ resolve() [2/2]

◆ sample()

◆ slice() [1/5]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice ( String var,
V val )

Slices this UtilitySolutionSpace over a single variable-value assignment.

Parameters
varthe variable to be assigned a value
valthe value to assign to the variable
Returns
the UtilitySolutionSpace resulting from this slice

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ slice() [2/5]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice ( String var,
V[] subDomain )

Slices this UtilitySolutionSpace over a single variable.

Parameters
varthe variable to be assigned a value
subDomainthe new domain for this variable (must be a subset of the original domain)
Returns
the UtilitySolutionSpace resulting from this slice

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ slice() [3/5]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice ( String[] variables_names,
V[] values )

Returns a slice of this UtilitySolutionSpace.

Slicing corresponds to grounding some of the variables.

Parameters
variables_namesthe variables to slice
valuesthe values for the variables
Returns
a UtilitySolutionSpace representing a slice of this UtilitySolutionSpace

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ slice() [4/5]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice ( String[] variables_names,
V sub_domains[][] )

Returns a slice of this UtilitySolutionSpace.

Slicing corresponds to reducing the domains of some of the variables.

Parameters
variables_namesthe variables to slice
sub_domainsthe new domains for the variables
Returns
a UtilitySolutionSpace representing a slice of this UtilitySolutionSpace

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.getLocalSpace(), frodo2.algorithms.Problem< V extends Addable< V >, U extends Addable< U > >.getUtility(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getUtility(), frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.getUtility(), frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.getUtility(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.groundVars(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.projectAndSend(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.simulateUTILslice(), frodo2.solutionSpaces.hypercube.BlindProjectOutput< V extends Addable< V >, U extends Addable< U > >.slice(), frodo2.solutionSpaces.hypercube.BlindProjectOutput< V extends Addable< V >, U extends Addable< U > >.slice(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sliceSpaces(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testSliceRandom().

◆ slice() [5/5]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice ( V[] variables_values)

Returns a slice of this UtilitySolutionSpace.

Parameters
variables_valuesarray containing values of the last variables of the UtilitySolutionSpace
Returns
UtilitySolutionSpace object obtained by associating given values to the last variables of the UtilitySolutionSpace. The number of these variables depends on the length of the provided array of variable values.

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.

◆ sparseIter() [1/4]

◆ sparseIter() [2/4]

◆ sparseIter() [3/4]

SparseIterator< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.sparseIter ( String[] variables,
V domains[][] )

◆ sparseIter() [4/4]

SparseIterator< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.sparseIter ( String[] variables,
V domains[][],
V[] assignment )

◆ split()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.split ( U threshold,
boolean maximum )

Returns a UtilitySolutionSpace containing all solutions corresponding to utility values bigger/smaller than the provided threshold.

Parameters
thresholdthe threshold
maximumtrue if we should keep solutions with utility values higher than the threshold; false if lower
Returns
the resulting UtilitySolutionSpace

Implemented in frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >, frodo2.solutionSpaces.vehiclerouting.CompoundSpace< U extends Addable< U > >, and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.

◆ toHypercube()


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