-
Notifications
You must be signed in to change notification settings - Fork 2
update appraisal documentation #1125
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
base: main
Are you sure you want to change the base?
Changes from all commits
f50062b
25b2ae2
0703e1f
bcd1255
97204d2
1c2cc68
9cb3f69
63f682f
9345a93
e7b4d2e
046b16f
1656187
d4f7cd3
d2116c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,7 +24,7 @@ shadow prices for each commodity adjusted to remove the impact of binding capaci | |||||||||||
|
|
||||||||||||
| Note: there is an option to iterate over each year so that investment decisions are based on | ||||||||||||
| equilibrium prices in the _current year_, in what's referred to as the "[ironing-out loop]". | ||||||||||||
| In this case, \\( \lambda\_{c,r,t} \\) will reflect prices from previous iteration of the | ||||||||||||
| In this case, \\( \lambda\_{c,r,t} \\) will reflect prices from the previous iteration of the | ||||||||||||
| ironing-out loop. | ||||||||||||
|
|
||||||||||||
| ## Candidate and existing asset data | ||||||||||||
|
|
@@ -69,33 +69,32 @@ providing investment and dynamic decommissioning decisions. | |||||||||||
|
|
||||||||||||
| ### Pre-calculation of metrics for each supply option | ||||||||||||
|
|
||||||||||||
| > Note: This section contains a reference to "scopes", a feature that is not yet implemented | ||||||||||||
|
|
||||||||||||
| - Annualised fixed costs per unit of capacity (\\( AFC_{opt,r} \\)): For new candidates, this is | ||||||||||||
| their annualised CAPEX plus FOM. For existing assets, the relevant fixed cost is its FOM. | ||||||||||||
|
|
||||||||||||
| - Costs per unit of activity in each time slice, calculated as follows: | ||||||||||||
|
|
||||||||||||
| - Calculate net revenue per unit of activity \\(AC_{t}^{NPV} \\) (Tool A): | ||||||||||||
| \\[ | ||||||||||||
| \begin{aligned} | ||||||||||||
| AC_t = & \quad cost\_{\text{var}}[t] \\\\ | ||||||||||||
| &+ \sum\_{c} \Big( cost\_{\text{input}}[c] \cdot input\_{\text{coeff}}[c] | ||||||||||||
| + cost\_{\text{output}}[c] \cdot output\_{\text{coeff}}[c] \Big) \\\\ | ||||||||||||
| &+ \sum\_{c} \Big( input\_{\text{coeff}}[c] - output\_{\text{coeff}}[c] \Big) | ||||||||||||
| AC_{t}^{NPV} = &-cost\_{\text{var}}[t] \\\\ | ||||||||||||
| &- \sum\_{c} \Big( cost\_{\text{input}}[c] \cdot input\_{\text{coeff}}[c] + | ||||||||||||
| cost\_{\text{output}}[c] \cdot output\_{\text{coeff}}[c] \Big) \\\\ | ||||||||||||
| &+ \sum\_{c} \Big( output\_{\text{coeff}}[c] - input\_{\text{coeff}}[c] \Big) | ||||||||||||
| \cdot \lambda\_{c,r,t} \\\\ | ||||||||||||
| &+ \sum\_{s,c} in\\_scope[s] \cdot \Big\\{ \\\\ | ||||||||||||
| &\quad \quad (cost\_{\text{prod}}[s,c] - \mu\_{s,c}^{\text{prod}}) | ||||||||||||
| \cdot output\_{\text{coeff}}[c] \\\\ | ||||||||||||
| &\quad \quad + (cost\_{\text{cons}}[s,c] - \mu\_{s,c}^{\text{cons}}) | ||||||||||||
| \cdot input\_{\text{coeff}}[c] \\\\ | ||||||||||||
| &\quad \quad + (cost\_{\text{net}}[s,c] - \mu\_{s,c}^{\text{net}}) | ||||||||||||
| \cdot (output\_{\text{coeff}}[c] - input\_{\text{coeff}}[c]) \\\\ | ||||||||||||
| &\Big\\} | ||||||||||||
| \end{aligned} | ||||||||||||
| \\] | ||||||||||||
|
|
||||||||||||
| When using the LCOX objective, the calculation is adjusted to exclude the commodity of interest | ||||||||||||
| (\\( \lambda\_{c,r,t} \\) are set to zero). | ||||||||||||
| - Calculate cost per unit of activity \\( AC_{t}^{LCOX} \\) (Tool B). Note that the commodity | ||||||||||||
| of interest (primary output \\( c_{primary} \\)) is excluded from the price term: | ||||||||||||
| \\[ | ||||||||||||
| \begin{aligned} | ||||||||||||
| AC_{t}^{LCOX} = & \quad cost\_{\text{var}}[t] \\\\ | ||||||||||||
| &+ \sum\_{c} \Big( cost\_{\text{input}}[c] \cdot input\_{\text{coeff}}[c]+ | ||||||||||||
| cost\_{\text{output}}[c] \cdot output\_{\text{coeff}}[c] \Big) \\\\ | ||||||||||||
| &- \sum\_{c \neq c_{primary}} \Big( output\_{\text{coeff}}[c] - input\_{\text{coeff}} | ||||||||||||
| [c] \Big) | ||||||||||||
| \cdot \lambda\_{c,r,t} \\\\ | ||||||||||||
| \end{aligned} | ||||||||||||
| \\] | ||||||||||||
|
|
||||||||||||
| ### Initialise demand profiles for commodity of interest | ||||||||||||
|
|
||||||||||||
|
|
@@ -130,8 +129,8 @@ providing investment and dynamic decommissioning decisions. | |||||||||||
|
|
||||||||||||
| #### Tool A: NPV | ||||||||||||
|
|
||||||||||||
| This method is used when decision rule is single objective and objective is annualised profit for | ||||||||||||
| agents' serving commodity \\( c \\). This method iteratively builds a supply portfolio by selecting | ||||||||||||
| This method is used when the decision rule is `single` and the objective is annualised profit for | ||||||||||||
| agents serving commodity \\( c \\). It iteratively builds a supply portfolio by selecting | ||||||||||||
| options that offer the highest annualised profit for serving the current commodity demand. The | ||||||||||||
| economic evaluation uses \\( \pi_{prevMSY} \\) prices and takes account of asset-specific | ||||||||||||
| operational constraints (e.g., minimum load levels) and the balance level of the target commodity | ||||||||||||
|
|
@@ -140,10 +139,10 @@ operational constraints (e.g., minimum load levels) and the balance level of the | |||||||||||
| - **Optimise capacity and dispatch to maximise annualised profit:** Solve a small optimisation | ||||||||||||
| sub-problem to maximise the asset's surplus, subject to its operational rules and the specific | ||||||||||||
| demand tranche it is being asked to serve. \\(\varepsilon \approx 1×10^{-14}\\) is added to each | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The value of
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think
|
||||||||||||
| demand tranche it is being asked to serve. \\(\varepsilon \approx 1×10^{-14}\\) is added to each | |
| demand tranche it is being asked to serve. \\(\varepsilon\\) is a small positive constant added to each |
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs say that if AFC = 0 then options with AFC > 0 are “discarded as investment options”. In the code, zero-AFC NPV metrics are simply always ranked better than non-zero AFC during comparison, but the other options are still appraised/sorted (and can matter once zero-AFC options are exhausted/capacity-limited). Consider rewording this to describe the comparison rule (zero AFC always preferred; if both zero, compare total annualised surplus) rather than implying the others are removed from consideration.
| \\(\text{AFC}\\). If \\(\text{AFC} = 0\\), this is always preferred over options with | |
| \\(\text{AFC} > 0\\) so the latter are discarded as investment options. | |
| \\(\text{AFC}\\). Options with \\(\text{AFC} = 0\\) are always ranked ahead of options with | |
| \\(\text{AFC} > 0\\). When both options being compared have \\(\text{AFC} = 0\\), they are ranked | |
| using the total annualised surplus metric; otherwise they are ranked using the profitability index. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also mention that we fall back on comparing the numerator of the PI when AFC is zero.
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LaTeX variable formatting is inconsistent within this file: the profitability index uses \text{act}_t, \text{AC}_t, \text{AFC}, etc., while surrounding formulas and the worked example use act_t, AC_t, AFC without \text{}. Pick one style for variables in formulas (either remove \text{} here, or update the other formulas) to keep the notation consistent and easier to read.
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states that "A warning is emitted when this occurs" referring to cases where two or more investment options have identical metrics and cannot be distinguished even after applying tie-breaking rules. However, the implementation in sort_appraisal_outputs_by_investment_priority (src/simulation/investment/appraisal.rs:349-356) does not emit any warning when ties remain unresolved. The function comment acknowledges "The function does not guarantee that all ties will be resolved" but no warning is logged. Either the documentation should be updated to remove the claim about warning emission, or the code should be updated to emit a warning when unresolved ties exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is done by warn_on_equal_appraisal_output
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the LCOX optimisation objective, AF is used for fixed cost (AF \times cap), but the rest of the document defines annualised fixed cost as AFC_{opt,r} and the cost index formula below uses AFC. Please rename AF to AFC here (and keep notation consistent across Tool B).
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tool B’s optimisation bullet says it ‘minimise[s] annualised cost’ but then describes solving the sub-problem ‘to maximise the asset's surplus’, which is contradictory. Also, the objective uses AF × cap while the rest of the document defines the annualised fixed cost as AFC; please align the wording and notation so the objective is unambiguous and consistent with the earlier AFC_{opt,r} definition and the cost-index formula.
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LCOX optimisation objective shows a single “VoLL × UnmetD_t” term, but in the implementation unmet-demand variables exist per time slice and each contributes to the objective. To match the code (and the dispatch optimisation docs), this should be expressed as a sum over time slices (e.g., Σ_t VoLL · UnmetD_t).
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent LaTeX formatting for variable names. The cost index formula at lines 224-225 uses '\text{act}_t', '\text{AC}_t', etc. with the \text{} wrapper, but the equivalent cost index formula in the example section at line 386 uses 'act_t', 'AC_t', etc. without the \text{} wrapper. Similarly, line 182 uses '\text{act}_t' for the profitability index, but line 317 uses 'act_t' in the example. For consistency, either use \text{} for all variable names in standalone formulas, or don't use it for any. The most readable option would be to consistently use \text{} for all variable names in metric formulas (lines 224-225, 182) and update the example formulas (lines 317, 325, 386) to match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... It seems like we weren't consistently using \text before this PR, but we probably don't also want to be changing act to \text{act} haphazardly, without updating it everywhere (although the latter is arguably more correct).
Up to you whether you want to revert or whatever. Not esp important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I update the rest of the file to consistently use \text as copilot says? then we can make an issue about making sure it's consistent throughout the docs? (Maybe we can assign copilot to do that too :) )
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cost index formula introduces cap_r, but that symbol isn’t defined elsewhere in the doc (the optimisation and parameter tables use cap). Consider using the same capacity symbol/indices consistently (e.g., cap or cap_{opt,r}) to avoid confusion.
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Cost Index formula, capacity is written as \text{cap}_r, but elsewhere in Tool B (including the objective just above) the decision variable is cap without a regional subscript. Please make the notation consistent (either always subscript capacity by region or omit it throughout) so it’s clear these refer to the same variable.
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent notation for capacity variable. Line 205 uses cap while line 226 uses \text{cap}_r. For consistency, both should use the same notation. Either remove the subscript from line 226 to match line 205, or add a subscript to line 205 to match line 226. The subscript _r for region is not essential here since the context makes it clear we're dealing with a specific asset and region.
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Cost Index formula, the capacity term is written as “cap_r”, but elsewhere in this section the decision variable is “cap” and the region is already implied by the asset being appraised. Consider using consistent notation (either define cap_r explicitly, or just use cap) to avoid confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to use markdown-table-formatter to prettify markdown tables.
You should just be able to run it with npx markdown-table-formatter docs/model/investment.md.
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example assumes all flow costs (the cost field on each ProcessFlow) are zero, but this should be stated explicitly. The general formulas at lines 78-82 and 90-97 include cost_input and cost_output terms representing these per-flow costs, but they are omitted from the example calculations without explanation. Consider adding a note in the "Asset Parameters" section stating that flow costs are assumed to be zero for simplicity in this example.
| Note: In this illustrative example, all per-flow costs associated with individual ProcessFlows (the `cost` field, represented in the general formulas as \\( cost\_{input} \\) and \\( cost\_{output} \\)) are assumed to be zero; only the variable operating cost \\( cost\_{var}[t] \\) is included in the calculations. |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the example, electricity is introduced as the primary output c_{primary}, but the price table uses \lambda_{c_{elec},r,t}. Either use c_{primary} consistently, or explicitly define c_{elec} = c_{primary} in the example to avoid ambiguity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this block been changed, other than the indentation?