CYCLUS
Public Types | Public Member Functions | List of all members
cyclus::ExchangeGraph Class Reference

Detailed Description

An ExchangeGraph is a resource-neutral representation of a ResourceExchange.

In general, it is produced via translation by an ExchangeTranslator. It is comprised of ExchangeNodes that are collected into ExchangeNodeGroups. Arcs are defined, connecting ExchangeNodes to each other. An ExchangeSolver can solve a given instance of an ExchangeGraph, and the solution is stored on the Graph in the form of Matches.

Definition at line 207 of file exchange_graph.h.

#include <exchange_graph.h>

Public Types

typedef boost::shared_ptr< ExchangeGraphPtr
 

Public Member Functions

void AddArc (const Arc &a)
 
void AddMatch (const Arc &a, double qty)
 
void AddRequestGroup (RequestGroup::Ptr prs)
 
void AddSupplyGroup (ExchangeNodeGroup::Ptr prs)
 
const std::map< int, Arc > & arc_by_id () const
 
std::map< int, Arc > & arc_by_id ()
 
const std::map< Arc, int > & arc_ids () const
 
std::map< Arc, int > & arc_ids ()
 
const std::vector< Arc > & arcs () const
 
std::vector< Arc > & arcs ()
 
void ClearMatches ()
 
 ExchangeGraph ()
 
const std::vector< Match > & matches ()
 
const std::map< ExchangeNode::Ptr, std::vector< Arc > > & node_arc_map () const
 
std::map< ExchangeNode::Ptr, std::vector< Arc > > & node_arc_map ()
 
const std::vector< RequestGroup::Ptr > & request_groups () const
 
std::vector< RequestGroup::Ptr > & request_groups ()
 
const std::vector< ExchangeNodeGroup::Ptr > & supply_groups () const
 
std::vector< ExchangeNodeGroup::Ptr > & supply_groups ()
 

Member Typedef Documentation

◆ Ptr

typedef boost::shared_ptr<ExchangeGraph> cyclus::ExchangeGraph::Ptr

Definition at line 209 of file exchange_graph.h.

Constructor & Destructor Documentation

◆ ExchangeGraph()

cyclus::ExchangeGraph::ExchangeGraph ( )

Definition at line 114 of file exchange_graph.cc.

Member Function Documentation

◆ AddArc()

void cyclus::ExchangeGraph::AddArc ( const Arc a)

adds an arc to the graph

Definition at line 127 of file exchange_graph.cc.

◆ AddMatch()

void cyclus::ExchangeGraph::AddMatch ( const Arc a,
double  qty 
)

adds a match for a quanity of flow along an arc

Parameters
pathe arc corresponding to a match
qtythe amount of flow corresponding to a match

Definition at line 137 of file exchange_graph.cc.

◆ AddRequestGroup()

void cyclus::ExchangeGraph::AddRequestGroup ( RequestGroup::Ptr  prs)

adds a request group to the graph

Definition at line 117 of file exchange_graph.cc.

◆ AddSupplyGroup()

void cyclus::ExchangeGraph::AddSupplyGroup ( ExchangeNodeGroup::Ptr  prs)

adds a supply group to the graph

Definition at line 122 of file exchange_graph.cc.

◆ arc_by_id() [1/2]

const std::map<int, Arc>& cyclus::ExchangeGraph::arc_by_id ( ) const
inline

Definition at line 261 of file exchange_graph.h.

◆ arc_by_id() [2/2]

std::map<int, Arc>& cyclus::ExchangeGraph::arc_by_id ( )
inline

Definition at line 262 of file exchange_graph.h.

◆ arc_ids() [1/2]

const std::map<Arc, int>& cyclus::ExchangeGraph::arc_ids ( ) const
inline

Definition at line 258 of file exchange_graph.h.

◆ arc_ids() [2/2]

std::map<Arc, int>& cyclus::ExchangeGraph::arc_ids ( )
inline

Definition at line 259 of file exchange_graph.h.

◆ arcs() [1/2]

const std::vector<Arc>& cyclus::ExchangeGraph::arcs ( ) const
inline

Definition at line 255 of file exchange_graph.h.

◆ arcs() [2/2]

std::vector<Arc>& cyclus::ExchangeGraph::arcs ( )
inline

Definition at line 256 of file exchange_graph.h.

◆ ClearMatches()

void cyclus::ExchangeGraph::ClearMatches ( )
inline

clears all matches

Definition at line 229 of file exchange_graph.h.

◆ matches()

const std::vector<Match>& cyclus::ExchangeGraph::matches ( )
inline

Definition at line 253 of file exchange_graph.h.

◆ node_arc_map() [1/2]

const std::map<ExchangeNode::Ptr, std::vector<Arc> >& cyclus::ExchangeGraph::node_arc_map ( ) const
inline

Definition at line 246 of file exchange_graph.h.

◆ node_arc_map() [2/2]

std::map<ExchangeNode::Ptr, std::vector<Arc> >& cyclus::ExchangeGraph::node_arc_map ( )
inline

Definition at line 249 of file exchange_graph.h.

◆ request_groups() [1/2]

const std::vector<RequestGroup::Ptr>& cyclus::ExchangeGraph::request_groups ( ) const
inline

Definition at line 231 of file exchange_graph.h.

◆ request_groups() [2/2]

std::vector<RequestGroup::Ptr>& cyclus::ExchangeGraph::request_groups ( )
inline

Definition at line 234 of file exchange_graph.h.

◆ supply_groups() [1/2]

const std::vector<ExchangeNodeGroup::Ptr>& cyclus::ExchangeGraph::supply_groups ( ) const
inline

Definition at line 238 of file exchange_graph.h.

◆ supply_groups() [2/2]

std::vector<ExchangeNodeGroup::Ptr>& cyclus::ExchangeGraph::supply_groups ( )
inline

Definition at line 241 of file exchange_graph.h.


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