Core-node base class for the FlopCpp-Smi modelling framework. More...
Classes | |
class | CoreNodeBase |
Problem-independent base class for an LP/MIP model in one node of a tree. More... | |
class | ScenTreeStruct |
Base class for scenario-trees. More... | |
class | BinTreeStruct |
Class for balanced binary trees. More... | |
class | TwoStageTree |
Class for a 2-stage tree (bush) More... | |
Functions | |
SmiCoreData * | create_smi_core (vector< CoreNodeBase * > &coreNodes, std::string problemName="flop-smi_ex") |
creates an SmiCoreData object from a vector of core-node models More... | |
double | solve_det_equiv (SmiScnModel &stochModel, MP_model::MP_direction const minOrMax, double const *&p2solVector, std::string const problemName) |
solves the deterministic equivalent of an SmiScnModel model More... | |
double | minimize_det_equiv (SmiScnModel &stochModel, double const *&p2solVector, std::string const problemName="flop-smi_ex") |
wrapper for solve_det_equiv with minOrMax = MP_model::MINIMIZE More... | |
double | maximize_det_equiv (SmiScnModel &stochModel, double const *&p2solVector, std::string const problemName="flop-smi_ex") |
wrapper for solve_det_equiv with minOrMax = MP_model::MAXIMIZE More... | |
Core-node base class for the FlopCpp-Smi modelling framework.
Scenario-tree classes for the FlopCpp-Smi modelling framework.
Part of the bundle described in paper "A C++ Modelling Environment for Stochastic Programming" by Michal Kaut, Alan King and Tim Hultberg, IBM Technical report RC24662, http://domino.watson.ibm.com/library/ cyberdig.nsf/papers/3E80629707DD1782852574E300592E33
This file includes definitions of the general, problem independent, core-node base class.
Note that the code is meant as an illustrative example that mixes different styles to show more ways of doing things, something you most likely do not want to do in a real code. In addition, in a real code one would probably made many of the members private and write get/set methods where needed.Note that the COIN-OR classes should be included as "coin/class-name", but some of the FlopC++ classes do not do that, so we have to call the class without the prefix and add the coin dir. to the search path.
Part of the bundle described in paper "A C++ Modelling Environment for Stochastic Programming" by Michal Kaut, Alan King and Tim Hultberg, IBM Technical report RC24662, http://domino.watson.ibm.com/library/ cyberdig.nsf/papers/3E80629707DD1782852574E300592E33
This file includes declarations for classes describing different scenario-tree structures.
SmiCoreData* FlopSmiEx::create_smi_core | ( | vector< CoreNodeBase * > & | coreNodes, |
std::string | problemName = "flop-smi_ex" |
||
) |
creates an SmiCoreData
object from a vector of core-node models
Note that the input must be a vector of the base-class pointers CoreNodeBase*
. If we have a vector of pointers to derived classes, we have to make a copy with base-class pointers first.
double FlopSmiEx::solve_det_equiv | ( | SmiScnModel & | stochModel, |
MP_model::MP_direction const | minOrMax, | ||
double const *& | p2solVector, | ||
std::string const | problemName | ||
) |
solves the deterministic equivalent of an SmiScnModel
model
stochModel | the stochastic model to solve | |
[in] | minOrMax | optimization direction as MP_model::MP_direction |
[out] | p2solVector | will point to a solution vector |
[in] | problemName | used for the output MPS files (in debug mode) |
double FlopSmiEx::minimize_det_equiv | ( | SmiScnModel & | stochModel, |
double const *& | p2solVector, | ||
std::string const | problemName = "flop-smi_ex" |
||
) |
wrapper for solve_det_equiv
with minOrMax = MP_model::MINIMIZE
double FlopSmiEx::maximize_det_equiv | ( | SmiScnModel & | stochModel, |
double const *& | p2solVector, | ||
std::string const | problemName = "flop-smi_ex" |
||
) |
wrapper for solve_det_equiv
with minOrMax = MP_model::MAXIMIZE