jump-dev / ParametricOptInterface.jl

Extension for dealing with parameters
MIT License
36 stars 7 forks source link

Parameters multiplying quadratic terms #3

Closed joaquimg closed 2 years ago

joaquimg commented 4 years ago

This is non-trivial now because we don't have Scalar/VectorCubicFunction

There are a few possibilities: 1) do nothing about that, since most solver won't have an awesome hot-start anyway. However, that might be useful in stuff like Progressive Hedging or model differentiation (the other GSOC of 2020). 2) Add that only in this package and guarantee that a cubic function is never passed forward. 3) Add a set method to add the parameters one by one with triplets like (S(A/Q)F-with only params, variable_1, variable_2) 4) Add that to MOI, which would be a lot of work, probably not justified.

joaquimg commented 2 years ago

Elaborating 3:

MOI.set(model, POI.QuadraticObjectiveCoef(), (var_1::VI, var_2::VI), ::Union{
    VI,
    SAF,
    SQF,
})

This might require checking if there is an objective set. We can consider forcing the user to do this before setting the objective. When we get the objective we can see if there is a non-zero coef for the respective variable pair already set, if there is, throw an error...