Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Example: Airline crew allocation More...

Public Member Functions

 Crew (const Options &opt)
 The actual model.
 
virtual void print (std::ostream &os) const
 Print solution.
 
 Crew (Crew &s)
 Constructor for cloning s.
 
virtual Spacecopy (void)
 Copy during cloning.
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 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 Attributes

SetVarArray flight
 The crew for each flight.
 

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< BaseSpace >
static std::ostream & select_ostream (const char *sn, std::ofstream &ofs)
 Choose output stream according to sn.
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Detailed Description

Example: Airline crew allocation

Assign 20 flight attendants to 10 flights. Each flight needs a certain number of cabin crew, and they have to speak certain languages. Every cabin crew member has two flights off after an attended flight.

Definition at line 90 of file crew.cpp.

Constructor & Destructor Documentation

◆ Crew() [1/2]

Crew::Crew ( const Options & opt)
inline

The actual model.

Definition at line 96 of file crew.cpp.

◆ Crew() [2/2]

Crew::Crew ( Crew & s)
inline

Constructor for cloning s.

Definition at line 164 of file crew.cpp.

Member Function Documentation

◆ print()

virtual void Crew::print ( std::ostream & os) const
inlinevirtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 133 of file crew.cpp.

◆ copy()

virtual Space * Crew::copy ( void )
inlinevirtual

Copy during cloning.

Definition at line 170 of file crew.cpp.

Friends And Related Symbol Documentation

◆ main()

int main ( int argc,
char * argv[] )
related

Main-function.

Definition at line 180 of file crew.cpp.

Member Data Documentation

◆ flight

SetVarArray Crew::flight

The crew for each flight.

Definition at line 93 of file crew.cpp.


The documentation for this class was generated from the following file: