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

Code for infeasibility diagnostics called mis #3172

Merged
merged 44 commits into from
May 6, 2024
Merged

Conversation

DLWoodruff
Copy link
Contributor

@DLWoodruff DLWoodruff commented Mar 1, 2024

Fixes # .

Summary/Motivation:

Finds sets of actions that each, independently,
would result in feasibility. It also computes a minimal intractable system
(which is not guaranteed to be unique). It was written by Ben Knueven
as part of the watertap project and is governed by a license shown
at the top of the mis.py.

The algortithms come from John Chinneck's slides, see: https://www.sce.carleton.ca/faculty/chinneck/docs/CPAIOR07InfeasibilityTutorial.pdf

Changes proposed in this PR:

  • create a new package called mis in contrib

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@DLWoodruff
Copy link
Contributor Author

Some tests seem to be failing due to infrastructure issues (e.g. an Xpress license seized the once-every-four-years opportunity to expire on Feb 29!)

@DLWoodruff DLWoodruff requested a review from mrmundt March 1, 2024 22:38
@DLWoodruff DLWoodruff changed the title [WIP] Code for infeasibility diagnostics called mis Code for infeasibility diagnostics called mis Mar 4, 2024
@mrmundt
Copy link
Contributor

mrmundt commented Mar 5, 2024

Some tests seem to be failing due to infrastructure issues (e.g. an Xpress license seized the once-every-four-years opportunity to expire on Feb 29!)

Infrastructure issues have been fixed - I merged the changes into your branch.

@DLWoodruff
Copy link
Contributor Author

Now that the infrastructure issues are fixed (Thanks!) some tests are failing due to contention for temp files, but only on windows platforms. I will try to get some help with this.

@blnicho
Copy link
Member

blnicho commented Mar 12, 2024

@DLWoodruff @bknueven would either of you be able to attend a future Pyomo dev meeting to talk about this PR? We're curious if this should be added as an alternative in pyomo.contrib.iis rather than a stand-alone contrib package.

@bknueven
Copy link
Contributor

@DLWoodruff @bknueven would either of you be able to attend a future Pyomo dev meeting to talk about this PR? We're curious if this should be added as an alternative in pyomo.contrib.iis rather than a stand-alone contrib package.

I would be able to attend -- though next week is not good.

I agree that this capability should probably be folded into pyomo.contrib.iis.

@DLWoodruff DLWoodruff marked this pull request as draft March 17, 2024 23:16
@DLWoodruff
Copy link
Contributor Author

All conversations have been resolved. Thanks again for the thorough review.

Copy link
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

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

Thanks, @DLWoodruff ! I did another pass and have some more comments (that are mostly stylistic/quality)

doc/OnlineDocs/contributed_packages/iis.rst Outdated Show resolved Hide resolved
doc/OnlineDocs/contributed_packages/iis.rst Outdated Show resolved Hide resolved
pyomo/contrib/iis/mis.py Outdated Show resolved Hide resolved
pyomo/contrib/iis/mis.py Outdated Show resolved Hide resolved
pyomo/contrib/iis/mis.py Show resolved Hide resolved
pyomo/contrib/iis/mis.py Show resolved Hide resolved
pyomo/contrib/iis/mis.py Show resolved Hide resolved
pyomo/contrib/iis/tests/test_mis.py Outdated Show resolved Hide resolved
pyomo/contrib/iis/tests/test_mis.py Outdated Show resolved Hide resolved
pyomo/contrib/iis/tests/test_mis.py Outdated Show resolved Hide resolved
@DLWoodruff
Copy link
Contributor Author

All conversations have been resolved and thanks again for the thorough and constructive reviews.

@DLWoodruff DLWoodruff requested a review from mrmundt April 23, 2024 21:47
Copy link
Contributor

@Robbybp Robbybp left a comment

Choose a reason for hiding this comment

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

A small string formatting fix, otherwise this looks good.

pyomo/contrib/iis/mis.py Show resolved Hide resolved
pyomo/contrib/iis/mis.py Outdated Show resolved Hide resolved
pyomo/contrib/iis/mis.py Show resolved Hide resolved
Copy link
Contributor

@Robbybp Robbybp left a comment

Choose a reason for hiding this comment

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

Assuming the Pypy test failure is unrelated, this looks good to me

@DLWoodruff DLWoodruff requested a review from mrmundt May 2, 2024 15:43
@DLWoodruff DLWoodruff merged commit e77be8c into Pyomo:main May 6, 2024
29 of 31 checks passed
@DLWoodruff DLWoodruff deleted the mis branch May 6, 2024 00:36
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.

6 participants