quintel / etmoses

Online decision support tool to create local energy situations for neighbourhoods, cities and regions with a time resolution of 15 minutes created and maintained by Quintel – Not maintained
https://moses.energytransitionmodel.com
MIT License
11 stars 3 forks source link

Business case matrix should update when (for example) assets are removed #1468

Open ChaelKruip opened 7 years ago

ChaelKruip commented 7 years ago

Now you first have to recalculate the yearly business case before the business case matrix is updated which is not very clear to the user.

grdw commented 7 years ago

Business case matrix

Which matrix? The matrix on the edit page?

ChaelKruip commented 7 years ago

Which matrix? The matrix on the edit page?

Yes.

grdw commented 7 years ago

What would be cool to do is, when there's a change to either the heat_asset_list, heat_source_list, gas_asset_list, topology or technology_matrix detect the change and automatically recalculate the business case.

The thing is, come to think of it, that heat_asset_list, heat_source_list, gas_asset_list, topology should only need to recalculate the depreciation costs of the business case. Changes in the technology_matrix changes the load and the depreciation costs on the network and therefor the business case as a whole.

It would be nice if we could separate the two calculations before thinking about recalculating whole business cases just because someone removes a row in for example, the heat_source_list.

ChaelKruip commented 7 years ago

The thing is, come to think of it, that heat_asset_list, heat_source_list, gas_asset_list, topology should only need to recalculate the depreciation costs of the business case. Changes in the technology_matrix changes the load and the depreciation costs on the network and therefor the business case as a whole.

Unfortunately, it is not that easy. The energy flows can change by editing of heat_asset_list, heat_source_list, gas_asset_list and topology as well resulting in a different outcome of the market model transactions.

It would be nice if we could separate the two calculations before thinking about recalculating whole business cases just because someone removes a row in for example, the heat_source_list.

Yes. But because if is not clear how to do that I propose to trigger recalculation (in the background) with every change that is saved.

antw commented 7 years ago

Unfortunately, it is not that easy. The energy flows can change by editing of heat_asset_list, heat_source_list, gas_asset_list and topology as well resulting in a different outcome of the market model transactions.

Only the heat source list can affect energy flows within the network calculation.

ChaelKruip commented 7 years ago

Only the heat source list can affect energy flows within the network calculation.

Right! I forgot that we currently don't include the impact of constraints in the flows. Good point @antw 👍

grdw commented 7 years ago

Yes. But because if is not clear how to do that I propose to trigger recalculation (in the background) with every change that is saved.

I think this needs to be like this:

-> Make change to for example heat source list -> Check for pending business case jobs -> If pending job, cancel previous job -> Recalculate business case

Todo:

grdw commented 7 years ago

I am currently thinking about this. All updates go through a remote js request. So technically there should be a set of javascript methods which extend FinanceTable (I'd probably rename that file to BusinessCaseMatrix) and redraws the table.

Can't we recalculate the business case and redraw the matrix based on every clicked 'Save'. (Not "Save all and view LES" since you move of the Edit page when you do that)? To recalculate the business case on every change sounds a little like something that is part of #776 .

grdw commented 7 years ago

Ping @ChaelKruip and @antw

ChaelKruip commented 7 years ago

Can't we recalculate the business case and redraw the matrix based on every clicked 'Save'.

👍

antw commented 7 years ago

I don't think it needs to be recalculated after every change; only if the visitor tries to look at the matrix and the cached copy is stale.

I feel like the "Edit → Business Case" page isn't as necessary as it used to be, since the "proper" (?) business case page shows a breakdown of costs:

screen shot 2016-10-31 at 11 38 50

If a matrix is necessary, I think it should be moved to the proper business case page.

ChaelKruip commented 7 years ago

I don't think it needs to be recalculated after every change; only if the visitor tries to look at the matrix and the cached copy is stale.

Ans also, if it is used as a reference for a comparison in another LES.

I feel like the "Edit → Business Case" page isn't as necessary as it used to be

I think I agree. The only functionality that is not yet included in the current business case output page is the 'free-form/correction' row.

grdw commented 7 years ago

I think I agree. The only functionality that is not yet included in the current business case output page is the 'free-form/correction' row.

Yes. We're bit dragging of the main point of the issue here 😆. But we could make the "freeform" or "correction" as it is called on the business case page editable on the 'edit' page.

So to explain in pictures:

This would be the business case page:

screen shot 2016-10-31 at 14 57 37

This would be the edit page:

screen shot 2016-10-31 at 15 00 27

antw commented 7 years ago

Yes. We're bit dragging of the main point of the issue here 😆.

Well, what I mean is we're only discussing the need to recalculate the business case for the "matrix" page because it shows the costs for each stakeholder. If it no longer shows the matrix (and therefore no longer shows any costs except the "correction" field), then the business case does not need to be recalculated.

I don't see why the "Edit → Business Case" page needs to exist anymore. The "correction" field could be moved to the show business case page (like the "edit" screenshot above) and the "edit" page could be removed entirely.

grdw commented 7 years ago

[..] and the "edit" page could be removed entirely.

Yes, it's a bit obsolete.

ChaelKruip commented 7 years ago

Well, what I mean is we're only discussing the need to recalculate the business case for the "matrix" page because it shows the costs for each stakeholder. If it no longer shows the matrix (and therefore no longer shows any costs except the "correction" field), then the business case does not need to be recalculated.

But also, if a business case is used as a reference for a comparison in another LES.