From 1ae3793450f209df7986e2c81a4687b27ed9376f Mon Sep 17 00:00:00 2001 From: joaquimg Date: Wed, 16 Apr 2025 20:10:27 -0700 Subject: [PATCH] Cleanup renames --- src/constrained_variables.jl | 2 +- src/structures.jl | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/constrained_variables.jl b/src/constrained_variables.jl index 7e86cf1..acc9e3b 100644 --- a/src/constrained_variables.jl +++ b/src/constrained_variables.jl @@ -46,7 +46,7 @@ function _select_constrained_variables( # and not a parameter vi -> !haskey(m.primal_convar_to_primal_convarcon_and_index, vi) && - !(vi in params), + !(vi in params), f.variables, ) for (i, vi) in enumerate(f.variables) diff --git a/src/structures.jl b/src/structures.jl index 5b5c771..20626ac 100644 --- a/src/structures.jl +++ b/src/structures.jl @@ -45,10 +45,6 @@ Main maps: their internal index from 1 to dimension(set) (if vector constraints: VectorOfVariables-in-Set), 1 otherwise (scalar: VariableIndex-in-Set). - note: this set is important to dualization can keep track of what it - decided to define as a constrained variable. - - consider index 0 to highlight scalars - * `primal_convarcon_to_dual_con::Dict{MOI.ConstraintIndex,MOI.ConstraintIndex}`: maps the primal constraint index of constrained variables to the dual model's constraint index of the associated dual constraint. This dual @@ -57,21 +53,12 @@ Main maps: are not in this map, as they are not dualized (See primal_convarcon_to_dual_function). - note: from the above two maps, we can get primal_convar_to_dual_con_and_index - * `primal_var_to_dual_con::Dict{MOI.VariableIndex,MOI.ConstraintIndex}`: maps "free" primal variables to their associated dual (equality) constraints. Free variables as opposed to constrained variables. Note that Dualization will select automatically which variables are free and which are constrained. - note: from the above three maps, we can get primal_var_to_dual_con_and_index - - # TODO: idea, for simmetry, keep only - - primal_convarcon_to_dual_con (as is), analogous to primal_con_to_dual_convarcon - - primal_var_to_dual_con_and_index, analogous to primal_con_to_dual_var_vec - -- the second implicitly tracks which vars were decided to be convar's - * `primal_con_to_dual_var_vec::Dict{MOI.ConstraintIndex,Vector{MOI.VariableIndex}}`: maps primal constraint indices to vectors of dual variable indices. For scalar constraints those vectors will be single element vectors. @@ -79,9 +66,6 @@ Main maps: map. However, `VariableIndex`-in-set and `VectorOfVariables`-in-set might appear in this map if they were not chosen as the main ones. - note: possibly change this to: - primal_con_to_dual_var_vec_and_convarcon - * `primal_con_to_dual_convarcon::Dict{MOI.ConstraintIndex,MOI.ConstraintIndex}`: maps regular primal constraints to dual constrained variable. If the primal constraint's set is EqualTo or Zeros, no constraint is added in the dual