docs(pypsa): a start-up or shut-down cost may change from snapshot to snapshot, as in pypsa master - #807
Open
FabianHofmann wants to merge 7 commits into
Open
docs(pypsa): a start-up or shut-down cost may change from snapshot to snapshot, as in pypsa master#807FabianHofmann wants to merge 7 commits into
FabianHofmann wants to merge 7 commits into
Conversation
… snapshot, as in pypsa master
Documentation build overview
14 files changed ·
|
…ven expression, not as a variable (#809) * fix(language): a where that reads a given expression names it as a given expression, not as a variable The namespace files a given expression with the variables, because it is read as a column. A where that read one was refused as if it read a variable. The three refusals (the left name, the right name, a side of a comparison of expressions) now name the given expression and say why a mask may not read it: it may hold a variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBmqeqBrqpQC6MVoSrguHK * docs: the changelog line links #809 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBmqeqBrqpQC6MVoSrguHK --------- Co-authored-by: Claude <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The following content was generated by AI.
The six start-up and shut-down cost parameters span
snapshot, as on PyPSA master (PyPSA/PyPSA#1909). The relaxed file tightens only where both costs are equal in every snapshot, now stated in the language. Rung 62 records it.Stacks on #787 and #786. Part of #783 (step 3b, "Start-up and shut-down cost per snapshot").
Method, gate output, alternatives
What changed
examples/pypsa.yaml:{Generator,Link,Process}_{start_up,shut_down}_costgo from[scenario, c]to[scenario, snapshot, c]. PyPSA reads the cost at the snapshot of the start or stop (optimize.py:424-432on02bdcbba). The objective terms already summed oversnapshot, so they do not change.examples/pypsa_linearized_uc.yaml: the Generator pair spans[snapshot, generator]. The data-prep boolGenerator_partly_tightenedis gone. The four tightening rows now carrycount(Generator_start_up_cost != Generator_shut_down_cost, over=snapshot) == 0in theirwhere. That is PyPSA's(start_up_cost == shut_down_cost).all("snapshot")(constraints.py:636-641). The old description said two parameters cannot be compared in awhere; the language now allowsexpression OP expression, so no data prep and nosrc/change is needed. Awherenames no entry, so the condition is written in each of the four rows.tests/fixtures/pypsa_standard_shape.yaml: the standard frame of the six parameters gainssnapshot, as rungs 45 and 60 did for their parameters.rung_62_startup_cost_per_snapshot.py) and its record. Regenerated: fragments, gallery. Golden and schema regenerated with no diff.Rung 62
A committable peaker that the load needs in snapshots 3 and 4. A start costs
[400, 100, 900, 900, 900], a stop[300, 300, 300, 300, 0]; snapshot weights[2.0, 1.5, 1.0, 2.0, 1.0]. PyPSA master solves to6850.0(starts at snapshot 2, stops at snapshot 5). Probes on the same network:6407090.02407050.06900.0Failing first: on
pypsa==1.3.0the rung'sbuild()raisesAttributeError: start_up_costatn.generators_t.start_up_cost, since the attribute is static only there.Gates
uv run --script examples/references/pypsa/reference.pythen--check: "every rung solves to its record". Onlyrung_62is new inreferences.json.pixi run lint: pass.pixi run ci: pass, 2609 tests, docs-build, compile-tex.pixi run cifailedtest_a_standard_parameter_changes_frame_only_by_a_leading_scenarioon the six new frames, before the fixture change.Not done
wherehas no solved reference. It needs a rung number of its own.n.snapshots, the spec over itssnapshotdimension. They differ only whenn.optimize(snapshots=...)takes a subset.optimize.py:414-429cite in rung 48 and inscenario_opexis not re-anchored; that is the re-anchor item of PyPSA parity with master: open points, new master changes and the PyPSA bugs found #783.pypsa_linearized_uc.yamlas a patch file").