Commit 3a1511f7 authored by Winstead, Christopher's avatar Winstead, Christopher
Browse files

fixed bug in experiment setup

parent 15473fcf
{"maxZones": 72, "numZones": 146}
\ No newline at end of file
{"maxZones": 72, "numZones": 145}
\ No newline at end of file
{
"vtron_home" : "[abs path]/volttron",
"eplus_config" : "[abs path]/EnergyPlus-PBC/eplus_config/",
"eplusagenthome" : "[abs path]/EnergyPlus-PBC/agents/energyplusagent",
"eplusagenthome" : "[abs path]/PublicRepos/EnergyPlus-PBC/agents/energyplusagent",
"controlagenthome" : "[abs path]/EnergyPlus-PBC/agents/PBCagent",
"maxZones" : 72
}
......@@ -58,6 +58,7 @@ for idf, fl in enumerate(files):
size = 0
tsize = 0
totalZones = 0
for idx, l in enumerate(lines):
for z in zones:
if "Space "+z+" ZN" in l:
......@@ -90,12 +91,6 @@ for idf, fl in enumerate(files):
reppedZones = [int(i) for i in reppedZones]
numZones = max(reppedZones)+1
# Add num of zones to config
zone_cfg = json.load(open('./agents/PBCagent/PBC/zones.py','r'))
zone_cfg["numZones"] = 146
with open('./agents/PBCagent/PBC/zones.py', 'w') as outfile:
json.dump(zone_cfg, outfile)
for idx, l in enumerate(lines):
for rz in range(1, numZones+1):
......@@ -162,7 +157,6 @@ for idf, fl in enumerate(files):
+"Timestep;\n")
# ###### Create Config Files ###### #
#config = json.load(open('./energyplus'))
config = {}
config["properties"] = {
"identity" : "platform.actuator"+str(idf+1),
......@@ -226,6 +220,12 @@ for idf, fl in enumerate(files):
with open('./eplus_config/control.config','w') as outfile:
json.dump(control_config, outfile)
# Add num of zones to config
zone_cfg = json.load(open('./agents/PBCagent/PBC/zones.py','r'))
zone_cfg["numZones"] = zoneCount
with open('./agents/PBCagent/PBC/zones.py', 'w') as outfile:
json.dump(zone_cfg, outfile)
# Create Vtron agents
sp.call('./make-experiment '
+vtron_home
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment