
Example: Placing people on a photo More...
Public Types | |
| enum | { BRANCH_NONE , BRANCH_DEGREE , BRANCH_AFC_SIZE } |
| Branching to use for model. More... | |
Public Member Functions | |
| Photo (const SizeOptions &opt) | |
| Actual model. More... | |
| bool | slave (const MetaInfo &mi) |
| Slave function for restarts. More... | |
| Photo (Photo &s) | |
| Constructor for cloning s. More... | |
| virtual Space * | copy (void) |
| Copy during cloning. More... | |
| virtual void | print (std::ostream &os) const |
| Print solution. More... | |
| virtual IntVar | cost (void) const |
| Return solution cost. More... | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| ScriptBase (const Options &opt) | |
| Constructor. More... | |
| ScriptBase (ScriptBase &e) | |
| Constructor used for cloning. More... | |
| virtual void | compare (const Space &home, std::ostream &os) const |
| Compare with s. More... | |
Protected Attributes | |
| const PhotoSpec | spec |
| Photo specification. More... | |
| IntVarArray | pos |
| Person's position on photo. More... | |
| IntVar | violations |
| Number of violated preferences. More... | |
| Rnd | rnd |
| Random number generator for LNS. More... | |
| double | p |
| Relaxation probability. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
| Choose output stream according to sn. More... | |
| template<class Script , template< class > class Engine, class Options > | |
| static void | run (const Options &opt, Script *s=NULL) |
Example: Placing people on a photo
A group of people wants to take a group photo. Each person can give preferences next to whom he or she wants to be placed on the photo. The problem to be solved is to find a placement that violates as few preferences as possible.
| anonymous enum |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
|
inlinevirtual |
|
related |
|
protected |
|
protected |