Skip to content

Command line options

stefansc1 edited this page Aug 20, 2021 · 3 revisions

You can set parameters through the command line or from a configuration file. If unsure, you can type python <script.py> --help to get detailed information. Where the default is an Array ([]), the option can be set multiple times.

simulate.py

Simulate different charging strategies for a given scenario.

command line options short form configuration file description default example
(positional) input scenario json file (must be set) ./simulate.py example.json
--strategy -s strategy charging strategy greedy --strategy balanced
--visual -v visual Show plots of the results. None ./simulate.py example.json -v
--eta eta Show estimated remaining time instead of progress bar. Not recommended for fast computations. False ./simulate.py example.json --eta
--margin -m margin Add margin for desired SOC [0.0 - 1.0]. margin=0.05 means the simulation will not abort if vehicles reach at least 95%% of the desired SOC before leaving. margin=1 -> the simulation continues with every positive SOC value. 0.05 --margin 1
--strategy-option -so strategy_option set charging strategy options. For configuration file, see simulate.cfg in examples directory. For supported options, refer to the strategy page. [] -so CONCURRENCY 0.5
--output -o output Generate output file. None --output output.csv
--config (no effect) Use configuration file to set arguments. Overrides command line arguments. None --config examples/simulate.cfg

generate.py

Generate scenarios as JSON files for vehicle charging modelling.

command line options short form configuration file description default example
(positional) output output file name (must be set) ./generate.py scenario.json
--cars cars Set number of cars for a vehicle type. ([], continues with 2 golf and 3 sprinter) --cars 100 sprinter
--v2g v2g Are vehicles capable of vehicle-to-grid? False --v2g, v2g = true
--days days Set duration of scenario as number of days. 30 --days 7
--interval interval Set number of minutes for each timestep (Δt). 15 --interval 60
--min-soc min_soc Set minimum desired SoC (0%-100%) for each charging process. 80 --min-soc 50
--battery -b battery Add battery with specified capacity in kWh and C-rate (-1 for variable capacity, second argument is fixed power)). [] Fixed capacity of 1kW and C-rate of 2: -b 1000 2
Variable capacity with maximum power of 50 kWh: -b -1 50
--include-ext-load-csv include_ext_load_csv Include CSV for external load. Path is relative to output file. None --include-ext-load-csv load.csv
--include-ext-csv-option -eo include_ext_csv_option Set additional arguments to external load. See below. [] -eo column energy
--include-feed-in-csv include_feed_in_csv Include CSV for energy feed-in, e.g., local PV. Path is relative to output file. None --include-feed-in-csv feed_in.csv
--include-feed-in-csv-option -fo include_feed-in_csv_option Set additional arguments to feed-in load. See below. [] -fo step_duration 900
--include-price-csv include_price_csv Include CSV for energy price. Path is relative to output file. None --include-price-csv price.csv
--include-price-csv-option -po include_price_csv_option Set additional arguments to price signals. See below. [] -po column price
--config (no effect) Use configuration file to set arguments. Overrides command line arguments. None --config examples/generate.cfg

generate_from_simbev.py

Generate scenarios as JSON files for vehicle charging modelling from vehicle timeseries (e.g., SimBEV output).

command line options short form configuration file description default example
(positional) output output file name (must be set) ./generate_from_simbev.py scenario.json
--simbev simbev Set directory with SimBEV files. (must be set) --simbev examples/simbev/
--interval interval Set number of minutes for each timestep (Δt). 15 --interval 60
--price-seed price_seed Set seed when generating random market prices. Negative values for fixed price in cents/kWh. (don't set if you want different prices each time) Fixed at 10ct/kWh: --price-seed -10
--min-soc min_soc Set minimum desired SoC (0-1) for each charging process. 0.5 --min-soc 0.1
--min-soc-threshold min_soc_threshold SoC below this threshold trigger a warning. 0.05 --min-soc-threshold 0
--include-ext-load-csv include_ext_load_csv Include CSV for external load. Path is relative to output file. None --include-ext-load-csv load.csv
--include-ext-csv-option -eo include_ext_csv_option Set additional arguments to external load. See below. [] -eo column energy
--include-feed-in-csv include_feed_in_csv Include CSV for energy feed-in, e.g., local PV. Path is relative to output file. None --include-feed-in-csv feed_in.csv
--include-feed-in-csv-option -fo include_feed-in_csv_option Set additional arguments to feed-in load. See below. [] -fo step_duration 900
--include-price-csv include_price_csv Include CSV for energy price. Path is relative to output file. None --include-price-csv price.csv
--include-price-csv-option -po include_price_csv_option Set additional arguments to price signals. See below. [] -po column price
--config (no effect) Use configuration file to set arguments. Overrides command line arguments. None --config examples/generate.cfg

generate_energy_price.py

Generate energy price as CSV. These files can be included when generating scenario JSON files.

command line options short form configuration file description default example
(positional) output output file name (must be set) ./generate_energy_price.py price.csv
--start start First start time in isoformat. 2021-01-04T00:00:00+01:00 --start "2021-01-01T00:00:00+01:00"
--interval interval Set number of hours for each timestep (Δt). 1 --interval 6
--n-intervals -n n_intervals Number of timesteps. 168 --n-intervals 744
--price-seed price_seed Random seed for energy market prices. (don't set if you want different prices each time) --price-seed 0
min_avg_price Only from config: set minimum average daily price 2.7
max_avg_price Only from config: set maximum average daily price 4.9
std_avg_price Only from config: set standard deviation around average price 1.5
--config (no effect) Use configuration file to set arguments. Overrides command line arguments. None --config examples/generate.cfg

generate_schedule.py

Compute flexibility and schedule for a given scenario. Automatically includes schedule in scenario file.

command line options short form configuration file description default example
(positional) scenario Scenario JSON file name (must be set) ./generate_schedule.py example.json
--input input Timeseries with power and curtailment. Columns: abregelung, brutto (timestamp ignored) (must be set) input = nsm.csv
--output output Resulting schedule file name. <scenario>_schedule.csv output = schedule.csv
--max-load-range max_load_range Fraction below maximum load where charging is prohibited. 0.1 --max-load-range 0
--visual -v visual Plot flexibility and schedule. False visual = true
--config (no effect) Use configuration file to set arguments. Overrides command line arguments. None --config examples/generate.cfg

CSV file options

key description example value
start_time Timestamp of first entry in isoformat. (Should be the same as your scenario. When in doubt, don't touch it)
step_duration_s Interval between rows in seconds. 3600
grid_connector_id ID of grid connector. GC1
column Column name with values of interest. energy