Representation of ConstraintViolation in a min-cost flow problem.
More...
#include <ConstraintViolation.hpp>
|
| | ConstraintViolation (const MultiCommodityVertex::Ptr &v, uint32_t commodity, int32_t delta, uint32_t inFlow, uint32_t outFlow, Type type=MinFlow) |
| |
| | ConstraintViolation (const MultiCommodityEdge::Ptr &e, uint32_t commodity, int32_t delta, uint32_t inFlow, uint32_t outFlow, Type type=MinFlow) |
| |
| | ConstraintViolation (const MultiCommodityVertex::Ptr &v, const std::set< uint32_t > &commodities, int32_t delta, uint32_t inFlow, uint32_t outFlow, Type type=MinFlow) |
| |
| | ConstraintViolation (const MultiCommodityEdge::Ptr &e, const std::set< uint32_t > &commodities, int32_t delta, uint32_t inFlow, uint32_t outFlow, Type type=MinFlow) |
| |
| uint32_t | getCommodity () const |
| |
| uint32_t | getInFlow () const |
| |
| uint32_t | getOutFlow () const |
| |
| const std::set< uint32_t > & | getCommodities () const |
| |
| const Vertex::Ptr & | getVertex () const |
| |
| const Edge::Ptr & | getEdge () const |
| |
| int32_t | getDelta () const |
| |
| Type | getType () const |
| |
| std::string | toString (size_t indent=0) const |
| |
|
| static std::map< Type, std::string > | TypeTxt |
| | The string representation for each type. More...
|
| |
Representation of ConstraintViolation in a min-cost flow problem.
To identify the known violations of constraints, this class permits to represent constraint violations. A quantification of the violation is part of this representation.
◆ Type
| Enumerator |
|---|
| FlowBalance | Inflow does not equal Outflow.
|
| MinFlow | The minimum required flow (for a single commodity) is not available.
|
| TransFlow | The required transflow (min inflow + min outflow) for a single commodity is not available
|
| TotalMinFlow | The required minimum flow for all commodities related to this node is not satisfied
|
| TotalTransFlow | The required transflow for all commodities related to this node is not satisfied
|
◆ ConstraintViolation() [1/4]
| graph_analysis::algorithms::ConstraintViolation::ConstraintViolation |
( |
const MultiCommodityVertex::Ptr & |
v, |
|
|
uint32_t |
commodity, |
|
|
int32_t |
delta, |
|
|
uint32_t |
inFlow, |
|
|
uint32_t |
outFlow, |
|
|
Type |
type = MinFlow |
|
) |
| |
Default Constructor
- Parameters
-
| v | The vertex where the constraint violation is encountered |
| commodity | The commodity for which the constraint is violated |
| delta | The difference to the actually required fulfilment |
| inFlow | Current inflow |
| outFlow | Current outflow |
| type | Classification of violation |
◆ ConstraintViolation() [2/4]
| graph_analysis::algorithms::ConstraintViolation::ConstraintViolation |
( |
const MultiCommodityEdge::Ptr & |
e, |
|
|
uint32_t |
commodity, |
|
|
int32_t |
delta, |
|
|
uint32_t |
inFlow, |
|
|
uint32_t |
outFlow, |
|
|
Type |
type = MinFlow |
|
) |
| |
Default Constructor
- Parameters
-
| e | The edge where the constraint violation is encountered |
| commodity | The commodity for which the constraint is violated |
| delta | The difference to the actually required fulfilment |
| inFlow | Current inflow |
| outFlow | Current outflow |
| type | Classification of violation |
◆ ConstraintViolation() [3/4]
| graph_analysis::algorithms::ConstraintViolation::ConstraintViolation |
( |
const MultiCommodityVertex::Ptr & |
v, |
|
|
const std::set< uint32_t > & |
commodities, |
|
|
int32_t |
delta, |
|
|
uint32_t |
inFlow, |
|
|
uint32_t |
outFlow, |
|
|
Type |
type = MinFlow |
|
) |
| |
Construct a constraint violation with a set of commodities that are affected by the constraint violation
- Parameters
-
| v | The vertex where the constraint violation is encountered |
| commodities | The set of commodities for which the constraint is violated |
| delta | The difference to the actually required fulfilment |
| inFlow | Current inflow |
| outFlow | Current outflow |
| type | Classification of violation |
◆ ConstraintViolation() [4/4]
| graph_analysis::algorithms::ConstraintViolation::ConstraintViolation |
( |
const MultiCommodityEdge::Ptr & |
e, |
|
|
const std::set< uint32_t > & |
commodities, |
|
|
int32_t |
delta, |
|
|
uint32_t |
inFlow, |
|
|
uint32_t |
outFlow, |
|
|
Type |
type = MinFlow |
|
) |
| |
Construct a constraint violation with a set of commodities that are affected by the constraint violation
- Parameters
-
| e | The edge where the constraint violation is encountered |
| commodities | The set of commodities for which the constraint is violated |
| delta | The difference to the actually required fulfilment |
| inFlow | Current inflow |
| outFlow | Current outflow |
| type | Classification of violation |
◆ getCommodities()
| const std::set<uint32_t>& graph_analysis::algorithms::ConstraintViolation::getCommodities |
( |
| ) |
const |
|
inline |
The set of commodities that are affected by this violation
- Returns
- set of commodities
◆ getCommodity()
| uint32_t graph_analysis::algorithms::ConstraintViolation::getCommodity |
( |
| ) |
const |
Get the commodity id
- Returns
- commodity id
◆ getDelta()
| int32_t graph_analysis::algorithms::ConstraintViolation::getDelta |
( |
| ) |
const |
|
inline |
Quantification of the constraint violation, regarding the missing flow
- Returns
- missing flow
◆ getEdge()
| const Edge::Ptr& graph_analysis::algorithms::ConstraintViolation::getEdge |
( |
| ) |
const |
|
inline |
Get the edge that this constraint violation is related to (can be null)
- Returns
- affected edge
◆ getInFlow()
| uint32_t graph_analysis::algorithms::ConstraintViolation::getInFlow |
( |
| ) |
const |
|
inline |
Get the current inflow
- Returns
- inflow
◆ getOutFlow()
| uint32_t graph_analysis::algorithms::ConstraintViolation::getOutFlow |
( |
| ) |
const |
|
inline |
Get the current outflow
- Returns
- outflow
◆ getType()
| Type graph_analysis::algorithms::ConstraintViolation::getType |
( |
| ) |
const |
|
inline |
Get the constraint violation type
- Returns
- type
◆ getVertex()
| const Vertex::Ptr& graph_analysis::algorithms::ConstraintViolation::getVertex |
( |
| ) |
const |
|
inline |
Get the vertex that this constraint violation is related to (can be null)
- Returns
- affected vertex
◆ toString() [1/3]
| std::string graph_analysis::algorithms::ConstraintViolation::toString |
( |
size_t |
indent = 0 | ) |
const |
Stringify constraint
- Parameters
-
| indent | Number of indentation spaces |
- Returns
- string object
◆ toString() [2/3]
| std::string graph_analysis::algorithms::ConstraintViolation::toString |
( |
const std::vector< ConstraintViolation > & |
flaws, |
|
|
size_t |
indent = 0 |
|
) |
| |
|
static |
Stringify list of constraint violations
- Returns
- string object
◆ toString() [3/3]
| std::string graph_analysis::algorithms::ConstraintViolation::toString |
( |
const std::set< uint32_t > & |
commodities | ) |
|
|
static |
Stringify commodities
- Returns
- string object
◆ TypeTxt
Initial value:= InitMap<ConstraintViolation::Type, std::string>
The string representation for each type.
The documentation for this class was generated from the following files: