#include <iomanip>
#include "SmiScnModel.hpp"
#include "flopc.hpp"
#include "OsiClpSolverInterface.hpp"
Go to the source code of this file.
Namespaces | |
namespace | std |
namespace | flopc |
Classes | |
class | StageNode |
This is the base class for describing a model in one node of the tree. More... | |
class | RootNode |
Class for the root node of the tree. More... | |
class | MidStageNode |
Class for the middle-nodes, i.e. all the nodes between the root and leaves. More... | |
class | LeafNode |
This is the class for the leaves, i.e. the last-stage nodes. More... | |
class | ScenTreeStruct |
Class describing the scenario-tree structure. More... | |
class | BinTreeStruct |
Class for balanced binary trees. More... | |
Defines | |
#define | OSI_SOLVER_INTERFACE OsiClpSolverInterface |
Functions | |
int | main () |
This version uses FlopC++ to construct the core model and then Smi to construct the scenario-tree structure (using FlopC++ to get the relevant column and row indices). It is basically a combination of the Smi and FlopC++ (with stage-node objects) examples. Note that we use the stage-node objects directly from the FlopC++ example, which means that they are more general than needed in this case (where we only construct a deterministic model, so all non-leaf nodes only have one child).
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 make the members private and write get/set methods where needed. This has been omitted here to make the example shorter.
Definition in file investment.cpp.
#define OSI_SOLVER_INTERFACE OsiClpSolverInterface |
int main | ( | ) |
Definition at line 254 of file investment.cpp.
References ScenTreeStruct::firstLeaf, BinTreeStruct::get_parent(), RootNode::make_objective_function(), ScenTreeStruct::nmbNodes, StageNode::objFunction, and OSI_SOLVER_INTERFACE.