Seed by microseconds. Determinisme checked.

This commit is contained in:
Leonardo Bautista-Gomez 2023-03-14 11:25:17 +01:00
parent 377072ef79
commit 45bdcc3308
1 changed files with 4 additions and 5 deletions

View File

@ -27,17 +27,16 @@ def study():
simCnt = 0
now = datetime.now()
if config.deterministic:
random.seed("DASsimulator")
else:
random.seed(str(now).split(".")[1])
execID = now.strftime("%Y-%m-%d_%H-%M-%S_")+str(random.randint(100,999))
sim.logger.info("Starting simulations:", extra=sim.format)
start = time.time()
for shape in config.nextShape():
if config.deterministic:
random.seed("DASsimulator")
else:
random.seed(random.randint(0, 100))
sim.resetShape(shape)
sim.initValidators()