switch-model


Nameswitch-model JSON
Version 2.0.8 PyPI version JSON
download
home_pagehttp://switch-model.org
SummarySwitch Power System Planning Model
upload_time2024-04-25 22:24:28
maintainerSwitch Authors
docs_urlNone
authorNone
requires_python<3.13.0a0,>=3.7.2
licenseApache License 2.0
keywords renewable power energy electricity production cost capacity expansion planning optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This contains version 2 of the Switch electricity planning model.
This optimization model is modular and can be used with varying levels
of complexity. Look in the examples directory for demonstrations of
using Switch for investment planning or production cost simulation. The
examples enable varying levels of model complexity by choosing which
modules to include.

See INSTALL for installation instructions.

To generate documentation, go to the doc folder and run ./make_doc.sh.
This will build html documentation files from python doc strings which
will include descriptions of each module, their intentions, model
components they define, and what input files they expect.

TESTING
To test the entire codebase, run this command from the root directory:
	python run_tests.py

EXAMPLES
To run an example, navigate to an example directory and run the command:
	switch solve --verbose --log-run

CONFIGURING YOUR OWN MODELS

At a minimum, each model requires a list of SWITCH modules to define the model
and a set of input files to provide the data. The SWITCH framework and
individual modules also accept command-line arguments to change their behavior.

Each SWITCH model or collection of models is defined in a specific directory
(e.g., examples/3zone_toy). This directory contains one or more subdirectories
that hold input data and results (e.g., "inputs" and "outputs"). The models in
the examples directory show the type of text files used to provide inputs for a
model. You can change any of the model's input data by editing the *.csv files
in the input directory.

SWITCH contains a number of different modules, which can be selected and
combined to create models with different capabilities and amounts of detail.
You can look through the *.py files within switch_mod and its subdirectories to
see the standard modules that are available and the columns that each one will
read from the input files. You can also add modules of your own by creating
Python files in the main model directory and adding their name (without the
".py") to the module list, discussed below. These should define the same
functions as the standard modules (e.g., define_components()).

Each model has a text file which lists the modules that will be used for that
model. Normally this file is called "modules.txt" and is stored in the main
model directory or in an inputs subdirectory. SWITCH will automatically look in
those locations for this list; alternatively, you can specify a different file
with the "--module-list" argument.

Use "switch --help", "switch solve --help" or "switch solve-scenarios --help"
to see a list of command-line arguments that are available.

You can specify these arguments on the command line when you solve the model
(e.g., "switch solve --solver cplex"). You can also place frequently used
arguments in a file called "options.txt" in the main model directory. These can
all be on one line, or they can be placed on multiple lines for easier
readability (be sure to include the "--" part in all the argument names in
options.txt). The "switch solve" command first reads all the arguments from
options.txt, and then applies any arguments you specified on the command line.
If the same argument is specified multiple times, the last one takes priority.

You can also define scenarios, which are sets of command-line arguments to
define different models. These additional arguments can be placed in a scenario
list file, usually called "scenarios.txt" in the main model directory (or you
can use a different file specified by "--scenario-list"). Each scenario should
be defined on a single line, which includes a "--scenario-name" argument and
any other arguments needed to define the scenario. "switch solve-scenarios"
will solve all the scenarios listed in this file. For each scenario, it will
first apply all arguments from options.txt, then arguments from the relevant
line of scenarios.txt, then any arguments specified on the command line.

After the model runs, results will be written in tab-separated text files (with
extension .tsv or .tab) in the "outputs" directory (or some other directory
specified via the "--outputs-dir" argument).

            

Raw data

            {
    "_id": null,
    "home_page": "http://switch-model.org",
    "name": "switch-model",
    "maintainer": "Switch Authors",
    "docs_url": null,
    "requires_python": "<3.13.0a0,>=3.7.2",
    "maintainer_email": "authors@switch-model.org",
    "keywords": "renewable, power, energy, electricity, production cost, capacity expansion, planning, optimization",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/90/10/4fede5471c82e445361b188b30227c795393c3e79953ab48e748b084ea7a/switch_model-2.0.8.tar.gz",
    "platform": "any",
    "description": "This contains version 2 of the Switch electricity planning model.\nThis optimization model is modular and can be used with varying levels\nof complexity. Look in the examples directory for demonstrations of\nusing Switch for investment planning or production cost simulation. The\nexamples enable varying levels of model complexity by choosing which\nmodules to include.\n\nSee INSTALL for installation instructions.\n\nTo generate documentation, go to the doc folder and run ./make_doc.sh.\nThis will build html documentation files from python doc strings which\nwill include descriptions of each module, their intentions, model\ncomponents they define, and what input files they expect.\n\nTESTING\nTo test the entire codebase, run this command from the root directory:\n\tpython run_tests.py\n\nEXAMPLES\nTo run an example, navigate to an example directory and run the command:\n\tswitch solve --verbose --log-run\n\nCONFIGURING YOUR OWN MODELS\n\nAt a minimum, each model requires a list of SWITCH modules to define the model\nand a set of input files to provide the data. The SWITCH framework and\nindividual modules also accept command-line arguments to change their behavior.\n\nEach SWITCH model or collection of models is defined in a specific directory\n(e.g., examples/3zone_toy). This directory contains one or more subdirectories\nthat hold input data and results (e.g., \"inputs\" and \"outputs\"). The models in\nthe examples directory show the type of text files used to provide inputs for a\nmodel. You can change any of the model's input data by editing the *.csv files\nin the input directory.\n\nSWITCH contains a number of different modules, which can be selected and\ncombined to create models with different capabilities and amounts of detail.\nYou can look through the *.py files within switch_mod and its subdirectories to\nsee the standard modules that are available and the columns that each one will\nread from the input files. You can also add modules of your own by creating\nPython files in the main model directory and adding their name (without the\n\".py\") to the module list, discussed below. These should define the same\nfunctions as the standard modules (e.g., define_components()).\n\nEach model has a text file which lists the modules that will be used for that\nmodel. Normally this file is called \"modules.txt\" and is stored in the main\nmodel directory or in an inputs subdirectory. SWITCH will automatically look in\nthose locations for this list; alternatively, you can specify a different file\nwith the \"--module-list\" argument.\n\nUse \"switch --help\", \"switch solve --help\" or \"switch solve-scenarios --help\"\nto see a list of command-line arguments that are available.\n\nYou can specify these arguments on the command line when you solve the model\n(e.g., \"switch solve --solver cplex\"). You can also place frequently used\narguments in a file called \"options.txt\" in the main model directory. These can\nall be on one line, or they can be placed on multiple lines for easier\nreadability (be sure to include the \"--\" part in all the argument names in\noptions.txt). The \"switch solve\" command first reads all the arguments from\noptions.txt, and then applies any arguments you specified on the command line.\nIf the same argument is specified multiple times, the last one takes priority.\n\nYou can also define scenarios, which are sets of command-line arguments to\ndefine different models. These additional arguments can be placed in a scenario\nlist file, usually called \"scenarios.txt\" in the main model directory (or you\ncan use a different file specified by \"--scenario-list\"). Each scenario should\nbe defined on a single line, which includes a \"--scenario-name\" argument and\nany other arguments needed to define the scenario. \"switch solve-scenarios\"\nwill solve all the scenarios listed in this file. For each scenario, it will\nfirst apply all arguments from options.txt, then arguments from the relevant\nline of scenarios.txt, then any arguments specified on the command line.\n\nAfter the model runs, results will be written in tab-separated text files (with\nextension .tsv or .tab) in the \"outputs\" directory (or some other directory\nspecified via the \"--outputs-dir\" argument).\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Switch Power System Planning Model",
    "version": "2.0.8",
    "project_urls": {
        "Homepage": "http://switch-model.org"
    },
    "split_keywords": [
        "renewable",
        " power",
        " energy",
        " electricity",
        " production cost",
        " capacity expansion",
        " planning",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c0d72376b93af11ad47f2fca55fa792a618cc0362a76db5ab40f797bd5668c2",
                "md5": "fa8215e05062fd512477bd54ca421569",
                "sha256": "f7a86b196fbca6f8273632e6a2b12c4782afecdd1346a95b41c51c5217809d23"
            },
            "downloads": -1,
            "filename": "switch_model-2.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa8215e05062fd512477bd54ca421569",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13.0a0,>=3.7.2",
            "size": 420242,
            "upload_time": "2024-04-25T22:24:26",
            "upload_time_iso_8601": "2024-04-25T22:24:26.623667Z",
            "url": "https://files.pythonhosted.org/packages/9c/0d/72376b93af11ad47f2fca55fa792a618cc0362a76db5ab40f797bd5668c2/switch_model-2.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90104fede5471c82e445361b188b30227c795393c3e79953ab48e748b084ea7a",
                "md5": "2809dfc20317efc743b196b543fa4adc",
                "sha256": "d2d6cc5baa7e753388e6f16cb6f00ab7f5171a7eb7849e5a0d99fc17c40214c4"
            },
            "downloads": -1,
            "filename": "switch_model-2.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "2809dfc20317efc743b196b543fa4adc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13.0a0,>=3.7.2",
            "size": 516525,
            "upload_time": "2024-04-25T22:24:28",
            "upload_time_iso_8601": "2024-04-25T22:24:28.817918Z",
            "url": "https://files.pythonhosted.org/packages/90/10/4fede5471c82e445361b188b30227c795393c3e79953ab48e748b084ea7a/switch_model-2.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-25 22:24:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "switch-model"
}
        
Elapsed time: 0.24170s