arras-energy / gridlabd

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

Unable to use macros within python environment #20

Closed aivanova5 closed 1 year ago

aivanova5 commented 1 year ago

Problem description

When using the format

main.py :

import gridlabd
gridlabd.command("test.glm")
gridlabd.start("wait")

and test.glm contains a macro such as #weather get

this error occurs:

aivanovalocal@PC99458 sce_poles % gridlabd main_cardinal_network.py
/bin/bash: gridlabd/gridlabd-weather: No such file or directory
ERROR    [INIT] : GldMain::subcommand(format='%s/gridlabd-%s',...): command 'gridlabd/gridlabd-weather get CA-Chino_Airport.tmy3
' returns code 127
main_cardinal_poles.glm(16): #weather macro is not recognized
FATAL    [INIT] : shutdown after command line rejected
dchassin commented 1 year ago

Does it work if you use the full command macro, e.g., #gridlabd weather get...?

dchassin commented 1 year ago

Problem 1: the macro expansion of #weather is not doing anything, while #gridlabd weather works ok.

Problem 2: the command line syntax gridlabd file.py does not do anything, while gridlabd python file.py works ok.