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

COPT update #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

COPT update #383

wants to merge 1 commit into from

Conversation

PeterKlein11
Copy link

Removing this line of code stops COPT calling a floating license from a server in cases where COPT is not used to solve the problem.

Solver still solves as normal on my side after its removal.

Copy link
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

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

Why can you not just uninstall coptpy if you are not using it?

But I guess you have a point if coptpy.Envr() does not fail when no licence is set up.

@@ -109,8 +109,6 @@
import coptpy

with contextlib.suppress(coptpy.CoptError):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
with contextlib.suppress(coptpy.CoptError):
available_solvers.append("copt")

Please remove the check then as well

@PeterKlein11
Copy link
Author

The issue is that we do use COPT. We have a floating license, but only a limited number of seats. Each time pypsa is imported it checks out the license even if you not doing solving a problem. Like building a snakemake workflow.

@lkstrp
Copy link
Member

lkstrp commented Nov 25, 2024

Understood. You are right, we can just remove the check and the import check will be enough. If you resolve the comment, we can merge this. I don't have access to your fork and can't do it myself.

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