-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a999f0
commit 3ffede3
Showing
6 changed files
with
92 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
simulation/models/control_room_columbia/systems/diesels.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
from simulation.models.control_room_columbia import model | ||
from simulation.models.control_room_columbia.general_physics import ac_power | ||
from simulation.models.control_room_columbia.general_physics import diesel_generator | ||
|
||
|
||
|
||
def run(): | ||
|
||
if model.switches["cb_dg1_7_mode"]["position"] == 0: #Switch in C.R. | ||
if model.switches["cb_dg1_7"]["position"] == 0: | ||
ac_power.breakers["cb_dg1_7"].open() | ||
elif model.switches["cb_dg1_7"]["position"] == 2 and ac_power.breakers["cb_dg1_7"].info["sync"]: | ||
ac_power.breakers["cb_dg1_7"].close() | ||
|
||
if model.switches["dg1_gov"]["position"] == 0: | ||
diesel_generator.dg1.dg["rpm_set"] -= 0.1 | ||
elif model.switches["dg1_gov"]["position"] == 2: | ||
diesel_generator.dg1.dg["rpm_set"] += 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters