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

RFC: Integer variable modeling #5

Merged
merged 4 commits into from
Dec 10, 2020
Merged

RFC: Integer variable modeling #5

merged 4 commits into from
Dec 10, 2020

Conversation

joehuchette
Copy link
Collaborator

@joehuchette joehuchette commented Dec 10, 2020

I added a new field to ProblemData to track the types of variables. At this point, a variable can be continuous, binary, or general integer. This is not yet plugged into anything interesting, and in fact all but one of the LP presolve routines will immediately error in the presence of integer variables. I want to audit things first to make sure that the routines are "safe" for IPs.

Along the way, I ripped out the variable/constraint name fields. They did not seem useful to me, and they made the modeling interface marginally uglier since I wanted to make the "variable type" field optional. I can revert or split this change into a separate PR if desired.

I chose to store the types as a separate field, rather than trying to pack this into the Col type. I'm open to changing it if desired, though.

(Sorry about the unrelated whitespace changes, VS Code apparently ran a linter in the background).

…ed into anything). Along the way, remove variable/constraint names since they don't seem to be doing anything useful.
@joehuchette
Copy link
Collaborator Author

Also, cc @Anhtu07

@mtanneau
Copy link
Owner

👍 for removing the names

Storing variable types separately makes more sense. Col and Row should be used only for the constraint matrix.

@joehuchette joehuchette requested a review from mtanneau December 10, 2020 19:23
@mtanneau mtanneau merged commit 49a34c4 into master Dec 10, 2020
@mtanneau mtanneau deleted the integers branch December 12, 2020 19:07
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

Successfully merging this pull request may close these issues.

2 participants