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

fixed bug in experiment setup

parent 15473fcf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{"maxZones": 72, "numZones": 146}
 No newline at end of file
{"maxZones": 72, "numZones": 145}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
{
    "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
}
+7 −7
Original line number Diff line number Diff line
@@ -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
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.