-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
@LinearConstraint with syntiax as @addConstraint #595
Comments
It shouldn't be hard to get this working:
My only concern is that it could be confusing to someone reading the model how this differs from |
Totally agree, in fact it is a def of a cns. My final goal is to have this things working |
See @build_constraint. We don't have the one-line version that constructs a JuMP container given index sets. If this is needed, please open a new issue. |
@LinearConstraint(expr) (as well as @QuadConstraint(expr))
does not enable the full expressive power of
@addConstraint(m::Model, con)
or that of
@defExpr(ref, expr)
so that the following does not work
MyLCns = @LinearConstraint([i=1:2:4], x[i]+x[i+1] <=1)
It could be useful to have the same expressive power also for @LinearConstraint to define a (linear/quadratic) constraint without addint it to the model. Later one could get the coefficient of the linear constraints and manipulate them
Fabrizio
The text was updated successfully, but these errors were encountered: