arras-energy / gridlabd

Arras Energy simulator
https://www.arras.energy/
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

GUIDs are not subject to randomseed setting #30

Open dchassin opened 1 year ago

dchassin commented 1 year ago

Problem description

GUIDs are generated using random number generators, but they do not seed from the global random number generator state.

Steps to reproduce

  1. Create the following model in test.glm:

    print ${GUID}
  2. Run it twice:3.

shell$ gridlabd -D randomseed=1 /tmp/test.glm
/tmp/test.glm(1): f9493e71-8fa8-4f76-cab6-82e71391b5e5
shell$ gridlabd -D randomseed=1 /tmp/test.glm
/tmp/test.glm(1): d6687571-53e7-4921-20b0-162cd85e395d

Expected behavior

The result should be:

shell$ gridlabd -D randomseed=1 /tmp/test.glm
/tmp/test.glm(1): f9493e71-8fa8-4f76-cab6-82e71391b5e5
shell$ gridlabd -D randomseed=1 /tmp/test.glm
/tmp/test.glm(1): f9493e71-8fa8-4f76-cab6-82e71391b5e5