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. More... | |
PerfectSquare (bool share, PerfectSquare &s) | |
Constructor for cloning s. More... | |
virtual Space * | copy (bool share) |
Copy during cloning. More... | |
virtual void | print (std::ostream &os) const |
Print solution. More... | |
![]() | |
ScriptBase (void) | |
Default constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | compare (const Space &, std::ostream &os) const |
Compare with s. More... | |
Protected Attributes | |
IntVarArray | x |
Array of x-coordinates of squares. More... | |
IntVarArray | y |
Array of y-coordinates of squares. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
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 [] |
const int | s01 [] |
const int | s02 [] |
const int | s03 [] |
const int | s04 [] |
const int | s05 [] |
const int | s06 [] |
const int | s07 [] |
const int | s08 [] |
const int | s09 [] |
const int | s10 [] |
const int | s11 [] |
const int | s12 [] |
const int | s13 [] |
const int | s14 [] |
const int | s15 [] |
const int | s16 [] |
const int | s17 [] |
const int | s18 [] |
const int | s19 [] |
const int | s20 [] |
const int | s21 [] |
const int | s22 [] |
const int | s23 [] |
const int | s24 [] |
const int | s25 [] |
const int | s26 [] |
const int * | specs [] |
const unsigned int | n_specs = sizeof(specs) / sizeof(int*) |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
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 189 of file perfect-square.cpp.
|
inline |
Actual model.
Definition at line 202 of file perfect-square.cpp.
|
inline |
Constructor for cloning s.
Definition at line 276 of file perfect-square.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 282 of file perfect-square.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 287 of file perfect-square.cpp.
|
related |
Definition at line 61 of file perfect-square.cpp.
|
related |
Definition at line 65 of file perfect-square.cpp.
|
related |
Definition at line 69 of file perfect-square.cpp.
|
related |
Definition at line 73 of file perfect-square.cpp.
|
related |
Definition at line 77 of file perfect-square.cpp.
|
related |
Definition at line 81 of file perfect-square.cpp.
|
related |
Definition at line 85 of file perfect-square.cpp.
|
related |
Definition at line 89 of file perfect-square.cpp.
|
related |
Definition at line 93 of file perfect-square.cpp.
|
related |
Definition at line 97 of file perfect-square.cpp.
|
related |
Definition at line 101 of file perfect-square.cpp.
|
related |
Definition at line 105 of file perfect-square.cpp.
|
related |
Definition at line 109 of file perfect-square.cpp.
|
related |
Definition at line 113 of file perfect-square.cpp.
|
related |
Definition at line 117 of file perfect-square.cpp.
|
related |
Definition at line 121 of file perfect-square.cpp.
|
related |
Definition at line 125 of file perfect-square.cpp.
|
related |
Definition at line 129 of file perfect-square.cpp.
|
related |
Definition at line 133 of file perfect-square.cpp.
|
related |
Definition at line 137 of file perfect-square.cpp.
|
related |
Definition at line 141 of file perfect-square.cpp.
|
related |
Definition at line 145 of file perfect-square.cpp.
|
related |
Definition at line 149 of file perfect-square.cpp.
|
related |
Definition at line 153 of file perfect-square.cpp.
|
related |
Definition at line 157 of file perfect-square.cpp.
|
related |
Definition at line 161 of file perfect-square.cpp.
|
related |
Definition at line 165 of file perfect-square.cpp.
|
related |
|
related |
Definition at line 179 of file perfect-square.cpp.
|
related |
Main-function.
Definition at line 299 of file perfect-square.cpp.
|
protected |
Array of x-coordinates of squares.
Definition at line 192 of file perfect-square.cpp.
|
protected |
Array of y-coordinates of squares.
Definition at line 194 of file perfect-square.cpp.