assume-framework / assume

ASSUME - Agent-based Simulation for Studying and Understanding Market Evolution
https://assume.readthedocs.io
20 stars 5 forks source link

When CRM and EOM is used, the market_dispatch is not saved for every clearing #290

Closed adamsjohanna closed 5 months ago

adamsjohanna commented 5 months ago

Using the example "small_with_crm", the market dispatch is not saved in the output for those hours, when CRM and EOM both clear -> No data points in Grafarna

nick-harder commented 5 months ago

@maurerle do you have any idea where we might look for this error?

maurerle commented 5 months ago

So the problem you are describing, is that when running assume -s example_01c -c eom_and_crm --db-uri postgresql://assume:assume@localhost:5432/assume you get this visualization:

image

which has missing values for the market_dispatch for all units at every fourth hour, while the actual dispatch is written.

When looking into write_actual_dispatch, I found that the market_dispatch is often empty when it should not be. After first suspecting the aggregate_step_amount function, I found that relevant times were skipped for each product_type. This is because we did not yet calculate the last_sent_dispatch per product_type.

With this change we also see the dispatch to the CRM markets, though it seems that there is something wrong:

image

And we see that the market dispatch does not have leftouts anymore:

image