Now that the instances for all the components are available, we can write the code to actually allow the scenario to work. In this section, the functionality.py file is split into separate parts, with a discussion of each code listing following its respective part.
We've seen the code in part 1 many times before, so there is no need to discuss it in detail:
functionality.py (part 1)
1 #!/usr/bin/env python3
2 """
3 FuelFarm_functionality.py
4
5 Purpose: Ensure valve/pump changes are passed to the rest of the system.
6
7 Author: Cody Jackson
8
9 Date: 6/18/18
10 #################################
11 Version 0.2
12 Added path extension for utility formulas
13 Version 0.1
14 Initial build
15 """
In part 2, we import the necessary modules and update the system path. We also list all the parameters and components...