TreeOnlyBlindLP module

class panco.blind.treeOnlyBlindLP.TreeOnlyBlindLP(network: Network, foi: int, filename='tree_blind.lp')

Bases: object

Class for the analysis for tree networks with blind multiplexing using linear programming techniques.

Parameters:
  • network (Network) – the network to analyze (must be a well-numbered tree)

  • foi (int) – the flow of interest for computing the performance bound

  • filename (str) – the name of the file where the linear program is written

arrival_constraints(f)

Writes the arrival constraints for each flow of the network

Parameters:

f – file to write the constraints

Returns:

nothing

arrival_shaping_constraints(f)

Writes the arrival shaping constraints for each flow of the network

Parameters:

f – file to write the constraints

Returns:

nothing

property backlog: float

Computes the worst-case backlog of the flow of interest

Returns:

the backlog of the flow of interest

Return type:

float

>>> flows = [Flow([TokenBucket(1, 1)], [3, 4]), Flow([TokenBucket(2, 2)], [0, 3]),
...          Flow([TokenBucket(3, 3)], [2, 4]), Flow([TokenBucket(4, 4)], [1, 3, 4])]
>>> servers = [Server([RateLatency(10, 1), RateLatency(5, 0)], []), Server([RateLatency(20, 2)], []),
...            Server([RateLatency(30, 3)], []), Server([RateLatency(40, 3)], [TokenBucket(1, 40)]),
...            Server([RateLatency(50, 5)], [])]
>>> arrival_shaping = [(3, [0], [TokenBucket(0, 10)]), (1, [3], [TokenBucket(0, 20)]),
...                    (2, [2], [TokenBucket(0, 30)]), (0, [1], [TokenBucket(0, 40)])]
>>> tree = Network(servers, flows, arrival_shaping)
>>> TreeOnlyBlindLP(tree, 0, 'test_tree_blind_backlog.lp').backlog
11.03419973
backlog_objective(file)

Writes the backlog objective of the flow of interest.

Parameters:

file – file where constraints are written

Returns:

nothing

causality_constraints(f)

Writes the causality constraints for each arrival process of the network

Parameters:

f – file to write the constraints

Returns:

nothing

property delay: float

Computes the worst-case delay of the flow of interest

WARNING: Flows must have a single token-bucket. otherwise, put them in the arrival shaping.

Returns:

the delay of the flow of interest

Return type:

float

>>> flows = [Flow([TokenBucket(1, 1)], [3, 4]), Flow([TokenBucket(2, 2)], [0, 3]),
...          Flow([TokenBucket(3, 3)], [2, 4]), Flow([TokenBucket(4, 4)], [1, 3, 4])]
>>> servers = [Server([RateLatency(10, 1), RateLatency(5, 0)], []), Server([RateLatency(20, 2)], []),
...            Server([RateLatency(30, 3)], []), Server([RateLatency(40, 3)], [TokenBucket(1, 40)]),
...            Server([RateLatency(50, 5)], [])]
>>> arrival_shaping = [(3, [0], [TokenBucket(0, 10)]), (1, [3], [TokenBucket(0, 20)]),
...                    (2, [2], [TokenBucket(0, 30)]), (0, [1], [TokenBucket(0, 40)])]
>>> tree = Network(servers, flows, arrival_shaping)
>>> TreeOnlyBlindLP(tree, 0, 'test_tree_blind.lp').delay
10.06361149
delay_objective(file)

Writes the delay objective and some additional constraints for the flow of interest

Parameters:

file – file where constraints are written

Returns:

nothing

greedy_shaping_constraints(f)

Writes the greedy-shaping constraints for each server of the network

Parameters:

f – file to write the constraints

Returns:

nothing

monotony_constraints(f)

Writes the monotony constraints for each arrival process of the network

Parameters:

f – file to write the constraints

Returns:

nothing

service_constraints(f)

Writes the service constraints for each server of the network

Parameters:

f – file to write the constraints

Returns:

nothing

time_constraints(f)

Writes the time constraints for the network.

Parameters:

f – file to write the constraints

Returns:

nothing

property time_horizon: float

Computes the worst-case delay of the flow of interest

WARNING: Flows must have a single token-bucket. otherwise, put them in the arrival shaping.

Returns:

the time-horizon of the flow of interest

Return type:

float

time_horizon_objective(file)

Writes the time-horizon for the flow of interest

Parameters:

file – file where constraints are written

Returns:

nothing

write_constraints(file)

Writes all the constraints of the flow of interest.

Parameters:

file – file to write the constraints

Returns:

nothing