MIP Constraints
PortfolioOptimisers.get_mip_ss Function
get_mip_ss(ss::Number, args...) -> NumberReturn the big-M style scaling constant used by MIP constraints.
When ss is a number it is returned directly. When nothing, the value is derived from the largest finite bound magnitude in wb multiplied by 1000, defaulting to 1000.0 when all bounds are infinite or absent.
Arguments
ss::Number: Scaling constant. Returned as-is.
Returns
ss::Number: The scaling constant.
Related
sourcePortfolioOptimisers.mip_wb Function
mip_wb(_, _::Nothing, args...)Add MIP-compatible weight bound constraints using binary selection variables.
The fall-through method does nothing when wb is nothing. The concrete method adds w ≥ is ⊙ lb and w ≤ il ⊙ ub constraints when the respective finite bounds are present.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.il: Long binary (or continuous relaxation) indicator variable.is: Short binary (or continuous relaxation) indicator variable.
Returns
nothing.
Related
sourcePortfolioOptimisers.short_mip_threshold_constraints Function
short_mip_threshold_constraints(
model::Model,
wb::WeightBounds,
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ffl::Union{Nothing, Number, AbstractVector{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
ffs::Union{Nothing, Number, AbstractVector{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool,
ffl_flag::Bool,
ffs_flag::Bool,
miprb_flag::Bool
) -> AnyAdd MIP binary selection variables and threshold constraints for long-short portfolios.
Creates ilb/isb binary indicator variables (or their continuous relaxations ilf/isf when k is a JuMP variable), enforces that each asset is either long or short but not both (ilb + isb ≤ 1), and applies long/short minimum-holding threshold and rebalancing constraints based on the flags provided.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.lt::Option{<:Threshold}: Long-side minimum-holding threshold.st::Option{<:Threshold}: Short-side minimum-holding threshold.ffl::Option{<:Num_VecNum}: Long-side fixed fee rate(s).ffs::Option{<:Num_VecNum}: Short-side fixed fee rate(s).ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).lt_flag::Bool: Whether to apply the long-side threshold.st_flag::Bool: Whether to apply the short-side threshold.ffl_flag::Bool: Whether to add long fixed fee expressions.ffs_flag::Bool: Whether to add short fixed fee expressions.miprb_flag::Bool: Whether to add MIP rebalancing constraints.
Returns
i_mip: Combined long+short indicator expression.
Related
sourcePortfolioOptimisers.mip_constraints Function
mip_constraints(
model::Model,
wb::WeightBounds,
ffl::Union{Nothing, Number, AbstractVector{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
ffl_flag::Bool,
miprb_flag::Bool
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}Add long-only MIP binary indicator variable and associated constraints to the JuMP optimisation model.
Creates binary variable ib[i] per asset indicating whether the asset is held. When k is a JuMP variable, introduces continuous relaxation ibf with big-M linking constraints. Optionally applies minimum-holding threshold, fixed-fee, and rebalancing constraints.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.ffl::Option{<:Num_VecNum}: Long-side fixed fee rate(s).lt::Option{<:Threshold}: Long-side minimum-holding threshold.ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).lt_flag::Bool: Whether to apply the long-side threshold.ffl_flag::Bool: Whether to add fixed fee expressions.miprb_flag::Bool: Whether to add MIP rebalancing constraints.
Returns
ib: Binary indicator JuMP variable vector.
Related
PortfolioOptimisers.set_iplg_constraints! Function
set_iplg_constraints!(
model::Model,
plgs::Union{AbstractPhylogenyConstraintResult, AbstractVector{<:AbstractPhylogenyConstraintResult}}
)Add integer phylogeny cardinality constraints to the JuMP optimisation model.
Iterates over plgs and, for each IntegerPhylogeny entry, enforces A * ib ≤ B where ib is the binary indicator variable created by mip_constraints.
Arguments
model::JuMP.Model: The JuMP optimisation model.plgs: Collection of phylogeny constraint objects.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_mip_constraints! Function
set_mip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
gcard::Union{Nothing, LinearConstraint},
pl::Union{Nothing, AbstractPhylogenyConstraintResult, AbstractVector{<:AbstractPhylogenyConstraintResult}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
fees::Union{Nothing, Fees},
ss::Union{Nothing, Number}
)
set_mip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
gcard::Union{Nothing, LinearConstraint},
pl::Union{Nothing, AbstractPhylogenyConstraintResult, AbstractVector{<:AbstractPhylogenyConstraintResult}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
fees::Union{Nothing, Fees},
ss::Union{Nothing, Number},
miprb_flag::Bool
)Add all long-only MIP constraints to the JuMP optimisation model.
Orchestrates cardinality, group cardinality, integer phylogeny, minimum-holding threshold, fixed-fee, and rebalancing MIP constraints for long-only portfolios, dispatching to mip_constraints, short_mip_threshold_constraints, and set_iplg_constraints! as appropriate.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.card::Option{<:Integer}: Optional maximum cardinality (number of non-zero assets).gcard::Option{<:LinearConstraint}: Optional group cardinality constraint.pl::Option{<:PlC_VecPlC}: Optional phylogeny constraint(s).lt::Option{<:Threshold}: Long-side minimum-holding threshold.st::Option{<:Threshold}: Short-side minimum-holding threshold.fees::Option{<:Fees}: Optional fee specification.ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).miprb_flag::Bool = false: Whether to add MIP rebalancing constraints.
Returns
nothing.
Related
PortfolioOptimisers.smip_wb Function
smip_wb(_, _::Nothing, args...)Add sub-group MIP weight bound constraints using a selection matrix.
The fall-through method does nothing when wb is nothing. The concrete method applies bounds smtx * lb and smtx * ub gated by binary selection variables is and il respectively.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.smtx::MatNum: Selection matrix mapping assets to sub-groups.smtx_expr: JuMP expression for the sub-group weight combination.il: Long binary (or continuous relaxation) indicator variable.is: Short binary (or continuous relaxation) indicator variable.key::Symbol = :set_w_mip_: Base key for naming constraints.i::Integer = 1: Index for generating unique constraint names.
Returns
nothing.
Related
sourcePortfolioOptimisers.short_smip_threshold_constraints Function
short_smip_threshold_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool
) -> Any
short_smip_threshold_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool,
key1::Symbol
) -> Any
short_smip_threshold_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool,
key1::Symbol,
key7::Symbol
) -> Any
short_smip_threshold_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool,
key1::Symbol,
key7::Symbol,
key8::Symbol
) -> Any
short_smip_threshold_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
st_flag::Bool,
key1::Symbol,
key7::Symbol,
key8::Symbol,
i::Integer
) -> AnyAdd sub-group MIP binary selection variables and threshold constraints for long-short portfolios using a selection matrix.
Creates per-group binary indicator variables and, when k is a JuMP variable, their continuous relaxations with big-M linking constraints. Applies long/short minimum-holding thresholds gated by the selection matrix smtx.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.smtx::Option{<:MatNum}: Selection matrix mapping assets to sub-groups.lt::Option{<:Threshold}: Long-side minimum-holding threshold.st::Option{<:Threshold}: Short-side minimum-holding threshold.ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).lt_flag::Bool: Whether to apply the long-side threshold.st_flag::Bool: Whether to apply the short-side threshold.key1::Symbol = :si: Base key for long indicator variables.key7::Symbol = :smtx_expr_: Base key for sub-group weight expressions.key8::Symbol = :set_w_mip_: Base key for weight bound constraints.i::Integer = 1: Index for generating unique names.
Returns
i_mip: Combined long+short indicator expression for the sub-group.
Related
sourcePortfolioOptimisers.smip_constraints Function
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol,
key3::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol,
key3::Symbol,
key4::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol,
key3::Symbol,
key4::Symbol,
key5::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol,
key3::Symbol,
key4::Symbol,
key5::Symbol,
key6::Symbol
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}
smip_constraints(
model::Model,
wb::WeightBounds,
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
lt_flag::Bool,
key1::Symbol,
key2::Symbol,
key3::Symbol,
key4::Symbol,
key5::Symbol,
key6::Symbol,
i::Integer
) -> Union{JuMP.Containers.DenseAxisArray{_A, _B, Ax, _C} where {_A, _B, Ax<:Tuple, _C<:NTuple{_B, JuMP.Containers._AxisLookup}}, Vector{VariableRef}}Add a sub-group MIP binary indicator variable and associated weight and threshold constraints for a single selection matrix group.
Creates binary variable sib (or continuous relaxation when k is a JuMP variable) representing asset inclusion within the sub-group, then applies sub-group weight expression and optional threshold bounds via smip_wb.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.smtx::Option{<:MatNum}: Selection matrix for this sub-group.lt::Option{<:Threshold}: Long-side minimum-holding threshold.ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).lt_flag::Bool: Whether to apply the long-side threshold.key1::Symbol = :sib_: Base key for binary indicator variable.key2::Symbol = :i_smip_: Base key for the indicator expression.key3::Symbol = :isbf_: Base key for continuous relaxation variable.key4::Symbol = :smtx_expr_: Base key for sub-group weight expression.key5::Symbol = :set_w_mip_: Base key for weight bound constraints.key6::Symbol = :w_smip_lt_: Base key for threshold constraints.i::Integer = 1: Index for generating unique names.
Returns
sib: Binary indicator JuMP variable for this sub-group.
Related
sourcePortfolioOptimisers.set_all_smip_constraints! Function
set_all_smip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
gcard::Union{Nothing, LinearConstraint},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number}
)
set_all_smip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
gcard::Union{Nothing, LinearConstraint},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
i::Integer
)Add all sub-group MIP constraints for a single or multiple selection matrices.
The single-matrix method handles cardinality, group cardinality, long/short threshold, and weight-bound constraints for one sub-group. The vector method iterates over collections of cardinalities, group constraints, and selection matrices.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.card: Cardinality bound(s) for the sub-group(s).gcard: Group-cardinality constraint(s) for the sub-group(s).smtx: Selection matrix (or vector thereof) for the sub-group(s).lt: Long-side minimum-holding threshold(s).st: Short-side minimum-holding threshold(s).ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).i::Integer = 1: Index for generating unique names (single-matrix method only).
Returns
nothing.
Related
PortfolioOptimisers.set_scardmip_constraints! Function
set_scardmip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number}
)
set_scardmip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
i::Integer
)Add sub-group cardinality MIP constraints using a selection matrix.
The single-matrix method enforces sum(sib) ≤ card for one sub-group. The vector method iterates over collections of cardinalities and selection matrices.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.card: Cardinality bound(s) for the sub-group(s).smtx: Selection matrix (or vector thereof).lt: Long-side minimum-holding threshold(s).st: Short-side minimum-holding threshold(s).ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).i::Integer = 1: Index for generating unique names (single-matrix method only).
Returns
nothing.
Related
PortfolioOptimisers.set_sgcardmip_constraints! Function
set_sgcardmip_constraints!(
model::Model,
wb::WeightBounds,
gcard::Union{Nothing, LinearConstraint},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number}
)
set_sgcardmip_constraints!(
model::Model,
wb::WeightBounds,
gcard::Union{Nothing, LinearConstraint},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}},
lt::Union{Nothing, Threshold},
st::Union{Nothing, Threshold},
ss::Union{Nothing, Number},
i::Integer
)Add sub-group group-cardinality MIP constraints using a selection matrix.
The single-matrix method enforces linear group cardinality constraints A * sib ≤ B and A * sib = B on the sub-group binary indicator. The vector method iterates over multiple group constraints and selection matrices.
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.gcard: Group-cardinality constraint(s).smtx: Selection matrix (or vector thereof).lt: Long-side minimum-holding threshold(s).st: Short-side minimum-holding threshold(s).ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).i::Integer = 1: Index for generating unique names (single-matrix method only).
Returns
nothing.
Related
PortfolioOptimisers.set_smip_constraints! Function
set_smip_constraints!(
model::Model,
wb::WeightBounds,
card::Union{Nothing, Integer, AbstractVector{<:Integer}},
gcard::Union{Nothing, LinearConstraint, AbstractVector{<:LinearConstraint}},
smtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}, AbstractVector{<:AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}}},
sgmtx::Union{Nothing, AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}, AbstractVector{<:AbstractMatrix{<:Union{var"#s19", var"#s18"} where {var"#s19"<:Number, var"#s18"<:AbstractJuMPScalar}}}},
lt::Union{Nothing, Threshold, AbstractVector{<:Union{Nothing, var"#s379"} where var"#s379"<:Threshold}},
st::Union{Nothing, Threshold, AbstractVector{<:Union{Nothing, var"#s379"} where var"#s379"<:Threshold}},
glt::Union{Nothing, Threshold, AbstractVector{<:Union{Nothing, var"#s379"} where var"#s379"<:Threshold}},
gst::Union{Nothing, Threshold, AbstractVector{<:Union{Nothing, var"#s379"} where var"#s379"<:Threshold}},
ss::Union{Nothing, Number}
)Add all sub-group MIP constraints (both cardinality and group-cardinality) to the JuMP optimisation model.
Dispatches between combined selection matrices (calling set_all_smip_constraints!) and separate cardinality/group-cardinality selection matrices (calling set_scardmip_constraints! and set_sgcardmip_constraints! independently).
Arguments
model::JuMP.Model: The JuMP optimisation model.wb::WeightBounds: Weight bound specification containing lower and upper bounds.card: Cardinality bound(s).gcard: Group-cardinality constraint(s).smtx: Cardinality selection matrix (or vector thereof).sgmtx: Group-cardinality selection matrix (or vector thereof).lt: Long-side minimum-holding threshold(s) for cardinality sub-groups.st: Short-side minimum-holding threshold(s) for cardinality sub-groups.glt: Long-side minimum-holding threshold(s) for group-cardinality sub-groups.gst: Short-side minimum-holding threshold(s) for group-cardinality sub-groups.ss::Option{<:Number}: Big-M scaling constant (computed viaget_mip_sswhennothing).
Returns
nothing.
Related