-
Notifications
You must be signed in to change notification settings - Fork 122
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
Time alignment inconsistencies when chaining simulations #651
Comments
Hello, This is not a problem of the "simulate" nor the "chain of simulate" . For example: import grid2op
env=grid2op.make("l2rpn_idf_2023")
obs=env.reset()
do_nothing_act=env.action_space({})
print(f"real obs timestamp {obs.get_time_stamp()}")
#chained simulation on timestep 0
obs_simu_1,*_=obs.simulate(do_nothing_act,time_step=1)
print(f"obs_simu_1 (simulate with time_step=1) timestamp {obs_simu_1.get_time_stamp()}")
obs_simu_1_simu,*_=obs_simu_1.simulate(do_nothing_act,time_step=1)
print(f"obs_simu_1_simu (chain 2 simulates with time_step=1) {obs_simu_1_simu.get_time_stamp()}") gives the correct expected output:
This is rather a problem with "time_step=0" which has already been posted in issue #598 for which still no clear and consistent model has been proposed (see #598 (comment)) I'm closing this one and will write something there to keep track of this other issue with "simulate for time_step=0" |
Outputs: The second case is still an issue for time_step!=0 (here time_step=1 and you can try others). We "return" to the past. The problem might be related to the "current_step" variable |
Environment
1.10.4
Bug description
When chaining simulations, that is reapplying simulate on a simulated observation, time alignment look inconsistent, which results in simulations on other timesteps.
We assume in obs.simulate(act,timestep) that timestep is the number of timestep ahead from the timestamp of the observation we are simulating on.
When doing a second chained simulate on the current grid state (timestep=0), the simulation is actually done on timestep=1
When doing a second chained simulation on the currently simulated grid state, the simulation is actually done on timestep=1 (=in the past)
Chaining simulations is of interest for instance for exploring the combination of several actions through simulation
How to reproduce
Command line
# command line used if any
Code snippet
Current output
Expected output
The text was updated successfully, but these errors were encountered: