mapc_optimal.main¶
Classes¶
The main problem responsible for the selection and time division of configurations |
Module Contents¶
- class mapc_optimal.main.Main(log_approx, opt_type, solver, M)¶
The main problem responsible for the selection and time division of configurations generated by the pricing problem.
- Parameters:
log_approx (
tuple[NDArray,NDArray]) – Tuple containing the slopes and biases of the piecewise linear approximation of the logarithm function.opt_type (
OptimizationType) – The type of optimization problem to solve.solver (
pulp.LpSolver) – The solver used to solve the optimization problem.M (
float) – The value of the big-M parameter.
- log_approx¶
- opt_type¶
- solver¶
- M¶
- __call__(stations, link_node_b, conf_links, conf_link_rates, conf_total_rates, confs, baseline, target_stations=None)¶
Solves the main problem given the configurations generated by the pricing problem. Returns the dual variables, the shares of the configurations, the throughput of the stations, 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.baseline (
dict) – Dictionary containing the baseline rates of the links. In the lexicographic optimization, these rates are enforced strictly, i.e., without the big-M relaxation.target_stations (
list, defaultNone) – List of the stations whose worst throughput is maximized. All the stations by default.
- Returns:
result – Tuple containing the results of the optimization problem and the value of the objective function.
- Return type:
tuple[dict,float]