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

Improve printing #36

Open
jd-lara opened this issue Mar 20, 2019 · 3 comments
Open

Improve printing #36

jd-lara opened this issue Mar 20, 2019 · 3 comments

Comments

@jd-lara
Copy link
Contributor

jd-lara commented Mar 20, 2019

The current printing of a constraint with params can be confusing since it adds a 0.0 on the RHS.

julia> m = ModelWithParams();
julia> a = Parameter(m, 10);
julia> x = @variable(m);
julia> t = @constraint(m, x <= a)
noname  0.0
@joaquimg
Copy link
Collaborator

Uhm, thats because the model is only synced once all variables are added.
Maybe we can add a mode to passa the constants directly.
Having parameters themselves in the printing might be harder.

@jd-lara
Copy link
Contributor Author

jd-lara commented Mar 20, 2019

Agreed, this seems to be a hard problem but it's worth registering it into the issues for reference.

@joaquimg
Copy link
Collaborator

joaquimg commented Mar 26, 2019

One option would be to create a ParametricConstraintRef type.

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

No branches or pull requests

2 participants