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

An XCSP parser that generates spaces based on JaCoP. More...

Inheritance diagram for frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >:

Classes

enum  ConstraintType
 Constraint type. More...

Public Member Functions

 JaCoPxcspParser (Document probDoc)
 Constructor.
 JaCoPxcspParser (Document probDoc, Element params)
 Constructor.
void setUtilClass (Class< V > valuationClass)
void parseConstraint (ArrayList< JaCoPutilSpace< V > > spaces, Element constraint, HashMap< String, AddableInteger[]> variablesHashMap, Element relation, Set< String > vars, final boolean getProbs, final boolean withAnonymVars, V infeasibleValuation, Set< String > forbiddenVars)
 Parses a constraint.
Document groundVars (String[] vars, AddableInteger[] assignments)
Document switchMaxMin (int shiftInt)
void reset (ProblemInterface< AddableInteger, V > newProblem)
UtilitySolutionSpace< AddableInteger, V > getUtility (Map< String, AddableInteger > assignments, final boolean withAnonymVars)
void rescale (V multiply, V add)
 Rescales the problem.
JaCoPxcspParser< V > getSubProblem (String agent)
JaCoPproblem< V > parse ()
Public Member Functions inherited from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >
 XCSPparser ()
 Empty constructor.
 XCSPparser (Element root)
 Constructor from a JDOM root Element in XCSP format.
 XCSPparser (Document doc)
 Constructor from a JDOM Document in XCSP format.
 XCSPparser (Document doc, Boolean countNCCCs)
 Constructor from a JDOM Document in XCSP format.
 XCSPparser (Document doc, Boolean countNCCCs, HashSet< String > spacesToIgnore)
 Constructor from a JDOM Document in XCSP format.
 XCSPparser (Document doc, boolean countNCCCs, boolean extendedRandNeighborhoods)
 Constructor from a JDOM Document in XCSP format.
 XCSPparser (Document doc, boolean countNCCCs, boolean extendedRandNeighborhoods, boolean publicAgents)
 Constructor from a JDOM Document in XCSP format.
 XCSPparser (Document doc, Element params)
 Constructor.
void setDomClass (Class< V > domClass)
 Sets the class to be used for variable values.
Class< V > getDomClass ()
void addSpaceToIgnore (String spaceToIgnore)
 Adds a space to be ignored.
void setUtilClass (Class< U > utilClass)
 Sets the class to be used for utility values.
String getAgent ()
getZeroUtility ()
getPlusInfUtility ()
getMinInfUtility ()
List< ? extends UtilitySolutionSpace< V, U > > getProbabilitySpaces ()
 Extracts probability spaces from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getProbabilitySpaces (String var)
 Extracts probability spaces involving the input variable from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces ()
 Returns the solution spaces in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (String var)
 Extracts solution spaces involving the input variable from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (final boolean withAnonymVars)
 Extracts solution spaces from the constraints in the problem.
List< ? extends UtilitySolutionSpace< V, U > > getSolutionSpaces (DCOPProblemInterface< V, U > problem, final boolean withAnonymVars)
 Extracts solution spaces from the constraints in the problem.
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, 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, 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, boolean withAnonymVars, Set< String > forbiddenVars)
 Extracts solution spaces involving the input variables from the constraints in the problem.
boolean isCountingNCCCs ()
void incrNCCCs (long incr)
 Increments the number of constraint checks.
void setNCCCs (long ncccs)
 Sets the NCCC count.
long getNCCCs ()
boolean removeSpace (String name)
 Removes the space with the given name.
boolean addSolutionSpace (UtilitySolutionSpace< V, U > space)
 Adds a solution space to the problem.
Set< String > getAgents ()
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, String > getOwners ()
int getNbrVars ()
 Extracts the number of variables in the problem.
int getNbrVars (String owner)
 Computes the number of variables owned by the input agent.
int getNbrIntVars ()
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 > 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.
HashSet< String > getNeighborVars (String var)
 Extracts the collection of neighbors of a given variable.
HashSet< String > getNeighborVars (String var, final boolean withAnonymVars)
 Extracts 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.
Map< String, HashSet< String > > getNeighborhoods (String agent)
 Parses the problem description to construct, for each variable owned by the input agent, its list of neighbors.
Map< String, HashSet< String > > getNeighborhoods ()
 Returns the neighborhood of each internal variable.
Map< String, HashSet< String > > getAnonymNeighborhoods (String agent)
 Parses the problem description to construct, for each variable owned by the input agent, its list of neighbors with no specified owner.
Map< String, HashSet< String > > getAnonymNeighborhoods ()
Map< String, HashSet< String > > getNeighborhoods (String agent, final boolean withAnonymVars, final boolean onlyAnonymVars)
 Parses the problem description to construct, for each variable owned by the input agent, its list of neighbors.
Map< String, Integer > getNeighborhoodSizes (String agent)
 Computes the number of neighboring variables of all variables owned by a given agent.
Map< String, Integer > getNeighborhoodSizes ()
 Returns the number of neighboring variables of all internal variables.
Map< String, Collection< String > > getAgentNeighborhoods (String agent)
 Gets the agent neighborhoods.
Map< String, Collection< String > > getAgentNeighborhoods ()
Map< String, Collection< String > > getBackyardNeighborhood (String var)
 This method only makes sense in subclasses of XCSPparser that handle backyard variables.
int getDomainSize (String var)
 Extracts the size of the domain of the input variable.
V[] getDomain (String var)
 Extracts the domain of a given variable.
void setDomain (String var, V[] dom)
 Sets the domain of a variable in the problem.
void setProbSpace (String var, Map< V, Double > prob)
 Adds to the problem a probability space for the input random variable.
String toString ()
String toDOT ()
boolean isRandom (String var)
 Returns whether the input variable is defined as a random variable.
Document groundVars (String[] vars, V[] values)
 Transforms the problem into one where some variables' values have been fixed.
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.
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 reset (ProblemInterface< V, U > newProblem)
 Resets this problem to be the same as the input one.
int getNumberOfCoordinationConstraints ()
 Returns the number of spaces that are shared between different agents.
boolean multipleTypes ()
UtilitySolutionSpace< V, U > addUnarySpace (String name, String var, V[] dom, U[] utils)
 Add a unary solution space to the problem.
Public Member Functions inherited from frodo2.algorithms.ParserInterface< V, U >
ProblemInterface< V, U > parse ()

Static Public Member Functions

static void parseRelation (Element constraint, Element relation, StoreCloneable store, List< Constraint > constraints, List< DecomposedConstraint< Constraint > > decompCons, ArrayList< IntVarCloneable > valuationVars)
 Parses a relation.
static void parsePredicate (Element constraint, Element predicate, StoreCloneable store, List< Constraint > constraints, List< DecomposedConstraint< Constraint > > decompCons, ArrayList< IntVarCloneable > valuationVars)
 Parses a predicate.
static void imposeGlobalConstraint (Element constraint, StoreCloneable store) throws FailException
 Parses a constraint and imposes it.
static void imposePredicate (Element constraint, Element predicate, StoreCloneable store, ArrayList< IntVarCloneable > valuationVars) throws FailException
 Parses a predicate and imposes it.
static void parseGlobalConstraint (Element constraint, StoreCloneable store, List< Constraint > constraints, List< DecomposedConstraint< Constraint > > decompCons, List< IntVarCloneable > valuationVars)
 Parses a constraint without imposing it.
Static Public Member Functions inherited from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >
static Document parse (File file) throws JDOMException, IOException
 Creates a JDOM Document out of the input XML file in XCSP format.
static Document parse (File file, boolean checkXCSP) throws JDOMException, IOException
 Creates a JDOM Document out of the input XML file (not necessarily in XCSP format).
static Document parse (String path) throws Exception
 Creates a JDOM Document out of the input XML file path in XCSP format.
static Document parse (String path, boolean checkXCSP) throws Exception
 Creates a JDOM Document out of the input XML file path (not necessarily in XCSP format).
static Document parse (InputStream stream) throws JDOMException, IOException
 Creates a JDOM Document out of the input XML stream in XCSP format.
static Document parse (InputStream stream, boolean checkXCSP) throws JDOMException, IOException
 Creates a JDOM Document out of the input XML stream (not necessarily in XCSP format).
static String toString (Document doc)
 Returns a human-friendly String representation of the input JDOM Document.
static String toString (Element root)
 Returns a human-friendly String representation of the input JDOM Element.
static void main (String[] args) throws Exception
 Parses the input problem.
static String toDOT (Document doc)
 Returns the constraint graph in DOT format.
static String toDOT (Element root)
 Returns the constraint graph in DOT format.
static< V extends Addable< V > Element getRelation (UtilitySolutionSpace< V, ? extends Addable<?> > hypercube, String id, String nature)
 Generates the XCSP "relation" or "probability" fragment corresponding to the input hypercube.
static Element getConstraint (UtilitySolutionSpace<?, ?> hypercube, String id, String ref)
 Creates an XCSP-formated description of this contraint.

Protected Member Functions

 JaCoPxcspParser (Element root, boolean countNCCCs, HashSet< String > constraintsToIgnoreNcccs, boolean publicVars, boolean privateConstraints)
 Constructor from a JDOM root Element in XCSP format.
JaCoPxcspParser< V > newInstance (Element instance)
List< JaCoPutilSpace< V > > getSpaces (Set< String > vars, final boolean withAnonymVars, final boolean getProbs, Set< String > forbiddenVars, DCOPProblemInterface< AddableInteger, V > problem)
void foundUndefinedRelations (HashSet< String > relationNames)
Protected Member Functions inherited from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >
 XCSPparser (Element root, boolean countNCCCs, boolean extendedRandNeighborhoods)
 Constructor from a JDOM root Element in XCSP format.
 XCSPparser (Element root, boolean countNCCCs, boolean extendedRandNeighborhoods, boolean publicAgents)
 Constructor from a JDOM root Element in XCSP format.
 XCSPparser (Element root, boolean countNCCCs)
 Constructor from a JDOM root Element in XCSP format.
 XCSPparser (Element root, boolean countNCCCs, boolean extendedRandNeighborhoods, HashSet< String > spacesToIgnoreNcccs, boolean mpc)
 Constructor from a JDOM root Element in XCSP format.
getInfeasibleUtil ()
List< ? extends UtilitySolutionSpace< V, U > > getSpaces (Set< String > vars, final boolean withAnonymVars, final boolean getProbs, Set< String > forbiddenVars, DCOPProblemInterface< V, U > problem)
 Extracts hypercubes from the constraints in the problem.
void parseConstraint (ArrayList< UtilitySolutionSpace< V, U > > spaces, Element constraint, HashMap< String, V[]> variablesHashMap, HashMap< String, Relation< V, U > > relationInfos, Set< String > vars, final boolean getProbs, final boolean withAnonymVars, U infeasibleUtil, Set< String > forbiddenVars, DCOPProblemInterface< V, U > problem)
 Parses a constraint.
V[] getDomain (Element domainElmt, final boolean debugLoad)
 Parses and instantiates a domain from a domain Element.
boolean ignore (String spaceClass)

Protected Attributes

final boolean publicVars
 Whether each variable is known to each agent.
final boolean privateConstraints
 If true, any constraint with a specific owner is only known by that owner.
Protected Attributes inherited from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >
Element root
 JDOM Element in XCSP format.
Class< U > utilClass = (Class<U>) AddableInteger.class
 The class to be used for utility values.
valInstance = (V) new AddableInteger ()
 An instance of V.
final boolean extendedRandNeighborhoods
 If true, neighborhood relationships between decision variables are extended through random variables.
final boolean publicAgents
 Whether each agent knows the identities of all agents.
final boolean mpc
 Whether to behave in MPC mode.
final boolean countNCCCs
 Whether to count constraint checks.
HashSet< String > spacesToIgnoreNcccs
 a set of spaces for which ncccs should be ignored

Private Member Functions

void createStore ()
 Initializes the JaCoP store with the variables.

Static Private Member Functions

static int parseInt (String str)
 Attempts to parse a string as an int, warning for double truncation.
static boolean warnTruncation (String str)
 Warns for truncation.

Private Attributes

StoreCloneable store
 The JaCoP store.

Detailed Description

An XCSP parser that generates spaces based on JaCoP.

Author
Thomas Leaute, Arnaud Jutzeler
Parameters
<V>the type used for valuations

Constructor & Destructor Documentation

◆ JaCoPxcspParser() [1/3]

Constructor.

Parameters
probDocthe problem Document in XCSP format

Referenced by getSubProblem(), newInstance(), and parseConstraint().

◆ JaCoPxcspParser() [2/3]

frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.JaCoPxcspParser ( Document probDoc,
Element params )

Constructor.

Parameters
probDocthe problem Document in XCSP format
paramsthe parser's parameters

◆ JaCoPxcspParser() [3/3]

frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.JaCoPxcspParser ( Element root,
boolean countNCCCs,
HashSet< String > constraintsToIgnoreNcccs,
boolean publicVars,
boolean privateConstraints )
protected

Constructor from a JDOM root Element in XCSP format.

Parameters
rootthe JDOM root Element in XCSP format
countNCCCsWhether to count constraint checks
constraintsToIgnoreNcccslist of constraints for which NCCCs should NOT be counted
publicVarsWhether each variable is known to each agent
privateConstraintsIf true, any constraint with a specific owner is only known by that owner

References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.countNCCCs, privateConstraints, publicVars, and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root.

Member Function Documentation

◆ createStore()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.createStore ( )
private

Initializes the JaCoP store with the variables.

References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root, and store.

Referenced by parse(), and parseConstraint().

◆ foundUndefinedRelations()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.foundUndefinedRelations ( HashSet< String > relationNames)
protected
See also
XCSPparser#foundUndefinedRelations(HashSet)

Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.

Referenced by getSubProblem().

◆ getSpaces()

List< JaCoPutilSpace< V > > frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.getSpaces ( Set< String > vars,
final boolean withAnonymVars,
final boolean getProbs,
Set< String > forbiddenVars,
DCOPProblemInterface< AddableInteger, V > problem )
protected
See also
XCSPparser#getSpaces(Set, boolean, boolean, Set, DCOPProblemInterface)
Todo
Reuse code.

References parseConstraint(), and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root.

Here is the call graph for this function:

◆ getSubProblem()

◆ getUtility()

◆ groundVars()

Document frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.groundVars ( String[] vars,
AddableInteger[] assignments )
See also
XCSPparser#groundVars(String[], Addable[])
Todo
TBC

◆ imposeGlobalConstraint()

◆ imposePredicate()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposePredicate ( Element constraint,
Element predicate,
StoreCloneable store,
ArrayList< IntVarCloneable > valuationVars ) throws FailException
static

Parses a predicate and imposes it.

Parameters
constraintthe jdom element describing the constraint
predicatethe jdom element describing the predicate
storethe store where the variables exist and in which we want to impose the extensional soft constraints
valuationVarsthe list of valuation variables to which we need to add the valuation variable of this constraint
Exceptions
FailExceptionthrown constraint imposition resulted in infeasibility

References parsePredicate(), and store.

Referenced by frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.createConstraint().

Here is the call graph for this function:

◆ newInstance()

◆ parse()

See also
XCSPparser.parse()

Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.

References frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.addAgent(), frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.addSolutionSpace(), frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.addVariable(), createStore(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.extendedRandNeighborhoods, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getAgent(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getAgents(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getOwner(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.maximize(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.publicAgents, frodo2.algorithms.AbstractProblem< V extends Addable< V >, U extends Addable< U > >.setAgent(), frodo2.solutionSpaces.JaCoP.JaCoPproblem< V extends Addable< V > >.setUtilClass(), and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.utilClass.

Referenced by frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.testProblemFromRepository(), and frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.testRandomExtensionalProblem().

Here is the call graph for this function:

◆ parseConstraint()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.parseConstraint ( ArrayList< JaCoPutilSpace< V > > spaces,
Element constraint,
HashMap< String, AddableInteger[]> variablesHashMap,
Element relation,
Set< String > vars,
final boolean getProbs,
final boolean withAnonymVars,
V infeasibleValuation,
Set< String > forbiddenVars )

Parses a constraint.

Parameters
spacesthe list of spaces to which the constraint should be added
constraintthe XCSP description of the constraint
variablesHashMapthe domain of each variable
relationthe relation, predicate or function referenced by the constraint
varsif null, returns all constraints; otherwise, returns only the constraints involving at least one variable in vars
getProbsif true, returns the probability spaces (ignoring withAnonymVars); else, returns the solution spaces
withAnonymVarswhether constraints involving variables with unknown owners should be taken into account
infeasibleValuationthe infeasible valuation
forbiddenVarsany space involving any of these variables will be ignored
Todo
Reuse code.

References createStore(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getOwner(), JaCoPxcspParser(), and store.

Referenced by getSpaces().

Here is the call graph for this function:

◆ parseGlobalConstraint()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.parseGlobalConstraint ( Element constraint,
StoreCloneable store,
List< Constraint > constraints,
List< DecomposedConstraint< Constraint > > decompCons,
List< IntVarCloneable > valuationVars )
static

Parses a constraint without imposing it.

Parameters
constraintthe jdom element describing the global constraint
storethe store where the variables exist
constraintsa list to which Constraints will be added
decompConsa list to which DecomposeConstraints will be added
valuationVarsa list to which valuation variables will be added
Todo
Reuse code by creating a method for this
Todo
Reuse code by creating a method for this
Todo
Reuse code by creating a method for this
Todo
Reuse code by creating a method for this

References parseInt(), and store.

Referenced by imposeGlobalConstraint().

Here is the call graph for this function:

◆ parseInt()

int frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.parseInt ( String str)
staticprivate

Attempts to parse a string as an int, warning for double truncation.

Parameters
strthe input string
Returns
the parsed int, possibly truncated

References warnTruncation().

Referenced by parseGlobalConstraint(), and parseRelation().

Here is the call graph for this function:

◆ parsePredicate()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.parsePredicate ( Element constraint,
Element predicate,
StoreCloneable store,
List< Constraint > constraints,
List< DecomposedConstraint< Constraint > > decompCons,
ArrayList< IntVarCloneable > valuationVars )
static

Parses a predicate.

Parameters
constraintthe jdom element describing the constraint
predicatethe jdom element describing the predicate or function
storethe store where the variables exist and in which we want to impose the intentional hard constraints
constraintsa list to which Constraints will be added
decompConsa list to which DecomposeConstraints will be added
valuationVarsthe list of valuation variables to which we need to add the valuation variable of this constraint (if it is a soft constraint)
Todo
test

References store, and frodo2.solutionSpaces.JaCoP.Predicate.valuationVar.

Referenced by imposePredicate().

◆ parseRelation()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.parseRelation ( Element constraint,
Element relation,
StoreCloneable store,
List< Constraint > constraints,
List< DecomposedConstraint< Constraint > > decompCons,
ArrayList< IntVarCloneable > valuationVars )
static

Parses a relation.

Parameters
constraintthe jdom element describing the constraint
relationthe jdom element describing the relation
storethe store where the variables exist and in which we want to impose the extensional soft constraints
constraintsa list to which Constraints will be added
decompConsa list to which DecomposeConstraints will be added
valuationVarsthe list of valuation variables to which we need to add the valuation variable of this constraint

References parseInt(), and store.

Here is the call graph for this function:

◆ rescale()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.rescale ( V multiply,
V add )

Rescales the problem.

Parameters
multiplymultiplies all valuations by multiply
addafter multiplying all valuations by multiply (if required), adds add

References frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.hasNext(), and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root.

Here is the call graph for this function:

◆ reset()

void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.reset ( ProblemInterface< AddableInteger, V > newProblem)
See also
XCSPparser#reset(ProblemInterface)
Todo
TBC

◆ setUtilClass()

◆ switchMaxMin()

◆ warnTruncation()

boolean frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.warnTruncation ( String str)
staticprivate

Warns for truncation.

Parameters
strthe string
Returns
true

Referenced by parseInt().

Member Data Documentation

◆ privateConstraints

final boolean frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.privateConstraints
protected

If true, any constraint with a specific owner is only known by that owner.

Else, constraint knowledge is shared by all involved.

Referenced by JaCoPxcspParser().

◆ publicVars

final boolean frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.publicVars
protected

Whether each variable is known to each agent.

Referenced by JaCoPxcspParser().

◆ store


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