graph_analysis
Public Types | Public Member Functions | List of all members
graph_analysis::algorithms::MultiCommodityEdge Class Reference

Representing of an edge in a multicommodity flow problem. More...

#include <MultiCommodityEdge.hpp>

Inheritance diagram for graph_analysis::algorithms::MultiCommodityEdge:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::algorithms::MultiCommodityEdge:
Collaboration graph
[legend]

Public Types

typedef shared_ptr< MultiCommodityEdge > Ptr
 
typedef std::set< uint32_t > CommoditySet
 
typedef std::map< CommoditySet, uint32_t > SubCapacityUpperBounds
 
- Public Types inherited from graph_analysis::Edge
typedef shared_ptr< Edge > Ptr
 
typedef shared_ptr< const Edge > ConstPtr
 
typedef std::vector< Ptr > PtrList
 
typedef std::set< Ptr > PtrSet
 
- Public Types inherited from graph_analysis::GraphElement
typedef shared_ptr< GraphElement > Ptr
 
typedef weak_ptr< GraphElement > WeakPtr
 
typedef std::vector< Ptr > PtrList
 

Public Member Functions

 MultiCommodityEdge (const std::string &label="")
 
 MultiCommodityEdge (uint32_t commodities, const std::string &label="")
 
virtual ~MultiCommodityEdge ()
 
virtual std::string getClassName () const
 
virtual std::string toString () const
 
void setCapacityUpperBound (uint32_t capacity)
 
uint32_t getCapacityUpperBound () const
 
void setCommodityCapacityUpperBound (uint32_t commodity, uint32_t capacity)
 
uint32_t getCommodityCapacityUpperBound (uint32_t commodity) const
 
void setCommodityCost (uint32_t commodity, double cost)
 
double getCommodityCost (uint32_t commodity)
 
void setCommodityFlow (uint32_t commodity, uint32_t flow)
 
void setSubCapacityUpperBound (const CommoditySet &commodities, uint32_t flow)
 
const SubCapacityUpperBounds & getSubCapacityBounds () const
 
uint32_t getCommodityFlow (uint32_t commodity) const
 
size_t numberOfCommodities () const
 
virtual void registerAttributes (EdgeTypeManager *) const
 
- Public Member Functions inherited from graph_analysis::Edge
 Edge (const std::string &label=std::string())
 
 Edge (const Vertex::Ptr &source, const Vertex::Ptr &target, const std::string &label=std::string())
 
virtual ~Edge ()
 
Edge::Ptr clone () const
 
virtual std::string toString (uint32_t indent) const
 
Vertex::Ptr getSourceVertex () const
 
Vertex::Ptr getTargetVertex () const
 
void setSourceVertex (const Vertex::Ptr &source)
 
void setTargetVertex (const Vertex::Ptr &target)
 
Edge::Ptr getSharedPointerFromGraph (const shared_ptr< BaseGraph > &pGraph) const
 
Edge::Ptr getPtr ()
 
Edge::ConstPtr getPtr () const
 
- Public Member Functions inherited from graph_analysis::GraphElement
 GraphElement (const std::string &label=std::string())
 Default constructor. More...
 
virtual ~GraphElement ()
 
virtual void setLabel (const std::string &label)
 
virtual const std::string & getLabel () const
 
bool associated (GraphId graph) const
 
void associate (GraphId graph, GraphElementId elementId)
 
void disassociate (GraphId graph)
 
GraphElementId getId (GraphId graph) const
 
GraphElementUuid getUid () const
 
GraphElementUuid getUuid () const
 
GraphIdList getGraphAssociations () const
 
std::string toPrefixedString (GraphId graph) const
 

Additional Inherited Members

- Static Public Member Functions inherited from graph_analysis::Edge
static std::vector< Vertex::Ptr > getInvolvedVertices (const Edge::Ptr &e0, const Edge::Ptr &e1)
 
static bool areMeeting (const Edge::Ptr &e0, const Edge::Ptr &e1)
 
- Static Public Member Functions inherited from graph_analysis::GraphElement
static GraphElement::Ptr fromUuid (const GraphElementUuid &uuid)
 
- Protected Member Functions inherited from graph_analysis::GraphElement
GraphElement::Ptr getSharedFromThis ()
 
void disassociateFromAll ()
 
void setUuid (const GraphElementUuid &uuid)
 
void setUuid (const std::string &uuid)
 
- Protected Attributes inherited from graph_analysis::GraphElement
GraphElementMap mGraphElementMap
 
GraphElementUuid mUuid
 
std::string mLabel
 
- Static Protected Attributes inherited from graph_analysis::GraphElement
static boost::uuids::random_generator msUuidGenerator
 
static std::map< GraphElementUuid, function< GraphElement::Ptr()> > msGraphElements
 

Detailed Description

Representing of an edge in a multicommodity flow problem.

Member Typedef Documentation

◆ CommoditySet

◆ Ptr

◆ SubCapacityUpperBounds

Flow limit for a number of commodities, e.g. to restrict transport of particular sets of commodites

Constructor & Destructor Documentation

◆ MultiCommodityEdge() [1/2]

graph_analysis::algorithms::MultiCommodityEdge::MultiCommodityEdge ( const std::string &  label = "")

Default constructor to support serialization

◆ MultiCommodityEdge() [2/2]

graph_analysis::algorithms::MultiCommodityEdge::MultiCommodityEdge ( uint32_t  commodities,
const std::string &  label = "" 
)

Construct edge with a given number of commodities which can go through this edge

◆ ~MultiCommodityEdge()

graph_analysis::algorithms::MultiCommodityEdge::~MultiCommodityEdge ( )
virtual

Deconstructor

Member Function Documentation

◆ getCapacityUpperBound()

uint32_t graph_analysis::algorithms::MultiCommodityEdge::getCapacityUpperBound ( ) const
inline

◆ getClassName()

virtual std::string graph_analysis::algorithms::MultiCommodityEdge::getClassName ( ) const
inlinevirtual

The class name of this instance

Reimplemented from graph_analysis::Edge.

◆ getCommodityCapacityUpperBound()

uint32_t graph_analysis::algorithms::MultiCommodityEdge::getCommodityCapacityUpperBound ( uint32_t  commodity) const
inline

Get the commodity specific bound for this edge

Parameters
commodityIndex of the commodity

◆ getCommodityCost()

double graph_analysis::algorithms::MultiCommodityEdge::getCommodityCost ( uint32_t  commodity)
inline

Get the cost of the commodity with the given index

Parameters
commodityIndex of the commodity

◆ getCommodityFlow()

uint32_t graph_analysis::algorithms::MultiCommodityEdge::getCommodityFlow ( uint32_t  commodity) const
inline

Get the assigned commodity flow

Returns
flow assigned to the commodity with the given index

◆ getSubCapacityBounds()

const SubCapacityUpperBounds& graph_analysis::algorithms::MultiCommodityEdge::getSubCapacityBounds ( ) const
inline

Get the existing flow limits

◆ numberOfCommodities()

size_t graph_analysis::algorithms::MultiCommodityEdge::numberOfCommodities ( ) const
inline

Get the number of commodities in this optimization instance

◆ registerAttributes()

void graph_analysis::algorithms::MultiCommodityEdge::registerAttributes ( EdgeTypeManager *  eManager) const
virtual

Register attributes for serialization

Reimplemented from graph_analysis::Edge.

◆ setCapacityUpperBound()

void graph_analysis::algorithms::MultiCommodityEdge::setCapacityUpperBound ( uint32_t  capacity)
inline

Set the general capacity bound for this edge sum of all flows on this edge cannot exceed this bound

◆ setCommodityCapacityUpperBound()

void graph_analysis::algorithms::MultiCommodityEdge::setCommodityCapacityUpperBound ( uint32_t  commodity,
uint32_t  capacity 
)

Set the commodity specific bound for this edge, i.e. the flow of a commodity cannot exceed this bound across this edge

Parameters
commodityIndex of the commodity
capacityCapacity limit for this commodity

◆ setCommodityCost()

void graph_analysis::algorithms::MultiCommodityEdge::setCommodityCost ( uint32_t  commodity,
double  cost 
)
inline

Set the cost for a particular commodity

Parameters
commodityIndex of the commodity
costCost for this commodity

◆ setCommodityFlow()

void graph_analysis::algorithms::MultiCommodityEdge::setCommodityFlow ( uint32_t  commodity,
uint32_t  flow 
)
inline

Set the commodity flow (after a solution has been computed)

Parameters
commodityIndex of the commodity
flow(Integral) flow of this commodity

◆ setSubCapacityUpperBound()

void graph_analysis::algorithms::MultiCommodityEdge::setSubCapacityUpperBound ( const CommoditySet &  commodities,
uint32_t  flow 
)
inline

Set the commodity sub flow limit, i.e.

◆ toString()

std::string graph_analysis::algorithms::MultiCommodityEdge::toString ( ) const
virtual

Provide a string representation of this object

Reimplemented from graph_analysis::Edge.


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