Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jebouchat opened this issue Mar 20, 2019 · 7 comments
Open

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

jebouchat opened this issue Mar 20, 2019 · 7 comments

Comments

@jebouchat
Copy link

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Member

blegat commented Apr 10, 2019

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

@ianfiske
Copy link

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
Copy link
Collaborator

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
Copy link

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

@pkienscherf
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants