Topics | |
| Variable selection for integer and Boolean variables | |
| Value selection for integer and Boolean variables | |
| Value selection for assigning integer variables | |
| Symmetry declarations | |
Classes | |
| class | Gecode::IntAFC |
| Recording AFC information for integer variables. More... | |
| class | Gecode::BoolAFC |
| Recording AFC information for Boolean variables. More... | |
| class | Gecode::IntAction |
| Recording actions for integer variables. More... | |
| class | Gecode::BoolAction |
| Recording actions for Boolean variables. More... | |
| class | Gecode::IntCHB |
| Recording CHB for integer variables. More... | |
| class | Gecode::BoolCHB |
| Recording CHB for Boolean variables. More... | |
| class | Gecode::IntVarBranch |
| Which integer variable to select for branching. More... | |
| class | Gecode::BoolVarBranch |
| Which Boolean variable to select for branching. More... | |
| class | Gecode::IntValBranch |
| Which values to select for branching first. More... | |
| class | Gecode::BoolValBranch |
| Which values to select for branching first. More... | |
| class | Gecode::IntAssign |
| Which values to select for assignment. More... | |
| class | Gecode::BoolAssign |
| Which values to select for assignment. More... | |
| class | Gecode::SymmetryHandle |
| A reference-counted pointer to a SymmetryObject. More... | |
Typedefs | |
| typedef std::function< bool(const Space &home, IntVar x, int i)> | Gecode::IntBranchFilter |
| Branch filter function type for integer variables. | |
| typedef std::function< bool(const Space &home, BoolVar x, int i)> | Gecode::BoolBranchFilter |
| Branch filter function type for Boolean variables. | |
| typedef std::function< double(const Space &home, IntVar x, int i)> | Gecode::IntBranchMerit |
| Branch merit function type for integer variables. | |
| typedef std::function< double(const Space &home, BoolVar x, int i)> | Gecode::BoolBranchMerit |
| Branch merit function type for Boolean variables. | |
| typedef std::function< int(const Space &home, IntVar x, int i)> | Gecode::IntBranchVal |
| Branch value function type for integer variables. | |
| typedef std::function< int(const Space &home, BoolVar x, int i)> | Gecode::BoolBranchVal |
| Branch value function type for Boolean variables. | |
| typedef std::function< void(Space &home, unsigned int a, IntVar x, int i, int n)> | Gecode::IntBranchCommit |
| Branch commit function type for integer variables. | |
| typedef std::function< void(Space &home, unsigned int a, BoolVar x, int i, int n)> | Gecode::BoolBranchCommit |
| Branch commit function type for Boolean variables. | |
Functions | |
| void | Gecode::branch (Home home, const IntVarArgs &x, IntVarBranch vars, IntValBranch vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over x with variable selection vars and value selection vals. | |
| void | Gecode::branch (Home home, const IntVarArgs &x, TieBreak< IntVarBranch > vars, IntValBranch vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over x with tie-breaking variable selection vars and value selection vals. | |
| void | Gecode::branch (Home home, IntVar x, IntValBranch vals, IntVarValPrint vvp=nullptr) |
| Branch over x with value selection vals. | |
| void | Gecode::branch (Home home, OpenIntVarList x) |
| Branch over the eventual integer list x. | |
| void | Gecode::branch (Home home, OpenBoolVarList x) |
| Branch over the eventual Boolean list x. | |
| void | Gecode::branch (Home home, OpenIntVarList x, IntVarBranch vars, IntValBranch vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over an open integer list with standard selectors. | |
| void | Gecode::branch (Home home, OpenBoolVarList x, BoolVarBranch vars, BoolValBranch vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over an open Boolean list with standard selectors. | |
| void | Gecode::branch (Home home, const BoolVarArgs &x, BoolVarBranch vars, BoolValBranch vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over x with variable selection vars and value selection vals. | |
| void | Gecode::branch (Home home, const BoolVarArgs &x, TieBreak< BoolVarBranch > vars, BoolValBranch vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over x with tie-breaking variable selection vars and value selection vals. | |
| void | Gecode::branch (Home home, BoolVar x, BoolValBranch vals, BoolVarValPrint vvp=nullptr) |
| Branch over x with value selection vals. | |
| void | Gecode::assign (Home home, const IntVarArgs &x, IntVarBranch vars, IntAssign vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Assign all x with variable selection vars with value selection vals. | |
| void | Gecode::assign (Home home, const IntVarArgs &x, TieBreak< IntVarBranch > vars, IntAssign vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Assign all x with tie-breaking variable selection vars and value selection vals. | |
| void | Gecode::assign (Home home, IntVar x, IntAssign vals, IntVarValPrint vvp=nullptr) |
| Assign x with value selection vals. | |
| void | Gecode::assign (Home home, const BoolVarArgs &x, BoolVarBranch vars, BoolAssign vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Assign all x with variable selection vars with value selection vals. | |
| void | Gecode::assign (Home home, const BoolVarArgs &x, TieBreak< BoolVarBranch > vars, BoolAssign vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Assign all x with tie-breaking variable selection vars and value selection vals. | |
| void | Gecode::assign (Home home, BoolVar x, BoolAssign vals, BoolVarValPrint vvp=nullptr) |
| Assign x with value selection vals. | |
| void | Gecode::branch (Home home, const IntVarArgs &x, IntValBranch vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over x with value selection vals. | |
| void | Gecode::branch (Home home, const BoolVarArgs &x, BoolValBranch vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over x with value selection vals. | |
| void | Gecode::assign (Home home, const IntVarArgs &x, IntAssign vals, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Assign all x with value selection vals. | |
| void | Gecode::assign (Home home, const BoolVarArgs &x, BoolAssign vals, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Assign all x with value selection vals. | |
| void | Gecode::branch (Home home, const IntVarArgs &x, IntVarBranch vars, IntValBranch vals, const Symmetries &syms, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over x with variable selection vars and value selection vals with symmetry breaking. | |
| void | Gecode::branch (Home home, const IntVarArgs &x, TieBreak< IntVarBranch > vars, IntValBranch vals, const Symmetries &syms, IntBranchFilter bf=nullptr, IntVarValPrint vvp=nullptr) |
| Branch over x with tie-breaking variable selection vars and value selection vals with symmetry breaking. | |
| void | Gecode::branch (Home home, const BoolVarArgs &x, BoolVarBranch vars, BoolValBranch vals, const Symmetries &syms, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over x with variable selection vars and value selection vals with symmetry breaking. | |
| void | Gecode::branch (Home home, const BoolVarArgs &x, TieBreak< BoolVarBranch > vars, BoolValBranch vals, const Symmetries &syms, BoolBranchFilter bf=nullptr, BoolVarValPrint vvp=nullptr) |
| Branch over x with tie-breaking variable selection vars and value selection vals with symmetry breaking. | |
Detailed Description
Typedef Documentation
◆ IntBranchFilter
| typedef std::function<bool(const Space& home, IntVar x, int i)> Gecode::IntBranchFilter |
◆ BoolBranchFilter
| typedef std::function<bool(const Space& home, BoolVar x, int i)> Gecode::BoolBranchFilter |
◆ IntBranchMerit
| typedef std::function<double(const Space& home, IntVar x, int i)> Gecode::IntBranchMerit |
◆ BoolBranchMerit
| typedef std::function<double(const Space& home, BoolVar x, int i)> Gecode::BoolBranchMerit |
◆ IntBranchVal
| typedef std::function<int(const Space& home, IntVar x, int i)> Gecode::IntBranchVal |
◆ BoolBranchVal
| typedef std::function<int(const Space& home, BoolVar x, int i)> Gecode::BoolBranchVal |
◆ IntBranchCommit
| typedef std::function<void(Space& home, unsigned int a, IntVar x, int i, int n)> Gecode::IntBranchCommit |
Branch commit function type for integer variables.
The function must post a constraint on the variable x which corresponds to the alternative a. The integer i refers to the variable's position in the original array passed to the brancher. The value n is the value computed by the corresponding branch value function.
◆ BoolBranchCommit
| typedef std::function<void(Space& home, unsigned int a, BoolVar x, int i, int n)> Gecode::BoolBranchCommit |
Branch commit function type for Boolean variables.
The function must post a constraint on the variable x which corresponds to the alternative a. The integer i refers to the variable's position in the original array passed to the brancher. The value n is the value computed by the corresponding branch value function.
Function Documentation
◆ branch() [1/16]
| void Gecode::branch | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntVarBranch | vars, | ||
| IntValBranch | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over x with variable selection vars and value selection vals.
Definition at line 39 of file branch.cpp.
◆ branch() [2/16]
| void Gecode::branch | ( | Home | home, |
| const IntVarArgs & | x, | ||
| TieBreak< IntVarBranch > | vars, | ||
| IntValBranch | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over x with tie-breaking variable selection vars and value selection vals.
Definition at line 65 of file branch.cpp.
◆ branch() [3/16]
| void Gecode::branch | ( | Home | home, |
| IntVar | x, | ||
| IntValBranch | vals, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over x with value selection vals.
Definition at line 140 of file branch.cpp.
◆ branch() [4/16]
| void Gecode::branch | ( | Home | home, |
| OpenIntVarList | x ) |
Branch over the eventual integer list x.
Selects the first unassigned materialized variable and its minimum value. Once all materialized variables are assigned, tries closing the list before extending it by one position.
Definition at line 354 of file branch.cpp.
◆ branch() [5/16]
| void Gecode::branch | ( | Home | home, |
| OpenBoolVarList | x ) |
Branch over the eventual Boolean list x.
Definition at line 359 of file branch.cpp.
◆ branch() [6/16]
| void Gecode::branch | ( | Home | home, |
| OpenIntVarList | x, | ||
| IntVarBranch | vars, | ||
| IntValBranch | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over an open integer list with standard selectors.
Selectors consider all materialized positions accepted by the filter. Once no unassigned variable is accepted, the brancher tries closing at known_length() before requiring another position and resuming value selection. Filters and callbacks receive the position in the list. Variables rejected by the filter may be unassigned in a solution. Without a practical bound on list length, search can be very expensive.
To decide the length before list values, post an ordinary brancher on x.length() before the list brancher, for example:
Branchers run in posting order. Once the length is assigned, propagation materializes that many positions before the list brancher selects values.
Action and CHB selection require the complete list to be materialized when posting; otherwise Int::UnknownBranching is thrown.
Definition at line 364 of file branch.cpp.
◆ branch() [7/16]
| void Gecode::branch | ( | Home | home, |
| OpenBoolVarList | x, | ||
| BoolVarBranch | vars, | ||
| BoolValBranch | vals, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over an open Boolean list with standard selectors.
The incremental branching, filter, and Action/CHB restrictions are as for integers.
Definition at line 380 of file branch.cpp.
◆ branch() [8/16]
| void Gecode::branch | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| BoolVarBranch | vars, | ||
| BoolValBranch | vals, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over x with variable selection vars and value selection vals.
Definition at line 217 of file branch.cpp.
◆ branch() [9/16]
| void Gecode::branch | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| TieBreak< BoolVarBranch > | vars, | ||
| BoolValBranch | vals, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over x with tie-breaking variable selection vars and value selection vals.
Definition at line 233 of file branch.cpp.
◆ branch() [10/16]
| void Gecode::branch | ( | Home | home, |
| BoolVar | x, | ||
| BoolValBranch | vals, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over x with value selection vals.
Definition at line 280 of file branch.cpp.
◆ assign() [1/8]
| void Gecode::assign | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntVarBranch | vars, | ||
| IntAssign | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Assign all x with variable selection vars with value selection vals.
Definition at line 147 of file branch.cpp.
◆ assign() [2/8]
| void Gecode::assign | ( | Home | home, |
| const IntVarArgs & | x, | ||
| TieBreak< IntVarBranch > | vars, | ||
| IntAssign | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Assign all x with tie-breaking variable selection vars and value selection vals.
◆ assign() [3/8]
| void Gecode::assign | ( | Home | home, |
| IntVar | x, | ||
| IntAssign | vals, | ||
| IntVarValPrint | vvp = nullptr ) |
Assign x with value selection vals.
Definition at line 210 of file branch.cpp.
◆ assign() [4/8]
| void Gecode::assign | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| BoolVarBranch | vars, | ||
| BoolAssign | vals, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Assign all x with variable selection vars with value selection vals.
Definition at line 286 of file branch.cpp.
◆ assign() [5/8]
| void Gecode::assign | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| TieBreak< BoolVarBranch > | vars, | ||
| BoolAssign | vals, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Assign all x with tie-breaking variable selection vars and value selection vals.
◆ assign() [6/8]
| void Gecode::assign | ( | Home | home, |
| BoolVar | x, | ||
| BoolAssign | vals, | ||
| BoolVarValPrint | vvp = nullptr ) |
Assign x with value selection vals.
Definition at line 348 of file branch.cpp.
◆ branch() [11/16]
|
inline |
Branch over x with value selection vals.
Definition at line 37 of file branch.hpp.
◆ branch() [12/16]
|
inline |
Branch over x with value selection vals.
Definition at line 42 of file branch.hpp.
◆ assign() [7/8]
|
inline |
Assign all x with value selection vals.
Definition at line 48 of file branch.hpp.
◆ assign() [8/8]
|
inline |
Assign all x with value selection vals.
Definition at line 53 of file branch.hpp.
◆ branch() [13/16]
| void Gecode::branch | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntVarBranch | vars, | ||
| IntValBranch | vals, | ||
| const Symmetries & | syms, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over x with variable selection vars and value selection vals with symmetry breaking.
Throws LDSBBadValueSelection exception if vals is any of SEL_SPLIT_MIN, SEL_SPLIT_MAX, SEL_RANGE_MIN, SEL_RANGE_MAX, SEL_VALUES_MIN, and SEL_VALUES_MAX, or if vals is SEL_VAL_COMMIT with a custom commit function.
◆ branch() [14/16]
| void Gecode::branch | ( | Home | home, |
| const IntVarArgs & | x, | ||
| TieBreak< IntVarBranch > | vars, | ||
| IntValBranch | vals, | ||
| const Symmetries & | syms, | ||
| IntBranchFilter | bf = nullptr, | ||
| IntVarValPrint | vvp = nullptr ) |
Branch over x with tie-breaking variable selection vars and value selection vals with symmetry breaking.
Throws LDSBBadValueSelection exception if vals is any of SEL_SPLIT_MIN, SEL_SPLIT_MAX, SEL_RANGE_MIN, SEL_RANGE_MAX, SEL_VALUES_MIN, and SEL_VALUES_MAX, or if vals is SEL_VAL_COMMIT with a custom commit function.
◆ branch() [15/16]
| void Gecode::branch | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| BoolVarBranch | vars, | ||
| BoolValBranch | vals, | ||
| const Symmetries & | syms, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over x with variable selection vars and value selection vals with symmetry breaking.
Throws LDSBBadValueSelection exception if vals is any of SEL_SPLIT_MIN, SEL_SPLIT_MAX, SEL_RANGE_MIN, SEL_RANGE_MAX, SEL_VALUES_MIN, and SEL_VALUES_MAX, or if vals is SEL_VAL_COMMIT with a custom commit function.
◆ branch() [16/16]
| void Gecode::branch | ( | Home | home, |
| const BoolVarArgs & | x, | ||
| TieBreak< BoolVarBranch > | vars, | ||
| BoolValBranch | vals, | ||
| const Symmetries & | syms, | ||
| BoolBranchFilter | bf = nullptr, | ||
| BoolVarValPrint | vvp = nullptr ) |
Branch over x with tie-breaking variable selection vars and value selection vals with symmetry breaking.
Throws LDSBBadValueSelection exception if vals is any of SEL_SPLIT_MIN, SEL_SPLIT_MAX, SEL_RANGE_MIN, SEL_RANGE_MAX, SEL_VALUES_MIN, and SEL_VALUES_MAX, or if vals is SEL_VAL_COMMIT with a custom commit function.
