Skip to content

Commit

Permalink
deploy: af2ef5c
Browse files Browse the repository at this point in the history
  • Loading branch information
snaeimi committed Jul 16, 2024
0 parents commit 4281fc0
Show file tree
Hide file tree
Showing 63 changed files with 6,655 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1b5dbf08ac0c80477f8bb72d2feef7b7
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/docs/Future.doctree
Binary file not shown.
Binary file added .doctrees/docs/Inputs.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/docs/WorkflowDescription.doctree
Binary file not shown.
Binary file added .doctrees/docs/install.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
15 changes: 15 additions & 0 deletions _sources/docs/Future.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Future Development
##################

API Development
***************
REWET is planned to be used in in NHERI SimCenter's R2D General Recovery; thus, it must provide APIs to be seamlessly
get connected to the R2D's planned general recovery module. There are goring to be a module providing API. The following
APIs are to be developed in the next development cycle:

* init: this API is the conceptual init function to load the inputs and settings required pertaining to the restoration simulation tasks.
* runTillNextTime: Runs the simulation until the next specified time. Returns exception if the time is less or the same time as the current_stop_time.
* runTillNextEvent: Runs until the next events.
* getNextEventTime: Gets the next event time.
* setEventTime: sets an event time.
Empty file added _sources/docs/Inputs.rst.txt
Empty file.
130 changes: 130 additions & 0 deletions _sources/docs/Restoration_Plan_Config_File.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
=================
Restoration Plan
=================


The restoration plan may be defined using sectiosn and directives. Sections includes:

* **[Files]** Files that are in tabulaetd data in it are storedin it.
* **[Sequences]** Defiens sequence of `Actions` that must be done for a damage of an element type, so that damage type is cosnidered restored.
* **[Damaege_Group]** Defiens damages groups made from elements and tehir damage types.
* **[Crews]** Crew data is defiend in this section.
* **[POINTS]** geographical point groups can be created in thsi sections.
* **[PRIORITIES]** restration pririties are defined here.
* **[JOBS]** Jobs definition are made in this section.
* **[DEFINE]** Job Effect definition is defined here.
* **[Group]** Groups are defien in thsi section.

Files
*****

Files are usedin other sections. Each file is defiend by its name and path. The structure of teh files are as follows
.. code-block::
<File handle> <File path>
in which `<file handle>` is the handle used in other sections and the `<file path>` is the relational or absolute path
of the file. The relative path is relative to teh restoration plan config file.

Sequences
*********

Each element is water distribution network (e.g., pipe, node, tanks, and pump) needs to have a series of `Action` so that
teh damage location is considerd restored. Each `Action` is a arbitary Action which later used in defining the restioration
`Priority`.

The format of the Sequence is as follows:::

<Element Type> <Action 1> ... <Action n>
.. note::
ELement types include:

* `PIPE`,
* `TANK`,
* `PUMP`, and
* `NODE`.

Please note that the element types are used in capital form.

An Example of a sequnce list of actions is as follows:::

PIPE drain repair repressurize

On this exampel you can define drain, repair and repressurize according to your network's and utilities capacity,
requirements and starndard operation proceddures.

Damage Groups
*************

teh user may create oen or more `damage groups`. A damage group is a group damage location of the same `element type` with
or without other attribute of the element the damage happens on. For instance, a damage group can be damage locations that
happen on a pipe (i.e., `element type==PIPE`) in which pipe has a diameter equal or bigger than 0.5 m (i.e., diameter>=0.5).
The user can create such damage groups according to their network's and utilities capacity, requirements and
starndard operation proceddures. Such damage groups are later used on `Priorities` definition alonside `Actions`.

The structure format of the damage groups are as follows:::
<Damaeg Group Name> <Element Type> <Attribute> <CONDITION 1>
.
.
.
<Damaeg Group Name> <Element Type> <Attribute> <CONDITION N>

.. note::

each line of adde condition connotes logical `AND`.

Conditon
---------

In REWET a condition is created with three values each sepearetd with one colon (i.e., "`:`"). The values are follows:::
<Attribute>:<Condition>:<Condition Value>

Attributes are as in the following table:

.. table:: Attributes in Damage Group
:widths: auto
:align: center

+------------+-----------------+-------------------------------------------------+
|Element Type| Attributes | Description |
+============+=================+=================================================+
|PIPE |DIAMETER | Diameter of teh pipe |
| | | |
| |FILE | Names of the element specified in ths file. |
| | | |
| |NOT_IN_FILE | Names of the element not specified in the file. |
+------------+-----------------+-------------------------------------------------+
| |Number_of_damages| Numebr of damages |
| | | |
|NODE |FILE | Names of the element specified in ths file. |
| | | |
| |NOT_IN_FILE | Names of the element not specified in the file. |
+------------+-----------------+-------------------------------------------------+
|TANK |FILE | Names of the element specified in ths file. |
| | | |
| |NOT_IN_FILE | Names of the element not specified in the file. |
+------------+-----------------+-------------------------------------------------+
|PUMP |FILE | Names of the element specified in ths file. |
| | | |
| |NOT_IN_FILE | Names of the element not specified in the file. |
+------------+-----------------+-------------------------------------------------+

Applicable Conditons are:
* EQ: equal,
* BT: bigger than,
* LT: less than,
* BE: bigger than or equal to,
* LE: less than or equal to,

.. note::

When File and NOT_IN_FILE are teh attributes, teh conditions can only be EQ, NE amnd teh values can be a file handle.

For the excamples above the Conditon will be:::
a_name PIPE DIAMETER:BE:0.5


2 changes: 2 additions & 0 deletions _sources/docs/WorkflowDescription.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Workflow Description
####################
98 changes: 98 additions & 0 deletions _sources/docs/install.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
Install
#######

Virtual Environment
*******************

It's a good practice to install REWTe and its depencies in a cirtal enviroment. Because it is not necessary, this not explained here. The user can user
can create a `virtual enviroment<https://docs.python.org/3/library/venv.html>`.

1. Using PyPi
***************
For installing REWET, the easiest way is to install using PyPi.

.. code-block:: bash
pypi install rewet
2. Local Install
****************
If you inted to install rewet locally, specificially for devlopment purposes, you can do so with cloning REWET's git repository and tehn installing the package.
To clone the repo, please type teh following in a git-enabled console/terminal.

.. code-block:: bash
git clone https://github.com/snaeimi/REWET.git
Alternativey you can download the repo's `zip file<https://github.com/snaeimi/REWET/archive/refs/heads/main.zip>` and extract it.

Either way, you will need to navigate to the REWTE's root directory and install the package.

For installing from a local repo **(NOT in devloper mode)**, type the following in your desired python enviroment:

.. tabs::

.. tab:: Windows
.. code-block:: bash
python -m pip install .
.. tab:: Linux

.. code-block:: bash
python3 -m pip install .
.. tab:: MacOS

.. code-block:: bash
python3 -m pip install .
if you want to to install REWET in the **devloper mode**, type the following in your desired python enviroment:\

.. tabs::

.. tab:: Windows

.. code-block:: bash
python -m pip install -e .
.. tab:: Linux

.. code-block:: bash
python3 -m pip install -e .
.. tab:: MacOS

.. code-block:: bash
python3 -m pip install -e .
.. note::
In devloper mode, the package source file are not copied into python site packages directory;
thus, any cxhanges in the python codes is applied when running REWET.

3. Test Installation
********************


.. tabs::

.. tab:: Windows
.. code-block:: bash
python -m rewet.test.DefaultSettings
.. tab:: Linux

.. code-block:: bash
python3 -m pip install -e .
.. tab:: MacOS
.. code-block:: bash
python3 -m rewet.test.DefaultSettings
27 changes: 27 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. REWET documentation master file, created by
sphinx-quickstart on Mon Jun 10 11:28:55 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to REWET's documentation!
#################################

The following compromises the content of the documentation.

.. toctree::
:maxdepth: 2
:caption: Contents:

docs/install.rst
docs/WorkflowDescription.rst
docs/Restoration_Plan_Config_File.rst
docs/Future.rst



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Binary file added _static/REWET_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4281fc0

Please sign in to comment.