I would like to define an array of jump variables, e.g something like
for c:1:C
@variable(model, mu[c][1:foo(c)] >= 0)
end
or maybe
for c:1:C
mu[c] = @variable(model, [1:foo(c)] >= 0)
end
but I was not able to find the right syntax,
My goal is later to be able to define constraints on the different mu[c].
I cannot simply use mu = @variable(model,[c=1:C,1:foo(c)]) as in fact the dimension of mu[c] might depends on c.
Thanks for the answer, unfortunately this mgiht not be enough, indeed for some c I want to have mu[c] as a one dimensional variable, and for other as a multi-dimensional variable. Nevertheless your code snippet is helpful to me
One question : what is the start keyword exactly doing ?
The start keyword lets you initialize a variable to have a particular value before the solving process begins. Generally this is required for nonlinear problems and ignored for linear problems, but that depends on the solver used.