mapc_optimal.pricing ==================== .. py:module:: mapc_optimal.pricing Classes ------- .. autoapisummary:: mapc_optimal.pricing.Pricing Module Contents --------------- .. py:class:: Pricing(mcs_values, mcs_data_rates, min_sinr, max_tx_power, min_tx_power, noise_floor, log_approx, opt_type, solver) The pricing problem responsible for proposing new configurations for the main problem. :param mcs_values: List of the available MCS values. :type mcs_values: :py:class:`list` :param mcs_data_rates: List of the data rates corresponding to the available MCS values. :type mcs_data_rates: :py:class:`list` :param min_sinr: Array containing the minimum SINR values for each MCS value. :type min_sinr: :py:class:`NDArray` :param max_tx_power: Maximum transmission power of the nodes. :type max_tx_power: :py:class:`float` :param min_tx_power: Minimum transmission power of the nodes. :type min_tx_power: :py:class:`float` :param noise_floor: Mean level of the noise floor in the network. :type noise_floor: :py:class:`float` :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: Solver used to solve the pricing problem. :type solver: :py:class:`pulp.LpSolver` .. py:attribute:: mcs_values .. py:attribute:: mcs_data_rates .. py:attribute:: min_sinr .. py:attribute:: mcs_rate_diff .. py:attribute:: max_tx_power .. py:attribute:: min_tx_power .. py:attribute:: noise_floor .. py:attribute:: log_approx .. py:attribute:: opt_type .. py:attribute:: solver .. py:method:: initial_configuration(links, link_path_loss) Generates the initial configuration for the solver. The initial configurations are very simple, they contain only one link, with the best possible data rate and the maximum transmission power. The initial configurations include all the links in the network. :param links: List of the links in the network. :type links: :py:class:`list` :param link_path_loss: Dictionary containing the path loss of each link. :type link_path_loss: :py:class:`dict` :returns: **configuration** -- Dictionary containing the initial configuration. :rtype: :py:class:`dict` .. py:method:: __call__(dual_alpha, dual_beta, dual_gamma, stations, access_points, links, link_node_a, link_node_b, link_path_loss, max_interference, configuration) Solves the pricing problem given the dual variables of the main problem. Returns all the configurations and the value of the objective function. :param dual_alpha: Dual variable of the alpha constraint. :type dual_alpha: :py:class:`float` :param dual_beta: Dual variables of the beta constraints. :type dual_beta: :py:class:`dict` :param dual_gamma: Dual variables of the gamma constraints. :type dual_gamma: :py:class:`dict` :param stations: List of the station nodes. :type stations: :py:class:`list` :param access_points: List of the access point nodes. :type access_points: :py:class:`list` :param links: List of the links in the network. :type links: :py:class:`list` :param link_node_a: Dictionary containing the mapping of links to the access point nodes. :type link_node_a: :py:class:`dict` :param link_node_b: Dictionary containing the mapping of links to the station nodes. :type link_node_b: :py:class:`dict` :param link_path_loss: Dictionary containing the path loss of each link. :type link_path_loss: :py:class:`dict` :param max_interference: Dictionary containing the maximum interference level for each link and each MCS value. :type max_interference: :py:class:`dict` :param configuration: Dictionary containing all the configurations. :type configuration: :py:class:`dict` :returns: **result** -- Tuple containing the dictionary with the new configuration and the value of the objective function. :rtype: :py:class:`tuple[dict`, :py:class:`float]`