Skip to content

Migrate sslp harness to include a generic_cylinders.py entry#664

Open
DLWoodruff wants to merge 1 commit intoPyomo:mainfrom
DLWoodruff:sslp_update
Open

Migrate sslp harness to include a generic_cylinders.py entry#664
DLWoodruff wants to merge 1 commit intoPyomo:mainfrom
DLWoodruff:sslp_update

Conversation

@DLWoodruff
Copy link
Copy Markdown
Collaborator

Summary

sslp.py already exposes scenario_creator, scenario_names_creator, kw_creator, inparser_adder, scenario_denouement, and sample_tree_scen_creator, so the generic driver can run it. All the flags used by sslp_cylinders.py (--instance-name, --sslp-data-path, --surrogate-nonant, --integer-relax-then-enforce, --reduced-costs-rho, --use-primal-dual-rho-updater, etc.) are already registered through cfg in generic_cylinders too, so the parallel entry can use the same options.

  • Archive examples/sslp/sslp_ef.py (no callers anywhere) under examples/sslp/archive/.
  • examples/run_all.py: add a generic_cylinders.py --module-name sslp entry paralleling the retained sslp_cylinders.py one.
  • doc/src/examples.rst: reword the sslp section to say runs go through the generic driver by default and that sslp_cylinders.py is retained as the worked custom-driver example.

Retained: sslp.py (model, also the scenario_creator.rst surrogate-nonant example), sslp_cylinders.py (rst-referenced), and sslp_demo.bash.

Test plan

  • mpiexec -np 4 python -m mpi4py ../../mpisppy/generic_cylinders.py --module-name sslp --instance-name=sslp_15_45_10 --sslp-data-path=./data --integer-relax-then-enforce --integer-relax-then-enforce-ratio=0.8 --lagrangian --reduced-costs-rho --max-iterations=20 --default-rho=1e-6 --reduced-costs --rc-fixer --xhatshuffle --linearize-proximal-terms --rel-gap=0.0 --surrogate-nonant --use-primal-dual-rho-updater --primal-dual-rho-update-threshold=10 --solver-name=gurobi_persistent — runs, converges to ~4.7% cylinder gap after 20 iters
  • ruff check examples/run_all.py
  • CI run_all job on this PR

🤖 Generated with Claude Code

sslp.py already exposes scenario_creator, scenario_names_creator,
kw_creator, inparser_adder, scenario_denouement, and
sample_tree_scen_creator, so the generic driver can run it. All of
the flags used by sslp_cylinders.py (--instance-name,
--sslp-data-path, --surrogate-nonant, --integer-relax-then-enforce,
--reduced-costs-rho, --use-primal-dual-rho-updater, etc.) are already
registered through cfg in generic_cylinders too.

- Archive examples/sslp/sslp_ef.py (no callers anywhere) under
  examples/sslp/archive/.
- run_all.py: add a generic_cylinders invocation paralleling the
  retained sslp_cylinders.py entry, using the same flags.
- doc/src/examples.rst: reword the sslp section to say runs go
  through the generic driver by default and that sslp_cylinders.py
  is retained as the worked custom-driver example.

Retained: sslp.py (model, also the scenario_creator.rst
surrogate-nonant example), sslp_cylinders.py (rst), and sslp_demo.bash.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.72%. Comparing base (b726347) to head (8b0ad25).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
+ Coverage   70.71%   70.72%   +0.01%     
==========================================
  Files         153      153              
  Lines       19005    19005              
==========================================
+ Hits        13439    13441       +2     
+ Misses       5566     5564       -2     

☔ 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.

2 participants