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 type identifiers to scip.pxi #730

Closed
Joao-Dionisio opened this issue Oct 11, 2023 · 1 comment
Closed

Add type identifiers to scip.pxi #730

Joao-Dionisio opened this issue Oct 11, 2023 · 1 comment

Comments

@Joao-Dionisio
Copy link
Collaborator

Joao-Dionisio commented Oct 11, 2023

Using branchVar(v) will crash the code if v is not a scip variable.

A simple fix for this is to change the definition in scip.pxi from

def branchVar(self, variable):

to

def branchVar(self, Variable variable):

Plenty of other examples exist in the code. Besides making the code safer, it will also make it (slightly) faster.

EDIT: Adding types to loop variables is also desirable, given that it allows Cython to convert Python loops into C loops. See Issue #750 for more information. EDIT: This is now done, in PR #758.

@Joao-Dionisio
Copy link
Collaborator Author

This is somewhat outdated.

@github-project-automation github-project-automation bot moved this from Backlog to Done in PySCIPOpt Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants