Example #1
0
        slack.chat.post_message(
            '#sim_updates',
            'DANG!  Simulation failed for %d on host %s'
            % (run_num, host), as_user=True)
    else:
        raise e
    sys.exit(0)

print "Finished", time.ctime()

if MAPS:

    from urbansim_explorer import sim_explorer as se
    se.start(
        'runs/run%d_simulation_output.json' % run_num,
        'runs/run%d_parcel_output.csv' % run_num,
        write_static_file='/var/www/html/sim_explorer%d.html' % run_num
    )

if SLACK:
    slack.chat.post_message(
        '#sim_updates',
        'Completed simulation %d on host %s' % (run_num, host), as_user=True)

    slack.chat.post_message(
        '#sim_updates',
        'UrbanSim explorer is available at ' +
        'http://urbanforecast.com/sim_explorer%d.html' % run_num, as_user=True)

    slack.chat.post_message(
        '#sim_updates',
Example #2
0
from urbansim_explorer import sim_explorer as se
import sys

runnum = int(sys.argv[1])

parcel_output = 'runs/run%d_parcel_output.csv' % runnum
zone_output = 'runs/run%d_simulation_output.json' % runnum
outfile = '/var/www/html/sim_explorer%d.html' % runnum

se.start(
	zone_output,
	parcel_output,
	port=8080,
	host='0.0.0.0', 
	write_static_file=outfile
)
Example #3
0
    if SLACK:
        slack.chat.post_message('#sim_updates',
                                'DANG!  Simulation failed for %d on host %s' %
                                (run_num, host),
                                as_user=True)
    else:
        raise e
    sys.exit(0)

print("Finished", time.ctime())

if MAPS:

    from urbansim_explorer import sim_explorer as se
    se.start('runs/run%d_simulation_output.json' % run_num,
             'runs/run%d_parcel_output.csv' % run_num,
             write_static_file='/var/www/html/sim_explorer%d.html' % run_num)

if SLACK:
    slack.chat.post_message('#sim_updates',
                            'Completed simulation %d on host %s' %
                            (run_num, host),
                            as_user=True)

    slack.chat.post_message(
        '#sim_updates',
        'UrbanSim explorer is available at ' +
        'http://urbanforecast.com/sim_explorer%d.html' % run_num,
        as_user=True)

    slack.chat.post_message(
Example #4
0
from urbansim_explorer import sim_explorer as se
import sys

runnum = int(sys.argv[1])

parcel_output = 'runs/run%d_parcel_output.csv' % runnum
zone_output = 'runs/run%d_simulation_output.json' % runnum
outfile = '/var/www/html/sim_explorer%d.html' % runnum

se.start(
    zone_output,
    parcel_output,
    port=8080,
    host='0.0.0.0',
    write_static_file=outfile
)