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, waitbeginAnnotations, 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, unimplementedCasebuildCtrFalse, buildCtrTrue, loadAnnotations, loadArray, loadBlock, loadConstraints, loadConstraints, loadCtr, loadCtrs, loadDocument, loadGroup, loadInstance, loadInstance, loadLogic, loadObj, loadObjectives, loadSlide, loadVar, loadVariables, repostpublic org.xcsp.parser.XCallbacks.Implem implem()
implem in interface org.xcsp.parser.XCallbackspublic boolean isCOP()
public List<String> getViolatedCtrs(String solution) throws Exception
Exceptionpublic void buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x,
int minValue,
int maxValue)
buildVarInteger in interface org.xcsp.parser.XCallbacksbuildVarInteger in interface org.xcsp.parser.XCallbacks2public void buildVarInteger(org.xcsp.parser.entries.XVariables.XVarInteger x,
int[] values)
buildVarInteger in interface org.xcsp.parser.XCallbacksbuildVarInteger in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrExtension in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrExtension in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrElement in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrElement in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrElement in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrPrimitive in interface org.xcsp.parser.XCallbacks2public void buildCtrSum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrSum in interface org.xcsp.parser.XCallbacksbuildCtrSum in interface org.xcsp.parser.XCallbacks2public void buildCtrSum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, int[] coeffs, org.xcsp.common.Condition condition)
buildCtrSum in interface org.xcsp.parser.XCallbacksbuildCtrSum in interface org.xcsp.parser.XCallbacks2public void buildCtrAllDifferent(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildCtrAllDifferent in interface org.xcsp.parser.XCallbacksbuildCtrAllDifferent in interface org.xcsp.parser.XCallbacks2public void buildObjToMinimize(String id, org.xcsp.parser.entries.XVariables.XVarInteger x)
buildObjToMinimize in interface org.xcsp.parser.XCallbacksbuildObjToMinimize in interface org.xcsp.parser.XCallbacks2public void buildObjToMinimize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildObjToMinimize in interface org.xcsp.parser.XCallbacksbuildObjToMinimize in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildObjToMinimize in interface org.xcsp.parser.XCallbacks2public void buildObjToMaximize(String id, org.xcsp.parser.entries.XVariables.XVarInteger x)
buildObjToMaximize in interface org.xcsp.parser.XCallbacksbuildObjToMaximize in interface org.xcsp.parser.XCallbacks2public void buildObjToMaximize(String id, org.xcsp.common.Types.TypeObjective type, org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildObjToMaximize in interface org.xcsp.parser.XCallbacksbuildObjToMaximize in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildObjToMaximize in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrIntension in interface org.xcsp.parser.XCallbacks2public 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.XCallbacksbuildCtrIntension in interface org.xcsp.parser.XCallbacks2public void buildCtrMaximum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrMaximum in interface org.xcsp.parser.XCallbacksbuildCtrMaximum in interface org.xcsp.parser.XCallbacks2public void buildCtrMinimum(String id, org.xcsp.parser.entries.XVariables.XVarInteger[] list, org.xcsp.common.Condition condition)
buildCtrMinimum in interface org.xcsp.parser.XCallbacksbuildCtrMinimum in interface org.xcsp.parser.XCallbacks2public String solve(int nSolution, int timeOut)
public void buildAnnotationDecision(org.xcsp.parser.entries.XVariables.XVarInteger[] list)
buildAnnotationDecision in interface org.xcsp.parser.XCallbacksbuildAnnotationDecision in interface org.xcsp.parser.XCallbacks2public 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.