JuliaStochOpt / ParameterJuMP.jl

A JuMP extension to use parameter in constraints RHS
MIT License
41 stars 5 forks source link

No method matching *(::VariableRef, ::Parameter) #35

Open jebouchat opened 5 years ago

jebouchat commented 5 years ago

I feel like a method to multiply a (JuMP) variable by a (ParameterJuMP) parameter is missing. Is there a way around it? If not, do you plan on adding a method to allow it?

Julia 1.1 JuMP 0.19 ParameterJuMP v.0 (?)

joaquimg commented 5 years ago

So, this is currently undefined. Because derivatives are weird to define. And because we will need another data structure. If you have an example use case post it here. If you’d like to open a PR I would be happy to review. But so far parameters can only multiply constants. If you want to modify variable coeficients you might want to look at jump’s set_coefficient function

joaquimg commented 5 years ago

I am considering doing this. But then it would be good to know if cpv is enough. (p = parameter, v = jump variable, c = number) Or we will need to go up tu cpv*v (which is harder because its cubic and not quadraric). Any ideas from @blegat and @jd-lara ?

blegat commented 5 years ago

I think cpv has higher priority. You can replace cpvv by cpv using SOCP instead of QCP

ianfiske commented 2 years ago

I was reading here to check what it would take to implement this because I think it would be useful for some problems I'm working on. The use-case is repeated solves of the same power dispatch optimization problem, but with different prices at different times. Looking above, what does

Because derivatives are weird to define. And because we will need another data structure.

refer to? Where are derivatives implemented in ParameterJuMP source and how are they used? I'm wondering if this is something I can contribute on, but I'd like to get oriented.

joaquimg commented 2 years ago

I do not recommend doing it here. ParametricOptInterface already does that but is far from optimal. I recommend waiting until around June when we plan to finish a rewrite of ParametricOptInterface.

ianfiske commented 2 years ago

Got it, thanks! And great to learn about the ongoing work in ParametricOptInterface.

pkienscherf commented 2 years ago

Are there any updates on this, can one help? I'd interested in similar applications as @ianfiske .