CYCLUS
Classes | Public Member Functions | List of all members
cyclus::ProgTranslator Class Reference

Detailed Description

a helper class to translate a product exchange into a mathematical program.

use as follows:

// given a graph, g, and interface, iface
ProgTranslator t(g, iface);
t->ToProg();
// solve the program via the interface
t->FromProg();

Definition at line 36 of file prog_translator.h.

#include <prog_translator.h>

Classes

struct  Context
 

Public Member Functions

const ProgTranslatorContextctx () const
 
void FromProg ()
 
void Populate ()
 
 ProgTranslator (ExchangeGraph *g, OsiSolverInterface *iface)
 
 ProgTranslator (ExchangeGraph *g, OsiSolverInterface *iface, bool exclusive)
 
 ProgTranslator (ExchangeGraph *g, OsiSolverInterface *iface, double pseudo_cost)
 
 ProgTranslator (ExchangeGraph *g, OsiSolverInterface *iface, bool exclusive, double pseudo_cost)
 
void ToProg ()
 
void Translate ()
 

Constructor & Destructor Documentation

cyclus::ProgTranslator::ProgTranslator ( ExchangeGraph g,
OsiSolverInterface *  iface 
)

constructor

Parameters
gthe exchange graph
ifacethe solver interface
exclusivewhether or not to include binary-valued arcs
pseudo_costthe cost to use for faux arcs

Definition at line 16 of file prog_translator.cc.

cyclus::ProgTranslator::ProgTranslator ( ExchangeGraph g,
OsiSolverInterface *  iface,
bool  exclusive 
)

Definition at line 24 of file prog_translator.cc.

cyclus::ProgTranslator::ProgTranslator ( ExchangeGraph g,
OsiSolverInterface *  iface,
double  pseudo_cost 
)

Definition at line 33 of file prog_translator.cc.

cyclus::ProgTranslator::ProgTranslator ( ExchangeGraph g,
OsiSolverInterface *  iface,
bool  exclusive,
double  pseudo_cost 
)

Definition at line 42 of file prog_translator.cc.

Member Function Documentation

const ProgTranslatorContext& cyclus::ProgTranslator::ctx ( ) const
inline

Definition at line 71 of file prog_translator.h.

void cyclus::ProgTranslator::FromProg ( )

translates solution from iface back into graph matches

Definition at line 219 of file prog_translator.cc.

void cyclus::ProgTranslator::Populate ( )

populates the solver interface with values from the translators Context

Definition at line 104 of file prog_translator.cc.

void cyclus::ProgTranslator::ToProg ( )

translates graph into mathematic program via iface.

This method is equivalent to calling Translate(), then Populate().

Definition at line 124 of file prog_translator.cc.

void cyclus::ProgTranslator::Translate ( )

translates the graph, filling the translators Context

Definition at line 72 of file prog_translator.cc.


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