A parser for XCSP files involving constraints of type "global:vehicle_routing".
More...
|
| | XCSPparserVRP (Document doc) |
| | Constructor from a JDOM Document in XCSP format.
|
| | XCSPparserVRP (Document doc, Element params) |
| | Constructor.
|
| XCSPparserVRP< U > | getSubProblem (String agent) |
| void | setUtilClass (Class< U > utilClass) |
| void | rescale (U multiply, U add) |
| | 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.
|
| 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.
|
| Document | switchMaxMin (int shiftInt) |
| | Change the problem from a maximisation problem to a minimisation 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.
|
| DCOPProblemInterface< V, U > | parse () |
| ProblemInterface< V, U > | parse () |
|
| | XCSPparserVRP (Element instance) |
| | Constructor from a JDOM root Element in XCSP format.
|
| | XCSPparserVRP (Element instance, boolean countNCCCs, boolean extendedRandNeighborhoods, HashSet< String > spacesToIgnoreNcccs, boolean mpc) |
| | Constructor from a JDOM root Element in XCSP format.
|
| XCSPparserVRP< U > | newInstance (Element instance) |
| void | foundUndefinedRelations (HashSet< String > relationNames) |
| void | parseConstraint (ArrayList< UtilitySolutionSpace< AddableInteger, U > > spaces, Element constraint, HashMap< String, AddableInteger[]> variablesHashMap, HashMap< String, Relation< AddableInteger, U > > relationInfos, Set< String > vars, final boolean getProbs, final boolean withAnonymVars, U infeasibleUtil, Set< String > forbiddenVars, DCOPProblemInterface< AddableInteger, U > problem) |
| | 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) |
|
| 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.
|
| 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
|