public class XCSP extends Object implements org.xcsp.parser.XCallbacks2
Modifier and Type | Method and Description |
---|---|
void |
buildAnnotationDecision(org.xcsp.parser.entries.XVariables.XVarInteger[] list) |
void |
buildCtrAllDifferent(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list) |
void |
buildCtrElement(String id,
int[] list,
int startIndex,
org.xcsp.parser.entries.XVariables.XVarInteger index,
org.xcsp.common.Types.TypeRank rank,
org.xcsp.parser.entries.XVariables.XVarInteger value) |
void |
buildCtrElement(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int startIndex,
org.xcsp.parser.entries.XVariables.XVarInteger index,
org.xcsp.common.Types.TypeRank rank,
int value) |
void |
buildCtrElement(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int startIndex,
org.xcsp.parser.entries.XVariables.XVarInteger index,
org.xcsp.common.Types.TypeRank rank,
org.xcsp.parser.entries.XVariables.XVarInteger value) |
void |
buildCtrExtension(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int[][] tuples,
boolean positive,
Set<org.xcsp.common.Types.TypeFlag> flags) |
void |
buildCtrExtension(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
int[] values,
boolean positive,
Set<org.xcsp.common.Types.TypeFlag> flags) |
void |
buildCtrIntension(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] scope,
org.xcsp.common.predicates.XNodeParent<org.xcsp.parser.entries.XVariables.XVarInteger> tree) |
void |
buildCtrIntension(String id,
org.xcsp.parser.entries.XVariables.XVarSymbolic[] scope,
org.xcsp.common.predicates.XNodeParent<org.xcsp.parser.entries.XVariables.XVarSymbolic> syntaxTreeRoot) |
void |
buildCtrMaximum(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
org.xcsp.common.Condition condition) |
void |
buildCtrMinimum(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
org.xcsp.common.Condition condition) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeArithmeticOperator aop,
int p,
org.xcsp.common.Types.TypeConditionOperatorRel op,
int k) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeArithmeticOperator aop,
int p,
org.xcsp.common.Types.TypeConditionOperatorRel op,
org.xcsp.parser.entries.XVariables.XVarInteger y) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeArithmeticOperator aop,
org.xcsp.parser.entries.XVariables.XVarInteger y,
org.xcsp.common.Types.TypeConditionOperatorRel op,
int k) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeArithmeticOperator aop,
org.xcsp.parser.entries.XVariables.XVarInteger y,
org.xcsp.common.Types.TypeConditionOperatorRel op,
org.xcsp.parser.entries.XVariables.XVarInteger z) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeConditionOperatorRel op,
int k) |
void |
buildCtrPrimitive(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x,
org.xcsp.common.Types.TypeUnaryArithmeticOperator aop,
org.xcsp.parser.entries.XVariables.XVarInteger y) |
void |
buildCtrSum(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
org.xcsp.common.Condition condition) |
void |
buildCtrSum(String id,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int[] coeffs,
org.xcsp.common.Condition condition) |
void |
buildObjToMaximize(String id,
org.xcsp.common.Types.TypeObjective type,
org.xcsp.parser.entries.XVariables.XVarInteger[] list) |
void |
buildObjToMaximize(String id,
org.xcsp.common.Types.TypeObjective type,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int[] coeffs) |
void |
buildObjToMaximize(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x) |
void |
buildObjToMinimize(String id,
org.xcsp.common.Types.TypeObjective type,
org.xcsp.parser.entries.XVariables.XVarInteger[] list) |
void |
buildObjToMinimize(String id,
org.xcsp.common.Types.TypeObjective type,
org.xcsp.parser.entries.XVariables.XVarInteger[] list,
int[] coeffs) |
void |
buildObjToMinimize(String id,
org.xcsp.parser.entries.XVariables.XVarInteger x) |
void |
buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x,
int[] values) |
void |
buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x,
int minValue,
int maxValue) |
List<String> |
getViolatedCtrs(String solution) |
org.xcsp.parser.XCallbacks.Implem |
implem() |
boolean |
isCOP() |
static void |
main(String[] args) |
SearchStatistics |
solve(BiConsumer<String,Integer> onSolution,
Function<SearchStatistics,Boolean> shouldStop) |
String |
solve(int nSolution,
int timeOut) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beginAnnotations, beginArray, beginBlock, beginConstraints, beginGroup, beginInstance, beginLogic, beginObjectives, beginSlide, beginVariables, buildBinPacking, buildBinPacking, buildCtrAllDifferent, buildCtrAllDifferent, buildCtrAllDifferentExcept, buildCtrAllDifferentList, buildCtrAllDifferentMatrix, buildCtrAllEqual, buildCtrAmong, buildCtrAmong, buildCtrAtLeast, buildCtrAtMost, buildCtrCardinality, buildCtrCardinality, buildCtrCardinality, buildCtrCardinality, buildCtrCardinality, buildCtrCardinality, buildCtrChannel, buildCtrChannel, buildCtrChannel, buildCtrCircuit, buildCtrCircuit, buildCtrCircuit, buildCtrClause, buildCtrCount, buildCtrCount, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrCumulative, buildCtrElement, buildCtrElement, buildCtrExactly, buildCtrExactly, buildCtrExtension, buildCtrExtension, buildCtrInstantiation, buildCtrLex, buildCtrLexMatrix, buildCtrLogic, buildCtrLogic, buildCtrMaximum, buildCtrMDD, buildCtrMinimum, buildCtrNoOverlap, buildCtrNoOverlap, buildCtrNoOverlap, buildCtrNoOverlap, buildCtrNotAllEqual, buildCtrNValues, buildCtrNValuesExcept, buildCtrOrdered, buildCtrOrdered, buildCtrPrimitive, buildCtrPrimitive, buildCtrRegular, buildCtrStretch, buildCtrStretch, buildCtrSum, buildCtrSum, buildObjToMaximize, buildObjToMinimize, buildVarSymbolic, endAnnotations, endArray, endBlock, endConstraints, endGroup, endInstance, endLogic, endObjectives, endSlide, endVariables, unimplementedCase
buildCtrFalse, buildCtrTrue, loadAnnotations, loadArray, loadBlock, loadConstraints, loadConstraints, loadCtr, loadCtrs, loadDocument, loadGroup, loadInstance, loadInstance, loadLogic, loadObj, loadObjectives, loadSlide, loadVar, loadVariables, repost
public org.xcsp.parser.XCallbacks.Implem implem()
implem
in interface org.xcsp.parser.XCallbacks
public boolean isCOP()
public List<String> getViolatedCtrs(String solution) throws Exception
Exception
public void buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x, int minValue, int maxValue)
buildVarInteger
in interface org.xcsp.parser.XCallbacks
buildVarInteger
in interface org.xcsp.parser.XCallbacks2
public void buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x, int[] values)
buildVarInteger
in interface org.xcsp.parser.XCallbacks
buildVarInteger
in interface org.xcsp.parser.XCallbacks2
public void buildCtrExtension(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, int[] values, boolean positive, Set<org.xcsp.common.Types.TypeFlag> flags)
buildCtrExtension
in interface org.xcsp.parser.XCallbacks
buildCtrExtension
in interface org.xcsp.parser.XCallbacks2
public void buildCtrExtension(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int[][] tuples, boolean positive, Set<org.xcsp.common.Types.TypeFlag> flags)
buildCtrExtension
in interface org.xcsp.parser.XCallbacks
buildCtrExtension
in interface org.xcsp.parser.XCallbacks2
public void buildCtrElement(String id, int[] list, int startIndex, org.xcsp.parser.entries.XVariables.XVarInteger index, org.xcsp.common.Types.TypeRank rank, org.xcsp.parser.entries.XVariables.XVarInteger value)
buildCtrElement
in interface org.xcsp.parser.XCallbacks
buildCtrElement
in interface org.xcsp.parser.XCallbacks2
public void buildCtrElement(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int startIndex, org.xcsp.parser.entries.XVariables.XVarInteger index, org.xcsp.common.Types.TypeRank rank, int value)
buildCtrElement
in interface org.xcsp.parser.XCallbacks
buildCtrElement
in interface org.xcsp.parser.XCallbacks2
public void buildCtrElement(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int startIndex, org.xcsp.parser.entries.XVariables.XVarInteger index, org.xcsp.common.Types.TypeRank rank, org.xcsp.parser.entries.XVariables.XVarInteger value)
buildCtrElement
in interface org.xcsp.parser.XCallbacks
buildCtrElement
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeConditionOperatorRel op, int k)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeUnaryArithmeticOperator aop, org.xcsp.parser.entries.XVariables.XVarInteger y)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeArithmeticOperator aop, int p, org.xcsp.common.Types.TypeConditionOperatorRel op, int k)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeArithmeticOperator aop, int p, org.xcsp.common.Types.TypeConditionOperatorRel op, org.xcsp.parser.entries.XVariables.XVarInteger y)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeArithmeticOperator aop, org.xcsp.parser.entries.XVariables.XVarInteger y, org.xcsp.common.Types.TypeConditionOperatorRel op, int k)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrPrimitive(String id, org.xcsp.parser.entries.XVariables.XVarInteger x, org.xcsp.common.Types.TypeArithmeticOperator aop, org.xcsp.parser.entries.XVariables.XVarInteger y, org.xcsp.common.Types.TypeConditionOperatorRel op, org.xcsp.parser.entries.XVariables.XVarInteger z)
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks
buildCtrPrimitive
in interface org.xcsp.parser.XCallbacks2
public void buildCtrSum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrSum
in interface org.xcsp.parser.XCallbacks
buildCtrSum
in interface org.xcsp.parser.XCallbacks2
public void buildCtrSum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int[] coeffs, org.xcsp.common.Condition condition)
buildCtrSum
in interface org.xcsp.parser.XCallbacks
buildCtrSum
in interface org.xcsp.parser.XCallbacks2
public void buildCtrAllDifferent(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildCtrAllDifferent
in interface org.xcsp.parser.XCallbacks
buildCtrAllDifferent
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMinimize(String id, org.xcsp.parser.entries.XVariables.XVarInteger x)
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMinimize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMinimize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int[] coeffs)
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks
buildObjToMinimize
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMaximize(String id, org.xcsp.parser.entries.XVariables.XVarInteger x)
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMaximize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks2
public void buildObjToMaximize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int[] coeffs)
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks
buildObjToMaximize
in interface org.xcsp.parser.XCallbacks2
public void buildCtrIntension(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] scope, org.xcsp.common.predicates.XNodeParent<org.xcsp.parser.entries.XVariables.XVarInteger> tree)
buildCtrIntension
in interface org.xcsp.parser.XCallbacks
buildCtrIntension
in interface org.xcsp.parser.XCallbacks2
public void buildCtrIntension(String id, org.xcsp.parser.entries.XVariables.XVarSymbolic[] scope, org.xcsp.common.predicates.XNodeParent<org.xcsp.parser.entries.XVariables.XVarSymbolic> syntaxTreeRoot)
buildCtrIntension
in interface org.xcsp.parser.XCallbacks
buildCtrIntension
in interface org.xcsp.parser.XCallbacks2
public void buildCtrMaximum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrMaximum
in interface org.xcsp.parser.XCallbacks
buildCtrMaximum
in interface org.xcsp.parser.XCallbacks2
public void buildCtrMinimum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrMinimum
in interface org.xcsp.parser.XCallbacks
buildCtrMinimum
in interface org.xcsp.parser.XCallbacks2
public String solve(int nSolution, int timeOut)
public void buildAnnotationDecision(org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildAnnotationDecision
in interface org.xcsp.parser.XCallbacks
buildAnnotationDecision
in interface org.xcsp.parser.XCallbacks2
public SearchStatistics solve(BiConsumer<String,Integer> onSolution, Function<SearchStatistics,Boolean> shouldStop)
onSolution:
- void onSolution(solution, obj). If not a COP, obj = Integer.MAXVALUEshouldStop:
- boolean shouldStop(stats, isCOP).public static void main(String[] args)
Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.