BKRCast Setup - bellevuewa/BKRCast GitHub Wiki
This section contains two subsections that describe the BKRCast model setup process:
System Setup
The following steps are recommended to prepare a machine for a BKRCast model run:
Anaconda Installation
- Download Anaconda here
- Select the latest 64-bit version with Python 2.7.
- Install Microsoft Visual C++ 9.0 from http://aka.ms/vcpython27. Choose 64-bit version.
- Download the
bkrcast.txt
configuration file. - Under Anaconda prompt console, change directory to the folder where you just downloaded the configuration file. Run the following command to build a virtual environment called BKRCast for running BKRCast Model:
Ifconda create --name BKRCast --file bkrcast.txt conda activate BKRCast pip install backports.shutil-get-terminal-size==1.0.0 pip install backports.ssl-match-hostname==3.4.0.2 census==0.8.3 jellyfish==0.5.1 pip install pandana==0.2.0 tables==3.2.2 us==0.9.1
conda activate BKRCast
does not work, tryactivate BKRCast
.
The PATH variable change (below) is not required on the latest Windows platform - Update PATH in your system variables:
- Open the Windows environment variables menu
- Locate the PATH system variable, and select the "edit" button
- Move all Anaconda-related paths (often found at the end) to the beginning. If you do not see any anaconda related paths, manually add the following entries at the very beginning, separated by ';':
C:\Anaconda2;C:\Anaconda2\Scripts;C:\Anaconda2\Library\bin;C:\Anaconda2\Lib;C:\Anaconda2\Lib\site-packages;
- Click "Save"
Anaconda Python
- Locate the target Python install folder using Windows File Explorer and delete the folder "ply" under
Ananconda2\Lib\site-packages
- (for EMME 4.2.9 only) Copy the file
[Emme Path]\Python27\Lib\site-packages\Inro.pth
to Anaconda python install :Anaconda2\env\BKRCast\Lib\site-packages
- (for EMME 4.4+ only) Copy the file
[Emme Path]\emme.pth
to Anaconda python install :Anaconda2\env\BKRCast\Lib\site-packages
Emme's Python libraries can conflict with the Anaconda install used to run Python. As of Emme release 4.2.3, there is a known conflict with the Anaconda libraries. The "ply" library from Anaconda clashes with Emme. INRO's solution is to remove this library from the Anaconda install and rely on the Emme version instead. This can be done from the command prompt with conda uninstall ply
. Emme looks to its local install of these packages when the "ply" library is removed from Anaconda, which should eliminate the known conflict.
Emme
- Open Emme Desktop
- Go to Tools → Application Options → Modeller
- Change Python Path to the BKRCast environment folder that was created in the steps above. In most cases it will reside within Anaconda install folder i.e.
C:\Anaconda2\envs\BKRCast
. - Select
Install Package
orUpdate Modeller Package
and click OK. - Close Emme
GitHub Installation
- Download and install GitHub Desktop from here
- Download and install Git LFS from here
- Start Git LFS by entering
git lfs install
in a command line window
Git Installation
Download Git from https://git-scm.com/download/win. Choose latest 64-bit Windows version. Follow the installation instructions to complete installation.
Git Credential Manager
It is recommended to download and install git credential manager for Windows.
TortoiseGit Installation
Download TortoiseGit from https://tortoisegit.org/download/. Choose latest 64-bit version. Follow the installation instruction to complete installation.
Model Setup
The following steps are recommended to set up the BKRCast model on a machine:
- Download setup:
- Open Anaconda prompt window (console mode). Change current directory to the working directory.
- Run command
git clone https://github.com/bellevuewa/BKRCast
. This command is to clone the BKRCast repository. This is a public repository and primarily contains scripts/programs and configuration files.
Daysim is installed in daysim_2016 subfolder. The current Daysim version BKRCast is using is 2.2.0-beta.427. - Get the BKRCast input files. Save input files under BKRCast/inputs. We no longer keep BKRCastInputs on GitHub.
- Update input_configuration.py:
- Under BKRCast root folder, open input_configuration.py in a text editor.
- Set
project_folder
to the BKRCast folder on the target machine - Set
parcels_file_folder
to the directory of the primary parcel file
The following tree diagram represents a BKRCast model directory that is ready for a model run based on the aforementioned setup guidance.