Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Attributes |
Related Symbols |
List of all members
BACP Class Reference
Example: The balanced academic curriculum problem More...
Public Types | |
| enum | { BRANCHING_NAIVE , BRANCHING_LOAD , BRANCHING_LOAD_REV } |
| Branching variants. More... | |
Public Member Functions | |
| BACP (const SizeOptions &opt) | |
| Actual model. | |
| BACP (BACP &bacp) | |
| Constructor for copying bacp. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual IntVar | cost (void) const |
| Return solution cost. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
| 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. | |
Static Public Member Functions | |
| static int | load (const Space &home, IntVar x, int) |
| Value selection function for load branching. | |
| static int | load_rev (const Space &home, IntVar x, int) |
| Value selection function for reverse load branching. | |
| 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=nullptr) |
Protected Attributes | |
| const Curriculum | curr |
| The curriculum to be scheduled. | |
| IntVarArray | l |
| Academic load for each period. | |
| IntVar | u |
| Maximum academic load. | |
| IntVarArray | q |
| Number of courses assigned to a period. | |
| IntVarArray | x |
| Period to which a course is assigned. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Parameters for balanced academic curriculum | |
| const Course | courses8 [] |
| Courses for first example. | |
| const char * | prereqs8 [] |
| Prerequisites for first example. | |
| const Course | courses10 [] |
| Courses for second example. | |
| const char * | prereqs10 [] |
| Prerequisites for second example. | |
| const Course | courses12 [] |
| Courses for third example. | |
| const char * | prereqs12 [] |
| Prerequisites for third example. | |
| const Curriculum | curriculum [] |
| The example specifications. | |
| const unsigned int | n_examples = sizeof(curriculum) / sizeof(Curriculum) |
| The number of examples. | |
Detailed Description
Example: The balanced academic curriculum problem
This is problem 030 from http://www.csplib.org/.
A custom value selection from "A CP Approach to the Balanced Academic Curriculum Problem", J.N. Monette, P. Schaus, S. Zampelli, Y. Deville, and P. Dupont is available.
Member Enumeration Documentation
◆ anonymous enum
| anonymous enum |
Constructor & Destructor Documentation
◆ BACP() [1/2]
|
inline |
◆ BACP() [2/2]
|
inline |
Member Function Documentation
◆ load()
◆ load_rev()
◆ copy()
|
inlinevirtual |
◆ cost()
|
inlinevirtual |
◆ print()
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > >.
Friends And Related Symbol Documentation
◆ courses8
|
Initial value:
=
{
{"dew100", 1},
{"fis100", 3},
{"hcw310", 1},{"iwg101", 2},{"mat190", 4},{"mat192", 4},{"dew101", 1},
{"fis101", 5},{"iwi131", 3},{"mat191", 4},{"mat193", 4},{"fis102", 5},{"hxwxx1", 1},
{"iei134", 3},{"iei141", 3},{"mat194", 4},
{"dewxx0", 1},{"hcw311", 1},{"iei132", 3},{"iei133", 3},{"iei142", 3},{"iei162", 3},
{"iwn170", 3},{"mat195", 3},{"hxwxx2", 1},{"iei231", 4},{"iei241", 4},{"iei271", 3},{"iei281", 3},{"iwn261", 3},
{"hfw120", 2},{"iei233", 4},{"iei238", 3},{"iei261", 3},{"iei272", 3},{"iei273", 3},{"iei161", 3},{"iei232", 3},
{"iei262", 3},{"iei274", 3},{"iwi365", 3},{"iwn270", 3},{"hrw130", 2},{"iei218", 3},{"iei219", 3},{"iei248", 3},
{0,0}
}
Courses for first example.
◆ prereqs8
◆ courses10
◆ prereqs10
◆ courses12
◆ prereqs12
◆ curriculum
|
Initial value:
=
{ { 8, 10, 24, 2, 10,
},
{ 10, 10, 24, 2, 10,
},
{ 12, 10, 24, 2, 10,
}
}
The example specifications.
◆ n_examples
|
◆ main()
Member Data Documentation
◆ curr
|
protected |
◆ l
|
protected |
◆ u
◆ q
|
protected |
◆ x
|
protected |
The documentation for this class was generated from the following file:
- examples/bacp.cpp
