e-constraints.net
the home of Explanation-based Constraint Programming
Search

 Introduction   Implementations   Applications   Pointers 
e-constraints.net : Implementations : PaLM : Manual : Tutorial : API

PaLM interface

As a general rule, switching from choco to PaLM just needs creating a PalmProblem using makePalmProblem instead of a Problem created using the makeProblem method (as shown in the PaLM note dedicated to first steps in PaLM).

However, some choco API methods cannot work within PaLM. When this is the case, PaLM provides its own methods.

Overview


Equivalence list

chocoPaLM
makeProblem makePalmProblem
makeConstantIntVar makeConstantPalmIntVar
scalar e-scalar
sumVars e-sumVars
or e-or
and e-and
ifThen e-ifThen
ifOnlyIf e-iff
implies e-implies
allDifferent e-completeAllDiff
card e-card
atleast e-atleast
atmost e-atmost

Moreover, PaLM provides the checkFullPalm method that checks that all variables and constraints in a given problem are really PaLM objects.


Specific situations

  • Search in PaLM
    Although the solve method exists in PaLM notice that search in PaLM is completely different from the one in choco. The PaLM note dedicated to search details how search works in an e-constraints system.

  • Defining a constant variable
    Choco provides an automatic creation of constant variables. PaLM cannot handle those mechanisms but to provide the makeConstantPalmIntVar method.

  • All-Different related constraints
    PaLM provides a complete set of all-different constraints. These (except one) are defined in Igloo (a set of global constraints developed at the e-Lab). The current PaLM distribution provides the necessary single Igloo file: matching.cl.
    PaLM provides e-completeAllDiff, e-permutation, and e-gcc.


Getting information about the resolution

PaLM provides several tools to get information about the resolution. See the reference pages on getRuntimeStatistic, setRuntimeStatistic, incRuntimeStatistic, decRuntimeStatistic, printRuntimeStatistics, getGlobalStatistics and solutions.

- Last modified: Thu Feb 07 12:29:44 Paris, Madrid 2002 by Webmaster