Example: Packing squares into a rectangle More...
Public Types | |
enum | { PROP_REIFIED , PROP_CUMULATIVES } |
Propagation to use for model. More... |
Public Member Functions | |
PerfectSquare (const SizeOptions &opt) | |
Actual model. | |
PerfectSquare (PerfectSquare &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Copy during cloning. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > > | |
ScriptBase (const Options &opt) | |
Constructor. | |
ScriptBase (ScriptBase &e) | |
Constructor used for cloning. | |
virtual void | compare (const Space &home, std::ostream &os) const |
Compare with s. | |
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace > | |
IgnoreStepOption (const Options &) | |
Constructor. | |
IgnoreStepOption (BaseSpace &e) | |
Constructor used for cloning. |
Protected Attributes | |
IntVarArray | x |
Array of x-coordinates of squares. | |
IntVarArray | y |
Array of y-coordinates of squares. |
Specifications for perfect square problems | |
The first element is the number of squares to be placed, the second the size of the master square, and the remaining the sizes of the squares to be packed. The data is taken from: C. J. Bouwkamp and A. J. W. Duijvestijn, Catalogue of Simple Perfect Squared Squares of Orders 21 Through 25, Eindhoven Univ. Technology, Dept. of Math., Report 92-WSK-03, Nov. 1992. | |
const int | s00 [] |
Main-function. | |
const int | s01 [] |
Main-function. | |
const int | s02 [] |
Main-function. | |
const int | s03 [] |
Main-function. | |
const int | s04 [] |
Main-function. | |
const int | s05 [] |
Main-function. | |
const int | s06 [] |
Main-function. | |
const int | s07 [] |
Main-function. | |
const int | s08 [] |
Main-function. | |
const int | s09 [] |
Main-function. | |
const int | s10 [] |
Main-function. | |
const int | s11 [] |
Main-function. | |
const int | s12 [] |
Main-function. | |
const int | s13 [] |
Main-function. | |
const int | s14 [] |
Main-function. | |
const int | s15 [] |
Main-function. | |
const int | s16 [] |
Main-function. | |
const int | s17 [] |
Main-function. | |
const int | s18 [] |
Main-function. | |
const int | s19 [] |
Main-function. | |
const int | s20 [] |
Main-function. | |
const int | s21 [] |
Main-function. | |
const int | s22 [] |
Main-function. | |
const int | s23 [] |
Main-function. | |
const int | s24 [] |
Main-function. | |
const int | s25 [] |
Main-function. | |
const int | s26 [] |
Main-function. | |
const int * | specs [] |
Main-function. | |
const unsigned int | n_specs = sizeof(specs) / sizeof(int*) |
Main-function. | |
int | main (int argc, char *argv[]) |
Main-function. |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > > | |
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
Choose output stream according to sn. | |
static void | run (const Options &opt, Script *s=NULL) |
Example: Packing squares into a rectangle
See problem 9 at http://www.csplib.org/.
Definition at line 185 of file perfect-square.cpp.
anonymous enum |
Propagation to use for model.
Enumerator | |
---|---|
PROP_REIFIED | Use reified constraints. |
PROP_CUMULATIVES | Use cumulatives constraint. |
Definition at line 193 of file perfect-square.cpp.
|
inline |
Actual model.
Definition at line 198 of file perfect-square.cpp.
|
inline |
Constructor for cloning s.
Definition at line 273 of file perfect-square.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 279 of file perfect-square.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.
Definition at line 284 of file perfect-square.cpp.
|
Main-function.
Definition at line 57 of file perfect-square.cpp.
|
Main-function.
Definition at line 61 of file perfect-square.cpp.
|
Main-function.
Definition at line 65 of file perfect-square.cpp.
|
Main-function.
Definition at line 69 of file perfect-square.cpp.
|
Main-function.
Definition at line 73 of file perfect-square.cpp.
|
Main-function.
Definition at line 77 of file perfect-square.cpp.
|
Main-function.
Definition at line 81 of file perfect-square.cpp.
|
Main-function.
Definition at line 85 of file perfect-square.cpp.
|
Main-function.
Definition at line 89 of file perfect-square.cpp.
|
Main-function.
Definition at line 93 of file perfect-square.cpp.
|
Main-function.
Definition at line 97 of file perfect-square.cpp.
|
Main-function.
Definition at line 101 of file perfect-square.cpp.
|
Main-function.
Definition at line 105 of file perfect-square.cpp.
|
Main-function.
Definition at line 109 of file perfect-square.cpp.
|
Main-function.
Definition at line 113 of file perfect-square.cpp.
|
Main-function.
Definition at line 117 of file perfect-square.cpp.
|
Main-function.
Definition at line 121 of file perfect-square.cpp.
|
Main-function.
Definition at line 125 of file perfect-square.cpp.
|
Main-function.
Definition at line 129 of file perfect-square.cpp.
|
Main-function.
Definition at line 133 of file perfect-square.cpp.
|
Main-function.
Definition at line 137 of file perfect-square.cpp.
|
Main-function.
Definition at line 141 of file perfect-square.cpp.
|
Main-function.
Definition at line 145 of file perfect-square.cpp.
|
Main-function.
Definition at line 149 of file perfect-square.cpp.
|
Main-function.
Definition at line 153 of file perfect-square.cpp.
|
Main-function.
Definition at line 157 of file perfect-square.cpp.
|
Main-function.
Definition at line 161 of file perfect-square.cpp.
|
|
Main-function.
Definition at line 175 of file perfect-square.cpp.
|
Main-function.
Definition at line 296 of file perfect-square.cpp.
|
protected |
Array of x-coordinates of squares.
Definition at line 188 of file perfect-square.cpp.
|
protected |
Array of y-coordinates of squares.
Definition at line 190 of file perfect-square.cpp.