CYCLUS
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
cyclus::ExchangeSolver Class Referenceabstract

Detailed Description

a very simple interface for solving translated resource exchanges

Definition at line 15 of file exchange_solver.h.

#include <exchange_solver.h>

Inheritance diagram for cyclus::ExchangeSolver:
cyclus::GreedySolver cyclus::ProgSolver

Public Member Functions

double ArcCost (const Arc &a)
 
 ExchangeSolver (bool exclusive_orders=kDefaultExclusive)
 
void graph (ExchangeGraph *graph)
 
ExchangeGraphgraph () const
 
double Solve (ExchangeGraph *graph=NULL)
 
void verbose ()
 
virtual ~ExchangeSolver ()
 
void sim_ctx (Context *c)
 
Contextsim_ctx ()
 
double PseudoCost ()
 
double PseudoCost (double cost_factor)
 
double PseudoCostByCap (double cost_factor)
 
double PseudoCostByPref (double cost_factor)
 

Static Public Member Functions

static double Cost (const Arc &a, bool exclusive_orders=kDefaultExclusive)
 

Static Public Attributes

static const bool kDefaultExclusive = true
 

Protected Member Functions

virtual double SolveGraph ()=0
 

Protected Attributes

bool exclusive_orders_
 
ExchangeGraphgraph_
 
Contextsim_ctx_
 
bool verbose_
 

Constructor & Destructor Documentation

cyclus::ExchangeSolver::ExchangeSolver ( bool  exclusive_orders = kDefaultExclusive)
inlineexplicit

Definition at line 23 of file exchange_solver.h.

virtual cyclus::ExchangeSolver::~ExchangeSolver ( )
inlinevirtual

Definition at line 27 of file exchange_solver.h.

Member Function Documentation

double cyclus::ExchangeSolver::ArcCost ( const Arc a)
inline

return the cost of an arc

Definition at line 62 of file exchange_solver.h.

double cyclus::ExchangeSolver::Cost ( const Arc a,
bool  exclusive_orders = kDefaultExclusive 
)
static

return the cost of an arc

Definition at line 11 of file exchange_solver.cc.

void cyclus::ExchangeSolver::graph ( ExchangeGraph graph)
inline

Definition at line 37 of file exchange_solver.h.

ExchangeGraph* cyclus::ExchangeSolver::graph ( ) const
inline

Definition at line 38 of file exchange_solver.h.

double cyclus::ExchangeSolver::PseudoCost ( )

Calculates the ratio of the maximum objective coefficient to minimum unit capacity plus an added cost.

This is guaranteed to be larger than any other arc cost measure and can be used as a cost for unmet demand.

Parameters
cost_factorthe additional cost for false arc costs, i.e., max_cost
  • (1 + cost_factor)

Definition at line 16 of file exchange_solver.cc.

double cyclus::ExchangeSolver::PseudoCost ( double  cost_factor)

Definition at line 20 of file exchange_solver.cc.

double cyclus::ExchangeSolver::PseudoCostByCap ( double  cost_factor)

Definition at line 24 of file exchange_solver.cc.

double cyclus::ExchangeSolver::PseudoCostByPref ( double  cost_factor)

Definition at line 86 of file exchange_solver.cc.

void cyclus::ExchangeSolver::sim_ctx ( Context c)
inline

simulation context get/set

Definition at line 31 of file exchange_solver.h.

Context* cyclus::ExchangeSolver::sim_ctx ( )
inline

Definition at line 32 of file exchange_solver.h.

double cyclus::ExchangeSolver::Solve ( ExchangeGraph graph = NULL)
inline

interface for solving a given exchange graph

Parameters
apointer to the graph to be solved

Definition at line 42 of file exchange_solver.h.

virtual double cyclus::ExchangeSolver::SolveGraph ( )
protectedpure virtual

Worker function for solving a graph.

This must be implemented by any solver.

Implemented in cyclus::GreedySolver, and cyclus::ProgSolver.

void cyclus::ExchangeSolver::verbose ( )
inline

tell the solver to be verbose

Definition at line 36 of file exchange_solver.h.

Member Data Documentation

bool cyclus::ExchangeSolver::exclusive_orders_
protected

Definition at line 69 of file exchange_solver.h.

ExchangeGraph* cyclus::ExchangeSolver::graph_
protected

Definition at line 68 of file exchange_solver.h.

const bool cyclus::ExchangeSolver::kDefaultExclusive = true
static

default value to allow exclusive orders or not

Definition at line 18 of file exchange_solver.h.

Context* cyclus::ExchangeSolver::sim_ctx_
protected

Definition at line 71 of file exchange_solver.h.

bool cyclus::ExchangeSolver::verbose_
protected

Definition at line 70 of file exchange_solver.h.


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