Download Extended Indexicals: User Manual
Transcript
Notice that the “::Bool” annotation put after a vint argument (e.g. vint X::Bool) makes it compiled into a Gecode
Boolean variable.
The second defined function replaces the IntConLevel by an enumeration letting one choose among all the defined
propagators of the constraint. The enumeration is defined in the header file just before the function prototypes.
As an example, if you defined a constraint by indexicals as def ACSTR(vint[] X, vint Z)..., an example program
that uses it could be:
#include <g e c o d e / d r i v e r . hh>
#include <g e c o d e / int . hh>
#include ” g e n e r a t e d f i l e . hh” ;
using namespace Gecode ;
c l a s s TestCSTR : public S c r i p t {
private :
IntVarArray X;
IntVar Z ;
public :
TestCSTR ( ) : X( ∗ this , 1 0 , 2 , 8 ) , Z( ∗ this , −10 ,10) {
ACSTR( ∗ this , X, Z ) ;
[...]
}
[...]
}
3.3.3
Oscar
TOCOME
3.3.4
Gecode/FlatZinc
TOCOME
9