示例#1
0
def main():
    f = open(sys.argv[1])
    luc = LUC(f.read())
    f.close()

    site = LEAMsite('http://ewg.leamgroup.com')
    base = luc.growth[0]['id']
    print luc.growth[0]['layer']
    site.getURL(luc.growth[0]['layer'], filename=base + '.layer.zip')
    site.getURL(luc.growth[0]['graph'], filename=base + '.graph')

    print "SCENARIO:", luc.scenario.keys()
    print "GROWTH[0]:", luc.growth[0].keys()
    print "GROWTH[0] GRAPH:", luc.growth[0]['graph']
    print "GROWTHMAPS: len =", len(luc.growthmap)
    print "GROWTHMAPS:", luc.growthmap[0].keys()
    print "GROWTHMAPS nogrowth:", luc.growthmap[0]['nogrowth']
    print "GROWTHMAPS: download=", luc.growthmap[0]['download']
    print "DECLINE: len=", len(luc.decline),
    print "DECLINE: len=", len(luc.declinemap),
示例#2
0
def main():
    f = open(sys.argv[1])
    luc = LUC(f.read())
    f.close()

    site = LEAMsite('http://ewg.leamgroup.com')
    base = luc.growth[0]['id']
    print luc.growth[0]['layer']
    site.getURL(luc.growth[0]['layer'], filename=base+'.layer.zip')
    site.getURL(luc.growth[0]['graph'], filename=base+'.graph')

    print "SCENARIO:", luc.scenario.keys()
    print "GROWTH[0]:", luc.growth[0].keys()
    print "GROWTH[0] GRAPH:", luc.growth[0]['graph']
    print "GROWTHMAPS: len =", len(luc.growthmap)
    print "GROWTHMAPS:", luc.growthmap[0].keys()
    print "GROWTHMAPS nogrowth:", luc.growthmap[0]['nogrowth']
    print "GROWTHMAPS: download=", luc.growthmap[0]['download']
    print "DECLINE: len=", len(luc.decline),
    print "DECLINE: len=", len(luc.declinemap),
def main():
    # Sample variable values
    # scenariotitle = 'test2_projection'
    # resultsdir = 'http://portal.leam.illinois.edu/chicago/luc/scenarios/test4_scenario'
    # demandgraphurl="http://portal.leam.illinois.edu/chicago/luc/projections/test2_projection/getGraph"

    resultsdir = sys.argv[1]
    scenariotitle = os.path.basename(resultsdir)

    global site
    global runlog
    site = LEAMsite(resultsdir, user=sys.argv[2], passwd=sys.argv[3])
    runlog = RunLog(resultsdir, site, initmsg='Scenario ' + scenariotitle)

    demandgraphurl = sys.argv[4]
    demandstr = site.getURL(demandgraphurl).getvalue()

    executeGLUCModel(demandstr, scenariotitle, runlog)
def main():
    # Sample variable values
    # scenariotitle = 'test2_projection'
    # resultsdir = 'http://portal.leam.illinois.edu/chicago/luc/scenarios/test4_scenario'
    # demandgraphurl="http://portal.leam.illinois.edu/chicago/luc/projections/test2_projection/getGraph"

    resultsdir = sys.argv[1]
    scenariotitle = os.path.basename(resultsdir)

    global site
    global runlog
    site = LEAMsite(resultsdir, user=sys.argv[2], passwd=sys.argv[3])
    runlog = RunLog(resultsdir, site, initmsg='Scenario ' + scenariotitle)

    demandgraphurl = sys.argv[4]
    demandstr = site.getURL(demandgraphurl).getvalue()

    executeGLUCModel(demandstr, scenariotitle, runlog)