Skip to content

Conversation

Opt-Mucca
Copy link
Collaborator

No description provided.

Copy link
Member

@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 disabled auto-merge May 4, 2024 09:42
@Joao-Dionisio Joao-Dionisio merged commit e750b29 into master May 4, 2024
@Joao-Dionisio
Copy link
Member

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.

2 participants