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

Allow parameters in constraints #8

Closed
dpsanders opened this issue Jun 4, 2016 · 2 comments
Closed

Allow parameters in constraints #8

dpsanders opened this issue Jun 4, 2016 · 2 comments

Comments

@dpsanders
Copy link
Member

It is not clear what syntax to use to distinguish variables (that specify the dimensions of the space that the feasible region lives in) and parameters (basically, constants that are specified externally).

Maybe

S = @constraint(c, 1 <= (x - c)^2 <= 3 )

The last argument is the constraint; the others specify that those variables are parameters.
Then S(1) should be the constraint specialised with c = 1 etc.

@dpsanders
Copy link
Member Author

Another possible syntax was proposed by Simon Byrne:

@constraint 1 <= (x - $c)^2 <= 3

where the $ indicates that c is a parameter whose value comes from outside (where?).

@dpsanders
Copy link
Member Author

Constants seem to be working.

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

No branches or pull requests

1 participant