least-cost-xmission

Least Cost Xmission Command Line Interface

least-cost-xmission [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

-n, --name <name>

Job name.

Default:

'LeastCostXmission'

-v, --verbose

Flag to turn on debug logging. Default is not verbose.

from-config

Run Least Cost Xmission from a config.

least-cost-xmission from-config [OPTIONS]

Options

-c, --config <config>

Required Filepath to Least Cost Xmission config json file.

-v, --verbose

Flag to turn on debug logging. Default is not verbose.

local

Run Least Cost Xmission on local hardware

least-cost-xmission local [OPTIONS]

Options

-cost, --cost_fpath <cost_fpath>

Required Path to h5 file with cost rasters and other required layers

-feats, --features_fpath <features_fpath>

Required Path to GeoPackage with transmission features

-regs, --regions_fpath <regions_fpath>

Path to reinforcement regions GeoPackage. If not None, Least Cost Xmission is run with reinforcement path costs. Features must be substations only, and the substation file must contain a region_identifier_column column that matches the region_identifier_column ID in this file for the reinforcement region containing that substation.

-rid, --region_identifier_column <region_identifier_column>

Name of column in reinforcement regions GeoPackagecontaining a unique identifier for each region.

-cap, --capacity_class <capacity_class>

Required Capacity class of transmission features to connect supply curve points to

-res, --resolution <resolution>

SC point resolution

Default:

128

-xcfg, --xmission_config <xmission_config>

Path to Xmission config .json

-mll, --min_line_length <min_line_length>

Minimum Tie-line length.

Default:

0

-gids, --sc_point_gids <sc_point_gids>

List of sc_point_gids to connect to. If running from_config, this can also be a path to a CSV file with a ‘sc_point_gid’ column containing the GID’s to run. Note the missing ‘s’ in the column name - this makes it seamless to run on a supply curve output from reV

-nn, --nn_sinks <nn_sinks>

Number of nearest neighbor sinks to use for clipping radius calculation. This is overridden by –radius

Default:

2

-buffer, --clipping_buffer <clipping_buffer>

Buffer to expand clipping radius by

Default:

1.05

-tbln, --tb_layer_name <tb_layer_name>

Name of transmission barrier layer in cost_fpath file. This layer defines the multipliers applied to the cost layer to determine LCP routing (but does not actually affect output costs

Default:

'transmission_barrier'

-bmult, --barrier_mult <barrier_mult>

Tranmission barrier multiplier, used when computing the least cost tie-line path

Default:

100

-irln, --iso_regions_layer_name <iso_regions_layer_name>

Name of ISO regions layer in cost_fpath file. The layer maps pixels to ISO region ID’s (1, 2, 3, 4, etc.) .

Default:

'ISO_regions'

-mw, --max_workers <max_workers>

Number of workers to use for processing, if 1 run in serial, if None use all available cores

-o, --out_dir <out_dir>

Directory to save least cost xmission values to.

Default:

'./out'

-log, --log_dir <log_dir>

Directory to dump log files.

-v, --verbose

Flag to turn on debug logging. Default is not verbose.

--save_paths

Save least cost paths and data to GeoPackage.

-rad, --radius <radius>

Radius to clip costs raster to in pixels This overrides –nn_sinks if set.

-mpd, --mp_delay <mp_delay>

Delay in seconds between starting multi-process workers. Useful for reducing memory spike at working startup.

Default:

3.0

-er, --expand_radius

Flag to expand radius until at least one transmission feature is included for connection. Has no effect if radius input is None.

--simplify-geo <simplify_geo>

Simplify path geometries by a value before writing to GeoPackage.

-cl, --cost-layers <cost_layers>

Required Layer in H5 to add to total cost raster used for routing. Multiple layers may be specified. Layer name may have curly brackets ({}), which will be filled in based on the capacity class input (e.g. “tie_line_costs_{}MW”)

-licl, --li-cost-layers <li_cost_layers>

Length-invariant cost layer in H5 to add to total cost raster used for routing. These costs do not scale with distance traversed acroiss the cell. Multiple layers may be specified.

-trl, --tracked_layers <tracked_layers>

Dictionary mapping layer names to strings, where the strings are numpy methods that should be applied to the layer along the LCP.

-lmk, --length_mult_kind <length_mult_kind>

Type of length multiplier calcualtion. “step” computes length multipliers using a step function, while “linear” computes the length multiplier using a linear interpolation between 0 amd 10 mile spur-line lengths.

Default:

'linear'

-cs, --cell_size <cell_size>

Side length of a single cell in meters. Cells are assumed to be square. Default is

Default:

90

merge-output

Merge output GeoPackage/CSV files and optionally convert to GeoJSON

least-cost-xmission merge-output [OPTIONS] [FILES]...

Options

-s, --split-to-geojson

After merging GeoPackages, split into GeoJSON by POI name.

--suppress-combined-file

Don’t create combined layer.

-of, --out-file <out_file>

Name for output GeoPackage/CSV file.

-d, --drop <drop>

Transmission feature category types to drop from results. Options: TransLine, LoadCen, PCALoadCen, Substation

-od, --out-dir <out_dir>

Output directory for output files.

Default:

'./out'

--simplify-geo <simplify_geo>

Simplify path geometries by a value before exporting.

-ssid, --ss_id_col <ss_id_col>

Name of column used to unqiuely identify substations. Used for reinforcement calcaultions only.

Arguments

FILES

Optional argument(s)

merge-reinforcement-costs

Merge reinforcement costs into transmission costs.

least-cost-xmission merge-reinforcement-costs [OPTIONS]

Options

-f, --cost_fpath <cost_fpath>

Required Path to GeoPackage/CSV file with calculated transmission costs. This file must have a ‘trans_gid’ column that will be used to merge in the reinforcement costs.

-r, --reinforcement_cost_fpath <reinforcement_cost_fpath>

Required Path to GeoPackage/CSV file with calculated reinforcement costs. This file must have a ‘gid’ column that will be used to merge in the reinforcement costs.

-mc, --merge_column <merge_column>

Name of column in cost_fpath and reinforcement_cost_fpath files to merge on.

-of, --out_file <out_file>

Name for output GeoPackage/CSV file.

valid-config-keys

Echo the valid Least Cost Xmission config keys

least-cost-xmission valid-config-keys [OPTIONS]