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_
bool verbose_

Constructor & Destructor Documentation

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

Definition at line 23 of file exchange_solver.h.

virtual cyclus::ExchangeSolver::~ExchangeSolver ( )

Definition at line 27 of file exchange_solver.h.

Member Function Documentation

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

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 

return the cost of an arc

Definition at line 11 of file

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

Definition at line 37 of file exchange_solver.h.

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

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.

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

Definition at line 16 of file

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

Definition at line 20 of file

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

Definition at line 24 of file

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

Definition at line 86 of file

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

simulation context get/set

Definition at line 31 of file exchange_solver.h.

Context* cyclus::ExchangeSolver::sim_ctx ( )

Definition at line 32 of file exchange_solver.h.

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

interface for solving a given exchange graph

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 ( )

tell the solver to be verbose

Definition at line 36 of file exchange_solver.h.

Member Data Documentation

bool cyclus::ExchangeSolver::exclusive_orders_

Definition at line 69 of file exchange_solver.h.

ExchangeGraph* cyclus::ExchangeSolver::graph_

Definition at line 68 of file exchange_solver.h.

const bool cyclus::ExchangeSolver::kDefaultExclusive = true

default value to allow exclusive orders or not

Definition at line 18 of file exchange_solver.h.

Context* cyclus::ExchangeSolver::sim_ctx_

Definition at line 71 of file exchange_solver.h.

bool cyclus::ExchangeSolver::verbose_

Definition at line 70 of file exchange_solver.h.

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