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

Access to value of constraint variable at the end of model.optimize? #254

Open
2 of 3 tasks
janpeter19 opened this issue May 30, 2023 · 1 comment
Open
2 of 3 tasks

Comments

@janpeter19
Copy link

janpeter19 commented May 30, 2023

Checklist

Question

I am a new user to Opltang and just used it for smaller problems, mainly linear-programming.
It would be very convenient to have access to the actual value of a constraining variable at the
end of an optimisation. The actual objectiv as well as variables I can get but I do not see
how to read out the value of the constraint. Can you help me?

Examples:
model.objective.value - ok
model.variables.x_opt.primal - ok
model.constraints.y_lim.value - not ok
model.constraints.y_lim.primal - not ok

@cdiener
Copy link
Member

cdiener commented Aug 13, 2023

As long as y_lim is the name of the constraint the last option should work. What error are you getting?

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

2 participants