How to solve a problem with a paarameter in it?
opened this issue · comments
Deleted user commented
Hi,
In Python I could have the constraint depend on a parameter that is supplied later on.
param = cp.Parameter(nonneg=True)
prob = cp.Problem(cp.Minimize(y), [x == param])
param.value = 3
prob.solve()
How can I achieve this in R? I tried using the Parameter class and then setting the param value by calling value(param) <- 3
but solve
didn't work.
Balasubramanian Narasimhan commented
Reference semantics in effect for Parameter