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

The subproblem to be solved by a given agent. More...

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

Public Member Functions

Set< String > getAllVars ()
Set< String > getVariables ()
Set< String > getVariables (String owner)
 Returns the set of variables owned by a given agent.
Set< String > getMyVars ()
Set< String > getRandVars ()
int getNbrIntVars ()
int getNbrVars ()
int getNbrVars (String agent)
 Returns the number of variables owned by the input agent.
Set< String > getExtVars ()
Set< String > getAnonymVars ()
boolean addVariable (String name, String owner, String domain)
 Adds a new variable.
boolean addVariable (String name, String owner, V[] domain)
 Adds a new variable.
V[] getDomain (String var)
 Looks up the domain of a variable.
int getDomainSize (String var)
 Returns the size of the domain of the input variable.
boolean isRandom (String var)
 Returns whether the input variable is defined as a random variable.
boolean maximize ()
void setMaximize (boolean maximize)
 Sets whether utility should be maximized, or cost minimized.
void rescale (U multiply, U add)
 Rescales the problem.
void setDomain (String var, V[] dom)
 Sets the domain of a variable.
Map< String, String > getOwners ()
String getOwner (String var)
 Returns the name of the agent owning the input variable.
boolean setOwner (String var, String owner)
 Sets the owner agent for the input variable.
Map< String, Set< String > > getAgentNeighborhoods ()
Map< String, Set< String > > getAgentNeighborhoods (String owner)
 Gets the agent neighborhoods.
Map< String, Set< String > > getVarScopes ()
Map< String, Set< String > > getNeighborhoods ()
 Returns the neighborhood of each internal variable.
Map< String, Set< String > > getNeighborhoods (String agent)
 Returns the neighborhood of each variable owned by the input agent.
Map< String, Set< String > > getNeighborhoods (String agent, final boolean withAnonymVars, final boolean onlyAnonymVars)
 Returns the neighborhood of each variable owned by the input agent.
Map< String, Set< String > > getAnonymNeighborhoods ()
Map< String, Set< String > > getAnonymNeighborhoods (String agent)
 For each variable owned by the input agent, return its collection of neighbors with no specified owner.
Map< String, Integer > getNeighborhoodSizes ()
 Returns the number of neighboring variables of all internal variables.
Map< String, Integer > getNeighborhoodSizes (String agent)
 Returns the number of neighboring variables of all variables owned by the input agent.
Collection< String > getNeighborVars (String var)
 Returns the neighbors of the given variable.
HashSet< String > getNeighborVars (String var, final boolean withAnonymVars)
 Returns the collection of neighbors of a given variable.
int getNbrNeighbors (String var)
 Extracts the number of neighbors of an input variable.
int getNbrNeighbors (String var, final boolean withAnonymVars)
 Extracts the number of neighbors of an input variable.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces ()
 Returns the solution spaces in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (final boolean withAnonymVars)
 Returns the solution spaces in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (String var, Set< String > forbiddenVars)
 Returns the solution spaces involving the input variable and none of the forbidden variables.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (String var, final boolean withAnonymVars)
 Extracts solution spaces involving the input variable from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (String var, final boolean withAnonymVars, Set< String > forbiddenVars)
 Extracts solution spaces involving the input variable from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (Set< String > vars, final boolean withAnonymVars, Set< String > forbiddenVars)
 Extracts solution spaces involving the input variables from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getProbabilitySpaces ()
 Returns the probability spaces in the problem.
Map< String, ? extends UtilitySolutionSpace< V, U > > getProbabilitySpacePerRandVar ()
 Returns the probability space of each random variable in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getProbabilitySpaces (String var)
 Returns the probability spaces involving the input variable.
void setProbSpace (String var, Map< V, Double > prob)
 Adds to the problem a probability space for the input random variable.
boolean removeSpace (String name)
 Removes the space with the given name.
boolean addSolutionSpace (UtilitySolutionSpace< V, U > space)
 Adds a solution space to the problem.
UtilitySolutionSpace< V, U > addUnarySpace (String name, String var, V[] dom, U[] valuations)
 Add a unary solution space to the problem.
UtilitySolutionSpace< V, U > getUtility (Map< String, V > assignments)
 Computes the total utility of the input assignment to variables, ignoring variables with no specified owner.
UtilitySolutionSpace< V, U > getUtility (Map< String, V > assignments, final boolean withAnonymVars)
 Computes the total utility of the input assignment to variables.
UtilitySolutionSpace< V, U > getExpectedUtility (Map< String, V > assignments)
 Computes the expectation over the random variables of the utility for the input assignments.
UtilitySolutionSpace< V, U > getParamUtility (Map< String[], BasicUtilitySolutionSpace< V, ArrayList< V > > > assignments)
 Computes the total utility of the input assignment to variables, conditioned on the values of parameters.
int getNumberOfCoordinationConstraints ()
 Returns the number of spaces that are shared between different agents.
DCOPProblemInterface< V, U > getSubProblem (String agent)
void ground (String var, V val)
 Adds a constraint that enforces that var = val.
boolean addAgent (String agent)
 Adds an agent to the problem.
Public Member Functions inherited from frodo2.solutionSpaces.ProblemInterface< V, U >
void reset (ProblemInterface< V, U > newProblem)
 Resets this problem to be the same as the input one.
void setDomClass (Class< V > domClass)
 Sets the class to be used for variable values.
Class< V > getDomClass ()
void setUtilClass (Class< U > utilClass)
 Sets the class to be used for utility values.
Class< U > getUtilClass ()
getZeroUtility ()
getPlusInfUtility ()
getMinInfUtility ()
String getAgent ()
Set< String > getAgents ()
ProblemInterface< V, U > getSubProblem (String agent)
 Builds the subproblem description for a given agent by extracting it from the overall problem description.
boolean multipleTypes ()
void incrNCCCs (long incr)
 Increments the number of constraint checks.
long getNCCCs ()
void setNCCCs (long ncccs)
 Sets the NCCC count.

Detailed Description

The subproblem to be solved by a given agent.

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

Member Function Documentation

◆ addAgent()

boolean frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.addAgent ( String agent)

Adds an agent to the problem.

Parameters
agentthe name of the agent
Returns
true if the agent has been added; false if it was already defined in the problem

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ addSolutionSpace()

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

Adds a solution space to the problem.

Parameters
spacethe solution space
Returns
true if the space was added, false if the space's name is null or is already taken
Note
Ignores the relation name of this space, if any

Referenced by frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.addUnarySpace().

◆ addUnarySpace()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.addUnarySpace ( String name,
String var,
V[] dom,
U[] valuations )

Add a unary solution space to the problem.

Parameters
namethe name of the space
varthe unique variable in the space's scope
domthe allowed variable values
valuationsthe valuation for each variable value
Returns
the newly added space

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.notifyIn().

◆ addVariable() [1/2]

boolean frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.addVariable ( String name,
String owner,
String domain )

Adds a new variable.

Parameters
namevariable name
ownername of the variable's agent
domainreference to the variable's domain
Returns
true if the variable was added, false if a variable with the same name already exists or no domain with given name exists

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ addVariable() [2/2]

boolean frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.addVariable ( String name,
String owner,
V[] domain )

Adds a new variable.

Parameters
namevariable name
ownername of the variable's agent
domainvariable domain
Returns
true if the variable was added, false if a variable with the same name already exists

◆ getAgentNeighborhoods() [1/2]

◆ getAgentNeighborhoods() [2/2]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAgentNeighborhoods ( String owner)

Gets the agent neighborhoods.

Parameters
ownerthe owner agent, or null if we want all variables
Returns
for each variable owned by the input agent (or for each variable if the input is null), the collection of neighboring agents

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getAllVars()

Set< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAllVars ( )

◆ getAnonymNeighborhoods() [1/2]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAnonymNeighborhoods ( )
Returns
for each internal variable, its collection of neighbors with no specified owner

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >, and frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ getAnonymNeighborhoods() [2/2]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAnonymNeighborhoods ( String agent)

For each variable owned by the input agent, return its collection of neighbors with no specified owner.

Parameters
agentthe agent
Returns
for each internal variable, its set of neighbors with no specified owner

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >, and frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ getAnonymVars()

Set< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAnonymVars ( )
Returns
the variables with no specified owner

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getDomain()

V[] frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomain ( String var)

Looks up the domain of a variable.

Parameters
varthe name of the variable
Returns
the domain for the input variable, or null if the variable or its domain is unknown

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.init(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.Listener.Listener(), frodo2.algorithms.dpop.memory.LabelingPhase< V extends Addable< V > >.notifyIn(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.notifyIn(), frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.randomDomain(), frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.RerootRequester(), frodo2.algorithms.adopt.test.testADOPT.test(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.asodpop.tests.ASODPOPTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.UTILpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.test.ProblemTest.testGetDomain(), frodo2.algorithms.test.XCSPparserTest.testGetDomain(), frodo2.algorithms.test.XCSPparserTest.testGetDomainSize(), and frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.testRandom().

◆ getDomainSize()

◆ getExpectedUtility()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getExpectedUtility ( Map< String, V > assignments)

Computes the expectation over the random variables of the utility for the input assignments.

Parameters
assignmentsvalues for variables
Returns
the expectation of the utility for the input assignments

◆ getExtVars()

Set< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getExtVars ( )
Returns
the variables that are owned by a different agent

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

Referenced by frodo2.algorithms.test.XCSPparserTest.testGetExtVars().

◆ getMyVars()

◆ getNbrIntVars()

◆ getNbrNeighbors() [1/2]

◆ getNbrNeighbors() [2/2]

int frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNbrNeighbors ( String var,
final boolean withAnonymVars )

Extracts the number of neighbors of an input variable.

Parameters
varthe variable
withAnonymVarsif false, ignores variables with no specified owner
Returns
the number of neighbor variables of var

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNbrVars() [1/2]

◆ getNbrVars() [2/2]

int frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNbrVars ( String agent)

Returns the number of variables owned by the input agent.

Parameters
agentthe agent
Returns
the number of variables owned by the input agent

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNeighborhoods() [1/3]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoods ( )

◆ getNeighborhoods() [2/3]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoods ( String agent)

Returns the neighborhood of each variable owned by the input agent.

Parameters
agentthe agent
Returns
for each of the agent's variables, its collection of neighbors

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNeighborhoods() [3/3]

Map< String, Set< String > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoods ( String agent,
final boolean withAnonymVars,
final boolean onlyAnonymVars )

Returns the neighborhood of each variable owned by the input agent.

Parameters
agentthe agent
withAnonymVarsif false, ignores variables with no specified owner
onlyAnonymVarsif true, only considers variables with no specified owner (in which case this superseeds withAnonymVars)
Returns
for each of the agent's variables, its collection of neighbors

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNeighborhoodSizes() [1/2]

Map< String, Integer > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoodSizes ( )

Returns the number of neighboring variables of all internal variables.

Returns
for each internal variable, its number of neighboring variables
Warning
Ignores variables with no specified owner.

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNeighborhoodSizes() [2/2]

Map< String, Integer > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoodSizes ( String agent)

Returns the number of neighboring variables of all variables owned by the input agent.

Parameters
agentname of the agent
Returns
for each variable owned by the input agent, its number of neighboring variables
Warning
Ignores variables with no specified owner.

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNeighborVars() [1/2]

Collection< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborVars ( String var)

Returns the neighbors of the given variable.

Parameters
varthe variable
Returns
the neighbors
Warning
Ignores variables with no specified owner.

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.varOrdering.linear.LinearOrdering< V extends Addable< V >, U extends Addable< U > >.MaxWidthMinDom.getScore().

◆ getNeighborVars() [2/2]

HashSet< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborVars ( String var,
final boolean withAnonymVars )

Returns the collection of neighbors of a given variable.

Parameters
varthe name of the variable
withAnonymVarsif false, ignores variables with no specified owner
Returns
a collection of neighbor variables of var

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getNumberOfCoordinationConstraints()

int frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNumberOfCoordinationConstraints ( )

Returns the number of spaces that are shared between different agents.

Author
Brammert Ottens, 6 mrt 2010
Returns
the number of spaces that are shared between different agents

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getOwner()

◆ getOwners()

◆ getParamUtility()

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getParamUtility ( Map< String[], BasicUtilitySolutionSpace< V, ArrayList< V > > > assignments)

Computes the total utility of the input assignment to variables, conditioned on the values of parameters.

Parameters
assignmentsvalues for variables
Returns
the optimal conditional utility corresponding to the input assignment

◆ getProbabilitySpacePerRandVar()

◆ getProbabilitySpaces() [1/2]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getProbabilitySpaces ( )

◆ getProbabilitySpaces() [2/2]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getProbabilitySpaces ( String var)

Returns the probability spaces involving the input variable.

Parameters
varthe variable of interest
Returns
a list of spaces, or null if some information is missing

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ getRandVars()

◆ getSolutionSpaces() [1/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( )

Returns the solution spaces in the problem.

Returns
a list of spaces, or null if some information is missing
Warning
Ignores variables with unknown owners.

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.centralization(), frodo2.algorithms.adopt.ADOPT< Val extends Addable< Val >, U extends Addable< U > >.checkAllCostsNonNeg(), frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.checkAllCostsNonNeg(), frodo2.algorithms.synchbb.SynchBB< V extends Addable< V >, U extends Addable< U > >.checkAllCostsNonNeg(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.factorGraphToDOT(), 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.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.Listener.Listener(), frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn(), frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.parseSpaces(), frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.processLinearOrdering(), frodo2.algorithms.adopt.test.testADOPT.test(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.asodpop.tests.ASODPOPTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.UTILpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.test.ProblemTest.testGetSolutionSpaces(), frodo2.algorithms.test.XCSPparserTest.testGetSolutionSpaces(), frodo2.algorithms.test.XCSPparserTest.testGetSubProblem(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.testRandom(), and frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.testRandom().

◆ getSolutionSpaces() [2/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( final boolean withAnonymVars)

Returns the solution spaces in the problem.

Parameters
withAnonymVarswhether spaces involving variables with unknown owners should be taken into account
Returns
a list of spaces, or null if some information is missing

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getSolutionSpaces() [3/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( Set< String > vars,
final boolean withAnonymVars,
Set< String > forbiddenVars )

Extracts solution spaces involving the input variables from the constraints in the problem.

Returns
a list of hypercubes, or null if some information is missing in the problem file
Parameters
varsthe variables of interest
withAnonymVarswhether hypercubes involving variables with unknown owners should be taken into account
forbiddenVarsany space involving any of these variables will be ignored

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getSolutionSpaces() [4/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( String var,
final boolean withAnonymVars )

Extracts solution spaces involving the input variable from the constraints in the problem.

Returns
a list of hypercubes, or null if some information is missing in the problem file
Parameters
varthe variable of interest
withAnonymVarswhether hypercubes involving variables with unknown owners should be taken into account

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getSolutionSpaces() [5/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( String var,
final boolean withAnonymVars,
Set< String > forbiddenVars )

Extracts solution spaces involving the input variable from the constraints in the problem.

Returns
a list of hypercubes, or null if some information is missing in the problem file
Parameters
varthe variable of interest
withAnonymVarswhether hypercubes involving variables with unknown owners should be taken into account
forbiddenVarsany space involving any of these variables will be ignored

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getSolutionSpaces() [6/6]

List< ? extends UtilitySolutionSpace< V, U > > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces ( String var,
Set< String > forbiddenVars )

Returns the solution spaces involving the input variable and none of the forbidden variables.

Parameters
varthe variable of interest
forbiddenVarsany space involving any of these variables will be ignored
Returns
a list of spaces, or null if some information is missing

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getSubProblem()

DCOPProblemInterface< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSubProblem ( String agent)
See also
ProblemInterface.getSubProblem(java.lang.String)

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

Referenced by frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest.initiateParamAndListener(), frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.initiateParamAndListener(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.Listener.Listener(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.Listener(), frodo2.algorithms.dpop.privacy.test.SecureRerootingTest.randomTest(), frodo2.algorithms.dpop.privacy.test.VariableObfuscationTest< V extends Addable< V > >.randomTest(), frodo2.algorithms.dpop.privacy.test.SecureCircularRoutingTest.setUp(), frodo2.algorithms.adopt.test.testADOPT.test(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.asodpop.tests.ASODPOPTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.duct.tests.NormalizeInfTest.test(), frodo2.algorithms.duct.tests.NormalizeTest.test(), frodo2.algorithms.test.XCSPparserTest.testMaximize(), frodo2.algorithms.adopt.test.testPreprocessing.testRandom(), frodo2.algorithms.asodpop.tests.ASODPOPagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryAgentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTestBinaryDomains< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTestFullDomain< V extends Addable< V >, U extends Addable< U > >.testRandom(), and frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.testRandom().

◆ getUtility() [1/2]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getUtility ( Map< String, V > assignments)

Computes the total utility of the input assignment to variables, ignoring variables with no specified owner.

This methods actually returns a UtilitySolutionSpace. If not all variables in the problem are assigned a value, the space will represent the utility of the assignment, conditioned on the free variables. If all variables are grounded, the method returns a scalar UtilitySolutionSpace.

Parameters
assignmentsvalues for variables
Returns
the optimal (possibly conditional) utility corresponding to the input assignment

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.asodpop.tests.ASODPOPagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), and frodo2.algorithms.asodpop.tests.ASODPOPBinaryAgentTest< V extends Addable< V >, U extends Addable< U > >.testRandom().

◆ getUtility() [2/2]

UtilitySolutionSpace< V, U > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getUtility ( Map< String, V > assignments,
final boolean withAnonymVars )

Computes the total utility of the input assignment to variables.

This methods actually returns a UtilitySolutionSpace. If not all variables in the problem are assigned a value, the space will represent the utility of the assignment, conditioned on the free variables. If all variables are grounded, the method returns a scalar UtilitySolutionSpace.

Parameters
assignmentsvalues for variables
withAnonymVarsif false, ignores variable with no specified owner
Returns
the optimal (possibly conditional) utility corresponding to the input assignment

◆ getVariables() [1/2]

Set< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getVariables ( )
Returns
all variables with a known owner

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

Referenced by frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.checkModulus(), frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.CollaborativeDecryption(), frodo2.gui.jung.JungVisualizer.drawVertices(), frodo2.algorithms.varOrdering.factorgraph.FactorGraphGen< V extends Addable< V >, U extends Addable< U > >.factorGraphToDOT(), frodo2.algorithms.test.XCSPparserTest.getNeighborhoods(), frodo2.algorithms.heuristics.RandScoringHeuristic.getScores(), frodo2.algorithms.heuristics.SmallestDomainHeuristic.getScores(), frodo2.algorithms.heuristics.VarNameHeuristic.getScores(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.init(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.notifyIn(), frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.processLinearOrdering(), frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.RerootRequester(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.reset(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.revealSol(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.terminate(), frodo2.algorithms.adopt.test.testADOPT.test(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.asodpop.tests.ASODPOPTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.UTILpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.test.XCSPparserTest.testGetDomain(), frodo2.algorithms.test.XCSPparserTest.testGetDomainSize(), frodo2.algorithms.test.XCSPparserTest.testGetProbabilitySpacesForVar(), frodo2.algorithms.test.XCSPparserTest.testGetSolutionSpacesForVar(), frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.testRandom(), and frodo2.algorithms.test.XCSPparserTest.testSetDomain().

◆ getVariables() [2/2]

Set< String > frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getVariables ( String owner)

Returns the set of variables owned by a given agent.

Parameters
ownerthe name of the agent; if null, returns all variables with no specified owner
Returns
a set of variables owned by owner

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

◆ getVarScopes()

◆ ground()

void frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.ground ( String var,
V val )

Adds a constraint that enforces that var = val.

Parameters
varthe variable
valthe value

◆ isRandom()

◆ maximize()

◆ removeSpace()

boolean frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.removeSpace ( String name)

Removes the space with the given name.

Parameters
namethe name of the space
Returns
true if the space was present and had been removed

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ rescale()

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

Rescales the problem.

Parameters
multiplymultiplies all costs/utilities by multiply
addafter multiplying all costs/utilities by multiply (if required), adds add

Referenced by frodo2.algorithms.reformulation.ProblemRescaler< U extends Addable< U > >.notifyIn().

◆ setDomain()

void frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.setDomain ( String var,
V[] dom )

Sets the domain of a variable.

Parameters
varthe name of the variable
domthe domain; if empty, does nothing

Referenced by frodo2.algorithms.test.XCSPparserTest.testSetDomain().

◆ setMaximize()

void frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.setMaximize ( boolean maximize)

Sets whether utility should be maximized, or cost minimized.

Parameters
maximizetrue iff this should be a maximization problem

Implemented in frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.

References maximize().

Referenced by frodo2.algorithms.reformulation.ProblemRescaler< U extends Addable< U > >.notifyIn().

Here is the call graph for this function:

◆ setOwner()

boolean frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.setOwner ( String var,
String owner )

Sets the owner agent for the input variable.

Parameters
varthe variable
ownerthe owner
Returns
false if the owner was not changed because the variable does not exist

Implemented in frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.

◆ setProbSpace()

void frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.setProbSpace ( String var,
Map< V, Double > prob )

Adds to the problem a probability space for the input random variable.

Parameters
varrandom variable
probweighted samples

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