Battery test case feeder population

Submodules

test_cases.battery.feeder_population.feeder_population_centralized module

test_cases.battery.feeder_population.feeder_population_collocated module

test_cases.battery.feeder_population.glm_mod_functions module

Module contains functions for modifying GridLAB-D power system simulation models

test_cases.battery.feeder_population.glm_mod_functions.load_base_glm(base_file_dir, base_glm_file)

Loads base glm file into a dictionary structure.

Parameters:
  • base_file_dir – directory where base_glm_file is

  • base_glm_file – file name for the base glm model

Returns:

dictionary of gridlabd objects from base glm model, dictionary of object types associated with glm_dict, list of globals from base model, list of include statements from base model, list of script statements

test_cases.battery.feeder_population.glm_mod_functions.replace_load_w_meter(glm_dict, match_str, rep_str, obj_type)

Replace load with meter in GLM dictionary.

Parameters:
  • glm_dict – dictionary of glm objects

  • match_str – str to replace

  • rep_str – str to replace it with

  • obj_type – dictionary of object types

Returns:

the modified dictionary of glm objects

test_cases.battery.feeder_population.glm_mod_functions.replace_load_w_meter_old(glm_dict, match_str, rep_str, obj_type)

Replace load with meter in GLM dictionary.

Parameters:
  • glm_dict – dictionary of glm objects

  • match_str – str to replace

  • rep_str – str to replace it with

  • obj_type – dictionary of object types

Returns:

the modified dictionary of glm objects

test_cases.battery.feeder_population.glm_mod_functions.write_base_glm(glm_dict, obj_type, globals_list, include_list, out_dir, file_name, sync_list)
Parameters:
  • glm_dict – dictionary of gridlabd objects

  • obj_type – dictionary of object types associated with glm_dict

  • globals_list – globals list for glm_dict model

  • include_list – list of include statements for glm file

  • out_dir – output directory for written file

  • file_name – file name of written glm file

  • sync_list – sync list to include in written glm file

Returns:

none

test_cases.battery.feeder_population.glm_mod_functions.write_class_dict(file, gld_dict, class_name)

Write dictionary corresponding to GLD class to .glm file.

Parameters:
  • file

  • gld_dict

  • class_name

Returns:

test_cases.battery.feeder_population.glm_mod_functions.write_clock_dict(file, gld_dict)

Write dictionary corresponding to GLD clock to .glm file.

Parameters:
  • file

  • gld_dict

Returns:

test_cases.battery.feeder_population.glm_mod_functions.write_filter_dict(file, gld_dict, class_name)

Write dictionary corresponding to GLD filter to .glm file.

Parameters:
  • file

  • gld_dict

  • class_name

Returns:

test_cases.battery.feeder_population.glm_mod_functions.write_mod_dict(file, gld_dict, mod_name)

Write dictionary corresponding to GLD module to .glm file’

Parameters:
  • file

  • gld_dict

  • mod_name

Returns:

test_cases.battery.feeder_population.glm_mod_functions.write_obj_dict(file, gld_dict, dict_key, obj_type)

Write dictionary corresponding to GLD objects to .glm file

Parameters:
  • file

  • gld_dict

  • dict_key

  • obj_type

Returns:

Module contents

Introduction

This is the feeder population module within the battery test case. This file performs the pre-simulation step for running EV-Ecosim.

It takes in a base Gridlab-D Model (GLM) file (for example, IEEE123.glm), and modifies that file by including secondary distribution, home loads, and EV Charging station and transformers.

Once this script is done running, it reads and writes new GLM as <initial_glm_name>_populated.glm and <initial_glm_name>_secondary.glm, and saves them within the test case folder. These saved files are used to run the simulation. These files are saved in the ‘test_case_dir’ field specified in config.txt.

Input file description

Config config.txt: configuration file describing the pre-simulation parameters. This can be modified directly or with the help of our Graphic User Interface (GUI). The return outputs of this module are files that are read in to run the EV-Ecosim environment.

Output file description

real_power.csv - Real power; this is residential real load timeseries file per node_name/bus reactive_power.csv - Reactive power; this is residential reactive load timeseries file per node_name/bus dcfc_bus.txt - DC fast charging bus locations; this is used in co-simulation L2charging_bus.txt - L2 charging bus locations; this is used in co-simulation.