Conversation
bernalde
left a comment
There was a problem hiding this comment.
Blocking issues: None.
Nonblocking issues: None.
Questions: None.
Tests run and outcomes:
git diff --check origin/main...HEADpassed./home/bernalde/.pixi/bin/pixi run pytest tests/test_biofuel.py tests/test_module_imports.py -v --tb=shortpassed, 72 passed./home/bernalde/.pixi/bin/pixi run testpassed, 288 passed and 1 skipped./home/bernalde/.pixi/bin/pixi run lintpassed. The configured non-blocking full flake8 report still printed existing style findings under--exit-zero.gh pr checks 133shows all CI checks passing.
This PR should be merged as-is based on the reviewed diff and checks. I am authenticated as bernalde, which is also the PR author, so I am submitting this as a COMMENT review rather than APPROVE; an eligible reviewer still needs to approve it.
|
Benchmark evidence from a Gurobi-only biofuel run on this PR branch (2026-05-12). I skipped Command: /home/bernalde/.pixi/bin/pixi run gdplib-benchmark run \
--instances biofuel \
--strategies gdp.bigm gdp.hull gdpopt.loa gdpopt.gloa gdpopt.lbb gdpopt.ric \
--timelimit 300 \
--solver-profile gams-gurobi \
--gams-nlp-solver gurobi \
--gams-mip-solver gurobi \
--gams-minlp-solver gurobi \
--gams-local-minlp-solver gurobi \
--run-id pr133_biofuel_gurobi_300s_20260512 \
--no-skip-existingPreflight passed with GAMS available at
Generated artifacts are local/ignored under:
The solve cases completed, but the benchmark command exited nonzero after writing the results because the optional post-run summary step could not import Important caveat: direct transformed GAMS solves on this PR branch still use the benchmark runner's current direct-solve default Takeaway: GAMS/Gurobi on the direct Hull reformulation is currently the best evidence for this biofuel instance in this run: it found |
33b988e to
f4ecc83
Compare
bernalde
left a comment
There was a problem hiding this comment.
Maintainer review of head f4ecc83.
The fix is correct and the regression test is genuine. The base no_modules constraints summed m.num_modules[...] over the entire (site, time) index space, so selecting the inactive or conventional disjunct at any one site forced module variables to zero at all 12 sites — mixed modular/non-modular configurations were infeasible. The site-restricted sums match the docstrings and the symmetric structure of _build_modular_disjunct, and they only remove the unintended cross-site coupling; multi-period module balance, purchase lead time, and salvage logic are untouched. On the base model _module_variable_sites returns all 12 sites, so the new locality assertion is red-on-base — a real regression test.
Findings:
Nonblocking: include fixed variables — tests/test_biofuel.py uses identify_variables(..., include_fixed=False), which silently excludes the num_modules[site, t] entries fixed to 0 during setup periods by _build_modular_disjunct. The assertion holds today only because later periods remain free. The test's meaning (which sites' variables appear in the constraint) does not depend on fixedness — use include_fixed=True so the site set reflects the constraint algebra regardless of build-time fixing.
Nonblocking: shallow transform smoke — the bigm/hull smoke only asserts that no active Disjunction/Disjunct remains, which any structurally valid GDP satisfies. An exception would still fail the test, so this is acceptable, but asserting an expected disaggregated-variable count (hull) would make it catch real hull regressions. Optional.
Nonblocking: closes-vs-refs — the body says "Closes #62", but issue #62's checklist still has Hull, GLOA, Enumeration, and LBB unchecked and the body itself states no solver-backed campaign was run. Merging as-is auto-closes an open tracker; treat the link as Refs #62, or accept the closure explicitly and move the remaining checklist elsewhere.
Summary — Blocking: 0. Nonblocking: 3. Questions: 0. Tests: static verification of the constraint algebra, index sets, and red-on-base reasoning; CI is green at this head (6/6 checks). Merge-ready once the issue-linkage decision is recorded. Posting as COMMENT (author account); the main ruleset requires one approving review from another maintainer.
|
Addressed the review of head f4ecc83 in commit 0a9d2d7:
Tests: |
Summary
biofuelconventional and inactive site disjuncts so theirno_modulesconstraints only reference module variables for the disjunct's own site.biofuelstill reformulates withgdp.bigmandgdp.hull.Tests run
pixi run pytest tests/test_biofuel.py -v --tb=short- passed, 4 passed.pixi run pytest 'tests/test_module_imports.py::TestModelConstruction::test_model_construction[biofuel]' -v --tb=short- passed, 1 passed.pixi run test- passed, 288 passed and 1 skipped.pixi run lint- exited 0 after Black, critical flake8, non-blocking full flake8 report, and typos.git diff --check- passed.Notes
Closes #62