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

Add getnorigconss #845

Merged
merged 7 commits into from
May 4, 2024
Merged

Add getnorigconss #845

merged 7 commits into from
May 4, 2024

Conversation

Opt-Mucca
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Joao-Dionisio Joao-Dionisio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @Opt-Mucca!

Looking at getVars, it has an argument transformed, that returns original or transformed variables depending on the argument. I think the syntax should be uniform, but I don't have a strong preference for either one. What do you think, Mark?

(Interestingly, we don't have a way of getting the number of original variables (SCIPgetNOrigVars exists). I can make a PR, but I want to make sure where we're going with this.)

@Opt-Mucca
Copy link
Collaborator Author

@Joao-Dionisio That is a great suggestion and a complete oversight by me! I will change the behaviour to match (can also add getnorigvars)

@Opt-Mucca
Copy link
Collaborator Author

Added changes and actually made the test work now (is just a simple LP that tests that after presolve there are less constraints than we originally added).

The only potential issue I see: depending on the function you're using transformed has a different default value. I currently set it so the default values stick to the older functionality (don't see any better solution).

@Joao-Dionisio Joao-Dionisio enabled auto-merge (squash) May 4, 2024 09:42
@Joao-Dionisio Joao-Dionisio merged commit e750b29 into master May 4, 2024
1 check passed
@Joao-Dionisio
Copy link
Collaborator

I agree that it's annoying, @Opt-Mucca, but I like your solution, you aren't introducing any problems that weren't there before.

@Opt-Mucca Opt-Mucca deleted the mt/add_getorigconss branch May 4, 2024 11:02
@Opt-Mucca
Copy link
Collaborator Author

Thanks for adding the extra docstrings

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.

None yet

2 participants