#include <iomanip>
#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 objects for models at different stages of the scenario tree. It is based on the
stampl.cpp
example from FlopC++ distribution.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 functions 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 186 of file investment.cpp.
References ScenTreeStruct::firstLeaf, BinTreeStruct::get_parent(), RootNode::make_objective_function(), ScenTreeStruct::nmbNodes, StageNode::objFunction, OSI_SOLVER_INTERFACE, and StageNode::x.