mapc_optimal.main
¶
Module Contents¶
Classes¶
The main problem responsible for the selection and time division of configurations |
- class mapc_optimal.main.Main(min_throughput, opt_sum, solver)¶
The main problem responsible for the selection and time division of configurations generated by the pricing problem.
- Parameters:
min_throughput (
float
) – The minimum throughput of each station required when optimizing total throughput.opt_sum (
bool
) – If True, the total throughput is optimized, otherwise the worst throughput is optimized.solver (
pulp.LpSolver
) – The solver used to solve the optimization problem.
- __call__(stations, link_node_b, conf_links, conf_link_rates, conf_total_rates, confs)¶
Solves the main problem given the configurations generated by the pricing problem. Returns the dual variables, the shares of the configurations and the value of the objective function.
- Parameters:
stations (
list
) – List of the station nodes.link_node_b (
dict
) – Dictionary containing the mapping of links to the station nodes.conf_links (
dict
) – Dictionary containing the links of each configuration.conf_link_rates (
dict
) – Dictionary containing the rates of each link for each configuration.conf_total_rates (
dict
) – Dictionary containing the total rate of each configuration.confs (
list
) – List of the configurations.
- Returns:
result – Tuple containing the results of the optimization problem and the value of the objective function.
- Return type:
tuple[dict
,float]