mapc_optimal.main ================= .. py:module:: mapc_optimal.main Classes ------- .. autoapisummary:: mapc_optimal.main.Main Module Contents --------------- .. py:class:: Main(log_approx, opt_type, solver, M) The main problem responsible for the selection and time division of configurations generated by the pricing problem. :param log_approx: Tuple containing the slopes and biases of the piecewise linear approximation of the logarithm function. :type log_approx: :py:class:`tuple[NDArray`, :py:class:`NDArray]` :param opt_type: The type of optimization problem to solve. :type opt_type: :py:class:`OptimizationType` :param solver: The solver used to solve the optimization problem. :type solver: :py:class:`pulp.LpSolver` :param M: The value of the big-M parameter. :type M: :py:class:`float` .. py:attribute:: log_approx .. py:attribute:: opt_type .. py:attribute:: solver .. py:attribute:: M .. py:method:: __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. :param stations: List of the station nodes. :type stations: :py:class:`list` :param link_node_b: Dictionary containing the mapping of links to the station nodes. :type link_node_b: :py:class:`dict` :param conf_links: Dictionary containing the links of each configuration. :type conf_links: :py:class:`dict` :param conf_link_rates: Dictionary containing the rates of each link for each configuration. :type conf_link_rates: :py:class:`dict` :param conf_total_rates: Dictionary containing the total rate of each configuration. :type conf_total_rates: :py:class:`dict` :param confs: List of the configurations. :type confs: :py:class:`list` :param baseline: Dictionary containing the baseline rates of the links. :type baseline: :py:class:`dict` :returns: **result** -- Tuple containing the results of the optimization problem and the value of the objective function. :rtype: :py:class:`tuple[dict`, :py:class:`float]`