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. | |
bool | slave (const MetaInfo &mi) |
Slave function for restarts. | |
Photo (Photo &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Copy during cloning. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
virtual IntVar | cost (void) const |
Return solution cost. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > > | |
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 | |
const PhotoSpec | spec |
Photo specification. | |
IntVarArray | pos |
Person's position on photo. | |
IntVar | violations |
Number of violated preferences. | |
Rnd | rnd |
Random number generator for LNS. | |
double | p |
Relaxation probability. |
Related Symbols | |
(Note that these are not member symbols.) | |
int | main (int argc, char *argv[]) |
Main-function. |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > > | |
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: 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< Driver::IgnoreStepOption< IntMinimizeSpace > >.
|
inlinevirtual |
|
protected |
|
protected |