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.
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.
The main user-facing function to prepare Switch inputs is
switchwrapper.prepare.prepare_inputs
. Required inputs are:
Grid
object.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.
The main user-facing function to launch Switch is switchwrapper.call.launch_switch
.
Required inputs are:
Optional inputs are:
gurobi
.dual
.verbose
is True
.Running this function returns no output, but Switch will be launched.
For full documentation, see the function docstring.
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.
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.