BlindLP module¶
- class panco.blind.blindLP.BlindLP(network: Network, list_edges=None, filename='blind.lp')¶
Bases:
object
Class for the analysis of a network with the linear programming methods. The network is decomposed into a forest (self.forest) with well-numbered servers, regarding the decomposition.
- Parameters:
network (Network) – the network to analyze
list_edges (List[Tuple[int, int]]) – the edges to keep in the decomposition in a forest
filename (str) – name of the file to write the linear program
- property all_delays: List[float]¶
Returns the delay bounds for all the flows
- Returns:
the list of delay bounds
- backlog(foi: int) float ¶
Computes the backlog of the flow of interest
- Parameters:
foi (int) – the flow of interest
- Returns:
the backlog of foi
- Return type:
float
- delay(foi: int) float ¶
Returns the delay bounds for flows foi
- Parameters:
foi – the flow of interest
- Returns:
the delay bound of foi
- ff_analysis() Network ¶
Analysis performed if the network is feed-forward.
- Returns:
the updated version of self.forest (updated burst parameters)
- Return type:
- property ff_equiv: Network¶
Construct the equivalent network by solving the fix-point equations. If the network has not been decomposed, then returns the original network
- Returns:
the equivalent network
- lp_constraint_flow(foi: int, file)¶
Writes the linear constraints for flow foi of the forest decomposition
- Parameters:
foi – flow of interest
file – file where the constraints are written
- Returns:
None
- lp_constraints(file)¶
Writes the constraints linear program in file
- Parameters:
file – the file where the linear program is written
- Returns:
None
- property lp_program: ndarray¶
Writes the linear program and solves it to obtain the unknown burst where the flows have been cut
- Returns:
the list of bursts of flows in the forest
- update_sigma(f: int, sigma: ndarray) ndarray ¶
If the network is feed-forward, computes the burst parameters where the flows are cut. Checks if the burst of the flow has already been computed, otherwise, generate the linear programs needed for the computation.
- Parameters:
f (int) – (cut) flow analyzed, its backlog is computed
sigma (np.ndarray) – the current array of backlogs for cur flows
- Returns:
the new array of backlogs for cut flows
- Return type:
np.ndarray