I am referring a code in which there are multiple macros with same name. So, how would it work? I mean, what attributes would be called/run when macro is called?
eg. @expression(EP, ePowerBalance[t=1:T, z=1:Z], 0), @expression(EP, eObj, 0)
and many more “@expression” are there.
The documentation of JuMP.@expression
is here
. The code is a little hard to follow but it is here. I am not sure if I understand your question, what incompatibly are you seeing in calling @expression
multiple times? Most macros can be called an unlimited number of times inside a function, see @show
for example.
I thought of re-categorizing your post to the mathematical modeling section, but I am a bit puzzled if your problem is with macros in general or just the JuMP.@expression
macro specifically.
1 Like
Yes. I figured it out,
It was about JuMP.@expression.
Thanks.
Re-categorized, renamed, and re-tagged your question.
1 Like