Closed marota closed 4 years ago
@mjothy @NMegel
In Grid2op API, we could only find
env.setid(id = chronicnumber) env.reset()
to move from one chronic scenario to another. Is there a way to identify chronic folders with names?
import grid2op
import os
env = grid2op.make("l2rpn_neurips_2020_track1_small")
for id, sp in enumerate(env.chronics_handler.real_data.subpaths):
env.set_id(id)
env.reset()
current_name = os.path.basename(env.chronics_handler.get_id())
assert current_name == os.path.basename(sp)
this is enough to find the name, no need to set_id and reset environment
scenarios={}
for id, sp in enumerate(env.chronics_handler.real_data.subpaths):
scenarios[os.path.basename(sp)] = id
@mjothy @NMegel a revoir
Done in commit 64b46604f2de7f260ca74f7fb42c7b5efc4ca61a
Tested ok, Closing
Chronic names are not necessarily integers, but rather strings. It should be possible to refer to a chronic with a name when launching alphadeesp