Link Search Menu Expand Document

Windows Installation Instructions

As of version 0.3.1, an URBANopt installer (64-bit Windows 7 – 10) is available to install the URBANopt CLI, Ruby 2.5.x, and OpenStudio SDK at the same time. If you’d rather install the dependencies manually, view the manual install section below.

For CLI usage examples, see our usage examples page

Install with the URBANopt installer

  1. Download the desired version of the .exe installer.

  2. Use the GUI installer and choose a directory to install. Once installed, open a terminal (Powershell, Windows CMD and GitBash are supported) and run the provided setup script for that shell (below are the setup scripts for each respective shell environment).

    Bash (or GitBash for Windows)

     c:/urbanopt-cli-X.X.X/setup-env.sh  
     . ~/.env_uo.sh  
    

    Powershell

     c:\urbanopt-cli-X.X.X\setup-env.ps1  
     . ~\.env_uo.ps1  
    

    Windows Command Prompt

     c:\urbanopt-cli-X.X.X\setup-env.bat  
     %HOMEPATH%\.env_uo.bat  
    
  3. When launching new shell terminals, run the correct environment config to setup the environment.

Manual Install

  1. Install Ruby 2.5 (x64)

    Make sure that you select option 3: MSYS2 and MINGW development toolchain during the installation process: installer options

  2. Include path to Ruby by adding the following to your environment variables path:

    C:\Ruby25-x64\bin

  3. Create a new environment variable HOME and set the variable value to the following:

    C:\Users\<user_name>

    Detailed instructions for creating environment variables can be found online.

  4. Install Bundler version 2.1:

     gem install bundler -v 2.1
    
  5. Install OpenStudio 3.0.1

  6. Create file C:\ruby-2.5.5-1-x64-mingw32\lib\ruby\site_ruby\openstudio.rb and edit it to contain the path to your installed OpenStudio (where X.X.X is the OpenStudio version installed):

     require 'C:\openstudio-X.X.X\Ruby\openstudio.rb'
    
  7. Verify your OpenStudio and Ruby configuration:

     ruby -e "require 'openstudio'" -e "puts OpenStudio::Model::Model.new"
    

    Expected output:

     OS:Version,
      {<long-uuid>},                          !- Handle
      3.0.0;                                  !- Version Identifier`
    
  1. Install the URBANopt Command Line Interface (CLI):

     gem install urbanopt-cli
    

URBANopt CLI Usage

  1. View available CLI commands with:

     uo --help
    
  2. For detailed instructions, see the usage examples page.

OpenDSS and DiTTo Reader Set-up

As of version 0.4.0, the URBANopt CLI includes DiTTo/OpenDSS support. Since this functionality is implemented in Python, a different set of dependencies must be installed in order to use it.

If you’d like to use this functionality, follow the OpenDSS installation instructions.

Note that Windows users may experience some difficulty during the install (particularly with the environment variable setup). If you are not able to access the opendss command via the CLI, you can always access it manually by following the general OpenDSS instructions.


URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.