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

Constant constraints #82

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Constant constraints #82

merged 2 commits into from
Jun 27, 2024

Conversation

termoshtt
Copy link
Member

@termoshtt termoshtt commented Jun 27, 2024

Constraint without any decision variable like following causes segmentation fault in CBC solver with Python-MIP 1.15. https://github.com/Jij-Inc/ommx/actions/runs/9698846012/job/26766373894

    x = DecisionVariable.continuous(0)
    instance = Instance.from_components(
        decision_variables=[x],
        objective=x,
        constraints=[
            # 1 >= 0 is always true
            Linear(terms={}, constant=1) >= 0,
            x <= 1,
        ],
        sense=Instance.MAXIMIZE,
    )

This has been reported in coin-or/python-mip#213, coin-or/python-mip#238 and some linked issues, and fixed in coin-or/python-mip#237.

We use latest commit of Python-MIP coin-or/python-mip@0ccb811 until the next version is released coin-or/python-mip#384

@termoshtt termoshtt self-assigned this Jun 27, 2024
@termoshtt termoshtt added bug Something isn't working python Changes in Python SDK labels Jun 27, 2024
@termoshtt termoshtt marked this pull request as ready for review June 27, 2024 23:26
@termoshtt termoshtt merged commit 1233f0e into main Jun 27, 2024
27 checks passed
@termoshtt termoshtt deleted the constant-constraints branch June 27, 2024 23:26
termoshtt added a commit that referenced this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Changes in Python SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant