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:
Inheritance graph
[legend]

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

◆ ExchangeSolver()

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

Definition at line 23 of file exchange_solver.h.

◆ ~ExchangeSolver()

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

Definition at line 27 of file exchange_solver.h.

Member Function Documentation

◆ ArcCost()

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

return the cost of an arc

Definition at line 62 of file exchange_solver.h.

◆ Cost()

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.

◆ graph() [1/2]

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

Definition at line 37 of file exchange_solver.h.

◆ graph() [2/2]

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

Definition at line 38 of file exchange_solver.h.

◆ PseudoCost() [1/2]

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.

◆ PseudoCost() [2/2]

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

Definition at line 20 of file exchange_solver.cc.

◆ PseudoCostByCap()

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

Definition at line 24 of file exchange_solver.cc.

◆ PseudoCostByPref()

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

Definition at line 86 of file exchange_solver.cc.

◆ sim_ctx() [1/2]

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

simulation context get/set

Definition at line 31 of file exchange_solver.h.

◆ sim_ctx() [2/2]

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

Definition at line 32 of file exchange_solver.h.

◆ Solve()

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.

◆ SolveGraph()

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.

◆ verbose()

void cyclus::ExchangeSolver::verbose ( )
inline

tell the solver to be verbose

Definition at line 36 of file exchange_solver.h.

Member Data Documentation

◆ exclusive_orders_

bool cyclus::ExchangeSolver::exclusive_orders_
protected

Definition at line 69 of file exchange_solver.h.

◆ graph_

ExchangeGraph* cyclus::ExchangeSolver::graph_
protected

Definition at line 68 of file exchange_solver.h.

◆ kDefaultExclusive

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

default value to allow exclusive orders or not

Definition at line 18 of file exchange_solver.h.

◆ sim_ctx_

Context* cyclus::ExchangeSolver::sim_ctx_
protected

Definition at line 71 of file exchange_solver.h.

◆ verbose_

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: