Skip to content

Commit

Permalink
Merge pull request #150 from WISDEM/release-2.3.1
Browse files Browse the repository at this point in the history
Release 2.3.1
  • Loading branch information
akey7 authored Jul 29, 2020
2 parents 2f582b2 + 881d1c3 commit 0e1e1f8
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 55 deletions.
Binary file modified installation_instructions/03_clone_the_repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified installation_instructions/05_download_zip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified installation_instructions/06_landbosse_dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file removed installation_instructions/09_new_user_variable.png
Binary file not shown.
Binary file not shown.
65 changes: 14 additions & 51 deletions installation_instructions/windows_end_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ However, if you are unfamiliar with `git` and GitHub you can simply download the

![Clone the GitHub repo](03_clone_the_repo.png)

Click on "Download ZIP" to download the `.zip` file.

### Step 5: Get the source code ready

Open the `.zip` file. Copy the single directory within it to the `landbosse` folder on the desktop. Rename the directory to `LandBOSSE-dev`
Expand All @@ -54,31 +56,9 @@ This is the directory configuration you need to run LandBOSSE.

### Step 6: A word of caution about input files

If you are familiar with GitHub and `git` please read the following warning. If you are unfamiliar please skip to Step 7.

Input files shouldn't be placed in the LandBOSSE source code directory. *This creates a risk that proprietary input data will become visible in a source code repository.* This risk is mitigated by using the folder structure you just created above.

### Step 7: Set environment variables

We just made a folder structure for LandBOSSE. In order for LandBOSSE to know where these folders are, we need to make environment variables pointing to the files. If you want to (optionally) know more about environment variables you can [read about them on Wikipedia](https://en.wikipedia.org/wiki/Environment_variable). However, all you really need to know right now is that they are keywords that specify folders for LandBOSSE. We will use the Windows control panel to set these variables. Search for "environment variable" in the start menu, and open the control panel

![Find windows control panel for setting environment variables.](07_environment_variables_control_panel.png)

Click on the above start menu option above. Then click on the `Environment Variables` button in the lower right. You will then see the following dialog box:

![Environment variables listing](08_where_to_set_environment_variables.png)

Click on the **New** button under **User variables for your_username**. You will be presented with

![Defining a new environment variable](09_new_user_variable.png)

Enter the variable name `LANDBOSSE_INPUT_DIR` and browse the directory where we have the landbosse inputs. Click OK. Then open the same dialog box, enter the variable name `LANDBOSSE_OUTPUT_DIR` and browse to your outputs directory. Click OK. When you are done, you should see the environment variables set like this. The selection of environment variables will probably look different but you will have the `LANDBOSSE_INPUT_DIR` and `LANDBOSSE_OUTPUT_DIR` set up. Check for those. Also

![Finished setting up environment variables](10_variable_and_directories.png)

Click OK.

### Step 8: Copy your data into the input folder
### Step 7: Copy your data into the input folder

Now you can copy the template input files into the LandBOSSE input folder. Navigate to the `project_input_template` folder in the LandBOSSE source directory, as shown below.

Expand All @@ -94,49 +74,32 @@ Your result will look like this when you are done:

![done pasting](13_done_pasting.png)

### Step 9: Install shapely
Note: Depending on the version of LandBOSSE, you may have more files copied into the input folder. As long as you copy over all the input files into the destination folder, LandBOSSE will find its input files.

Assuming you have been following along the folder placement we have been using so far, open an Anaconda prompt. Type the following command to get to the LandBOSSE folder:
### Step 8: Install the LandBOSSE package

You will need Python 3.7 for this step.

```
c:
cd \Users\%USERNAME%\Desktop\landbosse\LandBOSSE-dev
```

In a browser enter the following URL

[https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely](https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely)

These are pre-built versions of shapely. What you need is to install one of these prebuilt version. First we need to download it. On the web page you just opened, click on `Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl` to download it. (It is easier if you type Ctrl-F and search for `Shapely` to find the file). Then type the following command to install it (assuming it is in your `Downloads` folder)

```
pip install C:\Users\%USERNAME%\Downloads\Shapely-1.6.4.post1-sp37-cp37m-win_amd64.whl
```

The command should result in a message that begins Then install landbosse itself:
The command should result in a message that begins Then install LandBOSSE itself:

```
cd \Users\%USERNAME%\Desktop\landbosse\LandBOSSE-master
pip install -e .
```

Note that there is a space between `-e` and `.`

## Step 10: Copy and modify template input files to input folder
## Step 9: Copy and modify template input files to input folder

In the `LandBOSSE` directory you will find a folder named `project_input_template`. Copy (do not move) the contents of this folder into the `inputs` folder you created and specified in Steps 3 and 7. Retain the folder structure in `project_input_template`.

The file named `projects_list.xlsx` must keep the same name. The names of the project data files in the `project_data` folder must match the project names in `projects_list.xlsx`.

### Step 11: Run LandBOSSE
### Step 10: Run LandBOSSE

From the `LandBOSSE` folder, type the following command:
Navigate back to where you installed LandBOSSE (in case you have navigated away) and run LandBOSSE by typing the following two commands:

```
python main.py
```
cd \Users\%USERNAME%\Desktop\landbosse\LandBOSSE-master\
python main.py -i \Users\%USERNAME%\Desktop\landbosse\input -o \Users\%USERNAME%\Desktop\landbosse\output
```

### Step 12: Examine the results
### Step 11: Examine the results

Your output is in the `output` directory of your landbosse directory!
8 changes: 4 additions & 4 deletions landbosse/model/ErectionCost.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,11 +916,11 @@ def aggregate_erection_costs(self):
same_topbase_crane_list = possible_crane_topbase[['Crane name', 'Boom system']]
possible_crane_topbase = same_topbase_crane_list.merge(possible_crane_cost, on=['Crane name', 'Boom system'])
possible_crane_topbase_sum = possible_crane_topbase.groupby(['Crane name',
'Boom system'])['Labor cost USD without management',
'Boom system'])[['Labor cost USD without management',
'Subtotal for hourly labor (non-management) USD',
'Subtotal for per diem labor (non-management) USD',
'Equipment rental cost USD',
'Fuel cost USD'
'Fuel cost USD']
].sum().reset_index()

# Store the possible cranes for the top and base for future diagnostics.
Expand Down Expand Up @@ -948,11 +948,11 @@ def aggregate_erection_costs(self):

# calculate costs if top and base use separate cranes
separate_topbase = \
possible_crane_cost.groupby(['Operation', 'Crane name', 'Boom system'])['Labor cost USD without management',
possible_crane_cost.groupby(['Operation', 'Crane name', 'Boom system'])[['Labor cost USD without management',
'Subtotal for hourly labor (non-management) USD',
'Subtotal for per diem labor (non-management) USD',
'Equipment rental cost USD',
'Fuel cost USD'
'Fuel cost USD']
].sum().reset_index()

# join mobilization data to separate top base crane costs
Expand Down

0 comments on commit 0e1e1f8

Please sign in to comment.