update, and dispose variables | |
Gecode::Space::Space (void) | |
Default constructor. | |
Gecode::Space::Space (Space &s) | |
Constructor for cloning. | |
virtual | Gecode::Space::~Space (void) |
Destructor. | |
virtual Space * | Gecode::Space::copy (void)=0 |
Copying member function. | |
virtual void | Gecode::Space::constrain (const Space &best) |
Constrain function for best solution search. | |
virtual bool | Gecode::Space::master (const MetaInfo &mi) |
Master configuration function for meta search engines. | |
virtual bool | Gecode::Space::slave (const MetaInfo &mi) |
Slave configuration function for meta search engines. | |
Scripts (or models) are programmed by inheriting from the class Gecode::Space. For many examples see Example scripts (models).
Gecode::Space::Space | ( | Space & | s | ) |
|
pure virtual |
Copying member function.
Must create a new object using the constructor for cloning.
Implemented in Gecode::FlatZinc::FlatZincSpace, Test::AFC::TestSpace, Test::Array::TestSpace, Test::Assign::BoolTestSpace, Test::Assign::FloatTestSpace, Test::Assign::IntTestSpace, Test::Assign::SetTestSpace, Test::Branch::BoolTestSpace, Test::Branch::FloatTestSpace, Test::Branch::IntTestSpace, Test::Branch::SetTestSpace, Test::Float::TestSpace, Test::Int::BinPacking::CliqueMBPT::TestSpace, Test::Int::Cumulatives::Ass, Test::Int::Distinct::Pathological::TestSpace, Test::Int::TestSpace, Test::LDSB::LDSBLatin::Latin, Test::LDSB::OneArray, Test::LDSB::OneArraySet, Test::NoGoods::Hamming, Test::NoGoods::Queens, Test::Search::FailImmediate, Test::Search::HasSolutions, Test::Search::SolveImmediate, and Test::Set::SetTestSpace.
|
virtual |
Constrain function for best solution search.
Must constrain this space to be better than the so far best solution best.
The default function does nothing.
Reimplemented in Gecode::FlatZinc::FlatZincSpace, Gecode::FloatMaximizeSpace, Gecode::FloatMinimizeSpace, Gecode::IntLexMaximizeSpace, Gecode::IntLexMinimizeSpace, Gecode::IntMaximizeSpace, Gecode::IntMinimizeSpace, Test::Search::FailImmediate, Test::Search::HasSolutions, and Test::Search::SolveImmediate.
|
virtual |
Master configuration function for meta search engines.
This configuration function is used by both restart and portfolio meta search engines.
If a solution has been found, then search will continue with a restart id the function returns true, otherwise search will continue.
The default function posts no-goods obtained from mi.
The default function does nothing.
Reimplemented in Test::Search::HasSolutions, and Test::Search::TestSpace.
|
virtual |
Slave configuration function for meta search engines.
This configuration function is used by both restart and portfolio meta search engines.
If the function returns true, the search on the slave space is considered complete, i.e., if it fails or exhaustively explores the entire search space, the meta search engine finishes. If the function returns false, the search on the slave space is considered incomplete, and the meta engine will restart the search regardless of whether the search on the slave space finishes or times out.
The default function does nothing and returns true.
Reimplemented in Gecode::FlatZinc::FlatZincSpace.