Functionality coding

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 python32  """3  FuelFarm_functionality.py4​5  Purpose: Ensure valve/pump changes are passed to the rest of the system.6​7  Author: Cody Jackson8​9  Date: 6/18/1810 #################################11 Version 0.212 Added path extension for utility formulas13 Version 0.114 Initial build15 """

In part 2, we import the necessary ...

Get Learn Programming in Python with Cody Jackson now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.