SumCostWarehouses Class Reference

Model with cost defined as sum. More...

## Public Member Functions

| SumCostWarehouses (const Options &opt)
| Actual model.
virtual IntVar | cost (void) const
| Return solution cost.
| SumCostWarehouses (SumCostWarehouses &s)
| Constructor for cloning s.
virtual Space * | copy (void)
| Copy during cloning.
virtual void | print (std::ostream &os) const
| Print solution.
Public Member Functions inherited from Warehouses< IntMinimizeScript >
| Warehouses (const Options &opt)
| Actual model.
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

IntVar | c_total
| Total cost.
Protected Attributes inherited from Warehouses< IntMinimizeScript >
IntVarArray | supplier
| Which warehouse supplies a store.
BoolVarArray | open
| Is a warehouse open (warehouse needed).
IntVarArray | c_store
| Cost of a store.

## 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)
Related Symbols inherited from Warehouses< IntMinimizeScript >
int | main (int argc, char *argv[])
| Main-function.

## Detailed Description

Model with cost defined as sum.

Definition at line 149 of file warehouses.cpp.

## Constructor & Destructor Documentation

## SumCostWarehouses() [1/2]

SumCostWarehouses::SumCostWarehouses | ( | const Options & | opt | ) |

inline

Actual model.

Definition at line 155 of file warehouses.cpp.

## SumCostWarehouses() [2/2]

SumCostWarehouses::SumCostWarehouses | ( | SumCostWarehouses & | s | ) |

inline

Constructor for cloning s.

Definition at line 165 of file warehouses.cpp.

## Member Function Documentation

## cost()

virtual IntVar SumCostWarehouses::cost | ( | void |  | ) | const

inline virtual

Return solution cost.

Definition at line 161 of file warehouses.cpp.

## copy()

virtual Space * SumCostWarehouses::copy | ( | void |  | ) |

inline virtual

Copy during cloning.

Definition at line 169 of file warehouses.cpp.

## print()

virtual void SumCostWarehouses::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > >.

Definition at line 174 of file warehouses.cpp.

## Member Data Documentation

## c_total

IntVar SumCostWarehouses::c_total

protected

Total cost.

Definition at line 152 of file warehouses.cpp.

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

- examples/warehouses.cpp