Concentration Constraints: private API

PortfolioOptimisers.set_concentration_constraints! — Function
set_concentration_constraints!(model::JuMP.Model, conc::Nothing, args...; kwargs...)
set_concentration_constraints!(model::JuMP.Model, conc::Cnl_VecCnl,
                               wb::WeightBounds, ss::Option{<:Number};
                               prefix::Symbol = Symbol(""))

Add the concentration rules of a block to the model.

The block builder set_block_constraints! calls it after the MIP kinds, so the parts of the weights exist. Rule i of the slot registers its entries under the keys conc_<name>_i, under prefix, so two rules and two blocks do not collide. The form of each rule, its field alg, picks its rows, see set_concentration_rows!. The rules of a vector intersect.

The rows follow the scale of the weights. A ratio objective and a RiskBudgeting head solve for the scaled weights $k \boldsymbol{w}$, so each number of a rule is multiplied by k, the variable of get_k, as the weight bounds multiply theirs. The binary of the exact form then gates the rows through the product z k that declare_mip_gate! declares, as the held bit does. When k is the number 1, the binary gates the rows directly.

Algorithm

  1. conc = nothing: add no row.
  2. For each rule cl at index i:
    1. Make the ConcentrationMIPSpace of the rule.
    2. Make the positions x with mip_wx!, which registers them as conc_x_i.
    3. Add the rows of the form cl.alg with set_concentration_rows!.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • conc: The resolved rules of the block, or nothing.
  • wb: The weight bounds of the block, which size the big-M expression under a free budget.
  • ss::Option{<:Number}: Big-M scaling constant (computed via get_mip_ss when nothing).
  • prefix::Symbol = Symbol(""): Model State namespace of the call. The builder reads the weights under it, and every entry that it registers takes it, so two calls under two prefixes add two sets of rows to one model. The empty default gives the bare names.

Returns

  • nothing.

Related

source