Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch 2.0.5 (csv import/export) #119

Merged
merged 20 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
da3ea26
Simplify rhosetter code and remove sympy dependency
mfripp Jun 21, 2019
bd9fe59
Factor out numpy dependency and drop requirements.txt
mfripp Jun 21, 2019
01b9d5c
Updating PHA example input files with updated model structure. Minor …
josiahjohnston Jun 27, 2019
7c80e83
Slightly improved dev installation instructions for Windows users.
Jun 28, 2019
b8280d2
Fixed several bugs in the documentation and execution of the stochast…
Jun 28, 2019
ffa02ff
Clean up useless files in PySP example (they are already in the corre…
Jun 28, 2019
121fb87
Adding comment about relative import.
josiahjohnston Jun 28, 2019
1392bc7
Use .csv instead of .tab files (find-replaced file extensions)
mfripp Aug 9, 2019
be20002
Create outputs as .csv files
mfripp Aug 10, 2019
9d94ba7
Fix .tab parsing errors in upgrade scripts and fix malformed .tab files
mfripp Aug 10, 2019
56f2922
add switch_model.upgrade.upgrade_2_0_5
mfripp Aug 10, 2019
970daeb
upgrade examples for 2.0.5 (use .csv for all inputs)
mfripp Aug 10, 2019
390eba7
Update version number to 2.0.5
mfripp Aug 10, 2019
53e0e53
Save Hawaii results in .csv format instead of .tsv
mfripp Aug 10, 2019
b6b44d6
Allow use of cap_cost_scen_id instead of tech_scen_id for older Hawai…
mfripp Aug 10, 2019
922481a
Report file name and raise error if conversion fails
mfripp Aug 10, 2019
9c3671e
Show Switch version number and website in banner; improve solve messages
mfripp Aug 10, 2019
244a9c9
Use .csv instead of .dat files for non-indexed parameters
mfripp Aug 11, 2019
6c3feb8
Use .csv instead of .dat files for examples
mfripp Aug 11, 2019
6d73e74
Prefer simple conda installation in INSTALL.md
mfripp Aug 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions CHANGELOG.txt → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
-------------------------------------------------------------------------------
Switch 2.0.5
-------------------------------------------------------------------------------
This release standardizes all inputs and outputs as .csv files.

As usual, when you first solve an older model, Switch will prompt to backup and
upgrade the inputs directory. If you accept, it will convert the existing
tab-delimited *.tab files and most ampl-format *.dat files to comma-delimited
*.csv files. It is recommended that you update your model data preparation
scripts to create .csv files directly. Note that non-indexed parameters should
now be stored in .csv files with a header row listing the parameter names and a
single data row showing their values.

All multi-value outputs from Switch are also now in comma-delimited .csv files,
instead of a mix of .csv, .tab and .txt files. (total_cost.txt is unchanged)

This release also includes includes the following minor updates:

- Updated installation instructions
- Switch version number and website are now shown in the startup banner when
running with --verbose flag; solve messages have also been improved slightly
- Some parsing errors for *.tab files have been fixed in the upgrade scripts;
this may cause errors during the upgrade process for input files that use
spaces instead of tabs and were previously upgraded by Switch, producing
malformed files.
- Fixed several bugs in the documentation and execution of the stochastic
examples that use the PySP module of the Pyomo package

-------------------------------------------------------------------------------
Switch 2.0.4
-------------------------------------------------------------------------------
Expand Down
26 changes: 22 additions & 4 deletions DEV_INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,33 @@ INSTALLATION WITH PYTHON VIRTUAL ENVIRONMENTS FOR DEVELOPMENT
git clone https://github.com/switch-model/switch.git "$SRC_DIR"

4. Create a virtual environment in your project directory, and install switch
and its prerequisites.
and its prerequisites (if using Windows, replace "bin" with "Scripts"):
cd "$PROJECT_DIR"
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install --editable "$SRC_DIR"
pip install --editable "$SRC_DIR"[extra_requirements]

Note: The --editable flag ensures that any changes to your downloaded copy
Remember to replace "extra_requirements" with a comma-separated list with
the extra dependencies you will be using for your development:
database_access: Used to access Hawaii data from Matthias.
advanced: Used for advanced demand response and progressive
hedging modules.
plotting: Self explanatory.
dev: Used for debugging.

Note 1: The --editable flag ensures that any changes to your downloaded copy
of switch will be immediately reflected to your installed copy in the
virtual environment.

5. Record the exact version of every library you are using so you can
Note 2: If installing advanced dependencies in a Windows OS using pip, the
installation of r2py may raise an error. The simplest workaround is to
follow the steps outlined here: https://stackoverflow.com/a/32983656
After manually installing r2py, you can proceed to repeat the installation
of Switch with the advanced dependencies using:
pip install --editable "$SRC_DIR"[extra_requirements]

5. [Optional] Record the exact version of every library you are using so you can
precisely replicate this setup in the future.
pip freeze > requirements.txt
Without this step, you are at higher risk of not being able to readily
Expand All @@ -68,3 +83,6 @@ EXECUTION
source venv/bin/activate
3. Execute switch like normal
switch solve ...
4. When finished development work, remember to leave the virtual
environment with the following command:
deactivate
202 changes: 0 additions & 202 deletions INSTALL

This file was deleted.

Loading