|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
An XCSP parser that generates spaces based on JaCoP. More...

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 () |
| U | getZeroUtility () |
| U | getPlusInfUtility () |
| U | 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. | |
| U | 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. | |
| V | 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. | |
An XCSP parser that generates spaces based on JaCoP.
| <V> | the type used for valuations |
| frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.JaCoPxcspParser | ( | Document | probDoc | ) |
Constructor.
| probDoc | the problem Document in XCSP format |
Referenced by getSubProblem(), newInstance(), and parseConstraint().
| frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.JaCoPxcspParser | ( | Document | probDoc, |
| Element | params ) |
Constructor.
| probDoc | the problem Document in XCSP format |
| params | the parser's parameters |
|
protected |
Constructor from a JDOM root Element in XCSP format.
| root | the JDOM root Element in XCSP format |
| countNCCCs | Whether to count constraint checks |
| constraintsToIgnoreNcccs | list of constraints for which NCCCs should NOT be counted |
| publicVars | Whether each variable is known to each agent |
| privateConstraints | If 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.
|
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().
|
protected |
Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.
Referenced by getSubProblem().
|
protected |
References parseConstraint(), and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root.

| JaCoPxcspParser< V > frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.getSubProblem | ( | String | agent | ) |
Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.
References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.extendedRandNeighborhoods, frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.ConstraintType.EXTENSIONAL, foundUndefinedRelations(), 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.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.ConstraintType.GLOBAL, frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.ConstraintType.INTENSIONAL, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.isRandom(), JaCoPxcspParser(), newInstance(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.publicAgents, and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.root.

| UtilitySolutionSpace< AddableInteger, V > frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.getUtility | ( | Map< String, AddableInteger > | assignments, |
| final boolean | withAnonymVars ) |
Test this method
Reuse code.
References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getInfeasibleUtil(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getZeroUtility(), frodo2.output, and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice().

| Document frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.groundVars | ( | String[] | vars, |
| AddableInteger[] | assignments ) |
|
static |
Parses a constraint and imposes it.
| constraint | the jdom element describing the global constraint |
| store | the store where the variables exist |
| FailException | thrown constraint imposition resulted in infeasibility |
References parseGlobalConstraint(), and store.
Referenced by frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintAllDifferentParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintCumulativeParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintElementParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumEqParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumGeParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumGtParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumLeParser(), frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumLtParser(), and frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumNeParser().

|
static |
Parses a predicate and imposes it.
| constraint | the jdom element describing the constraint |
| predicate | the jdom element describing the predicate |
| store | the store where the variables exist and in which we want to impose the extensional soft constraints |
| valuationVars | the list of valuation variables to which we need to add the valuation variable of this constraint |
| FailException | thrown constraint imposition resulted in infeasibility |
References parsePredicate(), and store.
Referenced by frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.createConstraint().

|
protected |
Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.
References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.countNCCCs, JaCoPxcspParser(), and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.spacesToIgnoreNcccs.
Referenced by getSubProblem().

| JaCoPproblem< V > frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.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().

| 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.
| spaces | the list of spaces to which the constraint should be added |
| constraint | the XCSP description of the constraint |
| variablesHashMap | the domain of each variable |
| relation | the relation, predicate or function referenced by the constraint |
| vars | if null, returns all constraints; otherwise, returns only the constraints involving at least one variable in vars |
| getProbs | if true, returns the probability spaces (ignoring withAnonymVars); else, returns the solution spaces |
| withAnonymVars | whether constraints involving variables with unknown owners should be taken into account |
| infeasibleValuation | the infeasible valuation |
| forbiddenVars | any space involving any of these variables will be ignored |
References createStore(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getOwner(), JaCoPxcspParser(), and store.
Referenced by getSpaces().

|
static |
Parses a constraint without imposing it.
| constraint | the jdom element describing the global constraint |
| store | the store where the variables exist |
| constraints | a list to which Constraints will be added |
| decompCons | a list to which DecomposeConstraints will be added |
| valuationVars | a list to which valuation variables will be added |
References parseInt(), and store.
Referenced by imposeGlobalConstraint().

|
staticprivate |
Attempts to parse a string as an int, warning for double truncation.
| str | the input string |
References warnTruncation().
Referenced by parseGlobalConstraint(), and parseRelation().

|
static |
Parses a predicate.
| constraint | the jdom element describing the constraint |
| predicate | the jdom element describing the predicate or function |
| store | the store where the variables exist and in which we want to impose the intentional hard constraints |
| constraints | a list to which Constraints will be added |
| decompCons | a list to which DecomposeConstraints will be added |
| valuationVars | the list of valuation variables to which we need to add the valuation variable of this constraint (if it is a soft constraint) |
References store, and frodo2.solutionSpaces.JaCoP.Predicate.valuationVar.
Referenced by imposePredicate().
|
static |
Parses a relation.
| constraint | the jdom element describing the constraint |
| relation | the jdom element describing the relation |
| store | the store where the variables exist and in which we want to impose the extensional soft constraints |
| constraints | a list to which Constraints will be added |
| decompCons | a list to which DecomposeConstraints will be added |
| valuationVars | the list of valuation variables to which we need to add the valuation variable of this constraint |
References parseInt(), and store.

| void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.rescale | ( | V | multiply, |
| V | add ) |
Rescales the problem.
| multiply | multiplies all valuations by multiply |
| add | after 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.

| void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.reset | ( | ProblemInterface< AddableInteger, V > | newProblem | ) |
| void frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.setUtilClass | ( | Class< V > | valuationClass | ) |
References 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().
| Document frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.switchMaxMin | ( | int | shiftInt | ) |
Reimplemented from frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.
|
staticprivate |
|
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().
|
protected |
Whether each variable is known to each agent.
Referenced by JaCoPxcspParser().
|
private |
The JaCoP store.
Referenced by createStore(), imposeGlobalConstraint(), imposePredicate(), parseConstraint(), parseGlobalConstraint(), parsePredicate(), and parseRelation().