Reference

Dualization.supported_constraintsFunction
supported_constraints(con_types::Vector{Tuple{Type, Type}})

Returns true if Function-in-Set is supported for Dualization and throws an error if it is not.

supported_constraints(F::MOI.AbstractFunction, S::MOI.AbstractSet)

Returns true if Function-in-Set is supported for Dualization and false if it is not.

source
Dualization.supported_objectiveFunction
supported_objective(primal_model::MOI.ModelLike)

Returns true if MOI.ObjectiveFunctionType() is supported for Dualization and throws an error if it is not.

supported_objective(obj_func_type::Type)

Returns true if obj_func_type is supported for Dualization and throws an error if it is not.

source
Dualization.DualNamesType
DualNames

DualNames is a struct to pass the prefix of dual variables and dual constraints names.

See more on naming the variables.

source
Dualization.PrimalVariableDataType
PrimalVariableData{T}

Data structure used in PrimalDualMap to hold information about primal variables and their dual counterparts.

  • primal_constrained_variable_constraint::Union{Nothing,MOI.ConstraintIndex}: if primal variable is chosen to be a constrained variable by Dualization.jl, then this value is different from nothing.

  • primal_constrained_variable_index::Int: if variable is a scalar constrained variable then it is 0. If variable is not a constrained variable then it is -1. If variable is part of a vector constrained variable, then this is the position in that vector.

  • dual_constraint::Union{Nothing,MOI.ConstraintIndex}: dual constraint associated with the variable. If the variable is not constrained then the set is EqualTo{T}(zero(T)). If the variable is a constrained variable then the set is the dual set of the constrained variable set. If the dual set is Reals then the field is kept as nothing as teh constraint is not added.

  • dual_function::Union{Nothing,MOI.ScalarAffineFunction{T}}: if the constrained variable is VectorOfVariables-in-Zeros or VariableIndex-in-EqualTo(zero(T)) then the dual is func-in-Reals, which is "irrelevant" to the model. But this information is cached for completeness of the DualOptimizer for getting ConstraintDuals.

To got from the constrained variable constraint to the primal variable, use the primal_constrained_variables field of PrimalDualMap.

See also PrimalDualMap and PrimalConstraintData.

source
Dualization.PrimalConstraintDataType
PrimalConstraintData{T}

Data structure used in PrimalDualMap to hold information about primal constraints and their dual counterparts.

Constraint indices for constrained variables are not in this structure. They are added in the primal_constrained_variables field of PrimalDualMap.

  • primal_set_constants::Vector{T}: a vector of primal set constants that are used in MOI getters. This is used to get the primal constants of the primal constraints.

  • dual_variables::Vector{MOI.VariableIndex}: vector of dual variables. If primal constraint is scalar then, the vector has length = 1.

  • dual_constrained_variable_constraint::Union{Nothing,MOI.ConstraintIndex}: if primal set is EqualTo or Zeros, then the dual constraint is Reals then the dual variable is free (no constraint in the dual model).

source
Dualization.PrimalDualMapType
PrimalDualMap{T}

Maps information from all structures of the primal to the dual model.

Main maps:

  • primal_variable_data::Dict{MOI.VariableIndex,Dualization.PrimalVariableData{T}}: maps primal variable indices to their data. The data is a structure that contains information about the primal variable and its dual counterpart. In particular, it contains the primal constrained variable constraint index, the primal constrained variable index, the dual constraint index and the primal function for the case of constraints that are not added in the dual.

  • primal_constraint_data::Dict{MOI.ConstraintIndex,Dualization.PrimalConstraintData{T}}: maps primal constraint indices to their data. The data is a structure that contains information about the primal constraint and its dual counterpart. In particular, it contains the primal set constants, the dual variables and the dual constrained variable constraint index.

  • primal_constrained_variables::Dict{MOI.ConstraintIndex,Vector{MOI.VariableIndex}}: maps primal constrained variable constraint indices to their primal constrained variables.

Addtional maps

  • primal_parameter_to_dual_parameter::Dict{MOI.VariableIndex,MOI.VariableIndex}: maps parameters in the primal model to parameters in the dual model.

  • primal_var_in_quad_obj_to_dual_slack_var::Dict{MOI.VariableIndex,MOI.VariableIndex}: maps primal variables (that appear in quadratic objective terms) to dual "slack" variables. These primal variables might appear in other maps.

source