assume-framework / assume

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

Contraintuitive index handling of simulation time #498

Open kim-mskw opened 2 days ago

kim-mskw commented 2 days ago

Currently, the end of the simulation is translated confusingly to the index, which used to test the correct length of the data frame.

At the end of the simulation, 00:00 seems to belong to the next day, while at the start, it belongs to the former. The end is 03.08 00:00, which lets the simulation run till 03.09 00:00 to compare the index. image

image

Sometimes, in the examples, we artificially extend the index by 24 hours. Compare tutorial 03 in the handling of the electrolyzer. I guess this is because we want to fit the weird translation of the end of the simulation, but for beginners, it seems simply confusing.

kim-mskw commented 2 days ago

Is there any reason behind that?

nick-harder commented 2 days ago

@kim-mskw I believe we simply add extra 24 hours to the index so the forecasting things and market clearings work properly. But I also don't like this solution and we should remove this confusing thing

nick-harder commented 1 day ago

@maurerle when looking into the code and removing the extra one day we had, I don't see any issues with the code. The history says you added that one extra day. Do you remember why exactly?

index = pd.date_range( start=start, end=end + timedelta(days=1), freq=config["time_step"], )

maurerle commented 1 day ago

This is correct:

I believe we simply add extra 24 hours to the index so the forecasting things and market clearings work properly

I think if you always bid for the next 24 hours at once, we had an issue that the forecast was accessing values after the end of the simulation. I am not 100% sure if this is still needed, as we improved ending the simulation at some place. Though I thought it was not needed anymore last time and was proofed wrong :laughing: