示例#1
0
def main():
    # Based on the structure in the dataset3 repo: https://github.com/Smart-DS/dataset3
    #create_rnm_to_cyme_stack(os.path.join('..','..','dataset3', 'MixedHumid'), 'industrial')
    region = sys.argv[1]
    dataset = sys.argv[2]
    solar = sys.argv[3]
    batteries = sys.argv[4]
    #dataset_map = {'dataset_4':'20180727','dataset_3':'20180910','dataset_2':'20180716'}
    dataset_map = {
        'dataset_4': '20181120',
        'dataset_3': '20181130',
        'dataset_2': '20181130'
    }
    solar_options = ['none', 'low', 'medium', 'high']
    battery_options = ['none', 'low', 'high']
    if batteries not in battery_options or solar not in solar_options:
        raise ("Invalid arguments " + solar + " " + batteries)
    create_rnm_to_cyme_stack_scenarios(
        os.path.join(
            '..', '..', '{dset}_{date}'.format(dset=dataset,
                                               date=dataset_map[dataset])),
        region, solar, batteries)
    from layerstack.stack import Stack
    s = Stack.load('../stack_library/rnm_to_cyme_stack_timeseries_' + region +
                   'solar_' + solar + '_batteries_' + batteries + '.json')
    if not os.path.isdir(
            os.path.join('.', 'results_v2', region, 'timeseries_solar_' +
                         solar + '_battery_' + batteries, 'cyme')):
        os.makedirs(
            os.path.join('.', 'results_v2', region,
                         'timeseries_solar_' + solar + '_battery_' + batteries,
                         'cyme'))
    s.run_dir = 'run_dir'
    s.run()
def main():
    # Based on the structure in the dataset3 repo: https://github.com/Smart-DS/dataset3
    #create_rnm_to_cyme_stack(os.path.join('..','..','dataset3', 'MixedHumid'), 'industrial')
    region = sys.argv[1]
    dataset = sys.argv[2]
    percent = float(sys.argv[3])
    dataset_map = {
        'dataset_4': '20180920',
        'dataset_3': '20181010',
        'dataset_2': '20180716'
    }
    if not os.path.isdir(
            os.path.join('.', 'results', region,
                         'timeseries_{pct}_pv'.format(pct=percent), 'cyme')):
        os.makedirs(
            os.path.join('.', 'results', region,
                         'timeseries_{pct}_pv'.format(pct=percent), 'cyme'))
    create_rnm_to_cyme_stack_pv(
        os.path.join(
            '..', '..', '{dset}_{date}'.format(dset=dataset,
                                               date=dataset_map[dataset])),
        region, percent)
    from layerstack.stack import Stack
    s = Stack.load('../stack_library/rnm_to_cyme_stack_timeseries_pv_' +
                   region + '_' + str(percent) + '_pct.json')
    s.run_dir = 'run_dir'
    s.run()
示例#3
0
def main():
    dataset3_snapshot(os.path.join('..', '..', 'dataset3'))
    from layerstack.stack import Stack
    s = Stack.load(
        '../stack_library/ds3_post_snap_MixedHumid_industrial_10pct_customers.json'
    )
    s.run_dir = '.'
    s.run()
示例#4
0
def main():
    create_test_stack_DERs('/home/telgindy/Ditto/DiTTo/data/dataset3')
    update_stack_base_dir(
        '../stack_library/ditto_test_stack_ders_dataset3.json',
        '../../dataset3')
    from layerstack.stack import Stack
    s = Stack.load('../stack_library/ditto_test_stack_ders_dataset3.json')
    s.run_dir = 'run_dir'
    s.run()
示例#5
0
def main():
    # Based on the structure in the dataset3 repo: https://github.com/Smart-DS/dataset3
#create_rnm_to_opendss_stack(os.path.join('..','..','dataset3', 'MixedHumid'), 'industrial')
    region= sys.argv[1]
    dataset = sys.argv[2]
    #dataset_map = {'dataset_4':'20180727','dataset_3':'20180910','dataset_2':'20180716'}
    dataset_map = {'dataset_4':'20181120','dataset_3':'20181130','dataset_2':'20181130'}
    create_rnm_to_opendss_stack(os.path.join('..','..','{dset}_{date}'.format(dset=dataset,date = dataset_map[dataset])), region, dataset)
    from layerstack.stack import Stack
    s = Stack.load('../stack_library/rnm_to_opendss_stack_'+region+'.json')
    if not os.path.isdir(os.path.join('.','results',region,'timeseries','opendss')):
        os.makedirs(os.path.join('.','results',region,'timeseries','opendss'))
    s.run_dir = 'run_dir'
    s.run()
示例#6
0
def main():
    #Set the path to the folder which contains the SCE feeders.
    #This folder is assumed to have one subfolder per sce feeder.
    path = '/Users/ngensoll/all_sce/'  #CHANGE THAT....

    #Get the list of folders holding the sce feeders.
    #Each folder is a number and contains one feeder in CYME format (so, three files...)
    folder_list = [d for d in os.listdir(path) if '.' not in d]

    from layerstack.stack import Stack
    #Loop over the feeders
    for folder in folder_list:
        create_compute_metrics_sce(path, folder)
        s = Stack.load('../stack_library/compute_metrics_sce.json')
        s.run_dir = 'run_dir'
        s.run()