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

Adding Necost to ACCERT #44

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 3 additions & 124 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,129 +21,8 @@ Workbench](https://www.ornl.gov/project/neams-workbench) and relies on input
files using Workbench's SON format. Instructions for installing ACCERT both
with and without Workbench are provided in this README.

## Installation
## Documentation

### Clone ACCERT
Documentation for ACCERT can be found
[__here__](https://accert.readthedocs.io/en/latest/index.html).

* For Windows user, obtain and install the [Git bash](https://git-scm.com/download/win)



* Open a terminal window and cd into the folder where you want to install ACCERT (e.g., CODE)
```console
[~]> mkdir CODE
[~]> cd CODE
[~/CODE]> git clone https://github.com/accert-dev/ACCERT.git
[~/CODE]> cd ACCERT
```

### Installation of MySQL Community Server

* Obtain the [MySQL Community Server](https://dev.mysql.com/downloads/mysql/)
* Install MySQL Community Server

[__NOTE__] You'll need to enter a __strong password__ under Root Account Password. Don't forget your password!
It's extremely important that you keep track of your **root password for MySQL**, as it's difficult to reset. Write
it down somewhere easily accessible, or add it to a password manager to keep it secure.


### Installation of NEAMS Workbench

* Obtain and install the [NEAMS Workbench](https://code.ornl.gov/neams-workbench/downloads)
* **Run NEAMS Workbench** before install ACCERT

### Set up ACCERT

* Change into the src folder

```console
[~/ACCERT]> cd src
```

* Edit the workbench.sh file, provide workbench_path to your NEAMS workbench location, do not include '/' at the end.

* For Mac the default location is:
```console
workbench_path="/Applications/workbench-<version-number>.app/Contents"
```

* For Windows:

```console
workbench_path="/c/Workbench-<version-number>"
```
* For Unix:
```
workbench_path="/home/<USERNAME>/Workbench-<version-number>"
```

* Run __setup_accert.sh__
```console
[~/src]> ./setup_accert.sh
```

* Edit or create the file `install.conf` in `src` folder and change "yourpassword" to your MySQL root password.

```console
[INSTALL]

PASSWD = yourpassword

# NOTE: ALL OTHER information should be set up later
# INSTALL_PATH = /usr/local
# DATADIR =/mysql/data
# INSTALL_PACKAGE =
# EXP_DIR =
```

* Change "yourpassword" to your **MySQL root password**.

* Run `database_install.py` to install the accertdb database.
```console
[~/src]> python database_install.py
```

## Test installation

* Test ACCERT
```console
[~/src]> cd ../test
[~/test]> pytest
```


## Configuration with Workbench

* For Windows user only:
* Go to `ACCERT/src` folder and right-click on the `Main.py` file and select `Properties` from the context menu.
* In the Properties window, select the `Security` tab.
* Click on the `Edit` button to change the permissions.
* Click on `Add` to add a new user or group to the permissions list.
* Enter your username or group name and click on `Check Names` to verify it.
* Click on `OK` to add the user or group to the list.
* Select the user or group that you just added from the list.
* In the `Permissions` section, check the box next to `Full Control` to grant full control permissions to the user or group.
* Click on `OK` to save the changes and close the Properties window.


* Open workbench, and open `Workbench/Configurations` hit `add` on the top
* Select `Accert` from the drop-down menu, hit `OK`
* In `executable`: give full path to the directory containing ACCERT/src/Main.py
* In configuration, hit `load gramma`

## ACCERT Execution

ACCERT can be executed both through the Workbench interface by pressing `run` or through the command lines:
`python ACCERT/src/Main.py -i myinput.son`



# A Tool for Quantifying Capital Cost Reduction Reduction Pathways for Advanced Nuclear Reactors
- A new tool has been developed to simulate different pathways to reduce the costs of advanced nuclear power plants when constructed through large order books. This tool inputs various levers that represent high-level decision-making and outputs the capital costs and construction duration, starting from the first plant to the last plant in the order book.

-The methodology and assumptions behind this tool are documented [here](https://inldigitallibrary.inl.gov/sites/sti/sti/Sort_109810.pdf)
- There are two versions of this tool available,
1. A Python Jupyter Notebook in the folder "Cost_Reduction."
2. An excel spreadsheet that can be found [here](https://fuelcycleoptions.inl.gov/Shared%20Documents/Nuclear-Reactor-Capital-Cost-Reduction-Pathway-Tool.pdf)

As currently implemented, this cost reduction tool is separate from the ACCERT cost estimation tool. In the future, the ACCERT cost estimation and cost reduction tools may be integrated, allowing users to estimate the costs of their own design using the estimation tool and use the cost reduction tool to simulate the evolution of its capital costs from FOAK to NOAK plants.
1 change: 1 addition & 0 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ User's Guide
input_structure
output_structure
build_your_own
using_necost
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ openpyxl
pandoc
pytest
pandas
numpy==1.24.3
4 changes: 2 additions & 2 deletions src/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def load_obj(self, input_path, accert_path):
"""

import subprocess
sonvalidxml = accert_path + "/bin/sonvalidxml"
schema = accert_path + "/src/etc/accert.sch"
sonvalidxml = os.path.join(accert_path, "bin", "sonvalidxml")
schema = os.path.join(accert_path, "src", "etc", "accert.sch")
cmd = ' '.join([sonvalidxml, schema, input_path])
xmlresult = subprocess.check_output(cmd, shell=True)
### obtain pieces of input by name for convenience
Expand Down
3 changes: 2 additions & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
from .xml2obj import xml2obj
from .utility_accert import Utility_methods
from .Algorithm import Algorithm
import necost

__all__ = ['Accert', 'xml2obj', 'Utility_methods', 'Algorithm']
__all__ = ['Accert', 'xml2obj', 'Utility_methods', 'Algorithm', 'necost']
Loading