Restoration Plan ================= The restoration plan may be defined using sectiosn and directives. Sections includes: * **[Files]** Files that are in tabulated data are stored in this section. * **[Sequences]** Defines a sequence of `Actions` that must be done for a damage of an element type so that the damage type is considered restored. * **[Damage_Group]** Defines damage groups made from elements and their damage types. * **[Crews]** Crew data is defined in this section. * **[Zone]** Zones are defined in this section. * **[POINTS]** Geographical point groups can be created in this section. * **[PRIORITIES]** Restoration priorities are defined here. * **[JOBS]** Job definitions are made in this section. * **[DEFINE]** Job Effect definitions are defined here. Files ***** Files are used in other sections. Each file is defined by its name and path. The structure of the files is as follows: .. code-block:: In which `` is the handle used in other sections, and the `` is the relative or absolute path of the file. The relative path is relative to the restoration plan config file. Sequences ********* Each element in the water distribution network (e.g., pipe, node, tanks, and pump) needs to have a series of `Actions` so that the damage location is considered restored. Each `Action` is an arbitrary action, which is later used in defining the restoration `Priority`. The format of the Sequence is as follows:: ... .. note:: Element types include: * `PIPE`, * `TANK`, * `PUMP`, and * `NODE`. Please note that the element types are used in capital form. An example of a sequence list of actions is as follows:: PIPE drain repair repressurize For this example, you can define drain, repair, and repressurize according to your network's and utilities' capacity, requirements, and standard operating procedures. Damage Groups ************* The user may create one or more `damage groups`. A damage group is a group of damage locations of the same `element type` with or without other attributes of the element where the damage occurs. For instance, a damage group can be damage locations that occur on a pipe (i.e., `element type==PIPE`) in which the pipe has a diameter equal to or greater 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 standard operating procedures. Such damage groups are later used in `Priorities` definition alongside `Actions`. The structure format of the damage groups is as follows:: . . . .. note:: Each line of added condition connotes logical `AND`. Condition --------- In REWET, a condition is created with three values each separated by a colon (i.e., "`:`"). The values are as follows:: :: Attributes are as listed in the following table: .. table:: Attributes in Damage Group :widths: auto :align: center +------------+-----------------+-------------------------------------------------+ |Element Type| Attributes | Description | +============+=================+=================================================+ |PIPE |DIAMETER | Diameter of the pipe | | | | | | |FILE | Names of the elements specified in this file. | | | | | | |NOT_IN_FILE | Names of the elements not specified in the file.| +------------+-----------------+-------------------------------------------------+ | |Number_of_damages| Number of damages | | | | | |NODE |FILE | Names of the elements specified in this file. | | | | | | |NOT_IN_FILE | Names of the elements not specified in the file.| +------------+-----------------+-------------------------------------------------+ |TANK |FILE | Names of the elements specified in this file. | | | | | | |NOT_IN_FILE | Names of the elements not specified in the file.| +------------+-----------------+-------------------------------------------------+ |PUMP |FILE | Names of the elements specified in this file. | | | | | | |NOT_IN_FILE | Names of the elements not specified in the file.| +------------+-----------------+-------------------------------------------------+ Applicable Conditions 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 the attributes, the conditions can only be EQ or NE, and the values can be a file handle. For the examples above, the Condition will be:: a_name PIPE DIAMETER:BE:0.5 Crews ***** Crews are defined as the number of crews for each shift and their base location. Because this data is tabular, you define such data in files in a tabular format and then just use the file handle after the crew's name. The format of defining crews is:: File .. note:: *Zone Name* is optional. If in the Zone section, we define zones for elements, then we have to define zones for crews too. Otherwise, crews will never be assigned to those elements (or some elements), and those elements will never be restored. The column identifier is the Zone-Name column's identifier in the crew tabular data file. In the file represented by , the following information must be given: .. table:: Attributes in Damage Group :widths: auto :align: center +------------+-----------------+-------------+-------------+-------------------------------------+ |Home-X-Coord| Home-Y-Coord | Number | Shift | Zone-Name column identifier | +============+=================+=============+=============+=====================================+ | | | | Shift Name | | +------------+-----------------+-------------+-------------+-------------------------------------+ .. note:: The table above is a comma-delimited table. The columns and data are separated by commas. .. note:: *Zone Name* is optional. If in the Zone section, we define zones for elements, then we have to define zones for crews too. Otherwise, crews will never be assigned to those elements (or some elements), and those elements will never be restored. There can be multiple crews of the same type in one file (i.e., different numbers and different shifts). If the crews are grouped into zones, then the user may provide . Zone (Group) ************ When you want to assign the crews to a group of elements (most likely based on their geographical location), you can do so using the Zone (AKA grouping) feature. In this way, each zone (aka group) is defined in one line as follows:: FILE When you define a zone, you give a name to the zone, the element type that the zone is related to, and after FILE, you give the file handle of the file that contains the zone data. The two last arguments are the elements' and zone-name column identifiers in the file that is represented by the file handle. POINTS ****** You can define groups of geographical points in this section. The format of defining points is as follows::: : ... : In the above format, the X and Y coordinates are separated by a colon (i.e., `:`). Each point's coordinates are separated by a space. You can use the point group in priorities as a **secondary priority**. Such points can be representative of (but not limited to) focal points, water sources, important establishments, etc. PRIORITIES ********** Priorities are defined in this section. Each priority is defined by a name, a damage group, a sequence, and a crew. There are two sorts of priorities: `Primary` and `Secondary`. The *Primary* priorities are the main priorities showing a job, which is a combination of *Actions* that is happening on a damage location belonging to a *Damage Group*. The *Secondary*, however, defines which damage location should be worked on within the *Primary* priority. A priority is a list of primary and secondary priorities. The format of defining priorities is as follows:: : ... : ... .. note:: The Secondary priorities are either a point group name that is defined before or one of the built-in secondary priorities. The built-in secondary priorities are: * **HYD_SIG**: The hydraulic significance of the element. * **Shortest Distance** [FUTURE], * **Minimum Damages** [FUTURE], * **Largest Diameter** [FUTURE], * **Smallest Diameter** [FUTURE], and * **Crew Base** [FUTURE]. For instance, if a point group has been defined before as ‘P_Group’, then the following is an example of such a priority definition: .. code-block:: Crew_A REPAIR:all_critical_pipes Crew_A P_Group Restoration Crew A REPAIR:al JOBS **** Jobs are defined in this section. Each job is specified by a crew name, the job (defined as a primary priority), the time it takes, and its effect on the system once the job is completed. The format for defining jobs is as follows::: : FIX: