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

LD-SDA Documentation #3539

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AlbertLee125
Copy link
Contributor

Summary/Motivation:

This PR enhances the Pyomo Documentation by incorporating detailed instructions on utilizing the Logic-based Discrete-Steepest Descent Algorithm (LD-SDA) solver within the Generalized Disjunctive Programming optimizer (GDPopt).
It includes additional narrative content and a usage example and ensures that the LD-SDA solver class is included in the API documentation.

Changes proposed in this PR:

  • Added comprehensive documentation on the usage of the LD-SDA solver within GDPopt.
  • Included an executable doctest illustrating the application of LD-SDA to a small GDP problem with ordered disjuncts and logical constraints.
  • Documented key solver arguments: starting_point, logical_constraint_list, and direction_norm.
  • Added ~pyomo.contrib.gdpopt.ldsda.GDP_LDSDA_Solver to the autodoc list to enable API documentation rendering.

The narrative content and example were added at the bottom of gdpopt.rst.
The autodoc entry for GDP_LDSDA_Solver was appended to the list of GDPopt solver classes to ensure it appears in the API reference.

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.

@AlbertLee125 AlbertLee125 changed the title Ldsda documentation LD-SDA Documentation Mar 25, 2025
Copy link
Contributor

@emma58 emma58 left a comment

Choose a reason for hiding this comment

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

This looks good! Could you also please edit lines 15-19 to update the number of algorithms to four and add a citation for the LDSDA paper?

--------------------------------------------------------

The GDPopt-LDSDA solver exploits the ordered Boolean variables in the disjunctions to solve the GDP model.
It requires an **exclusive OR (XOR) logical constraint** to ensure that exactly one disjunct is active in each disjunction.
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth noting that in its current implementation is requires an explicit LogicalConstraint, not just the fact that the Disjunction is declared with xor=True, since that's a deviation from anything else in GDP-land right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the note on the documentation of the current LD-SDA requires the explicit LogicalConstraint.

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.69%. Comparing base (a9d673d) to head (41edf80).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3539      +/-   ##
==========================================
- Coverage   88.69%   88.69%   -0.01%     
==========================================
  Files         888      888              
  Lines      101886   101886              
==========================================
- Hits        90365    90364       -1     
- Misses      11521    11522       +1     
Flag Coverage Δ
builders 26.54% <ø> (+<0.01%) ⬆️
default 84.80% <ø> (?)
expensive 33.94% <ø> (?)
linux 86.15% <ø> (-2.29%) ⬇️
linux_other 86.15% <ø> (-0.01%) ⬇️
osx 76.05% <ø> (ø)
win 84.63% <ø> (-0.01%) ⬇️
win_other 84.63% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants