Skip to content

ftong/SEM_public

 
 

Repository files navigation

SEM-energy-storage

This project contains the model code and input data for the following paper. Output result files will be available in Zenodo.

Tong, F.; Yuan, M.; Lewis, N.S.; Davis, S.J.; Caldeira, K.* Effects of deep reductions in energy storage costs on highly reliable wind and solar electricity systems. Forthcoming at iScience.

Contact information: Fan Tong, [email protected] Ken Caldeira, [email protected]

SEM Model

This is a Simple Energy Model that optimizes electricity (or electricity and fuels) without considering any spatial variation, policy, capacity markets, etc. Version v1.1 Last updated 2018/12

Running Environment

Python v3. cvxpy, version 0.4.11 -- python library Gurubi -- solver

See below for details.

WINDOWS 10 INSTALLATION INSTRUCTIONS

The following is installation instructions for Windows 10 machines.

  1. Use remove programs to remove all python2.x programs. This uninstalls Anaconda2.

  2. Use remove programs to remove all Gurobi (Not sure this is necessary. I had Gurobi 7 and new release is Gurobi 8.)

  3. Install Anaconda3. https://www.anaconda.com/download/ https://conda.io/docs/user-guide/install/windows.html

  4. Install Visual C++ 14.0. Download and install software using this link. https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15 See this link for more information: https://www.scivision.co/python-windows-visual-c++-14-required/

  5. Download and install Gurobi. http://www.gurobi.com/documentation/8.0/quickstart_windows/quickstart_windows.html http://www.gurobi.com/documentation/8.0/quickstart_windows/creating_a_new_academic_li.html#subsection:createacademiclicense

  6. Activate Gurobi license. You have to go to this page https://user.gurobi.com/download/licenses/current to see what licenses are allocated to you. Click on the license that will pertain to your machine. A window will open up that will have some text like:

     grbgetkey 2c8c6fa0-ad45-11e8-a2c6-0acd5117eeae
    

Copy that text and paste in in an Anaconda window. (You might start these Anaconda windows as Administrator just to be on the safe side.)

  1. Set up python link to Gurobi. Open up the Anaconda3 window as Administrator from the start menu.(Note this is a dos window, not a linux window.) And then type:

        > cd  /c/gurobi801/win64
        > python setup.py install
    
  2. Install cvxpy, version 0.4.11. For python3, cvxpy must be installed with pip. They recommend making a special virtual environment to allow different versions of things to run on the same machine, but I just installed into my general space. Open up an Anaconda window (I did it as Administrator) and type

     > pip install cvxpy==0.4.11 
    

If this install fails on installing the ecos package, try the following line in an Anaconda window:

            > conda install ecos
	> pip install cvxpy==0.4.11

If you get error messages for not having (or having the correct versions of) ecos, scs, or cvxcanon, try the following command (Anaconda Cloud):

            > conda install -c sebp cvxpy==0.4.11

This command should automatically download / install the right packages needed for cvxpy ("-c CHANNEL" specifies additional channels to search for packages; sebp is a contributer on Anaconda Cloud).

Check the installation with

	> nosetests cvxpy 
  1. Download and run python3 version of the Simple Energy Model -- SEM-1.1: https://github.com/ClabEnergyProject/SEM-1.1 -- Open case_input.xlsx in excel. Make the cases you want (by altering base case or ratios to base case), and then save sheet as case_input.csv. -- Open Spyder and then within Spyder navigate to the folder that was cloned from github and open and run Simple_Energy_Model.py

MacOS 10.13 INSTALLATION INSTRUCTIONS

The following is installation instructions for MacOS 10.13 machines.

  1. If you installed Anaconda2 before, use remove programs to remove Anaconda2. You don't need to remove default python2 which might cause unexpected error


  2. Use remove programs to remove all Gurobi. Also, delete Gurobi license (normally under "/Users/$username/" if you didn't specify any location when installing)


  3. Install Anaconda3 for MacOS. https://www.anaconda.com/download/


  4. Download and install Gurobi. http://www.gurobi.com/downloads/download-center http://www.gurobi.com/downloads/gurobi-optimizer


  5. Activate Gurobi license. You have to go to this page https://user.gurobi.com/download/licenses/current to see what licenses are allocated to you. Click on the license that will pertain to your machine. A window will open up that will have some text like:


    grbgetkey 2c8c6fa0-ad45-11e8-a2c6-0acd5117eeae

  6. Copy that text and paste it in an Anaconda terminal window. (You might start these Anaconda windows as Administrator just to be on the safe side.)

  7. Set up python link to Gurobi. Open up the Anaconda3 terminal window as Administrator from the start menu. And then type:


    conda config --add channels http://conda.anaconda.org/gurobi

    conda install gurobi

  8. Install cvxpy, version 0.4.11. For python3, cvxpy must be installed with pip. Open up an Anaconda window (I did it as Administrator) and type


    pip install cvxpy==0.4.11

  9. If you get error messages for not having (or having the correct versions of) ecos, scs, or cvxcanon, try the following command (Anaconda Cloud):

    conda install -c sebp cvxpy==0.4.11

This command should automatically download / install the right packages needed for cvxpy ("-c CHANNEL" specifies additional channels to search for packages; sebp is a contributer on Anaconda Cloud).

  1. Check the installation with

    nosetests cvxpy

If you did not remove old Gurobi license and installed a new one, you might see error in this step. You need to delete the old Gurobi licencse and install the new one for your current Gurobi version

  1. Download and run python3 version of the Simple Energy Model -- SEM-1.1: https://github.com/ClabEnergyProject/SEM-1.1 -- Open case_input.xlsx in excel. Make the cases you want (by altering base case or ratios to base case), and then save sheet as case_input.csv. -- Open Spyder and then within Spyder navigate to the folder that was cloned from github and open and run Simple_Energy_Model.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%