Replies: 8 comments 11 replies
-
|
It appears the the NPV calculation is working as per the docs for simple cases. I have not checked for complex cases where there are more sophisticated availability constraints etc (I think there is an issue open for this anyway, e.g. where availability is specified at multiple time slice levels). But I did think of one thing that may help (a bit at least): We are calculating contribution to annual total operating cost per time slice (ACt in the docs), and then using this in the annualised profit optimisation. I've noticed that a lot of the AC values are very close to zero (like epsilon close). In fact, by my calculation that are very slightly negative (i.e. tiny profit per activity in time slices). But if you have an existing asset, you could arguably operate when profit is zero as it makes no difference to you. Suggest changing the code so this happens, which I think might be as follows:
I realise this doesn't solve all problems here. But should avoid the "no feasible investment options for commodity..." error. As an aside, I guess we are checking that AFC is not negative? |
Beta Was this translation helpful? Give feedback.
-
|
@Aurashk actually I take it back that NPV is working. I think it's getting the sign of the result wrong. In the missing_commodity model, if I put the A0_RES agent objective to npv, turn please_give_me_wrong_results to true and run it, I get -0.09940125836903009 for the investment appraisal metric in debug_appraisal_results.csv output for the RELCHP existing asset. By my calculation it should be the +ve of that number. Then, I increase the capacity of RELCHP such that it can meet all demand for RSHEAT (to 3655.82). This results in a very small negative number for the metric. However, investment for RSHEAT still fails. It shouldn't fail because there is enough capacity of RELCHP and it has a +ve PI. @alexdewar had said that this is because the algorithm actually chooses the most -ve of the metrics for investment, but I'm not sure that's what is happening. I think RELCHP should have been selected, but that's not what is happening. With the above changes, I think this model should succeed on investment in the first MSY (and fail on the second MSY - 2030). @tsmbland FYI |
Beta Was this translation helpful? Give feedback.
-
|
P.S. Oh I guess RSHEAT investment should still fail, as RELCHP isn't dispatched even though it has sufficient capacity - because only a few time slices have a really profitable result (all others are really close to zero - which hopefully would be resolved by my first post above). |
Beta Was this translation helpful? Give feedback.
-
|
I've created a branch that gives more detailed data about the appraisal, and I think it helps explain the problem. #989 I think at least part of the issue is with the way we calculate activity coefficient for the NPV. We're calculating it as net revenue from flows - operating cost Crucially, revenue from output commodities includes the primary commodity (conversely when using LCOX we exclude the primary commodity). In the simple case where there's only a single asset/process producing the commodity, I think that because of the way we calculate commodity prices (which ultimately comes down to the cost coefficients in the dispatch, which are operating cost + costs from input commodities) the above expression is guaranteed to be zero. If the activity coefficient is zero, then there's no incentive for activity to be greater than zero (note we also don't apply VoLL for NPV appraisal, unlike LCOX). I think the only scenarios where the above expression wouldn't be zero:
If the activity coefficient is zero/negative for all options (or at least not positive enough to offset the capacity cost), that's when it fails
Correct. Internally this would be the value calculated, however we then turn it negative so that we can always do a minimise operation to choose the best asset regardless of the objective, and this is the value that gets reported in the output file
In this case RELCHP is selected for retention. However, because the activity coefficient is (effectively) zero all timeslices in the appraisal optimisation, even though it can meet the full demand (and would do if a commodity balance constraint was applied), the investment algorithm still thinks there's demand left to fill after selecting RELCHP for retention, and then it fails later on when all the remaining options have an optimal capacity of zero |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @tsmbland - yes your analysis of the AC coefficient looks correct. I don't think there's necessarily a problem with it though. |
Beta Was this translation helpful? Give feedback.
-
|
I've added issue #991 for adding the epsilon to activity coefficient. Will leave this discussion open for forming further issues about the pricing methods. |
Beta Was this translation helpful? Give feedback.
-
|
Ah OK
…________________________________
From: Tom Bland ***@***.***>
Sent: 06 November 2025 13:28
To: EnergySystemsModellingLab/MUSE2 ***@***.***>
Cc: Hawkes, Adam D ***@***.***>; Mention ***@***.***>
Subject: Re: [EnergySystemsModellingLab/MUSE2] Current state and next steps of NPV (Discussion #987)
Perhaps, but with the way we do the optimisation (even with the proposed changes here), that's not possible: negative activity coeff -> zero activity -> zero capacity
—
Reply to this email directly, view it on GitHub<#987 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC37JLLSLQNUI4WRKOHOGND33NEH5AVCNFSM6AAAAACLAKV64GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIOBZGE3TQMQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
I've implemented @ahawkes suggestions and it seems promising. See the results in #998 for the simple model. @tsmbland |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The purpose of this discussion is to flesh out issue #716 (NPV is broken) by establishing the current state of things and work out the next steps/ break down into sub-issues. Below is my current understanding, please correct anything I got wrong:
Since NPV is currently not working it is hidden behind 'please_give_me_broken_results' input, the model setup will panic if 'npv' is selected unless the user sets it to true.
issue Gate known-broken model options behind another option #897 pr Scare users away from using broken options #902
Currently we aren't 100% certain how we will fix NPV, but irrespective of that we want to support alternative pricing methods to the current shadow pricing strategy. The more sophisticated pricing methods may help us fix NPV or may not. Adam has suggestions for the pricing strategies:
We already have a scarcity pricing option from Calculate reduced costs and add
scarcity_pricingoption #684 but the current implementation is flagged as producing bad results I'm not sure if this uses the same approach suggested in 2 thoughThere is separate problem mentioned about the
profitability_indexfunction which we also need to address to get NPV working.So seems like the prudent way forward is to see if we can get the alternative pricing strategies working first in a reliable way (possibly building off 3), then we have a new set of tools to fix the NPV method
@dalonsoa @ahawkes @tsmbland
Beta Was this translation helpful? Give feedback.
All reactions