template<typename DiGraph, typename Ratio, typename Domain>
MinParametricSolver class
Minimum Parametric Solver with constraints.
This class solves the following parametric network problem:
min r s.t. dist[v] - dist[u] <= distance(e, r) forall e(u, v) in G(V, E)
A parametric network problem refers to a type of optimization problem that involves finding the optimal solution to a network flow problem as a function of one single parameter.
Constructors, destructors, conversion operators
- MinParametricSolver(const DiGraph& digraph, MinParametricAPI<Node, Edge, Ratio>& omega)
- Initialize the solver with a graph and parametric API.
Public functions
Function documentation
template<typename DiGraph, typename Ratio, typename Domain>
MinParametricSolver<DiGraph, Ratio, Domain>:: MinParametricSolver(const DiGraph& digraph,
MinParametricAPI<Node, Edge, Ratio>& omega)
Initialize the solver with a graph and parametric API.
| Parameters | |
|---|---|
| digraph | A directed graph where each node maps to its neighbors and the edges connecting them |
| omega | An instance of MinParametricAPI that provides the necessary methods for distance calculation and cycle analysis |
template<typename DiGraph, typename Ratio, typename Domain>
template<typename Mapping>
auto MinParametricSolver<DiGraph, Ratio, Domain>:: run(Mapping& dist,
Ratio ratio,
const UpdateOk& update_ok,
bool pick_one_only = false) -> std::pair< Ratio, Cycle >
Execute the parametric solver algorithm to find the minimum ratio.
| Parameters | |
|---|---|
| dist | A mutable mapping of node distances that will be updated during the algorithm |
| ratio | The initial ratio value to start the optimization from |
| update_ok | A callback function that determines whether a distance update is acceptable |
| pick_one_only | If true, stops after finding the first improving cycle |
| Returns | std::pair<Ratio, Cycle> A pair containing:
|