Breakthrough-Energy / SwitchWrapper

Wrapper for Switch
MIT License
1 stars 2 forks source link

SwitchWrapper

Purpose

SwitchWrapper is a tool to interface between the Switch capacity expansion model and the PowerSimData data management tool. It can use PowerSimData data structures to create inputs for running Switch, and it can interpret the decisions made by Switch back to PowerSimData data structures.

Installation

SwitchWrapper can be installed like any other python package. The most universal way is to run pip install . from the command line at the root of the SwitchWrapper repository. The default behavior of other package management tools (pipenv, conda, poetry) should work as well.

Usage

Preparing inputs to Switch

The main user-facing function to prepare Switch inputs is switchwrapper.prepare.prepare_inputs. Required inputs are:

Optional inputs are:

Running this function returns no output, but all required files to launch switch will be created.

For full documentation, see the function docstring.

Launching Switch

The main user-facing function to launch Switch is switchwrapper.call.launch_switch. Required inputs are:

Optional inputs are:

Running this function returns no output, but Switch will be launched.

For full documentation, see the function docstring.

Interpreting Switch Results

The main user-facing function to interpret Switch results is switchwrapper.switch_extract.get_output_scenarios. Required inputs are:

Running this function returns a dictionary, where each key is an investment year specified via the inputs and each value is a PowerSimData Scenario object representing the Grid of that year and the input/output time-series for that year as interpreted by the temporal reduction specified via the inputs.

For full documentation, see the function docstring.

Contributing

If something is not working as expected, please fill out a bug report.

If the package does not have a feature that you think it should, please fill out a feature request.