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)¶
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.baseline (
dict
) – Dictionary containing the baseline rates of the links.
- Returns:
result – Tuple containing the results of the optimization problem and the value of the objective function.
- Return type:
tuple[dict
,float]