netmic.heuristics.flow_heuristics

Flow Heuristics 1 and 2.

 
Modules
       
netmic.algorithmic_utility
netmic.network_utility
networkx
time
netmic.timer
netmic.heuristics.weight_functions

 
Classes
       
heuristicEll0StartSolution
heuristicSolver
heuristic1Solver
heuristic1_1Solver
heuristic1_2Solver
heuristic1_3Solver(heuristic1Solver, heuristicx_3Solver)
heuristic2Solver
heuristic2_2Solver
heuristic2_3Solver(heuristic2Solver, heuristicx_3Solver)
heuristicx_3Solver

 
class heuristic1Solver(heuristicSolver)
    base class for heuristic1, start with l1-opt INC, compute iteratively
shortest paths between nodes with excess
 
  Methods defined here:
__init__(self, N)
computeStartSolution(self)
Return an initial solution for N, feasible regarding bounds,
but not flow conservation, by computing the max-flow.
solve(self)

 
class heuristic1_1Solver(heuristic1Solver)
    Implementation of heuristic 1.1
 
 
Method resolution order:
heuristic1_1Solver
heuristic1Solver
heuristicSolver

Methods defined here:
solve(self, sp='dijkstra', timelimit=900)
Compute heuristic 1.1. Start flow is given by bound feasible
max-flow, simple 0/1/2 weights for all nodes at once are used. The SP-
computations are done using the method indicated by sp.

Methods inherited from heuristic1Solver:
__init__(self, N)
computeStartSolution(self)
Return an initial solution for N, feasible regarding bounds,
but not flow conservation, by computing the max-flow.

 
class heuristic1_2Solver(heuristic1Solver)
    Implementation of heuristic 1.2
 
 
Method resolution order:
heuristic1_2Solver
heuristic1Solver
heuristicSolver

Methods defined here:
solve(self, timelimit=900)
Compute heuristic 1.2. Start flow is given by bound feasible
max-flow, 0/1-weights are computed "exact" for every pair (s,t) in (S,T).

Methods inherited from heuristic1Solver:
__init__(self, N)
computeStartSolution(self)
Return an initial solution for N, feasible regarding bounds,
but not flow conservation, by computing the max-flow.

 
class heuristic1_3Solver(heuristic1Solver, heuristicx_3Solver)
    Implementation of heuristic 1.3
 
 
Method resolution order:
heuristic1_3Solver
heuristic1Solver
heuristicSolver
heuristicx_3Solver

Methods defined here:
__init__(self, N, variant=False)
solve(self, timelimit=900)
Compute heuristic 1.3. Start flow is given by bound feasible max-flow,
-1/0/1-weights are computed "exact" for every pair (s,t) in (S,T),
then the shortest path is computed heuristically.

Methods inherited from heuristic1Solver:
computeStartSolution(self)
Return an initial solution for N, feasible regarding bounds,
but not flow conservation, by computing the max-flow.

Methods inherited from heuristicx_3Solver:
shortPathWithNegCycles(self, s, t=None)
Return short path between s and t. This is essentially Dijkstra,
adapted to tolerate negative weights and thereby no longer yielding the
optimal solution.

 
class heuristic2Solver(heuristicSolver)
    base class for heuristic2, start with heuristic ell_0 solution, compute
iteratively shortest paths from node with largest excess
 
  Methods defined here:
__init__(self, N, timelimit=900)
solve(self)

 
class heuristic2_2Solver(heuristic2Solver)
    Implementation of heuristic 2.2
 
 
Method resolution order:
heuristic2_2Solver
heuristic2Solver
heuristicSolver

Methods defined here:
solve(self)
Compute heuristic 2.2. Start flow is given by bound-feasible, heuristic
ell_0 INC, shortest path is computed with binary weights for node with
largest excess.

Methods inherited from heuristic2Solver:
__init__(self, N, timelimit=900)

 
class heuristic2_3Solver(heuristic2Solver, heuristicx_3Solver)
    Implementation of heuristic 2.3
 
 
Method resolution order:
heuristic2_3Solver
heuristic2Solver
heuristicSolver
heuristicx_3Solver

Methods defined here:
__init__(self, N, variant=False, timelimit=900)
solve(self)
Compute heuristic 2.3. Start flow is given by bound-feasible, heuristic
ell_0 INC, shortest path is computed with ternary weights for node with
largest excess, then shortest path is computed heuristically.

Methods inherited from heuristicx_3Solver:
shortPathWithNegCycles(self, s, t=None)
Return short path between s and t. This is essentially Dijkstra,
adapted to tolerate negative weights and thereby no longer yielding the
optimal solution.

 
class heuristicEll0StartSolution
    compute INC solution by iteratively satisfying node with smallest excess
 
  Methods defined here:
__init__(self, N)
solve(self, timelimit=300)
Return bound-feasible solution with (heuristically) as much nodes
satisfied as possible.

 
class heuristicSolver
    base class for heuristic, provide functionality shared by all heuristics
 
  Methods defined here:
__init__(self, N)
solve(self)

 
class heuristicx_3Solver(heuristicSolver)
    base class for heuristics 1.3 and 2.3, compute shortest path with
forbidden pairs
 
  Methods defined here:
__init__(self, variant)
shortPathWithNegCycles(self, s, t=None)
Return short path between s and t. This is essentially Dijkstra,
adapted to tolerate negative weights and thereby no longer yielding the
optimal solution.
solve(self)

 
Functions
       
heapify(...)
Transform list into a heap, in-place, in O(len(heap)) time.
heappop(...)
Pop the smallest item off the heap, maintaining the heap invariant.
heappush(...)
heappush(heap, item) -> None. Push item onto heap, maintaining the heap invariant.
heuristic1_1(N, sp='dijkstra', timelimit=900)
Return cover obtained by heuristic 1.1.
heuristic1_2(N, timelimit=900)
Return cover obtained by heuristic 1.2.
heuristic1_3(N, variant=False, timelimit=900)
Return cover obtained by heuristic 1.3.
heuristic2_2(N, timelimit=900)
Return cover obtained by heuristic 2.2.
heuristic2_3(N, variant=False, timelimit=900)
Return cover obtained by heuristic 2.3.