Skip to content

Add SCIPvarMarkRelaxationOnly #1023

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

Merged
merged 7 commits into from
Jul 19, 2025
Merged

Conversation

Joao-Dionisio
Copy link
Member

Fix #1019

Could you provide a test, please, @kkazda?

@kkazda
Copy link

kkazda commented Jul 14, 2025

i am getting the following error when running var.markRelaxationOnly()
"*** TypeError: an integer is required"

@kkazda
Copy link

kkazda commented Jul 14, 2025

i don't believe PY_SCIP_CALL should call SCIPvarMarkRelaxationOnly as its does not return a RET_CODE.
also, i believe it would be valuable to also implement SCIPvarIsRelaxationOnly so a check to see if a variable is properly marked as relaxation only can be performed.

@Joao-Dionisio
Copy link
Member Author

Oops! Yeah that's what you get for trusting Copilot a bit too much :)
I'll edit it tomorrow morning, sorry

@Joao-Dionisio
Copy link
Member Author

@kkazda should be good now, works locally

@Joao-Dionisio
Copy link
Member Author

In SCIP in debug mode, we're getting a segfault. I figure it's because the variable is not marked as deletable.
To add SCIPvarMarkDeletable, we'd also need to interface SCIPcreateVar or add another optional argument to addVar (deletable=False, which would mark it deletable before adding the variable to the problem). I'm not too keen on either option, so if this is working for you @kkazda, then I would merge as is.

@Joao-Dionisio
Copy link
Member Author

After some thought, I decided to go with the optional argument approach, and also decided against adding this argument to the matrix variables, at least for now.

@Joao-Dionisio Joao-Dionisio merged commit b4a70f5 into master Jul 19, 2025
1 check passed
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.

add constraint to relaxation only
2 participants