From fe75a731414f31a4691e642e0f55173ace14ff1f Mon Sep 17 00:00:00 2001 From: mahmood19227 Date: Mon, 10 Apr 2023 15:37:16 +0330 Subject: [PATCH] Some DS added and Some step function currected --- .../RigSpecifications/CHoisting.f90 | 2 +- .../ControlPanels/CHookVariables.f90 | 8 +- .../ControlPanels/CTopDrivePanel.f90 | 4 +- CSharp/Equipments/DrillWatch/CDrillWatch.f90 | 2 +- .../Equipments/MudPathFinding/CManifolds.f90 | 45 +- CSharp/Equipments/Tanks/CTanks.f90 | 2 +- .../Common/COperationScenariosMain.f90 | 477 +++---- .../Common/COperationScenariosSettings.f90 | 2 +- .../Common/COperationScenariosVariables.f90 | 137 +- ...CloseKellyCockLedNotificationVariables.f90 | 67 - .../CCloseSafetyValveLedNotification.f90 | 6 +- ...oseSafetyValveLedNotificationVariables.f90 | 67 - ...CFillMouseHoleLedNotificationVariables.f90 | 61 - .../CIrIBopLedNotificationVariables.f90 | 63 - .../CIrSafetyValveLedNotification.f90 | 6 +- ...CIrSafetyValveLedNotificationVariables.f90 | 90 -- .../CLatchLedNotificationVariables.f90 | 58 - ...COpenKellyCockLedNotificationVariables.f90 | 63 - .../COpenSafetyValveLedNotification.f90 | 6 +- ...penSafetyValveLedNotificationVariables.f90 | 65 - .../CSlipsNotificationVariables.f90 | 65 - .../CSwingLedNotificationVariables.f90 | 55 - .../CTdsIbopLedNotificationVariables.f90 | 60 - .../CTdsPowerLedNotificationVariables.f90 | 57 - ...dsTorqueWrenchLedNotificationVariables.f90 | 50 - .../Notifications/CTongNotification.f90 | 12 +- .../CTongNotificationVariables.f90 | 69 - .../Notifications/CUnlatchLedNotification.f90 | 14 +- .../CUnlatchLedNotificationVariables.f90 | 62 - .../Notifications/NotificationVariables.f90 | 434 ++++++ .../Permissions/CFillupHeadPermission.f90 | 2 - .../CFillupHeadPermissionVariables.f90 | 50 - .../CInstallFillupHeadPermissionVariables.f90 | 53 - .../CInstallMudBucketPermissionVariables.f90 | 51 - .../CIrIbopPermissionVariables.f90 | 49 - .../CIrSafetyValvePermissionVariables.f90 | 51 - .../CRemoveFillupHeadPermissionVariables.f90 | 51 - .../CRemoveMudBucketPermissionVariables.f90 | 51 - .../CSwingDrillPermissionVariables.f90 | 49 - .../CSwingOffPermissionVariables.f90 | 48 - .../CSwingTiltPermissionVariables.f90 | 50 - .../Permissions/PermissionsVariables.f90 | 212 +++ .../SoftwareInputs/CHookHeight.f90 | 37 - .../SoftwareInputs/CIbopHeight.f90 | 58 - .../SoftwareInputs/CNearFloorConnection.f90 | 60 - .../SoftwareInputs/CSafetyValveHeight.f90 | 59 - .../SoftwareInputs/CSlackOff.f90 | 54 - .../SoftwareInputs/CStandRack.f90 | 38 - .../SoftwareInputs/CStringPressure.f90 | 57 - .../SoftwareInputs/CTdsStemJointHeight.f90 | 55 - .../SoftwareInputs/CZeroStringSpeed.f90 | 60 - .../SoftwareInputsVariables.f90 | 195 +++ .../SoftwareOutputs/CStringUpdate.f90 | 33 - .../CStringUpdateVariables.f90 | 20 +- .../SoftwareOutputsVariables.f90 | 0 .../Test/TestOperationScenarios.f90 | 831 ------------ .../Test/TestOperationScenariosVariables.f90 | 96 -- .../OperationScenarios/Unity/CUnityInputs.f90 | 752 +++++------ .../Unity/CUnityOutputs.f90 | 144 +- .../UnitySignals/CTongEnum.f90 | 2 +- .../UnitySignals/UnitySignalsVariables.f90 | 478 +++++++ CSharp/Problems/CBitProblems.f90 | 28 +- CSharp/Problems/CBitProblemsVariables.f90 | 68 +- CSharp/Problems/CBopProblems.f90 | 128 +- CSharp/Problems/CBopProblemsVariables.f90 | 464 +++---- CSharp/Problems/CChokeProblems.f90 | 120 +- CSharp/Problems/CChokeProblemsVariables.f90 | 376 +++--- CSharp/Problems/CDrillStemProblems.f90 | 32 +- .../Problems/CDrillStemProblemsVariables.f90 | 94 +- CSharp/Problems/CGaugesProblems.f90 | 184 +-- CSharp/Problems/CGaugesProblemsVariables.f90 | 655 ++++----- CSharp/Problems/CHoistingProblems.f90 | 24 +- .../Problems/CHoistingProblemsVariables.f90 | 88 +- CSharp/Problems/CKickProblems.f90 | 28 +- CSharp/Problems/CKickProblemsVariables.f90 | 42 +- CSharp/Problems/CLostProblems.f90 | 12 +- CSharp/Problems/CLostProblemsVariables.f90 | 37 +- CSharp/Problems/CMudTreatmentProblems.f90 | 8 +- .../CMudTreatmentProblemsVariables.f90 | 116 +- CSharp/Problems/COtherProblems.f90 | 22 +- CSharp/Problems/COtherProblemsVariables.f90 | 312 ++--- CSharp/Problems/CProblemDifinition.f90 | 136 +- CSharp/Problems/CPumpProblems.f90 | 146 +- CSharp/Problems/CPumpProblemsVariables.f90 | 144 +- CSharp/Problems/CRotaryProblems.f90 | 50 +- CSharp/Problems/CRotaryProblemsVariables.f90 | 60 +- CSharp/Simulation/CSimulation.f90 | 2 +- CSharp/Simulation/CSimulationVariables.f90 | 46 +- CSharp/Simulation/CSounds.f90 | 874 ++++++------ CSounds.f90 | 150 +-- Data Structures.txt | 31 +- Equipments/BopStack/ANNULAR.f90 | 12 +- Equipments/BopStack/AnnularMain.f90 | 93 +- Equipments/BopStack/BlindRamsMain.f90 | 100 +- Equipments/BopStack/BopStackMain.f90 | 1 - Equipments/BopStack/CHOKE_LINE.f90 | 29 +- Equipments/BopStack/ChokeLineMain.f90 | 95 +- Equipments/BopStack/KILL_LINE.f90 | 12 +- Equipments/BopStack/KillLineMain.f90 | 93 +- Equipments/BopStack/LOSS_INPUTS.f90 | 4 +- Equipments/BopStack/PIPE_RAM1.f90 | 22 +- Equipments/BopStack/PIPE_RAM2.f90 | 35 +- Equipments/BopStack/PipeRams1Main.f90 | 91 +- Equipments/BopStack/PipeRams2Main.f90 | 93 +- Equipments/BopStack/SHEAR_RAM.f90 | 544 +++----- Equipments/BopStack/VARIABLES.f90 | 58 +- Equipments/BopStack/bopstackmain.mod | Bin 289 -> 0 bytes .../ChokeControl/AirPump_Choke_Subs.f90 | 14 +- Equipments/ChokeControl/CHOKE.f90 | 70 +- Equipments/ChokeControl/CHOKE_VARIABLES.f90 | 2 +- Equipments/ChokeControl/ChokeControlMain.f90 | 76 +- Equipments/ChokeControl/ChokeStartup.f90 | 8 +- Equipments/Drawworks/DrawworksMain.f90 | 256 ++-- Equipments/Drawworks/Drawworks_INPUTS.f90 | 63 +- Equipments/Drawworks/Drawworks_Solver.f90 | 5 +- .../Drawworks_Solver_FreeTractionMotor.f90 | 5 +- Equipments/MudSystem/Elements_Creation.f90 | 2 +- Equipments/MudSystem/MudSystem.f90 | 1187 ++++++++--------- Equipments/MudSystem/MudSystemMain.f90 | 30 +- Equipments/MudSystem/MudSystem_Variables.f90 | 2 +- Equipments/MudSystem/Pump_and_Trip_In.f90 | 1 + Equipments/MudSystem/Trip_Out_andPump.f90 | 1 + Equipments/Pumps/Pump1_MainSolver.f90 | 2 +- Equipments/Pumps/Pump_OffMode_Solver.f90 | 2 +- Equipments/Pumps/Pump_OnMode_Solver.f90 | 2 +- Equipments/Pumps/PumpsMain.f90 | 80 +- Equipments/Pumps/Pumps_Inputs.f90 | 2 +- Equipments/Pumps/Pumps_Outputs.f90 | 2 +- Equipments/Pumps/Pumps_StartUp.f90 | 2 +- .../RTMalfunction_MotorFailure.f90 | 2 +- Equipments/RotaryTable/RTable_INPUTS.f90 | 5 +- Equipments/RotaryTable/RTable_OffMode.f90 | 2 +- Equipments/RotaryTable/RTable_Solver.f90 | 2 +- .../RotaryTable/RTable_Traction_Motor.f90 | 2 +- Equipments/RotaryTable/RotaryTableMain.f90 | 72 +- Equipments/RotaryTable/Rtable_MainSolver.f90 | 18 +- Equipments/TopDrive/TopDriveMain.f90 | 56 +- Equipments/TopDrive/TopDrive_INPUTS.f90 | 5 +- Equipments/TopDrive/TopDrive_MainSolver.f90 | 117 +- .../TopDrive_Malfunction_MotorFailure.f90 | 2 +- Equipments/TopDrive/TopDrive_OffMode.f90 | 2 +- Equipments/TopDrive/TopDrive_Solver.f90 | 2 +- .../TopDrive/TopDrive_Traction_Motor.f90 | 2 +- FluidFlow/FluidFlowMain.f90 | 46 +- FluidFlow/Well_Pressure_Data_Transfer.f90 | 8 +- Geo/GeoMain.f90 | 308 +---- Rop/JetImpactForce.f90 | 2 +- Rop/ROP_MainCalculation.f90 | 4 +- Rop/RopMain.f90 | 46 +- Rop/sROP_Module.f90 | 2 +- SimulationCore2.vfproj | 123 +- Simulator.f90 | 2 +- .../TD_DrillingSubs/TD_AddComponents.f90 | 19 +- .../TD_DrillStemConfiguration.f90 | 6 +- .../TD_DrillingSubs/TD_RemoveComponents.f90 | 17 +- .../TD_StringConnectionModes.f90 | 16 +- .../TD_Forces/TD_HookLoadCalculation.f90 | 3 +- TorqueDrag/TD_MainCalculations.f90 | 2 +- TorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 | 2 +- TorqueDrag/TD_StartUp/TD_StartUp.f90 | 5 +- TorqueDrag/TorqueDragMain.f90 | 48 +- 161 files changed, 6141 insertions(+), 8235 deletions(-) delete mode 100644 CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CIrIBopLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CLatchLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/COpenKellyCockLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CSlipsNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CSwingLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CTdsIbopLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CTdsPowerLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CTongNotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Notifications/CUnlatchLedNotificationVariables.f90 create mode 100644 CSharp/OperationScenarios/Notifications/NotificationVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CFillupHeadPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CInstallFillupHeadPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CInstallMudBucketPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CIrIbopPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CIrSafetyValvePermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CRemoveMudBucketPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CSwingDrillPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CSwingOffPermissionVariables.f90 delete mode 100644 CSharp/OperationScenarios/Permissions/CSwingTiltPermissionVariables.f90 create mode 100644 CSharp/OperationScenarios/Permissions/PermissionsVariables.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CHookHeight.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CIbopHeight.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CNearFloorConnection.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CSafetyValveHeight.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CSlackOff.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CStandRack.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CStringPressure.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CTdsStemJointHeight.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareInputs/CZeroStringSpeed.f90 create mode 100644 CSharp/OperationScenarios/SoftwareInputsVariables.f90 delete mode 100644 CSharp/OperationScenarios/SoftwareOutputs/CStringUpdate.f90 create mode 100644 CSharp/OperationScenarios/SoftwareOutputsVariables.f90 delete mode 100644 CSharp/OperationScenarios/Test/TestOperationScenarios.f90 delete mode 100644 CSharp/OperationScenarios/Test/TestOperationScenariosVariables.f90 create mode 100644 CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 delete mode 100644 Equipments/BopStack/bopstackmain.mod diff --git a/CSharp/BasicInputs/RigSpecifications/CHoisting.f90 b/CSharp/BasicInputs/RigSpecifications/CHoisting.f90 index e884b2a..71f5eff 100644 --- a/CSharp/BasicInputs/RigSpecifications/CHoisting.f90 +++ b/CSharp/BasicInputs/RigSpecifications/CHoisting.f90 @@ -7,7 +7,7 @@ module CHoisting !DEC$ ATTRIBUTES DLLEXPORT :: SetDriveType !DEC$ ATTRIBUTES ALIAS: 'SetDriveType' :: SetDriveType use CManifolds - use CIrSafetyValveLedNotificationVariables, only: Set_IrSafetyValveLed + use NotificationVariables, only: Set_IrSafetyValveLed implicit none integer, intent(in) :: v Hoisting%DriveType = v diff --git a/CSharp/Equipments/ControlPanels/CHookVariables.f90 b/CSharp/Equipments/ControlPanels/CHookVariables.f90 index ee2e8dc..8b84fc0 100644 --- a/CSharp/Equipments/ControlPanels/CHookVariables.f90 +++ b/CSharp/Equipments/ControlPanels/CHookVariables.f90 @@ -1,6 +1,6 @@ module CHookVariables use CRealEventHandlerCollection - use CHookActions + ! use CHookActions implicit none Type :: HookType real :: HookHeight_S = 0.0 @@ -21,9 +21,9 @@ module CHookVariables #endif Hook%HookHeight = v - if(associated(HookHeightPtr)) then - call HookHeightPtr(Hook%HookHeight) - end if + ! if(associated(HookHeightPtr)) then + ! call HookHeightPtr(Hook%HookHeight) + ! end if #ifdef deb print*, 'HookHeight=', Hook%HookHeight diff --git a/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90 b/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90 index 94bdfb5..9d19344 100644 --- a/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90 +++ b/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90 @@ -64,7 +64,7 @@ module CTopDrivePanel subroutine SetTopDriveTorqueLimitKnob(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetTopDriveTorqueLimitKnob !DEC$ ATTRIBUTES ALIAS: 'SetTopDriveTorqueLimitKnob' :: SetTopDriveTorqueLimitKnob - use CSimulationVariables, only: IsPortable + ! use CSimulationVariables, only: IsPortable use CDrillingConsoleVariables!, only: DrillingConsole%RTSwitch, DrillingConsole%RTTorqueLimitKnob use CWarningsVariables, only: Activate_TopdriveRotaryTableConfilict use CScaleRange @@ -100,7 +100,7 @@ module CTopDrivePanel subroutine SetRpmKnob(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetRpmKnob !DEC$ ATTRIBUTES ALIAS: 'SetRpmKnob' :: SetRpmKnob - use CSimulationVariables, only: IsPortable + ! use CSimulationVariables, only: IsPortable use CDrillingConsoleVariables!, only: DrillingConsole%RTSwitch, DrillingConsole%RTThrottle use CWarningsVariables, only: Activate_TopdriveRotaryTableConfilict use CScaleRange diff --git a/CSharp/Equipments/DrillWatch/CDrillWatch.f90 b/CSharp/Equipments/DrillWatch/CDrillWatch.f90 index d0c17aa..75c1994 100644 --- a/CSharp/Equipments/DrillWatch/CDrillWatch.f90 +++ b/CSharp/Equipments/DrillWatch/CDrillWatch.f90 @@ -1,6 +1,6 @@ module CDrillWatch use CDrillWatchVariables - !use CSimulationVariables + !! use CSimulationVariables implicit none public contains diff --git a/CSharp/Equipments/MudPathFinding/CManifolds.f90 b/CSharp/Equipments/MudPathFinding/CManifolds.f90 index 165cc2a..b4c8068 100644 --- a/CSharp/Equipments/MudPathFinding/CManifolds.f90 +++ b/CSharp/Equipments/MudPathFinding/CManifolds.f90 @@ -38,7 +38,7 @@ module CManifolds contains subroutine PathFinding_Setup() - use CSimulationVariables + ! use CSimulationVariables implicit none Manifold%IsTraverse = .false. call Setup() @@ -46,7 +46,7 @@ module CManifolds !call OnSimulationStop%Add(PathFinding_Init) !call OnPathFindingStep%Add(PathFinding_Step) !call OnPathFindingOutput%Add(PathFinding_Output) - call OnPathFindingMain%Add(PathFindingMainBody) + ! call OnPathFindingMain%Add(PathFindingMainBody) end subroutine subroutine PathFinding_Init @@ -56,25 +56,28 @@ module CManifolds end subroutine PathFinding_Init subroutine PathFinding_Step - implicit none - end subroutine PathFinding_Step - - subroutine PathFinding_Output - implicit none - end subroutine PathFinding_Output - - subroutine PathFindingMainBody - use CSimulationVariables - implicit none - loop : do - if(IsStopped) call Quit() - call sleepqq(50) - if (Manifold%IsPathsDirty) then - Manifold%IsPathsDirty = .false. - call Traverse() - endif - end do loop - end subroutine PathFindingMainBody + if (Manifold%IsPathsDirty) then + Manifold%IsPathsDirty = .false. + call Traverse() + endif +end subroutine PathFinding_Step + + ! subroutine PathFinding_Output + ! implicit none + ! end subroutine PathFinding_Output + + ! subroutine PathFindingMainBody + ! ! use CSimulationVariables + ! implicit none + ! loop : do + ! if(IsStopped) call Quit() + ! call sleepqq(50) + ! if (Manifold%IsPathsDirty) then + ! Manifold%IsPathsDirty = .false. + ! call Traverse() + ! endif + ! end do loop + ! end subroutine PathFindingMainBody subroutine Traverse() use CLog5 diff --git a/CSharp/Equipments/Tanks/CTanks.f90 b/CSharp/Equipments/Tanks/CTanks.f90 index dee8210..a238882 100644 --- a/CSharp/Equipments/Tanks/CTanks.f90 +++ b/CSharp/Equipments/Tanks/CTanks.f90 @@ -1,7 +1,7 @@ module CTanks use CTanksVariables - use CSimulationVariables + ! use CSimulationVariables use CManifolds implicit none public diff --git a/CSharp/OperationScenarios/Common/COperationScenariosMain.f90 b/CSharp/OperationScenarios/Common/COperationScenariosMain.f90 index 04ca396..7ac2c82 100644 --- a/CSharp/OperationScenarios/Common/COperationScenariosMain.f90 +++ b/CSharp/OperationScenarios/Common/COperationScenariosMain.f90 @@ -6,7 +6,7 @@ module COperationScenariosMain contains ! subroutine OperationScenarios_Setup() - ! use CSimulationVariables + ! ! use CSimulationVariables ! implicit none ! call OnSimulationInitialization%Add(OperationScenarios_Init) ! call OnSimulationStop%Add(OperationScenarios_Init) @@ -22,7 +22,7 @@ module COperationScenariosMain ! end subroutine OperationScenarios_Init subroutine OperationScenarios_Step - use CSimulationVariables + ! use CSimulationVariables use CKellyConnectionEnum use CElevatorConnectionEnum use CCloseKellyCockLedNotification @@ -43,14 +43,15 @@ module COperationScenariosMain use CIrSafetyValvePermission use CRemoveFillupHeadPermission use CRemoveMudBucketPermission - use CHookHeight - use CIbopHeight - use CNearFloorConnection - use CSafetyValveHeight - use CSlackOff - use CStandRack - use CStringPressure - use CZeroStringSpeed + use SoftwareInputsVariables + ! use CHookHeight + ! use CIbopHeight + ! use CNearFloorConnection + ! use CSafetyValveHeight + ! use CSlackOff + ! use CStandRack + ! use CStringPressure + ! use CZeroStringSpeed use CUnityInputs, only: & Get_ElevatorConnectionPossible, & Get_JointConnectionPossible, & @@ -68,14 +69,14 @@ module COperationScenariosMain use CSlipsEnum use CSwingEnum use CTongEnum - use CStringUpdate + ! use CStringUpdate use CFlowPipeDisconnectEnum use CFlowKellyDisconnectEnum use CFillupHeadPermission use CSwingDrillPermission use CSwingOffPermission use CSwingTiltPermission - use CTdsStemJointHeight + ! use CTdsStemJointHeight use CTdsConnectionModesEnum use CTdsElevatorModesEnum use CTdsSpineEnum @@ -124,7 +125,7 @@ module COperationScenariosMain call Evaluate_Swing() call Evaluate_Tong() - call Evaluate_StringUpdate() + ! call Evaluate_StringUpdate() call Evaluate_FlowKellyDisconnect() call Evaluate_FlowPipeDisconnect() @@ -171,252 +172,253 @@ module COperationScenariosMain implicit none end subroutine OperationScenarios_Output - subroutine OperationScenariosMainBody - use CSimulationVariables + ! subroutine OperationScenariosMainBody + ! ! use CSimulationVariables + + ! use CKellyConnectionEnum + ! use CElevatorConnectionEnum + + ! use CCloseKellyCockLedNotification + ! use CCloseSafetyValveLedNotification + ! use CFillMouseHoleLedNotification + ! use CIrIBopLedNotification + ! use CIrSafetyValveLedNotification + ! use CLatchLedNotification + ! use COpenKellyCockLedNotification + ! use COpenSafetyValveLedNotification + ! use CSlipsNotification + ! use CSwingLedNotification + ! use CTongNotification + ! use CUnlatchLedNotification + + ! use CInstallFillupHeadPermission + ! use CInstallMudBucketPermission + ! use CIrIbopPermission + ! use CIrSafetyValvePermission + ! use CRemoveFillupHeadPermission + ! use CRemoveMudBucketPermission + + ! ! use CHookHeight + ! ! use CIbopHeight + ! ! use CNearFloorConnection + ! ! use CSafetyValveHeight + ! ! use CSlackOff + ! ! use CStandRack + ! ! use CStringPressure + ! ! use CZeroStringSpeed + + ! use CUnityInputs, only: & + ! Get_ElevatorConnectionPossible, & + ! Get_JointConnectionPossible, & + ! Get_ElevatorPickup, & + ! Get_NearFloorPosition, & + ! Get_SingleSetInMouseHole + + ! use CBucketEnum + ! use CElevatorEnum + ! use CHeadEnum + ! use CIbopEnum + ! use CKellyEnum + ! use CMouseHoleEnum + ! use COperationConditionEnum + ! use CSafetyValveEnum + ! use CSlipsEnum + ! use CSwingEnum + ! use CTongEnum + + ! ! use CStringUpdate + + ! use CFlowPipeDisconnectEnum + ! use CFlowKellyDisconnectEnum + + + ! use CFillupHeadPermission + ! use CSwingDrillPermission + ! use CSwingOffPermission + ! use CSwingTiltPermission + ! ! use CTdsStemJointHeight + ! use CTdsConnectionModesEnum + ! use CTdsElevatorModesEnum + ! use CTdsSpineEnum + ! use CTdsSwingEnum + ! use CTdsTongEnum + ! use CTdsBackupClamp + + ! use CTdsIbopLedNotification + ! use CTdsPowerLedNotification + + ! use CTdsTorqueWrenchLedNotification - use CKellyConnectionEnum - use CElevatorConnectionEnum - - use CCloseKellyCockLedNotification - use CCloseSafetyValveLedNotification - use CFillMouseHoleLedNotification - use CIrIBopLedNotification - use CIrSafetyValveLedNotification - use CLatchLedNotification - use COpenKellyCockLedNotification - use COpenSafetyValveLedNotification - use CSlipsNotification - use CSwingLedNotification - use CTongNotification - use CUnlatchLedNotification - - use CInstallFillupHeadPermission - use CInstallMudBucketPermission - use CIrIbopPermission - use CIrSafetyValvePermission - use CRemoveFillupHeadPermission - use CRemoveMudBucketPermission - - use CHookHeight - use CIbopHeight - use CNearFloorConnection - use CSafetyValveHeight - use CSlackOff - use CStandRack - use CStringPressure - use CZeroStringSpeed - - use CUnityInputs, only: & - Get_ElevatorConnectionPossible, & - Get_JointConnectionPossible, & - Get_ElevatorPickup, & - Get_NearFloorPosition, & - Get_SingleSetInMouseHole - - use CBucketEnum - use CElevatorEnum - use CHeadEnum - use CIbopEnum - use CKellyEnum - use CMouseHoleEnum - use COperationConditionEnum - use CSafetyValveEnum - use CSlipsEnum - use CSwingEnum - use CTongEnum - - use CStringUpdate - - use CFlowPipeDisconnectEnum - use CFlowKellyDisconnectEnum - - - use CFillupHeadPermission - use CSwingDrillPermission - use CSwingOffPermission - use CSwingTiltPermission - use CTdsStemJointHeight - use CTdsConnectionModesEnum - use CTdsElevatorModesEnum - use CTdsSpineEnum - use CTdsSwingEnum - use CTdsTongEnum - use CTdsBackupClamp - - use CTdsIbopLedNotification - use CTdsPowerLedNotification - - use CTdsTorqueWrenchLedNotification - - implicit none - loop1: do - call Evaluate_KellyConnection() - call Evaluate_ElevatorConnection() - - call Evaluate_CloseKellyCockLed() - call Evaluate_CloseSafetyValveLed() - call Evaluate_FillMouseHoleLed() - call Evaluate_IrIBopLed() - call Evaluate_IrSafetyValveLed() - call Evaluate_LatchLed() - call Evaluate_OpenKellyCockLed() - call Evaluate_OpenSafetyValveLed() - call Evaluate_SlipsNotification() - call Evaluate_SwingLed() - call Evaluate_TongNotification() - call Evaluate_UnlatchLed() - - call Evaluate_InstallFillupHeadPermission() - call Evaluate_InstallMudBucketPermission() - call Evaluate_IrIbopPermission() - call Evaluate_IrSafetyValvePermission() - call Evaluate_RemoveFillupHeadPermission() - call Evaluate_RemoveMudBucketPermission() - - call Evaluate_MudBucket() - call Evaluate_Elevator() - call Evaluate_FillupHead() - call Evaluate_Ibop() - call Evaluate_Kelly() - call Evaluate_MouseHole() - call Evaluate_MouseHole() - call Evaluate_OperationCondition() - call Evaluate_SafetyValve() - call Evaluate_Slips() - call Evaluate_Swing() - call Evaluate_Tong() - - call Evaluate_StringUpdate() - - call Evaluate_FlowKellyDisconnect() - call Evaluate_FlowPipeDisconnect() - - !if(Get_FillMouseHoleLed()) then - ! call Set_MouseHole(MOUSE_HOLE_FILL) - !else - ! if((Get_KellyConnection() == KELLY_CONNECTION_SINGLE .or.& - ! Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) .and.& - ! Get_HookHeight() >= 95.0 ) then - ! call Set_MouseHole(MOUSE_HOLE_NEUTRAL) - ! else - ! call Set_MouseHole(MOUSE_HOLE_EMPTY) - ! endif - !endif - - - - - - - - - !topdrive - call Evaluate_TdsElevatorModes() - call Evaluate_TdsConnectionModes() - call Evaluate_SwingTiltPermission() - call Evaluate_SwingOffPermission() - call Evaluate_SwingDrillPermission() - call Evaluate_FillupHeadPermission() - call Evaluate_TdsTong() - call Evaluate_TdsBackupClamp() - call Evaluate_TdsSwing() - call Evaluate_TdsSpine() - - call Evaluate_PowerLed() - call Evaluate_IbopLed() + ! implicit none + ! loop1: do + ! call Evaluate_KellyConnection() + ! call Evaluate_ElevatorConnection() + + ! call Evaluate_CloseKellyCockLed() + ! call Evaluate_CloseSafetyValveLed() + ! call Evaluate_FillMouseHoleLed() + ! call Evaluate_IrIBopLed() + ! call Evaluate_IrSafetyValveLed() + ! call Evaluate_LatchLed() + ! call Evaluate_OpenKellyCockLed() + ! call Evaluate_OpenSafetyValveLed() + ! call Evaluate_SlipsNotification() + ! call Evaluate_SwingLed() + ! call Evaluate_TongNotification() + ! call Evaluate_UnlatchLed() + + ! call Evaluate_InstallFillupHeadPermission() + ! call Evaluate_InstallMudBucketPermission() + ! call Evaluate_IrIbopPermission() + ! call Evaluate_IrSafetyValvePermission() + ! call Evaluate_RemoveFillupHeadPermission() + ! call Evaluate_RemoveMudBucketPermission() + + ! call Evaluate_MudBucket() + ! call Evaluate_Elevator() + ! call Evaluate_FillupHead() + ! call Evaluate_Ibop() + ! call Evaluate_Kelly() + ! call Evaluate_MouseHole() + ! call Evaluate_MouseHole() + ! call Evaluate_OperationCondition() + ! call Evaluate_SafetyValve() + ! call Evaluate_Slips() + ! call Evaluate_Swing() + ! call Evaluate_Tong() + + ! ! call Evaluate_StringUpdate() + + ! call Evaluate_FlowKellyDisconnect() + ! call Evaluate_FlowPipeDisconnect() + + ! !if(Get_FillMouseHoleLed()) then + ! ! call Set_MouseHole(MOUSE_HOLE_FILL) + ! !else + ! ! if((Get_KellyConnection() == KELLY_CONNECTION_SINGLE .or.& + ! ! Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) .and.& + ! ! Get_HookHeight() >= 95.0 ) then + ! ! call Set_MouseHole(MOUSE_HOLE_NEUTRAL) + ! ! else + ! ! call Set_MouseHole(MOUSE_HOLE_EMPTY) + ! ! endif + ! !endif + + + + + + + + + ! !topdrive + ! call Evaluate_TdsElevatorModes() + ! call Evaluate_TdsConnectionModes() + ! call Evaluate_SwingTiltPermission() + ! call Evaluate_SwingOffPermission() + ! call Evaluate_SwingDrillPermission() + ! call Evaluate_FillupHeadPermission() + ! call Evaluate_TdsTong() + ! call Evaluate_TdsBackupClamp() + ! call Evaluate_TdsSwing() + ! call Evaluate_TdsSpine() + + ! call Evaluate_PowerLed() + ! call Evaluate_IbopLed() - call Evaluate_TorqueWrenchLed() + ! call Evaluate_TorqueWrenchLed() - !if (IsStopped==.true.) exit loop1 - if(IsStopped) call Quit() - call sleepqq(100) - enddo loop1 - end subroutine OperationScenariosMainBody + ! !if (IsStopped==.true.) exit loop1 + ! if(IsStopped) call Quit() + ! call sleepqq(100) + ! enddo loop1 + ! end subroutine OperationScenariosMainBody - subroutine SubscribeUpdateUnity(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpdateUnity - !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpdateUnity' :: SubscribeUpdateUnity - implicit none - procedure (ActionVoid) :: a - UpdateUnityPtr => a - end subroutine + ! subroutine SubscribeUpdateUnity(a) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpdateUnity + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpdateUnity' :: SubscribeUpdateUnity + ! implicit none + ! procedure (ActionVoid) :: a + ! UpdateUnityPtr => a + ! end subroutine subroutine UpdateUnity() implicit none if(associated(UpdateUnityPtr)) call UpdateUnityPtr() end subroutine - subroutine PreProcessingSnapshot - !DEC$ ATTRIBUTES DLLEXPORT :: PreProcessingSnapshot - !DEC$ ATTRIBUTES ALIAS: 'PreProcessingSnapshot' :: PreProcessingSnapshot - use CSwingEnumVariables - use CSlipsEnumVariables - use CHookVariables - use CTongEnumVariables - use CHoistingVariables - use CKellyConnectionEnumVariables - use COperationScenariosVariables - ! use CElevatorConnectionEnumVariables - use COperationConditionEnumVariables - use CMouseHoleEnumVariables - implicit none + ! subroutine PreProcessingSnapshot + ! !DEC$ ATTRIBUTES DLLEXPORT :: PreProcessingSnapshot + ! !DEC$ ATTRIBUTES ALIAS: 'PreProcessingSnapshot' :: PreProcessingSnapshot + ! use CSwingEnumVariables + ! use CSlipsEnumVariables + ! use CHookVariables + ! use CTongEnumVariables + ! use CHoistingVariables + ! use CKellyConnectionEnumVariables + ! use COperationScenariosVariables + ! ! use CElevatorConnectionEnumVariables + ! use COperationConditionEnumVariables + ! use CMouseHoleEnumVariables + ! implicit none - if(Hoisting%DriveType == Kelly_DriveType) then ! kelly mode + ! if(Hoisting%DriveType == Kelly_DriveType) then ! kelly mode - if(Get_OperationCondition() == OPERATION_DRILL) then + ! if(Get_OperationCondition() == OPERATION_DRILL) then - if(Get_KellyConnection() == KELLY_CONNECTION_NOTHING) then - call Kelly_ConnectionNothing() + ! if(Get_KellyConnection() == KELLY_CONNECTION_NOTHING) then + ! call Kelly_ConnectionNothing() - elseif (Get_KellyConnection() == KELLY_CONNECTION_STRING) then - call Kelly_ConnectionString() + ! elseif (Get_KellyConnection() == KELLY_CONNECTION_STRING) then + ! call Kelly_ConnectionString() - elseif (Get_KellyConnection() == KELLY_CONNECTION_SINGLE) then - call Kelly_ConnectionSingle() + ! elseif (Get_KellyConnection() == KELLY_CONNECTION_SINGLE) then + ! call Kelly_ConnectionSingle() - endif + ! endif - elseif (Get_OperationCondition() == OPERATION_TRIP) then + ! elseif (Get_OperationCondition() == OPERATION_TRIP) then - if(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING) then - call Elevator_ConnectionNothing() + ! if(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING) then + ! call Elevator_ConnectionNothing() - elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING) then - call Elevator_ConnectionString() + ! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING) then + ! call Elevator_ConnectionString() - elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND) then - call Elevator_ConnectionStand() + ! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND) then + ! call Elevator_ConnectionStand() - elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) then - call Elevator_ConnectionSingle() + ! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) then + ! call Elevator_ConnectionSingle() - endif + ! endif - endif + ! endif - else ! Topdrive mode - ! - endif + ! else ! Topdrive mode + ! ! + ! endif - ! final adjustments - call Update_MouseHole_From_Snapshot() + ! ! final adjustments + ! call Update_MouseHole_From_Snapshot() - end subroutine PreProcessingSnapshot + ! end subroutine PreProcessingSnapshot subroutine Kelly_ConnectionNothing - use CSwingEnumVariables - use CSlipsEnumVariables + ! use CSwingEnumVariables + ! use CSlipsEnumVariables + use UnitySignalVariables use CHookVariables implicit none @@ -433,14 +435,14 @@ module COperationScenariosMain !TODO: possibly goto a position to activate swing ! goto preferred swing position - if(Swing_S == SWING_MOUSE_HOLE_END) then + if(UnitySignals%Swing_S == SWING_MOUSE_HOLE_END) then call Set_Swing(SWING_MOUSE_HOLE_BEGIN) call UpdateUnity() loop2: do if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2 call sleepqq(100) enddo loop2 - elseif (Swing_S == SWING_RAT_HOLE_END) then + elseif (UnitySignals%Swing_S == SWING_RAT_HOLE_END) then call Set_Swing(SWING_RAT_HOLE_BEGIN) call UpdateUnity() loop3: do @@ -468,10 +470,11 @@ module COperationScenariosMain subroutine Kelly_ConnectionString - use CSwingEnumVariables - use CSlipsEnumVariables + ! use CSwingEnumVariables + ! use CSlipsEnumVariables + use UnitySignalVariables use CHookVariables - use CTongEnumVariables + ! use CTongEnumVariables implicit none call Set_HookHeight(75.0) @@ -512,7 +515,7 @@ module COperationScenariosMain ! put slips to saved position - if(Slips_S == SLIPS_SET_END) then + if(UnitySignals%Slips_S == SLIPS_SET_END) then call Set_Slips(SLIPS_SET_BEGIN) call UpdateUnity() @@ -530,9 +533,10 @@ module COperationScenariosMain subroutine Kelly_ConnectionSingle - use CSwingEnumVariables - use CSlipsEnumVariables - use CTongEnumVariables + ! use CSwingEnumVariables + ! use CSlipsEnumVariables + ! use CTongEnumVariables + use UnitySignalVariables use CHookVariables implicit none @@ -577,7 +581,7 @@ module COperationScenariosMain - if (Swing_S == SWING_WELL_END) then ! already in mouse hole + if (UnitySignals%Swing_S == SWING_WELL_END) then ! already in mouse hole ! goto swing location call Set_HookHeight_S(98.0) @@ -607,10 +611,11 @@ module COperationScenariosMain subroutine Elevator_ConnectionNothing - use CSwingEnumVariables - use CSlipsEnumVariables + ! use CSwingEnumVariables + ! use CSlipsEnumVariables + use UnitySignalVariables use CHookVariables - use CKellyEnumVariables + ! use CKellyEnumVariables implicit none call Set_HookHeight(75.0) @@ -651,21 +656,21 @@ module COperationScenariosMain ! goto preferred swing position - if(Swing_S == SWING_MOUSE_HOLE_END) then + if(UnitySignals%Swing_S == SWING_MOUSE_HOLE_END) then call Set_Swing(SWING_MOUSE_HOLE_BEGIN) call UpdateUnity() loop4: do if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop4 call sleepqq(100) enddo loop4 - elseif (Swing_S == SWING_RAT_HOLE_END) then + elseif (UnitySignals%Swing_S == SWING_RAT_HOLE_END) then call Set_Swing(SWING_RAT_HOLE_BEGIN) call UpdateUnity() loop5: do if(Get_Swing() == SWING_RAT_HOLE_END) exit loop5 call sleepqq(100) enddo loop5 - elseif (Swing_S == SWING_WELL_END) then + elseif (UnitySignals%Swing_S == SWING_WELL_END) then call Set_Swing(SWING_WELL_BEGIN) call UpdateUnity() loop6: do diff --git a/CSharp/OperationScenarios/Common/COperationScenariosSettings.f90 b/CSharp/OperationScenarios/Common/COperationScenariosSettings.f90 index 53e485b..3eda2f4 100644 --- a/CSharp/OperationScenarios/Common/COperationScenariosSettings.f90 +++ b/CSharp/OperationScenarios/Common/COperationScenariosSettings.f90 @@ -4,7 +4,7 @@ module COperationScenariosSettings contains !subroutine Initialization() - ! use CSimulationVariables + ! ! use CSimulationVariables ! use CUnityOutputs, only: SetupUnityOutputs => Setup ! ! use CBucketEnum diff --git a/CSharp/OperationScenarios/Common/COperationScenariosVariables.f90 b/CSharp/OperationScenarios/Common/COperationScenariosVariables.f90 index c2c219c..37cb3ad 100644 --- a/CSharp/OperationScenarios/Common/COperationScenariosVariables.f90 +++ b/CSharp/OperationScenarios/Common/COperationScenariosVariables.f90 @@ -3,36 +3,39 @@ module COperationScenariosVariables use CKellyConnectionEnumVariables use CElevatorConnectionEnumVariables - use CCloseKellyCockLedNotificationVariables - use CCloseSafetyValveLedNotificationVariables - use CFillMouseHoleLedNotificationVariables - use CIrIBopLedNotificationVariables - use CIrSafetyValveLedNotificationVariables - use CLatchLedNotificationVariables - use COpenKellyCockLedNotificationVariables - use COpenSafetyValveLedNotificationVariables - use CSlipsNotificationVariables - use CSwingLedNotificationVariables - use CTongNotificationVariables - use CUnlatchLedNotificationVariables - - use CInstallFillupHeadPermissionVariables - use CInstallMudBucketPermissionVariables - use CIrIbopPermissionVariables - use CIrSafetyValvePermissionVariables - use CRemoveFillupHeadPermissionVariables - use CRemoveMudBucketPermissionVariables + use NotificationVariables + ! use CCloseKellyCockLedNotificationVariables + ! use CCloseSafetyValveLedNotificationVariables + ! use CFillMouseHoleLedNotificationVariables + ! use CIrIBopLedNotificationVariables + ! use CIrSafetyValveLedNotificationVariables + ! use CLatchLedNotificationVariables + ! use COpenKellyCockLedNotificationVariables + ! use COpenSafetyValveLedNotificationVariables + ! use CSlipsNotificationVariables + ! use CSwingLedNotificationVariables + ! use CTongNotificationVariables + ! use CUnlatchLedNotificationVariables + + use PermissionsVariables + ! use CInstallFillupHeadPermissionVariables + ! use CInstallMudBucketPermissionVariables + ! use CIrIbopPermissionVariables + ! use CIrSafetyValvePermissionVariables + ! use CRemoveFillupHeadPermissionVariables + ! use CRemoveMudBucketPermissionVariables - use CHookHeight - use CIbopHeight - use CNearFloorConnection - use CSafetyValveHeight - use CSlackOff - use CStandRack - use CStringPressure - use CZeroStringSpeed + use SoftwareInputsVariables + !use CHookHeight + !use CIbopHeight + !use CNearFloorConnection + !use CSafetyValveHeight + !use CSlackOff + !use CStandRack + !use CStringPressure + !use CZeroStringSpeed - use CStringUpdateVariables + ! use CStringUpdateVariables use CUnityInputs !, only: Get_OutOfMouseHole,& @@ -49,38 +52,40 @@ module COperationScenariosVariables ! Get_SingleSetInMouseHole,& ! Get_SwingCenter use CUnityOutputs, only: GetRotaryRpm - - use CBucketEnumVariables - use CElevatorEnumVariables - use CHeadEnumVariables - use CIbopEnumVariables - use CKellyEnumVariables - use CMouseHoleEnumVariables - use COperationConditionEnumVariables - use CSafetyValveEnumVariables - use CSlipsEnumVariables - use CSwingEnumVariables - use CTongEnumVariables + use UnitySignalVariables + ! use CBucketEnumVariables + ! use CElevatorEnumVariables + ! use CHeadEnumVariables + ! use CIbopEnumVariables + ! use CKellyEnumVariables + ! use CMouseHoleEnumVariables + ! use COperationConditionEnumVariables + ! use CSafetyValveEnumVariables + ! use CSlipsEnumVariables + ! use CSwingEnumVariables + ! use CTongEnumVariables - use CFillupHeadPermissionVariables - use CSwingDrillPermissionVariables - use CSwingOffPermissionVariables - use CSwingTiltPermissionVariables - use CTdsStemJointHeight + use PermissionsVariables + ! use CFillupHeadPermissionVariables + ! use CSwingDrillPermissionVariables + ! use CSwingOffPermissionVariables + ! use CSwingTiltPermissionVariables + ! use CTdsStemJointHeight use CTdsConnectionModesEnumVariables use CTdsElevatorModesEnumVariables - use CTdsSpineEnumVariables - use CTdsSwingEnumVariables - use CTdsTongEnumVariables - use CTdsBackupClampVariables + ! use CTdsSpineEnumVariables + ! use CTdsSwingEnumVariables + ! use CTdsTongEnumVariables + ! use CTdsBackupClampVariables use CHoistingVariables use CTopDrivePanelVariables - use CTdsPowerLedNotificationVariables - use CTdsIbopLedNotificationVariables + ! use CTdsPowerLedNotificationVariables + ! use CTdsIbopLedNotificationVariables + use NotificationVariables - use CTdsTorqueWrenchLedNotificationVariables + ! use CTdsTorqueWrenchLedNotificationVariables implicit none public @@ -99,14 +104,40 @@ module COperationScenariosVariables integer :: ElevatorConnection = 0 type(VoidEventHandlerCollection) :: OnElevatorConnectionChange - !moved from enum/CKellyConnectionEnum + !moved from SoftwareOutputs/CStringUpdateVariables + integer :: StringUpdate = 0 + type(IntegerEventHandlerCollection) :: OnStringUpdateChange + end type OperationScenarioType + type(OperationScenarioType)::OperationScenario + enum, bind(c) + enumerator STRING_UPDATE_NEUTRAL + enumerator STRING_UPDATE_ADD_SINGLE + enumerator STRING_UPDATE_ADD_STAND + enumerator STRING_UPDATE_REMOVE_SINGLE + enumerator STRING_UPDATE_REMOVE_STAND + end enum contains + subroutine Set_StringUpdate(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(OperationScenario%StringUpdate == v) return + #endif + OperationScenario%StringUpdate = v + call OperationScenario%OnStringUpdateChange%RunAll(v) + end subroutine + + integer function Get_StringUpdate() + implicit none + Get_StringUpdate = OperationScenario%StringUpdate + end function + real(8) function TJH() use TD_DrillStemComponents implicit none diff --git a/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotificationVariables.f90 deleted file mode 100644 index 4e957c1..0000000 --- a/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotificationVariables.f90 +++ /dev/null @@ -1,67 +0,0 @@ -module CCloseKellyCockLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: CloseKellyCockLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnCloseKellyCockLedChange - - private :: CloseKellyCockLed - - contains - - subroutine Set_CloseKellyCockLed(v) - use CDrillingConsoleVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed - use CManifolds, only: CloseKellyCock - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(CloseKellyCockLed == v) return -#endif - CloseKellyCockLed = v - - if(CloseKellyCockLed) then - call CloseKellyCock() - endif - - !if(CloseKellyCockLed) then - ! CloseKellyCockLedHw = 1 - !else - ! CloseKellyCockLedHw = 0 - !endif - call OnCloseKellyCockLedChange%RunAll() - end subroutine - - logical function Get_CloseKellyCockLed() - implicit none - Get_CloseKellyCockLed = CloseKellyCockLed - end function - - - - - - - - - - - - subroutine Set_CloseKellyCockLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_CloseKellyCockLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_CloseKellyCockLed_WN' :: Set_CloseKellyCockLed_WN - implicit none - logical , intent(in) :: v - call Set_CloseKellyCockLed(v) - end subroutine - - - logical function Get_CloseKellyCockLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_CloseKellyCockLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_CloseKellyCockLed_WN' :: Get_CloseKellyCockLed_WN - implicit none - Get_CloseKellyCockLed_WN = CloseKellyCockLed - end function - -end module CCloseKellyCockLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 b/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 index fa9be32..8055d5e 100644 --- a/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 @@ -41,11 +41,11 @@ module CCloseSafetyValveLedNotification implicit none integer , intent(in) :: v #ifdef ExcludeExtraChanges - if(operation_CloseSafetyValveLed == v) return + if(Notifications%operation_CloseSafetyValveLed == v) return #endif - operation_CloseSafetyValveLed = v + Notifications%operation_CloseSafetyValveLed = v #ifdef deb - print*, 'operation_CloseSafetyValveLed=', operation_CloseSafetyValveLed + print*, 'operation_CloseSafetyValveLed=', Notifications%operation_CloseSafetyValveLed #endif end subroutine diff --git a/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotificationVariables.f90 deleted file mode 100644 index 83ba6a9..0000000 --- a/CSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotificationVariables.f90 +++ /dev/null @@ -1,67 +0,0 @@ -module CCloseSafetyValveLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: CloseSafetyValveLed = .false. - integer :: operation_CloseSafetyValveLed = 0 - - public - type(VoidEventHandlerCollection) :: OnCloseSafetyValveLedChange - - private :: CloseSafetyValveLed - - contains - - subroutine Set_CloseSafetyValveLed(v) - ! use CDrillingConsoleVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed - use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode - use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(CloseSafetyValveLed == v) return -#endif - CloseSafetyValveLed = v - - if(CloseSafetyValveLed) then - !!call CloseSafetyValve() - if(Hoisting%DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_CloseSafetyValveLed == 1) call CloseSafetyValve_TripMode() - endif - - !if(CloseSafetyValveLed) then - ! CloseSafetyValveLedHw = 1 - !else - ! CloseSafetyValveLedHw = 0 - !endif - call OnCloseSafetyValveLedChange%RunAll() - end subroutine - - logical function Get_CloseSafetyValveLed() - implicit none - Get_CloseSafetyValveLed = CloseSafetyValveLed - end function - - - - - - - subroutine Set_CloseSafetyValveLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_CloseSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_CloseSafetyValveLed_WN' :: Set_CloseSafetyValveLed_WN - implicit none - logical , intent(in) :: v - call Set_CloseSafetyValveLed(v) - end subroutine - - logical function Get_CloseSafetyValveLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_CloseSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_CloseSafetyValveLed_WN' :: Get_CloseSafetyValveLed_WN - implicit none - Get_CloseSafetyValveLed_WN = CloseSafetyValveLed - end function - - - -end module CCloseSafetyValveLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotificationVariables.f90 deleted file mode 100644 index c503b82..0000000 --- a/CSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotificationVariables.f90 +++ /dev/null @@ -1,61 +0,0 @@ -module CFillMouseHoleLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: FillMouseHoleLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnFillMouseHoleLedChange - - private :: FillMouseHoleLed - - contains - - subroutine Set_FillMouseHoleLed(v) - use CDrillingConsoleVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed - use CMouseHoleEnumVariables - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(FillMouseHoleLed == v) return -#endif - FillMouseHoleLed = v - if(FillMouseHoleLed) then - DrillingConsole%FillMouseHoleLed = 1 - !call Set_MouseHole(MOUSE_HOLE_FILL) - else - DrillingConsole%FillMouseHoleLed = 0 - !call Set_MouseHole(MOUSE_HOLE_EMPTY) - endif - call OnFillMouseHoleLedChange%RunAll() - end subroutine - - logical function Get_FillMouseHoleLed() - implicit none - Get_FillMouseHoleLed = FillMouseHoleLed - end function - - - - - - - subroutine Set_FillMouseHoleLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_FillMouseHoleLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_FillMouseHoleLed_WN' :: Set_FillMouseHoleLed_WN - implicit none - logical , intent(in) :: v - call Set_FillMouseHoleLed(v) - end subroutine - - - logical function Get_FillMouseHoleLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_FillMouseHoleLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_FillMouseHoleLed_WN' :: Get_FillMouseHoleLed_WN - implicit none - Get_FillMouseHoleLed_WN = FillMouseHoleLed - end function - - - -end module CFillMouseHoleLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CIrIBopLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CIrIBopLedNotificationVariables.f90 deleted file mode 100644 index d4bf146..0000000 --- a/CSharp/OperationScenarios/Notifications/CIrIBopLedNotificationVariables.f90 +++ /dev/null @@ -1,63 +0,0 @@ -module CIrIBopLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: IrIBopLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnIrIBopLedChange - - private :: IrIBopLed - - contains - - subroutine Set_IrIBopLed(v) - use CDrillingConsoleVariables!, only: IRIBopLedHw => IRIBopLed - use CManifolds, only: InstallIBop, RemoveIBop - use CIbopEnumVariables, only: Set_Ibop_Install, Set_Ibop_Remove - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IrIBopLed == v) return -#endif - IrIBopLed = v - if(IrIBopLed) then - DrillingConsole%IRIBopLed = 1 - call InstallIBop() - call Set_Ibop_Install() - else - DrillingConsole%IRIBopLed = 0 - call RemoveIBop() - call Set_Ibop_Remove() - endif - call OnIrIBopLedChange%RunAll() - end subroutine - - logical function Get_IrIBopLed() - implicit none - Get_IrIBopLed = IrIBopLed - end function - - - - - - subroutine Set_IrIBopLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IrIBopLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IrIBopLed_WN' :: Set_IrIBopLed_WN - implicit none - logical , intent(in) :: v - call Set_IrIBopLed(v) - end subroutine - - - logical function Get_IrIBopLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IrIBopLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IrIBopLed_WN' :: Get_IrIBopLed_WN - implicit none - Get_IrIBopLed_WN = IrIBopLed - end function - - - -end module CIrIBopLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 b/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 index e5d03d5..9e713a8 100644 --- a/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 @@ -73,11 +73,11 @@ module CIrSafetyValveLedNotification implicit none integer , intent(in) :: v #ifdef ExcludeExtraChanges - if(operation_IrSafetyValveLed == v) return + if(Notifications%operation_IrSafetyValveLed == v) return #endif - operation_IrSafetyValveLed = v + Notifications%operation_IrSafetyValveLed = v #ifdef deb - print*, 'operation_IrSafetyValveLed=', operation_IrSafetyValveLed + print*, 'operation_IrSafetyValveLed=', Notifications%operation_IrSafetyValveLed #endif end subroutine diff --git a/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotificationVariables.f90 deleted file mode 100644 index 62f08ea..0000000 --- a/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotificationVariables.f90 +++ /dev/null @@ -1,90 +0,0 @@ -module CIrSafetyValveLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: IrSafetyValveLed = .false. - integer :: operation_IrSafetyValveLed = 0 - - public - - type(VoidEventHandlerCollection) :: OnIrSafetyValveLedChange - - private :: IrSafetyValveLed - contains - - subroutine Set_IrSafetyValveLed(v) - use CDrillingConsoleVariables!, only: DrillingConsole%CloseKellyCockLed => IRSafetyValveLed - use CManifolds, only: & - InstallSafetyValve_TopDrive, & - InstallSafetyValve_KellyMode, & - InstallSafetyValve_TripMode, & - RemoveSafetyValve_TopDrive, & - RemoveSafetyValve_KellyMode, & - RemoveSafetyValve_TripMode - use CSafetyValveEnumVariables, only: Set_SafetyValve_Install, Set_SafetyValve_Remove - use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IrSafetyValveLed == v) return -#endif - IrSafetyValveLed = v - - if(IrSafetyValveLed) then - DrillingConsole%IRSafetyValveLed = 1 - - if(Hoisting%DriveType == TopDrive_DriveType) call InstallSafetyValve_TopDrive() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_IrSafetyValveLed == 0) call InstallSafetyValve_KellyMode() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_IrSafetyValveLed == 1) call InstallSafetyValve_TripMode() - - call Set_SafetyValve_Install() - else - DrillingConsole%IRSafetyValveLed = 0 - - if(Hoisting%DriveType == TopDrive_DriveType) call RemoveSafetyValve_TopDrive() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_IrSafetyValveLed == 0) call RemoveSafetyValve_KellyMode() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_IrSafetyValveLed == 1) call RemoveSafetyValve_TripMode() - - call Set_SafetyValve_Remove() - endif - - call OnIrSafetyValveLedChange%RunAll() - end subroutine - - logical function Get_IrSafetyValveLed() - implicit none - Get_IrSafetyValveLed = IrSafetyValveLed - end function - - - - - - subroutine Set_IrSafetyValveLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IrSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IrSafetyValveLed_WN' :: Set_IrSafetyValveLed_WN - implicit none - logical , intent(in) :: v - call Set_IrSafetyValveLed(v) - end subroutine - - - logical function Get_IrSafetyValveLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IrSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IrSafetyValveLed_WN' :: Get_IrSafetyValveLed_WN - implicit none - Get_IrSafetyValveLed_WN = IrSafetyValveLed - end function - - - subroutine Set_IrSafetyValveLed_off() - implicit none - call Set_IrSafetyValveLed(.false.) - end subroutine - - subroutine Set_IrSafetyValveLed_on() - implicit none - call Set_IrSafetyValveLed(.true.) - end subroutine - - -end module CIrSafetyValveLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CLatchLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CLatchLedNotificationVariables.f90 deleted file mode 100644 index eff29b4..0000000 --- a/CSharp/OperationScenarios/Notifications/CLatchLedNotificationVariables.f90 +++ /dev/null @@ -1,58 +0,0 @@ -module CLatchLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: LatchLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnLatchLedChange - - private :: LatchLed - - contains - - subroutine Set_LatchLed(v) - use CDrillingConsoleVariables!, only: DrillingConsole%LatchPipeLED - !use CUnlatchLedNotification - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(LatchLed == v) return -#endif - LatchLed = v - if(LatchLed) then - DrillingConsole%LatchPipeLED = 1 - !call Set_UnlatchLed(.false.) - else - DrillingConsole%LatchPipeLED = 0 - endif - call OnLatchLedChange%RunAll() - end subroutine - - logical function Get_LatchLed() - implicit none - Get_LatchLed = LatchLed - end function - - - - - - - - subroutine Set_LatchLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_LatchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_LatchLed_WN' :: Set_LatchLed_WN - implicit none - logical , intent(in) :: v - call Set_LatchLed(v) - end subroutine - - logical function Get_LatchLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_LatchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_LatchLed_WN' :: Get_LatchLed_WN - implicit none - Get_LatchLed_WN = LatchLed - end function - -end module CLatchLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/COpenKellyCockLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/COpenKellyCockLedNotificationVariables.f90 deleted file mode 100644 index 282db3a..0000000 --- a/CSharp/OperationScenarios/Notifications/COpenKellyCockLedNotificationVariables.f90 +++ /dev/null @@ -1,63 +0,0 @@ -module COpenKellyCockLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: OpenKellyCockLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnOpenKellyCockLedChange - - private :: OpenKellyCockLed - - contains - - subroutine Set_OpenKellyCockLed(v) - ! use CDrillingConsoleVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed - use CManifolds, only: OpenKellyCock - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(OpenKellyCockLed == v) return -#endif - OpenKellyCockLed = v - - if(OpenKellyCockLed) then - call OpenKellyCock() - endif - - ! HAS BEEN IMPLEMENTED IN CMANIFOLD - - !if(OpenKellyCockLed) then - ! OpenKellyCockLedHw = 1 - !else - ! OpenKellyCockLedHw = 0 - !endif - - call OnOpenKellyCockLedChange%RunAll() - end subroutine - - logical function Get_OpenKellyCockLed() - implicit none - Get_OpenKellyCockLed = OpenKellyCockLed - end function - - - - - - subroutine Set_OpenKellyCockLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_OpenKellyCockLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_OpenKellyCockLed_WN' :: Set_OpenKellyCockLed_WN - implicit none - logical , intent(in) :: v - call Set_OpenKellyCockLed(v) - end subroutine - - logical function Get_OpenKellyCockLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_OpenKellyCockLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_OpenKellyCockLed_WN' :: Get_OpenKellyCockLed_WN - implicit none - Get_OpenKellyCockLed_WN = OpenKellyCockLed - end function - -end module COpenKellyCockLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 b/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 index 0c3c06c..8d53d1f 100644 --- a/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 @@ -43,11 +43,11 @@ module COpenSafetyValveLedNotification implicit none integer , intent(in) :: v #ifdef ExcludeExtraChanges - if(operation_OpenSafetyValveLed == v) return + if(notifications%operation_OpenSafetyValveLed == v) return #endif - operation_OpenSafetyValveLed = v + notifications%operation_OpenSafetyValveLed = v #ifdef deb - print*, 'operation_OpenSafetyValveLed=', operation_OpenSafetyValveLed + print*, 'notifications%operation_OpenSafetyValveLed=', notifications%operation_OpenSafetyValveLed #endif end subroutine diff --git a/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotificationVariables.f90 deleted file mode 100644 index 03ba175..0000000 --- a/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotificationVariables.f90 +++ /dev/null @@ -1,65 +0,0 @@ -module COpenSafetyValveLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: OpenSafetyValveLed = .false. - integer :: operation_OpenSafetyValveLed = 0 - - public - type(VoidEventHandlerCollection) :: OnOpenSafetyValveLedChange - - private :: OpenSafetyValveLed - - contains - - subroutine Set_OpenSafetyValveLed(v) - use CDrillingConsoleVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed - use CManifolds, only: OpenSafetyValve_TopDrive, OpenSafetyValve_KellyMode, OpenSafetyValve_TripMode - use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(OpenSafetyValveLed == v) return -#endif - OpenSafetyValveLed = v - - if(OpenSafetyValveLed) then - !!call OpenSafetyValve() - if(Hoisting%DriveType == TopDrive_DriveType) call OpenSafetyValve_TopDrive() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_OpenSafetyValveLed == 0) call OpenSafetyValve_KellyMode() - if(Hoisting%DriveType == Kelly_DriveType .and. operation_OpenSafetyValveLed == 1) call OpenSafetyValve_TripMode() - endif - - !if(OpenSafetyValveLed) then - ! OpenSafetyValveLedHw = 1 - !else - ! OpenSafetyValveLedHw = 0 - !endif - - call OnOpenSafetyValveLedChange%RunAll() - end subroutine - - logical function Get_OpenSafetyValveLed() - implicit none - Get_OpenSafetyValveLed = OpenSafetyValveLed - end function - - - - subroutine Set_OpenSafetyValveLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_OpenSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_OpenSafetyValveLed_WN' :: Set_OpenSafetyValveLed_WN - implicit none - logical , intent(in) :: v - call Set_OpenSafetyValveLed(v) - end subroutine - - logical function Get_OpenSafetyValveLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_OpenSafetyValveLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_OpenSafetyValveLed_WN' :: Get_OpenSafetyValveLed_WN - implicit none - Get_OpenSafetyValveLed_WN = OpenSafetyValveLed - end function - - - -end module COpenSafetyValveLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CSlipsNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CSlipsNotificationVariables.f90 deleted file mode 100644 index c042d95..0000000 --- a/CSharp/OperationScenarios/Notifications/CSlipsNotificationVariables.f90 +++ /dev/null @@ -1,65 +0,0 @@ -module CSlipsNotificationVariables - use CVoidEventHandlerCollection - use CIActionReference - implicit none - logical :: SlipsNotification = .false. - procedure (ActionBool), pointer :: SlipsNotificationPtr - - public - - type(VoidEventHandlerCollection) :: OnSlipsNotificationChange - - private :: SlipsNotification - - contains - - subroutine Set_SlipsNotification(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SlipsNotification == v) return -#endif - SlipsNotification = v - if(associated(SlipsNotificationPtr)) call SlipsNotificationPtr(SlipsNotification) -#ifdef deb - print*, 'SlipsNotification=', SlipsNotification -#endif - call OnSlipsNotificationChange%RunAll() - end subroutine - - logical function Get_SlipsNotification() - implicit none - Get_SlipsNotification = SlipsNotification - end function - - - - - - subroutine Set_SlipsNotification_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsNotification_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsNotification_WN' :: Set_SlipsNotification_WN - implicit none - logical , intent(in) :: v - call Set_SlipsNotification(v) - end subroutine - - logical function Get_SlipsNotification_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SlipsNotification_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SlipsNotification_WN' :: Get_SlipsNotification_WN - implicit none - Get_SlipsNotification_WN = SlipsNotification - end function - - - - - subroutine SubscribeSlipsNotification(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSlipsNotification - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSlipsNotification' :: SubscribeSlipsNotification - implicit none - procedure (ActionBool) :: a - SlipsNotificationPtr => a - end subroutine - -end module CSlipsNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CSwingLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CSwingLedNotificationVariables.f90 deleted file mode 100644 index 6a24ce4..0000000 --- a/CSharp/OperationScenarios/Notifications/CSwingLedNotificationVariables.f90 +++ /dev/null @@ -1,55 +0,0 @@ -module CSwingLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: SwingLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnSwingLedChange - - private :: SwingLed - - contains - - subroutine Set_SwingLed(v) - use CDrillingConsoleVariables!, only: SwingLedHw => SwingLed - implicit none - logical , intent(in) :: v - -#ifdef ExcludeExtraChanges - if(SwingLed == v) return -#endif - SwingLed = v - if(SwingLed) then - DrillingConsole%SwingLed = 1 - else - DrillingConsole%SwingLed = 0 - endif - call OnSwingLedChange%RunAll() - end subroutine - - logical function Get_SwingLed() - implicit none - Get_SwingLed = SwingLed - end function - - - - - - subroutine Set_SwingLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SwingLed_WN' :: Set_SwingLed_WN - implicit none - logical , intent(in) :: v - call Set_SwingLed(v) - end subroutine - - logical function Get_SwingLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SwingLed_WN' :: Get_SwingLed_WN - implicit none - Get_SwingLed_WN = SwingLed - end function - -end module CSwingLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CTdsIbopLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CTdsIbopLedNotificationVariables.f90 deleted file mode 100644 index 3482403..0000000 --- a/CSharp/OperationScenarios/Notifications/CTdsIbopLedNotificationVariables.f90 +++ /dev/null @@ -1,60 +0,0 @@ -module CTdsIbopLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: IbopLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnIbopLedChange - - private :: IbopLed - - contains - - subroutine Set_IbopLed(v) - use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveIbopLed - use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop - !use CLatchLedNotification - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IbopLed == v) return -#endif - IbopLed = v - - if(IbopLed) then - TopDrivePanel%TopDriveIbopLed = 1 - call CloseTopDriveIBop() - else - TopDrivePanel%TopDriveIbopLed = 0 - call OpenTopDriveIBop() - endif - - call OnIbopLedChange%RunAll() - end subroutine - - logical function Get_IbopLed() - implicit none - Get_IbopLed = IbopLed - end function - - - - - - subroutine Set_IbopLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IbopLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IbopLed_WN' :: Set_IbopLed_WN - implicit none - logical , intent(in) :: v - call Set_IbopLed(v) - end subroutine - - logical function Get_IbopLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IbopLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IbopLed_WN' :: Get_IbopLed_WN - implicit none - Get_IbopLed_WN = IbopLed - end function - -end module CTdsIbopLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CTdsPowerLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CTdsPowerLedNotificationVariables.f90 deleted file mode 100644 index c630217..0000000 --- a/CSharp/OperationScenarios/Notifications/CTdsPowerLedNotificationVariables.f90 +++ /dev/null @@ -1,57 +0,0 @@ -module CTdsPowerLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: PowerLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnPowerLedChange - - private :: PowerLed - - contains - - subroutine Set_PowerLed(v) - use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTdsPowerLed - !use CLatchLedNotification - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(PowerLed == v) return -#endif - PowerLed = v - - if(PowerLed) then - TopDrivePanel%TopDriveTdsPowerLed = 1 - !call Set_LatchLed(.false.) - else - TopDrivePanel%TopDriveTdsPowerLed = 0 - endif - - call OnPowerLedChange%RunAll() - end subroutine - - logical function Get_PowerLed() - implicit none - Get_PowerLed = PowerLed - end function - - - - - subroutine Set_PowerLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_PowerLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_PowerLed_WN' :: Set_PowerLed_WN - implicit none - logical , intent(in) :: v - call Set_PowerLed(v) - end subroutine - - logical function Get_PowerLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_PowerLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_PowerLed_WN' :: Get_PowerLed_WN - implicit none - Get_PowerLed_WN = PowerLed - end function - -end module CTdsPowerLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotificationVariables.f90 deleted file mode 100644 index 8db0229..0000000 --- a/CSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotificationVariables.f90 +++ /dev/null @@ -1,50 +0,0 @@ -module CTdsTorqueWrenchLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - integer :: TorqueWrenchLed = 0 - - public - - type(VoidEventHandlerCollection) :: OnTorqueWrenchLedChange - - private :: TorqueWrenchLed - - contains - - subroutine Set_TorqueWrenchLed(v) - use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTorqueWrenchLed - implicit none - integer , intent(in) :: v - -#ifdef ExcludeExtraChanges - if(TorqueWrenchLed == v) return -#endif - TorqueWrenchLed = v - TopDrivePanel%TopDriveTorqueWrenchLed = v - call OnTorqueWrenchLedChange%RunAll() - end subroutine - - logical function Get_TorqueWrenchLed() - implicit none - Get_TorqueWrenchLed = TorqueWrenchLed - end function - - - - - subroutine Set_TorqueWrenchLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_TorqueWrenchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_TorqueWrenchLed_WN' :: Set_TorqueWrenchLed_WN - implicit none - integer , intent(in) :: v - call Set_TorqueWrenchLed(v) - end subroutine - - logical function Get_TorqueWrenchLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_TorqueWrenchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_TorqueWrenchLed_WN' :: Get_TorqueWrenchLed_WN - implicit none - Get_TorqueWrenchLed_WN = TorqueWrenchLed - end function - -end module CTdsTorqueWrenchLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CTongNotification.f90 b/CSharp/OperationScenarios/Notifications/CTongNotification.f90 index 833c6dc..f2f59ab 100644 --- a/CSharp/OperationScenarios/Notifications/CTongNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/CTongNotification.f90 @@ -271,14 +271,14 @@ module CTongNotification subroutine Subscribe_TongNotification() implicit none - call OnOperationConditionChange%Add(Evaluate_TongNotification) - call OnHookHeightChange%Add(Evaluate_TongNotification) - call OnJointConnectionPossibleChange%Add(Evaluate_TongNotification) - call OnSingleSetInMouseHoleChange%Add(Evaluate_TongNotification) + call UnitySignals%OnOperationConditionChange%Add(Evaluate_TongNotification) + call SoftwareInputs%OnHookHeightChange%Add(Evaluate_TongNotification) + call UnityInputs%OnJointConnectionPossibleChange%Add(Evaluate_TongNotification) + call UnityInputs%OnSingleSetInMouseHoleChange%Add(Evaluate_TongNotification) call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_TongNotification) call KellyConnectionEnum%OnKellyConnectionChange%Add(Evaluate_TongNotification) - call OnSwingChange%Add(Evaluate_TongNotification) - call OnSlipsChange%Add(Evaluate_TongNotification) + call UnitySignals%OnSwingChange%Add(Evaluate_TongNotification) + call UnitySignals%OnSlipsChange%Add(Evaluate_TongNotification) end subroutine diff --git a/CSharp/OperationScenarios/Notifications/CTongNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CTongNotificationVariables.f90 deleted file mode 100644 index b9d0893..0000000 --- a/CSharp/OperationScenarios/Notifications/CTongNotificationVariables.f90 +++ /dev/null @@ -1,69 +0,0 @@ -module CTongNotificationVariables - use CVoidEventHandlerCollection - use CIActionReference - implicit none - logical :: TongNotification = .false. - procedure (ActionBool), pointer :: TongNotificationPtr - - public - - type(VoidEventHandlerCollection) :: OnTongNotificationChange - - private :: TongNotification - - contains - - subroutine Set_TongNotification(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(TongNotification == v) return -#endif - TongNotification = v - if(associated(TongNotificationPtr)) call TongNotificationPtr(TongNotification) -#ifdef deb - print*, 'TongNotification=', TongNotification -#endif - call OnTongNotificationChange%RunAll() - end subroutine - - logical function Get_TongNotification() - implicit none - Get_TongNotification = TongNotification - end function - - - - - subroutine Set_TongNotification_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_TongNotification_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_TongNotification_WN' :: Set_TongNotification_WN - implicit none - logical , intent(in) :: v - call Set_TongNotification(v) - end subroutine - - logical function Get_TongNotification_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_TongNotification_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_TongNotification_WN' :: Get_TongNotification_WN - implicit none - Get_TongNotification_WN = TongNotification - end function - - - - - - - - - - subroutine SubscribeTongNotification(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTongNotification - !DEC$ ATTRIBUTES ALIAS: 'SubscribeTongNotification' :: SubscribeTongNotification - implicit none - procedure (ActionBool) :: a - TongNotificationPtr => a - end subroutine - -end module CTongNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 b/CSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 index 467f4f5..d74a16a 100644 --- a/CSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 @@ -208,14 +208,14 @@ module CUnlatchLedNotification subroutine Subscribe_UnlatchLed() implicit none - call OnOperationConditionChange%Add(Evaluate_UnlatchLed) - call OnHookHeightChange%Add(Evaluate_UnlatchLed) - call OnStandRackChanged%Add(Evaluate_UnlatchLed) + call UnitySignals%OnOperationConditionChange%Add(Evaluate_UnlatchLed) + call SoftwareInputs%OnHookHeightChange%Add(Evaluate_UnlatchLed) + call SoftwareInputs%OnStandRackChanged%Add(Evaluate_UnlatchLed) call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_UnlatchLed) - call OnSwingChange%Add(Evaluate_UnlatchLed) - call OnSlipsChange%Add(Evaluate_UnlatchLed) - call OnLatchLedChange%Add(Evaluate_UnlatchLed) - call OnFillMouseHoleLedChange%Add(Evaluate_UnlatchLed) + call UnitySignals%OnSwingChange%Add(Evaluate_UnlatchLed) + call UnitySignals%OnSlipsChange%Add(Evaluate_UnlatchLed) + call Notifications%OnLatchLedChange%Add(Evaluate_UnlatchLed) + call Notifications%OnFillMouseHoleLedChange%Add(Evaluate_UnlatchLed) end subroutine end module CUnlatchLedNotification \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CUnlatchLedNotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/CUnlatchLedNotificationVariables.f90 deleted file mode 100644 index f06968b..0000000 --- a/CSharp/OperationScenarios/Notifications/CUnlatchLedNotificationVariables.f90 +++ /dev/null @@ -1,62 +0,0 @@ -module CUnlatchLedNotificationVariables - use CVoidEventHandlerCollection - implicit none - logical :: UnlatchLed = .false. - - public - - type(VoidEventHandlerCollection) :: OnUnlatchLedChange - - private :: UnlatchLed - - contains - - subroutine Set_UnlatchLed(v) - use CDrillingConsoleVariables!, only: DrillingConsole%UnlatchPipeLED - !use CLatchLedNotification - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(UnlatchLed == v) return -#endif - UnlatchLed = v - - if(UnlatchLed) then - DrillingConsole%UnlatchPipeLED = 1 - !call Set_LatchLed(.false.) - else - DrillingConsole%UnlatchPipeLED = 0 - endif - - call OnUnlatchLedChange%RunAll() - end subroutine - - logical function Get_UnlatchLed() - implicit none - Get_UnlatchLed = UnlatchLed - end function - - - - - - - subroutine Set_UnlatchLed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_UnlatchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_UnlatchLed_WN' :: Set_UnlatchLed_WN - implicit none - logical , intent(in) :: v - call Set_UnlatchLed(v) - end subroutine - - logical function Get_UnlatchLed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_UnlatchLed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_UnlatchLed_WN' :: Get_UnlatchLed_WN - implicit none - Get_UnlatchLed_WN = UnlatchLed - end function - - - - -end module CUnlatchLedNotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/NotificationVariables.f90 b/CSharp/OperationScenarios/Notifications/NotificationVariables.f90 new file mode 100644 index 0000000..e71dae3 --- /dev/null +++ b/CSharp/OperationScenarios/Notifications/NotificationVariables.f90 @@ -0,0 +1,434 @@ +module NotificationVariables + use CVoidEventHandlerCollection + implicit none + type::NotificationType + logical :: CloseKellyCockLed = .false. + type(VoidEventHandlerCollection) :: OnCloseKellyCockLedChange + + logical :: CloseSafetyValveLed = .false. + integer :: operation_CloseSafetyValveLed = 0 + type(VoidEventHandlerCollection) :: OnCloseSafetyValveLedChange + + logical :: FillMouseHoleLed = .false. + type(VoidEventHandlerCollection) :: OnFillMouseHoleLedChange + + logical :: IrIBopLed = .false. + type(VoidEventHandlerCollection) :: OnIrIBopLedChange + + logical :: IrSafetyValveLed = .false. + integer :: operation_IrSafetyValveLed = 0 + type(VoidEventHandlerCollection) :: OnIrSafetyValveLedChange + + logical :: LatchLed = .false. + type(VoidEventHandlerCollection) :: OnLatchLedChange + + logical :: OpenKellyCockLed = .false. + type(VoidEventHandlerCollection) :: OnOpenKellyCockLedChange + + logical :: OpenSafetyValveLed = .false. + + integer :: operation_OpenSafetyValveLed = 0 + type(VoidEventHandlerCollection) :: OnOpenSafetyValveLedChange + + logical :: SlipsNotification = .false. + ! procedure (ActionBool), pointer :: SlipsNotificationPtr + type(VoidEventHandlerCollection) :: OnSlipsNotificationChange + + logical :: SwingLed = .false. + type(VoidEventHandlerCollection) :: OnSwingLedChange + + logical :: IbopLed = .false. + type(VoidEventHandlerCollection) :: OnIbopLedChange + + logical :: PowerLed = .false. + type(VoidEventHandlerCollection) :: OnPowerLedChange + + integer :: TorqueWrenchLed = 0 + type(VoidEventHandlerCollection) :: OnTorqueWrenchLedChange + + logical :: TongNotification = .false. + ! procedure (ActionBool), pointer :: TongNotificationPtr + type(VoidEventHandlerCollection) :: OnTongNotificationChange + + logical :: UnlatchLed = .false. + type(VoidEventHandlerCollection) :: OnUnlatchLedChange + end type NotificationType + type(NotificationType)::notifications + + contains + + subroutine Set_UnlatchLed(v) + use CDrillingConsoleVariables!, only: DrillingConsole%UnlatchPipeLED + !use CLatchLedNotification + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%UnlatchLed == v) return + #endif + notifications%UnlatchLed = v + + if(notifications%UnlatchLed) then + DrillingConsole%UnlatchPipeLED = 1 + !call Set_LatchLed(.false.) + else + DrillingConsole%UnlatchPipeLED = 0 + endif + + call notifications%OnUnlatchLedChange%RunAll() + end subroutine + + logical function Get_UnlatchLed() + implicit none + Get_UnlatchLed = notifications%UnlatchLed + end function + + subroutine Set_TongNotification(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%TongNotification == v) return + #endif + notifications%TongNotification = v + ! if(associated(notifications%TongNotificationPtr)) call notifications%TongNotificationPtr(notifications%TongNotification) + #ifdef deb + print*, 'notifications%TongNotification=', notifications%TongNotification + #endif + call notifications%OnTongNotificationChange%RunAll() + end subroutine + + logical function Get_TongNotification() + implicit none + Get_TongNotification = notifications%TongNotification + end function + + subroutine Set_TorqueWrenchLed(v) + use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTorqueWrenchLed + implicit none + integer , intent(in) :: v + + #ifdef ExcludeExtraChanges + if(notifications%TorqueWrenchLed == v) return + #endif + notifications%TorqueWrenchLed = v + TopDrivePanel%TopDriveTorqueWrenchLed = v + call notifications%OnTorqueWrenchLedChange%RunAll() + end subroutine + + logical function Get_TorqueWrenchLed() + implicit none + Get_TorqueWrenchLed = notifications%TorqueWrenchLed + end function + + subroutine Set_PowerLed(v) + use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTdsPowerLed + !use CLatchLedNotification + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%PowerLed == v) return + #endif + notifications%PowerLed = v + + if(notifications%PowerLed) then + TopDrivePanel%TopDriveTdsPowerLed = 1 + !call Set_LatchLed(.false.) + else + TopDrivePanel%TopDriveTdsPowerLed = 0 + endif + + call notifications%OnPowerLedChange%RunAll() + end subroutine + + logical function Get_PowerLed() + implicit none + Get_PowerLed = notifications%PowerLed + end function + + subroutine Set_IbopLed(v) + use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveIbopLed + use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop + !use CLatchLedNotification + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%IbopLed == v) return + #endif + notifications%IbopLed = v + + if(notifications%IbopLed) then + TopDrivePanel%TopDriveIbopLed = 1 + call CloseTopDriveIBop() + else + TopDrivePanel%TopDriveIbopLed = 0 + call OpenTopDriveIBop() + endif + + call notifications%OnIbopLedChange%RunAll() + end subroutine + + logical function Get_IbopLed() + implicit none + Get_IbopLed = notifications%IbopLed + end function + + subroutine Set_SwingLed(v) + use CDrillingConsoleVariables!, only: SwingLedHw => SwingLed + implicit none + logical , intent(in) :: v + + #ifdef ExcludeExtraChanges + if(notifications%SwingLed == v) return + #endif + notifications%SwingLed = v + if(notifications%SwingLed) then + DrillingConsole%SwingLed = 1 + else + DrillingConsole%SwingLed = 0 + endif + call notifications%OnSwingLedChange%RunAll() + end subroutine + + logical function Get_SwingLed() + implicit none + Get_SwingLed = notifications%SwingLed + end function + + subroutine Set_SlipsNotification(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%SlipsNotification == v) return + #endif + notifications%SlipsNotification = v + ! if(associated(notifications%SlipsNotificationPtr)) call notifications%SlipsNotificationPtr(notifications%SlipsNotification) + #ifdef deb + print*, 'notifications%SlipsNotification=', notifications%SlipsNotification + #endif + call notifications%OnSlipsNotificationChange%RunAll() + end subroutine + + logical function Get_SlipsNotification() + implicit none + Get_SlipsNotification = notifications%SlipsNotification + end function + + subroutine Set_OpenSafetyValveLed(v) + use CDrillingConsoleVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed + use CManifolds, only: OpenSafetyValve_TopDrive, OpenSafetyValve_KellyMode, OpenSafetyValve_TripMode + use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%OpenSafetyValveLed == v) return + #endif + notifications%OpenSafetyValveLed = v + + if(notifications%OpenSafetyValveLed) then + !!call OpenSafetyValve() + if(Hoisting%DriveType == TopDrive_DriveType) call OpenSafetyValve_TopDrive() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_OpenSafetyValveLed == 0) call OpenSafetyValve_KellyMode() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_OpenSafetyValveLed == 1) call OpenSafetyValve_TripMode() + endif + + call notifications%OnOpenSafetyValveLedChange%RunAll() + end subroutine + + logical function Get_OpenSafetyValveLed() + implicit none + Get_OpenSafetyValveLed = notifications%OpenSafetyValveLed + end function + + subroutine Set_OpenKellyCockLed(v) + ! use CDrillingConsoleVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed + use CManifolds, only: OpenKellyCock + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%OpenKellyCockLed == v) return + #endif + notifications%OpenKellyCockLed = v + + if(notifications%OpenKellyCockLed) then + call OpenKellyCock() + endif + + ! HAS BEEN IMPLEMENTED IN CMANIFOLD + + !if(OpenKellyCockLed) then + ! OpenKellyCockLedHw = 1 + !else + ! OpenKellyCockLedHw = 0 + !endif + + call notifications%OnOpenKellyCockLedChange%RunAll() + end subroutine + + logical function Get_OpenKellyCockLed() + implicit none + Get_OpenKellyCockLed = notifications%OpenKellyCockLed + end function + + subroutine Set_LatchLed(v) + use CDrillingConsoleVariables!, only: DrillingConsole%LatchPipeLED + !use CUnlatchLedNotification + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%LatchLed == v) return + #endif + notifications%LatchLed = v + if(notifications%LatchLed) then + DrillingConsole%LatchPipeLED = 1 + !call Set_UnlatchLed(.false.) + else + DrillingConsole%LatchPipeLED = 0 + endif + call notifications%OnLatchLedChange%RunAll() + end subroutine + + logical function Get_LatchLed() + implicit none + Get_LatchLed = notifications%LatchLed + end function + + subroutine Set_IrSafetyValveLed(v) + use CDrillingConsoleVariables!, only: DrillingConsole%CloseKellyCockLed => IRSafetyValveLed + use CManifolds, only: & + InstallSafetyValve_TopDrive, & + InstallSafetyValve_KellyMode, & + InstallSafetyValve_TripMode, & + RemoveSafetyValve_TopDrive, & + RemoveSafetyValve_KellyMode, & + RemoveSafetyValve_TripMode + use UnitySignalVariables, only: Set_SafetyValve_Install, Set_SafetyValve_Remove + use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%IrSafetyValveLed == v) return + #endif + notifications%IrSafetyValveLed = v + + if(notifications%IrSafetyValveLed) then + DrillingConsole%IRSafetyValveLed = 1 + + if(Hoisting%DriveType == TopDrive_DriveType) call InstallSafetyValve_TopDrive() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 0) call InstallSafetyValve_KellyMode() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 1) call InstallSafetyValve_TripMode() + + call Set_SafetyValve_Install() + else + DrillingConsole%IRSafetyValveLed = 0 + + if(Hoisting%DriveType == TopDrive_DriveType) call RemoveSafetyValve_TopDrive() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 0) call RemoveSafetyValve_KellyMode() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 1) call RemoveSafetyValve_TripMode() + + call Set_SafetyValve_Remove() + endif + + call notifications%OnIrSafetyValveLedChange%RunAll() + end subroutine + + logical function Get_IrSafetyValveLed() + implicit none + Get_IrSafetyValveLed = notifications%IrSafetyValveLed + end function + + subroutine Set_IrIBopLed(v) + use CDrillingConsoleVariables!, only: IRIBopLedHw => IRIBopLed + use CManifolds, only: InstallIBop, RemoveIBop + use UnitySignalVariables, only: Set_Ibop_Install, Set_Ibop_Remove + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%IrIBopLed == v) return + #endif + notifications%IrIBopLed = v + if(notifications%IrIBopLed) then + DrillingConsole%IRIBopLed = 1 + call InstallIBop() + call Set_Ibop_Install() + else + DrillingConsole%IRIBopLed = 0 + call RemoveIBop() + call Set_Ibop_Remove() + endif + call notifications%OnIrIBopLedChange%RunAll() + end subroutine + + logical function Get_IrIBopLed() + implicit none + Get_IrIBopLed = notifications%IrIBopLed + end function + + subroutine Set_FillMouseHoleLed(v) + use CDrillingConsoleVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed + ! use CMouseHoleEnumVariables + use UnitySignalVariables + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%FillMouseHoleLed == v) return + #endif + notifications%FillMouseHoleLed = v + if(notifications%FillMouseHoleLed) then + DrillingConsole%FillMouseHoleLed = 1 + !call Set_MouseHole(MOUSE_HOLE_FILL) + else + DrillingConsole%FillMouseHoleLed = 0 + !call Set_MouseHole(MOUSE_HOLE_EMPTY) + endif + call notifications%OnFillMouseHoleLedChange%RunAll() + end subroutine + + logical function Get_FillMouseHoleLed() + implicit none + Get_FillMouseHoleLed = notifications%FillMouseHoleLed + end function + + subroutine Set_CloseKellyCockLed(v) + use CDrillingConsoleVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed + use CManifolds, only: CloseKellyCock + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%CloseKellyCockLed == v) return + #endif + notifications%CloseKellyCockLed = v + if(notifications%CloseKellyCockLed) then + call CloseKellyCock() + endif + call notifications%OnCloseKellyCockLedChange%RunAll() + end subroutine + + logical function Get_CloseKellyCockLed() + implicit none + Get_CloseKellyCockLed = notifications%CloseKellyCockLed + end function + + subroutine Set_CloseSafetyValveLed(v) + ! use CDrillingConsoleVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed + use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode + use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(notifications%CloseSafetyValveLed == v) return + #endif + notifications%CloseSafetyValveLed = v + if(notifications%CloseSafetyValveLed) then + !!call CloseSafetyValve() + if(Hoisting%DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode() + if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_CloseSafetyValveLed == 1) call CloseSafetyValve_TripMode() + endif + call notifications%OnCloseSafetyValveLedChange%RunAll() + end subroutine + + logical function Get_CloseSafetyValveLed() + implicit none + Get_CloseSafetyValveLed = notifications%CloseSafetyValveLed + end function + +end module NotificationVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 b/CSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 index 4f24c6f..4cd7101 100644 --- a/CSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 +++ b/CSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 @@ -7,8 +7,6 @@ module CFillupHeadPermission subroutine Evaluate_FillupHeadPermission() implicit none - - if (Hoisting%DriveType == TopDrive_DriveType) then #ifdef OST print*, 'Evaluate_FillupHeadPermission=TopDrive' diff --git a/CSharp/OperationScenarios/Permissions/CFillupHeadPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CFillupHeadPermissionVariables.f90 deleted file mode 100644 index 6d6261b..0000000 --- a/CSharp/OperationScenarios/Permissions/CFillupHeadPermissionVariables.f90 +++ /dev/null @@ -1,50 +0,0 @@ -module CFillupHeadPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: FillupHeadPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnFillupHeadPermissionChange - - private :: FillupHeadPermission - - contains - - subroutine Set_FillupHeadPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(FillupHeadPermission == v) return -#endif - FillupHeadPermission = v -#ifdef deb - print*, 'FillupHeadPermission=', FillupHeadPermission -#endif - call OnFillupHeadPermissionChange%RunAll() - end subroutine - - logical function Get_FillupHeadPermission() - implicit none - Get_FillupHeadPermission = FillupHeadPermission - end function - - - - - subroutine Set_FillupHeadPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_FillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_FillupHeadPermission_WN' :: Set_FillupHeadPermission_WN - implicit none - logical , intent(in) :: v - call Set_FillupHeadPermission(v) - end subroutine - - logical function Get_FillupHeadPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_FillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_FillupHeadPermission_WN' :: Get_FillupHeadPermission_WN - implicit none - Get_FillupHeadPermission_WN = FillupHeadPermission - end function - -end module CFillupHeadPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CInstallFillupHeadPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CInstallFillupHeadPermissionVariables.f90 deleted file mode 100644 index f57497e..0000000 --- a/CSharp/OperationScenarios/Permissions/CInstallFillupHeadPermissionVariables.f90 +++ /dev/null @@ -1,53 +0,0 @@ -module CInstallFillupHeadPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: InstallFillupHeadPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnInstallFillupHeadPermissionChange - - private :: InstallFillupHeadPermission - - contains - - subroutine Set_InstallFillupHeadPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(InstallFillupHeadPermission == v) return -#endif - InstallFillupHeadPermission = v -#ifdef deb - print*, 'InstallFillupHeadPermission=', InstallFillupHeadPermission -#endif - call OnInstallFillupHeadPermissionChange%RunAll() - end subroutine - - logical function Get_InstallFillupHeadPermission() - implicit none - Get_InstallFillupHeadPermission = InstallFillupHeadPermission - end function - - - - subroutine Set_InstallFillupHeadPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_InstallFillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_InstallFillupHeadPermission_WN' :: Set_InstallFillupHeadPermission_WN - implicit none - logical , intent(in) :: v - call Set_InstallFillupHeadPermission(v) - end subroutine - - - logical function Get_InstallFillupHeadPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallFillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_InstallFillupHeadPermission_WN' :: Get_InstallFillupHeadPermission_WN - implicit none - Get_InstallFillupHeadPermission_WN = InstallFillupHeadPermission - end function - - - - -end module CInstallFillupHeadPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CInstallMudBucketPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CInstallMudBucketPermissionVariables.f90 deleted file mode 100644 index 6f716f0..0000000 --- a/CSharp/OperationScenarios/Permissions/CInstallMudBucketPermissionVariables.f90 +++ /dev/null @@ -1,51 +0,0 @@ -module CInstallMudBucketPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: InstallMudBucketPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnInstallMudBucketPermissionChange - - private :: InstallMudBucketPermission - - contains - - subroutine Set_InstallMudBucketPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(InstallMudBucketPermission == v) return -#endif - InstallMudBucketPermission = v -#ifdef deb - print*, 'InstallMudBucketPermission=', InstallMudBucketPermission -#endif - call OnInstallMudBucketPermissionChange%RunAll() - end subroutine - - logical function Get_InstallMudBucketPermission() - implicit none - Get_InstallMudBucketPermission = InstallMudBucketPermission - end function - - - - - subroutine Set_InstallMudBucketPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_InstallMudBucketPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_InstallMudBucketPermission_WN' :: Set_InstallMudBucketPermission_WN - implicit none - logical , intent(in) :: v - call Set_InstallMudBucketPermission(v) - end subroutine - - - logical function Get_InstallMudBucketPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallMudBucketPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_InstallMudBucketPermission_WN' :: Get_InstallMudBucketPermission_WN - implicit none - Get_InstallMudBucketPermission_WN = InstallMudBucketPermission - end function - -end module CInstallMudBucketPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CIrIbopPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CIrIbopPermissionVariables.f90 deleted file mode 100644 index a86ca3c..0000000 --- a/CSharp/OperationScenarios/Permissions/CIrIbopPermissionVariables.f90 +++ /dev/null @@ -1,49 +0,0 @@ -module CIrIbopPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: IrIbopPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnIrIbopPermissionChange - - private :: IrIbopPermission - - contains - - subroutine Set_IrIbopPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IrIbopPermission == v) return -#endif - IrIbopPermission = v -#ifdef deb - print*, 'IrIbopPermission=', IrIbopPermission -#endif - call OnIrIbopPermissionChange%RunAll() - end subroutine - - logical function Get_IrIbopPermission() - implicit none - Get_IrIbopPermission = IrIbopPermission - end function - - - - subroutine Set_IrIbopPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IrIbopPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IrIbopPermission_WN' :: Set_IrIbopPermission_WN - implicit none - logical , intent(in) :: v - call Set_IrIbopPermission(v) - end subroutine - - logical function Get_IrIbopPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IrIbopPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IrIbopPermission_WN' :: Get_IrIbopPermission_WN - implicit none - Get_IrIbopPermission_WN = IrIbopPermission - end function - -end module CIrIbopPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CIrSafetyValvePermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CIrSafetyValvePermissionVariables.f90 deleted file mode 100644 index ad65d98..0000000 --- a/CSharp/OperationScenarios/Permissions/CIrSafetyValvePermissionVariables.f90 +++ /dev/null @@ -1,51 +0,0 @@ -module CIrSafetyValvePermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: IrSafetyValvePermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnIrSafetyValvePermissionChange - - private :: IrSafetyValvePermission - - contains - - subroutine Set_IrSafetyValvePermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IrSafetyValvePermission == v) return -#endif - IrSafetyValvePermission = v -#ifdef deb - print*, 'IrSafetyValvePermission=', IrSafetyValvePermission -#endif - call OnIrSafetyValvePermissionChange%RunAll() - end subroutine - - logical function Get_IrSafetyValvePermission() - implicit none - Get_IrSafetyValvePermission = IrSafetyValvePermission - end function - - - - - subroutine Set_IrSafetyValvePermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IrSafetyValvePermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IrSafetyValvePermission_WN' :: Set_IrSafetyValvePermission_WN - implicit none - logical , intent(in) :: v - call Set_IrSafetyValvePermission(v) - end subroutine - - logical function Get_IrSafetyValvePermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IrSafetyValvePermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IrSafetyValvePermission_WN' :: Get_IrSafetyValvePermission_WN - implicit none - Get_IrSafetyValvePermission_WN = IrSafetyValvePermission - end function - - -end module CIrSafetyValvePermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermissionVariables.f90 deleted file mode 100644 index ff22333..0000000 --- a/CSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermissionVariables.f90 +++ /dev/null @@ -1,51 +0,0 @@ -module CRemoveFillupHeadPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: RemoveFillupHeadPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnRemoveFillupHeadPermissionChange - - private :: RemoveFillupHeadPermission - - contains - - subroutine Set_RemoveFillupHeadPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(RemoveFillupHeadPermission == v) return -#endif - RemoveFillupHeadPermission = v -#ifdef deb - print*, 'RemoveFillupHeadPermission=', RemoveFillupHeadPermission -#endif - call OnRemoveFillupHeadPermissionChange%RunAll() - end subroutine - - logical function Get_RemoveFillupHeadPermission() - implicit none - Get_RemoveFillupHeadPermission = RemoveFillupHeadPermission - end function - - - - - subroutine Set_RemoveFillupHeadPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_RemoveFillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_RemoveFillupHeadPermission_WN' :: Set_RemoveFillupHeadPermission_WN - implicit none - logical , intent(in) :: v - call Set_RemoveFillupHeadPermission(v) - end subroutine - - logical function Get_RemoveFillupHeadPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveFillupHeadPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveFillupHeadPermission_WN' :: Get_RemoveFillupHeadPermission_WN - implicit none - Get_RemoveFillupHeadPermission_WN = RemoveFillupHeadPermission - end function - - -end module CRemoveFillupHeadPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CRemoveMudBucketPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CRemoveMudBucketPermissionVariables.f90 deleted file mode 100644 index a2bd728..0000000 --- a/CSharp/OperationScenarios/Permissions/CRemoveMudBucketPermissionVariables.f90 +++ /dev/null @@ -1,51 +0,0 @@ -module CRemoveMudBucketPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: RemoveMudBucketPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnRemoveMudBucketPermissionChange - - private :: RemoveMudBucketPermission - - contains - - subroutine Set_RemoveMudBucketPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(RemoveMudBucketPermission == v) return -#endif - RemoveMudBucketPermission = v -#ifdef deb - print*, 'RemoveMudBucketPermission=', RemoveMudBucketPermission -#endif - call OnRemoveMudBucketPermissionChange%RunAll() - end subroutine - - logical function Get_RemoveMudBucketPermission() - implicit none - Get_RemoveMudBucketPermission = RemoveMudBucketPermission - end function - - - - - subroutine Set_RemoveMudBucketPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_RemoveMudBucketPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_RemoveMudBucketPermission_WN' :: Set_RemoveMudBucketPermission_WN - implicit none - logical , intent(in) :: v - call Set_RemoveMudBucketPermission(v) - end subroutine - - logical function Get_RemoveMudBucketPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveMudBucketPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveMudBucketPermission_WN' :: Get_RemoveMudBucketPermission_WN - implicit none - Get_RemoveMudBucketPermission_WN = RemoveMudBucketPermission - end function - - -end module CRemoveMudBucketPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CSwingDrillPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CSwingDrillPermissionVariables.f90 deleted file mode 100644 index 2905b52..0000000 --- a/CSharp/OperationScenarios/Permissions/CSwingDrillPermissionVariables.f90 +++ /dev/null @@ -1,49 +0,0 @@ -module CSwingDrillPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: SwingDrillPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnSwingDrillPermissionChange - - private :: SwingDrillPermission - - contains - - subroutine Set_SwingDrillPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SwingDrillPermission == v) return -#endif - SwingDrillPermission = v -#ifdef deb - print*, 'SwingDrillPermission=', SwingDrillPermission -#endif - call OnSwingDrillPermissionChange%RunAll() - end subroutine - - logical function Get_SwingDrillPermission() - implicit none - Get_SwingDrillPermission = SwingDrillPermission - end function - - - - subroutine Set_SwingDrillPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingDrillPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SwingDrillPermission_WN' :: Set_SwingDrillPermission_WN - implicit none - logical , intent(in) :: v - call Set_SwingDrillPermission(v) - end subroutine - - logical function Get_SwingDrillPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingDrillPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SwingDrillPermission_WN' :: Get_SwingDrillPermission_WN - implicit none - Get_SwingDrillPermission_WN = SwingDrillPermission - end function - -end module CSwingDrillPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CSwingOffPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CSwingOffPermissionVariables.f90 deleted file mode 100644 index edf39aa..0000000 --- a/CSharp/OperationScenarios/Permissions/CSwingOffPermissionVariables.f90 +++ /dev/null @@ -1,48 +0,0 @@ -module CSwingOffPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: SwingOffPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnSwingOffPermissionChange - - private :: SwingOffPermission - - contains - - subroutine Set_SwingOffPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SwingOffPermission == v) return -#endif - SwingOffPermission = v -#ifdef deb - print*, 'SwingOffPermission=', SwingOffPermission -#endif - call OnSwingOffPermissionChange%RunAll() - end subroutine - - logical function Get_SwingOffPermission() - implicit none - Get_SwingOffPermission = SwingOffPermission - end function - - - subroutine Set_SwingOffPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingOffPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SwingOffPermission_WN' :: Set_SwingOffPermission_WN - implicit none - logical , intent(in) :: v - call Set_SwingOffPermission(v) - end subroutine - - logical function Get_SwingOffPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingOffPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SwingOffPermission_WN' :: Get_SwingOffPermission_WN - implicit none - Get_SwingOffPermission_WN = SwingOffPermission - end function - -end module CSwingOffPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/CSwingTiltPermissionVariables.f90 b/CSharp/OperationScenarios/Permissions/CSwingTiltPermissionVariables.f90 deleted file mode 100644 index 3253480..0000000 --- a/CSharp/OperationScenarios/Permissions/CSwingTiltPermissionVariables.f90 +++ /dev/null @@ -1,50 +0,0 @@ -module CSwingTiltPermissionVariables - use CVoidEventHandlerCollection - implicit none - logical :: SwingTiltPermission = .false. - - public - - type(VoidEventHandlerCollection) :: OnSwingTiltPermissionChange - - private :: SwingTiltPermission - - contains - - subroutine Set_SwingTiltPermission(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SwingTiltPermission == v) return -#endif - SwingTiltPermission = v -#ifdef deb - print*, 'SwingTiltPermission=', SwingTiltPermission -#endif - call OnSwingTiltPermissionChange%RunAll() - end subroutine - - logical function Get_SwingTiltPermission() - implicit none - Get_SwingTiltPermission = SwingTiltPermission - end function - - - - subroutine Set_SwingTiltPermission_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingTiltPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SwingTiltPermission_WN' :: Set_SwingTiltPermission_WN - implicit none - logical , intent(in) :: v - call Set_SwingTiltPermission(v) - end subroutine - - - logical function Get_SwingTiltPermission_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingTiltPermission_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SwingTiltPermission_WN' :: Get_SwingTiltPermission_WN - implicit none - Get_SwingTiltPermission_WN = SwingTiltPermission - end function - -end module CSwingTiltPermissionVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Permissions/PermissionsVariables.f90 b/CSharp/OperationScenarios/Permissions/PermissionsVariables.f90 new file mode 100644 index 0000000..ebd1ce9 --- /dev/null +++ b/CSharp/OperationScenarios/Permissions/PermissionsVariables.f90 @@ -0,0 +1,212 @@ +module PermissionsVariables +use CVoidEventHandlerCollection + type::PermissionsType + logical :: FillupHeadPermission = .false. + type(VoidEventHandlerCollection) :: OnFillupHeadPermissionChange + logical :: InstallFillupHeadPermission = .false. + type(VoidEventHandlerCollection) :: OnInstallFillupHeadPermissionChange + logical :: InstallMudBucketPermission = .false. + type(VoidEventHandlerCollection) :: OnInstallMudBucketPermissionChange + logical :: IrIbopPermission = .false. + type(VoidEventHandlerCollection) :: OnIrIbopPermissionChange + logical :: IrSafetyValvePermission = .false. + type(VoidEventHandlerCollection) :: OnIrSafetyValvePermissionChange + logical :: RemoveFillupHeadPermission = .false. + type(VoidEventHandlerCollection) :: OnRemoveFillupHeadPermissionChange + logical :: RemoveMudBucketPermission = .false. + type(VoidEventHandlerCollection) :: OnRemoveMudBucketPermissionChange + logical :: SwingDrillPermission = .false. + type(VoidEventHandlerCollection) :: OnSwingDrillPermissionChange + logical :: SwingOffPermission = .false. + type(VoidEventHandlerCollection) :: OnSwingOffPermissionChange + logical :: SwingTiltPermission = .false. + type(VoidEventHandlerCollection) :: OnSwingTiltPermissionChange + end type PermissionsType + + type(PermissionsType):: permissions + + contains + + subroutine Set_SwingTiltPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%SwingTiltPermission == v) return + #endif + permissions%SwingTiltPermission = v + #ifdef deb + print*, 'permissions%SwingTiltPermission=', permissions%SwingTiltPermission + #endif + call permissions%OnSwingTiltPermissionChange%RunAll() + end subroutine + + logical function Get_SwingTiltPermission() + implicit none + Get_SwingTiltPermission = permissions%SwingTiltPermission + end function + + subroutine Set_SwingOffPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%SwingOffPermission == v) return + #endif + permissions%SwingOffPermission = v + #ifdef deb + print*, 'permissions%SwingOffPermission=', permissions%SwingOffPermission + #endif + call permissions%OnSwingOffPermissionChange%RunAll() + end subroutine + + logical function Get_SwingOffPermission() + implicit none + Get_SwingOffPermission = permissions%SwingOffPermission + end function + + subroutine Set_SwingDrillPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%SwingDrillPermission == v) return + #endif + permissions%SwingDrillPermission = v + #ifdef deb + print*, 'permissions%SwingDrillPermission=', permissions%SwingDrillPermission + #endif + call permissions%OnSwingDrillPermissionChange%RunAll() + end subroutine + + logical function Get_SwingDrillPermission() + implicit none + Get_SwingDrillPermission = permissions%SwingDrillPermission + end function + + subroutine Set_RemoveMudBucketPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%RemoveMudBucketPermission == v) return + #endif + permissions%RemoveMudBucketPermission = v + #ifdef deb + print*, 'permissions%RemoveMudBucketPermission=', permissions%RemoveMudBucketPermission + #endif + call permissions%OnRemoveMudBucketPermissionChange%RunAll() + end subroutine + + logical function Get_RemoveMudBucketPermission() + implicit none + Get_RemoveMudBucketPermission = permissions%RemoveMudBucketPermission + end function + + + subroutine Set_RemoveFillupHeadPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%RemoveFillupHeadPermission == v) return + #endif + permissions%RemoveFillupHeadPermission = v + #ifdef deb + print*, 'permissions%RemoveFillupHeadPermission=', permissions%RemoveFillupHeadPermission + #endif + call permissions%OnRemoveFillupHeadPermissionChange%RunAll() + end subroutine + + logical function Get_RemoveFillupHeadPermission() + implicit none + Get_RemoveFillupHeadPermission = permissions%RemoveFillupHeadPermission + end function + + subroutine Set_IrSafetyValvePermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%IrSafetyValvePermission == v) return + #endif + permissions%IrSafetyValvePermission = v + #ifdef deb + print*, 'permissions%IrSafetyValvePermission=', permissions%IrSafetyValvePermission + #endif + call permissions%OnIrSafetyValvePermissionChange%RunAll() + end subroutine + + logical function Get_IrSafetyValvePermission() + implicit none + Get_IrSafetyValvePermission = permissions%IrSafetyValvePermission + end function + + subroutine Set_IrIbopPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%IrIbopPermission == v) return + #endif + permissions%IrIbopPermission = v + #ifdef deb + print*, 'permissions%IrIbopPermission=', permissions%IrIbopPermission + #endif + call permissions%OnIrIbopPermissionChange%RunAll() + end subroutine + + logical function Get_IrIbopPermission() + implicit none + Get_IrIbopPermission = permissions%IrIbopPermission + end function + + + subroutine Set_InstallMudBucketPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%InstallMudBucketPermission == v) return + #endif + permissions%InstallMudBucketPermission = v + #ifdef deb + print*, 'permissions%InstallMudBucketPermission=', permissions%InstallMudBucketPermission + #endif + call permissions%OnInstallMudBucketPermissionChange%RunAll() + end subroutine + + logical function Get_InstallMudBucketPermission() + implicit none + Get_InstallMudBucketPermission = permissions%InstallMudBucketPermission + end function + + subroutine Set_InstallFillupHeadPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%InstallFillupHeadPermission == v) return + #endif + permissions%InstallFillupHeadPermission = v + #ifdef deb + print*, 'InstallFillupHeadPermission=', permissions%InstallFillupHeadPermission + #endif + call permissions%OnInstallFillupHeadPermissionChange%RunAll() + end subroutine + + logical function Get_InstallFillupHeadPermission() + implicit none + Get_InstallFillupHeadPermission = permissions%InstallFillupHeadPermission + end function + + subroutine Set_FillupHeadPermission(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(permissions%FillupHeadPermission == v) return + #endif + permissions%FillupHeadPermission = v + #ifdef deb + print*, 'FillupHeadPermission=', permissions%FillupHeadPermission + #endif + call permissions%OnFillupHeadPermissionChange%RunAll() + end subroutine + + logical function Get_FillupHeadPermission() + implicit none + Get_FillupHeadPermission = permissions%FillupHeadPermission + end function + +end module \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CHookHeight.f90 b/CSharp/OperationScenarios/SoftwareInputs/CHookHeight.f90 deleted file mode 100644 index 963f368..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CHookHeight.f90 +++ /dev/null @@ -1,37 +0,0 @@ -module CHookHeight - use CVoidEventHandlerCollection - implicit none - real :: HookHeight = 0 - - public - type(VoidEventHandlerCollection) :: OnHookHeightChange - - private :: HookHeight - - contains - - subroutine Set_HookHeight(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(HookHeight == v) return -#endif - HookHeight = v -#ifdef deb - print*, 'HookHeight=', HookHeight -#endif - call OnHookHeightChange%RunAll() - end subroutine - - real function Get_HookHeight() - implicit none - Get_HookHeight = HookHeight - end function - - subroutine Subscribe_HookHeight() - use CHookVariables!, only: OnHookHeight => OnHookHeightChange - implicit none - call Hook%OnHookHeightChange%Add(Set_HookHeight) - end subroutine - -end module CHookHeight \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CIbopHeight.f90 b/CSharp/OperationScenarios/SoftwareInputs/CIbopHeight.f90 deleted file mode 100644 index b0d62a4..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CIbopHeight.f90 +++ /dev/null @@ -1,58 +0,0 @@ -module CIbopHeight - use CVoidEventHandlerCollection - implicit none - real :: IbopHeight = 0 - - public - - type(VoidEventHandlerCollection) :: OnIbopHeightChange - - private :: IbopHeight - - contains - - - subroutine Set_IbopHeight(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(IbopHeight == v) return -#endif - IbopHeight = v -#ifdef deb - print*, 'IbopHeight=', IbopHeight -#endif - call OnIbopHeightChange%RunAll() - end subroutine - - real function Get_IbopHeight() - implicit none - Get_IbopHeight = IbopHeight - !Get_IbopHeight = 23.0 - end function - - - - - subroutine Set_IbopHeight_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IbopHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_IbopHeight_WN' :: Set_IbopHeight_WN - implicit none - real , intent(in) :: v - call Set_IbopHeight(v) - end subroutine - real function Get_IbopHeight_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IbopHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IbopHeight_WN' :: Get_IbopHeight_WN - implicit none - Get_IbopHeight_WN = IbopHeight - !Get_IbopHeight_WN = 23.0 - end function - - - subroutine Subscribe_IbopHeight() - implicit none - end subroutine - - -end module CIbopHeight \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CNearFloorConnection.f90 b/CSharp/OperationScenarios/SoftwareInputs/CNearFloorConnection.f90 deleted file mode 100644 index 336b4e4..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CNearFloorConnection.f90 +++ /dev/null @@ -1,60 +0,0 @@ -module CNearFloorConnection - use CVoidEventHandlerCollection - implicit none - real :: NearFloorConnection = 0 - - public - - type(VoidEventHandlerCollection) :: OnNearFloorConnectionChange - - private :: NearFloorConnection - - contains - - - subroutine Set_NearFloorConnection(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(NearFloorConnection == v) return -#endif - NearFloorConnection = v -#ifdef deb - print*, 'NearFloorConnection=', NearFloorConnection -#endif - call OnNearFloorConnectionChange%RunAll() - end subroutine - - real function Get_NearFloorConnection() - implicit none - Get_NearFloorConnection = NearFloorConnection - !Get_NearFloorConnection = 4 - end function - - - - - subroutine Set_NearFloorConnection_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_NearFloorConnection_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_NearFloorConnection_WN' :: Set_NearFloorConnection_WN - implicit none - real , intent(in) :: v - call Set_NearFloorConnection(v) - end subroutine - - - real function Get_NearFloorConnection_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_NearFloorConnection_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_NearFloorConnection_WN' :: Get_NearFloorConnection_WN - implicit none - Get_NearFloorConnection_WN = NearFloorConnection - !Get_NearFloorConnection_WN = 4 - end function - - - - subroutine Subscribe_NearFloorConnection() - implicit none - end subroutine - -end module CNearFloorConnection \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CSafetyValveHeight.f90 b/CSharp/OperationScenarios/SoftwareInputs/CSafetyValveHeight.f90 deleted file mode 100644 index 6941606..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CSafetyValveHeight.f90 +++ /dev/null @@ -1,59 +0,0 @@ -module CSafetyValveHeight - use CVoidEventHandlerCollection - implicit none - real :: SafetyValveHeight = 0 - - public - - type(VoidEventHandlerCollection) :: OnSafetyValveHeightChange - - private :: SafetyValveHeight - - contains - - - subroutine Set_SafetyValveHeight(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SafetyValveHeight == v) return -#endif - SafetyValveHeight = v -#ifdef deb - print*, 'SafetyValveHeight=', SafetyValveHeight -#endif - call OnSafetyValveHeightChange%RunAll() - end subroutine - - real function Get_SafetyValveHeight() - implicit none - Get_SafetyValveHeight = SafetyValveHeight - !Get_SafetyValveHeight = 23 - end function - - - - - - subroutine Set_SafetyValveHeight_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SafetyValveHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SafetyValveHeight_WN' :: Set_SafetyValveHeight_WN - implicit none - real , intent(in) :: v - call Set_SafetyValveHeight(v) - end subroutine - - real function Get_SafetyValveHeight_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SafetyValveHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SafetyValveHeight_WN' :: Get_SafetyValveHeight_WN - implicit none - Get_SafetyValveHeight_WN = SafetyValveHeight - !Get_SafetyValveHeight_WN = 23 - end function - - - subroutine Subscribe_SafetyValveHeight() - implicit none - end subroutine - -end module CSafetyValveHeight \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CSlackOff.f90 b/CSharp/OperationScenarios/SoftwareInputs/CSlackOff.f90 deleted file mode 100644 index f6c0cbc..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CSlackOff.f90 +++ /dev/null @@ -1,54 +0,0 @@ -module CSlackOff - use CVoidEventHandlerCollection - implicit none - logical :: SlackOff = .false. - - public - - type(VoidEventHandlerCollection) :: OnSlackOffChange - - private :: SlackOff - - contains - - - subroutine Set_SlackOff(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(SlackOff == v) return -#endif - SlackOff = v -#ifdef deb - print*, 'SlackOff=', SlackOff -#endif - call OnSlackOffChange%RunAll() - end subroutine - - logical function Get_SlackOff() - implicit none - Get_SlackOff = SlackOff - end function - - - - subroutine Set_SlackOff_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlackOff_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_SlackOff_WN' :: Set_SlackOff_WN - implicit none - logical , intent(in) :: v - call Set_SlackOff(v) - end subroutine - - logical function Get_SlackOff_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SlackOff_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SlackOff_WN' :: Get_SlackOff_WN - implicit none - Get_SlackOff_WN = SlackOff - end function - - subroutine Subscribe_SlackOff() - implicit none - end subroutine - -end module CSlackOff \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CStandRack.f90 b/CSharp/OperationScenarios/SoftwareInputs/CStandRack.f90 deleted file mode 100644 index 14c8bfd..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CStandRack.f90 +++ /dev/null @@ -1,38 +0,0 @@ -module CStandRack - use CVoidEventHandlerCollection - implicit none - integer :: StandRack = 0 - - public - - type(VoidEventHandlerCollection) :: OnStandRackChanged - - private :: StandRack - - contains - - subroutine Set_StandRack(v) - implicit none - integer , intent(in) :: v -#ifdef ExcludeExtraChanges - if(StandRack == v) return -#endif - StandRack = v -#ifdef deb - print*, 'StandRack=', StandRack -#endif - call OnStandRackChanged%RunAll() - end subroutine - - integer function Get_StandRack() - implicit none - Get_StandRack = StandRack - end function - - subroutine Subscribe_StandRack() - use CCommonVariables - implicit none - call Common%OnStandRackChange%AssignTo(Set_StandRack) - end subroutine - -end module CStandRack \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CStringPressure.f90 b/CSharp/OperationScenarios/SoftwareInputs/CStringPressure.f90 deleted file mode 100644 index 6fbda76..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CStringPressure.f90 +++ /dev/null @@ -1,57 +0,0 @@ -module CStringPressure - use CVoidEventHandlerCollection - implicit none - real :: StringPressure = 0 - - public - - type(VoidEventHandlerCollection) :: OnStringPressureChange - - private :: StringPressure - - contains - - - subroutine Set_StringPressure(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(StringPressure == v) return -#endif - StringPressure = v -#ifdef deb - print*, 'StringPressure=', StringPressure -#endif - call OnStringPressureChange%RunAll() - end subroutine - - real function Get_StringPressure() - implicit none - Get_StringPressure = StringPressure - end function - - - - - subroutine Set_StringPressure_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_StringPressure_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_StringPressure_WN' :: Set_StringPressure_WN - implicit none - real , intent(in) :: v - call Set_StringPressure(v) - end subroutine - - real function Get_StringPressure_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_StringPressure_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_StringPressure_WN' :: Get_StringPressure_WN - implicit none - Get_StringPressure_WN = StringPressure - end function - - - - subroutine Subscribe_StringPressure() - implicit none - end subroutine - -end module CStringPressure \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CTdsStemJointHeight.f90 b/CSharp/OperationScenarios/SoftwareInputs/CTdsStemJointHeight.f90 deleted file mode 100644 index ae5f883..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CTdsStemJointHeight.f90 +++ /dev/null @@ -1,55 +0,0 @@ -module CTdsStemJointHeight - use CVoidEventHandlerCollection - implicit none - real :: TdsStemJointHeight = 0 - - public - type(VoidEventHandlerCollection) :: OnTdsStemJointHeightChange - - private :: TdsStemJointHeight - - contains - - subroutine Set_TdsStemJointHeight(v) - implicit none - real , intent(in) :: v -#ifdef ExcludeExtraChanges - if(TdsStemJointHeight == v) return -#endif - TdsStemJointHeight = v -#ifdef deb - print*, 'TdsStemJointHeight=', TdsStemJointHeight -#endif - call OnTdsStemJointHeightChange%RunAll() - end subroutine - - real function Get_TdsStemJointHeight() - implicit none - Get_TdsStemJointHeight = TdsStemJointHeight - end function - - - - - subroutine Set_TdsStemJointHeight_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsStemJointHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_TdsStemJointHeight_WN' :: Set_TdsStemJointHeight_WN - implicit none - real , intent(in) :: v - call Set_TdsStemJointHeight(v) - end subroutine - - real function Get_TdsStemJointHeight_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsStemJointHeight_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_TdsStemJointHeight_WN' :: Get_TdsStemJointHeight_WN - implicit none - Get_TdsStemJointHeight_WN = TdsStemJointHeight - end function - - - - subroutine Subscribe_TdsStemJointHeight() - implicit none - end subroutine - -end module CTdsStemJointHeight \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputs/CZeroStringSpeed.f90 b/CSharp/OperationScenarios/SoftwareInputs/CZeroStringSpeed.f90 deleted file mode 100644 index d62ca14..0000000 --- a/CSharp/OperationScenarios/SoftwareInputs/CZeroStringSpeed.f90 +++ /dev/null @@ -1,60 +0,0 @@ -module CZeroStringSpeed - use CVoidEventHandlerCollection - implicit none - logical :: ZeroStringSpeed = .false. - - public - - type(VoidEventHandlerCollection) :: OnZeroStringSpeedChange - - private :: ZeroStringSpeed - - contains - - - subroutine Set_ZeroStringSpeed(v) - implicit none - logical , intent(in) :: v -#ifdef ExcludeExtraChanges - if(ZeroStringSpeed == v) return -#endif - ZeroStringSpeed = v -#ifdef deb - print*, 'ZeroStringSpeed=', ZeroStringSpeed -#endif - call OnZeroStringSpeedChange%RunAll() - end subroutine - - logical function Get_ZeroStringSpeed() - implicit none - Get_ZeroStringSpeed = ZeroStringSpeed - !Get_ZeroStringSpeed = .true. - end function - - - - - subroutine Set_ZeroStringSpeed_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_ZeroStringSpeed_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_ZeroStringSpeed_WN' :: Set_ZeroStringSpeed_WN - implicit none - logical , intent(in) :: v - call Set_ZeroStringSpeed(v) - end subroutine - - logical function Get_ZeroStringSpeed_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_ZeroStringSpeed_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_ZeroStringSpeed_WN' :: Get_ZeroStringSpeed_WN - implicit none - Get_ZeroStringSpeed_WN = ZeroStringSpeed - !Get_ZeroStringSpeed_WN = .true. - end function - - - - subroutine Subscribe_ZeroStringSpeed() - implicit none - - end subroutine - -end module CZeroStringSpeed \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareInputsVariables.f90 b/CSharp/OperationScenarios/SoftwareInputsVariables.f90 new file mode 100644 index 0000000..a25e5e1 --- /dev/null +++ b/CSharp/OperationScenarios/SoftwareInputsVariables.f90 @@ -0,0 +1,195 @@ +module SoftwareInputsVariables + use CVoidEventHandlerCollection + type:: SoftwareInputsType + real :: HookHeight = 0 + type(VoidEventHandlerCollection) :: OnHookHeightChange + real :: IbopHeight = 0 + type(VoidEventHandlerCollection) :: OnIbopHeightChange + real :: NearFloorConnection = 0 + type(VoidEventHandlerCollection) :: OnNearFloorConnectionChange + real :: SafetyValveHeight = 0 + type(VoidEventHandlerCollection) :: OnSafetyValveHeightChange + logical :: SlackOff = .false. + type(VoidEventHandlerCollection) :: OnSlackOffChange + integer :: StandRack = 0 + type(VoidEventHandlerCollection) :: OnStandRackChanged + real :: StringPressure = 0 + type(VoidEventHandlerCollection) :: OnStringPressureChange + real :: TdsStemJointHeight = 0 + type(VoidEventHandlerCollection) :: OnTdsStemJointHeightChange + logical :: ZeroStringSpeed = .false. + type(VoidEventHandlerCollection) :: OnZeroStringSpeedChange + end type SoftwareInputsType + type(SoftwareInputsType):: softwareInputs + + contains + + subroutine Set_ZeroStringSpeed(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%ZeroStringSpeed == v) return + #endif + softwareInputs%ZeroStringSpeed = v + #ifdef deb + print*, 'ZeroStringSpeed=', softwareInputs%ZeroStringSpeed + #endif + call softwareInputs%OnZeroStringSpeedChange%RunAll() + end subroutine + + logical function Get_ZeroStringSpeed() + implicit none + Get_ZeroStringSpeed = softwareInputs%ZeroStringSpeed + !Get_ZeroStringSpeed = .true. + end function + + subroutine Set_TdsStemJointHeight(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%TdsStemJointHeight == v) return + #endif + softwareInputs%TdsStemJointHeight = v + #ifdef deb + print*, 'TdsStemJointHeight=', softwareInputs%TdsStemJointHeight + #endif + call softwareInputs%OnTdsStemJointHeightChange%RunAll() + end subroutine + + real function Get_TdsStemJointHeight() + implicit none + Get_TdsStemJointHeight = softwareInputs%TdsStemJointHeight + end function + + + subroutine Set_StringPressure(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%StringPressure == v) return + #endif + softwareInputs%StringPressure = v + #ifdef deb + print*, 'StringPressure=', softwareInputs%StringPressure + #endif + call softwareInputs%OnStringPressureChange%RunAll() + end subroutine + + real function Get_StringPressure() + implicit none + Get_StringPressure = softwareInputs%StringPressure + end function + + subroutine Set_StandRack(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%StandRack == v) return + #endif + softwareInputs%StandRack = v + #ifdef deb + print*, 'StandRack=', softwareInputs%StandRack + #endif + call softwareInputs%OnStandRackChanged%RunAll() + end subroutine + + integer function Get_StandRack() + implicit none + Get_StandRack = softwareInputs%StandRack + end function + + subroutine Set_SlackOff(v) + implicit none + logical , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%SlackOff == v) return + #endif + softwareInputs%SlackOff = v + #ifdef deb + print*, 'SlackOff=', softwareInputs%SlackOff + #endif + call softwareInputs%OnSlackOffChange%RunAll() + end subroutine + + logical function Get_SlackOff() + implicit none + Get_SlackOff = softwareInputs%SlackOff + end function + + subroutine Set_SafetyValveHeight(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%SafetyValveHeight == v) return + #endif + softwareInputs%SafetyValveHeight = v + #ifdef deb + print*, 'SafetyValveHeight=', softwareInputs%SafetyValveHeight + #endif + call softwareInputs%OnSafetyValveHeightChange%RunAll() + end subroutine + + real function Get_SafetyValveHeight() + implicit none + Get_SafetyValveHeight = softwareInputs%SafetyValveHeight + !Get_SafetyValveHeight = 23 + end function + + + subroutine Set_NearFloorConnection(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%NearFloorConnection == v) return + #endif + softwareInputs%NearFloorConnection = v + #ifdef deb + print*, 'NearFloorConnection=', softwareInputs%NearFloorConnection + #endif + call softwareInputs%OnNearFloorConnectionChange%RunAll() + end subroutine + + real function Get_NearFloorConnection() + implicit none + Get_NearFloorConnection = softwareInputs%NearFloorConnection + !Get_NearFloorConnection = 4 + end function + + subroutine Set_IbopHeight(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%IbopHeight == v) return + #endif + softwareInputs%IbopHeight = v + #ifdef deb + print*, 'IbopHeight=', softwareInputs%IbopHeight + #endif + call softwareInputs%OnIbopHeightChange%RunAll() + end subroutine + + real function Get_IbopHeight() + implicit none + Get_IbopHeight = softwareInputs%IbopHeight + !Get_IbopHeight = 23.0 + end function + + subroutine Set_HookHeight(v) + implicit none + real , intent(in) :: v + #ifdef ExcludeExtraChanges + if(softwareInputs%HookHeight == v) return + #endif + softwareInputs%HookHeight = v + #ifdef deb + print*, 'HookHeight=', softwareInputs%HookHeight + #endif + call softwareInputs%OnHookHeightChange%RunAll() + end subroutine + + real function Get_HookHeight() + implicit none + Get_HookHeight = softwareInputs%HookHeight + end function + +end module \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdate.f90 b/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdate.f90 deleted file mode 100644 index 0b97c52..0000000 --- a/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdate.f90 +++ /dev/null @@ -1,33 +0,0 @@ -module CStringUpdate - use COperationScenariosVariables - implicit none - contains - - subroutine Evaluate_StringUpdate() - implicit none - -! if (DriveType == TopDrive_DriveType) then -!#ifdef OST -! print*, 'Evaluate_StringUpdate=TopDrive' -!#endif -! endif -! -! -! -! -! -! -! -! if (DriveType == Kelly_DriveType) then -!#ifdef OST -! print*, 'Evaluate_StringUpdate=Kelly' -!#endif -! endif -! - end subroutine - - subroutine Subscribe_StringUpdate() - implicit none - end subroutine - -end module CStringUpdate \ No newline at end of file diff --git a/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdateVariables.f90 b/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdateVariables.f90 index ed1a071..2b90ef5 100644 --- a/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdateVariables.f90 +++ b/CSharp/OperationScenarios/SoftwareOutputs/CStringUpdateVariables.f90 @@ -22,24 +22,10 @@ module CStringUpdateVariables subroutine Set_StringUpdate(v) implicit none integer , intent(in) :: v -#ifdef ExcludeExtraChanges - if(StringUpdate == v) return -#endif + #ifdef ExcludeExtraChanges + if(StringUpdate == v) return + #endif StringUpdate = v -#ifdef deb - !if(StringUpdate==STRING_UPDATE_NEUTRAL) then - ! print*, 'StringUpdate=STRING_UPDATE_NEUTRAL' - !else if(StringUpdate==STRING_UPDATE_ADD_SINGLE) then - ! print*, 'StringUpdate=STRING_UPDATE_ADD_SINGLE' - !else if(StringUpdate==STRING_UPDATE_ADD_STAND) then - ! print*, 'StringUpdate=STRING_UPDATE_ADD_STAND' - !else if(StringUpdate==STRING_UPDATE_REMOVE_SINGLE) then - ! print*, 'StringUpdate=STRING_UPDATE_REMOVE_SINGLE' - !else if(StringUpdate==STRING_UPDATE_REMOVE_STAND) then - ! print*, 'StringUpdate=STRING_UPDATE_REMOVE_STAND' - !endif - !print*, 'StringUpdate=', StringUpdate -#endif call OnStringUpdateChange%RunAll(v) end subroutine diff --git a/CSharp/OperationScenarios/SoftwareOutputsVariables.f90 b/CSharp/OperationScenarios/SoftwareOutputsVariables.f90 new file mode 100644 index 0000000..e69de29 diff --git a/CSharp/OperationScenarios/Test/TestOperationScenarios.f90 b/CSharp/OperationScenarios/Test/TestOperationScenarios.f90 deleted file mode 100644 index 44e0924..0000000 --- a/CSharp/OperationScenarios/Test/TestOperationScenarios.f90 +++ /dev/null @@ -1,831 +0,0 @@ -module TestOperationScenarios - use CKellyConnectionEnumVariables - use CElevatorConnectionEnumVariables - - use CCloseKellyCockLedNotificationVariables - use CCloseSafetyValveLedNotificationVariables - use CFillMouseHoleLedNotificationVariables - use CIrIBopLedNotificationVariables - use CIrSafetyValveLedNotificationVariables - use CLatchLedNotificationVariables - use COpenKellyCockLedNotificationVariables - use COpenSafetyValveLedNotificationVariables - use CSlipsNotificationVariables - use CSwingLedNotificationVariables - use CTongNotificationVariables - use CUnlatchLedNotificationVariables - - use CInstallFillupHeadPermissionVariables - use CInstallMudBucketPermissionVariables - use CIrIbopPermissionVariables - use CIrSafetyValvePermissionVariables - use CRemoveFillupHeadPermissionVariables - use CRemoveMudBucketPermissionVariables - - use CHookHeight - use CIbopHeight - use CNearFloorConnection - use CSafetyValveHeight - use CSlackOff - use CStandRack - use CStringPressure - use CZeroStringSpeed - - use CUnityInputs - !, only: & - ! Get_ElevatorConnectionPossible, & - ! Get_JointConnectionPossible, & - ! Get_NearMonkeyBoardPosition, & - ! Get_NearFloorPosition, & - ! Get_SingleSetInMouseHole, & - ! Get_SwingCenter, & - ! Get_NewHookHeight - use CUnityOutputs - - use CBucketEnumVariables - use CElevatorEnumVariables - use CHeadEnumVariables - use CIbopEnumVariables - use CKellyEnumVariables - use CMouseHoleEnumVariables - use COperationConditionEnumVariables - use CSafetyValveEnumVariables - use CSlipsEnumVariables - use CSwingEnumVariables - use CTongEnumVariables - - use CRigSizeVariables - use CHoistingVariables - - use CFlowPipeDisconnectEnumVariables - use CFlowKellyDisconnectEnumVariables - - use CStringUpdateVariables - - implicit none - public - contains - - - integer function GetElevatorConnection() - !DEC$ ATTRIBUTES DLLEXPORT :: GetElevatorConnection - !DEC$ ATTRIBUTES ALIAS: 'GetElevatorConnection' :: GetElevatorConnection - implicit none - GetElevatorConnection = Get_ElevatorConnection() - - end function - - integer function GetKellyConnection() - !DEC$ ATTRIBUTES DLLEXPORT :: GetKellyConnection - !DEC$ ATTRIBUTES ALIAS: 'GetKellyConnection' :: GetKellyConnection - implicit none - GetKellyConnection = Get_KellyConnection() - end function - - - - logical function GetCloseKellyCockLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetCloseKellyCockLedU - !DEC$ ATTRIBUTES ALIAS: 'GetCloseKellyCockLedU' :: GetCloseKellyCockLedU - implicit none - GetCloseKellyCockLedU = Get_CloseKellyCockLed() - end function - - logical function GetCloseSafetyValveLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetCloseSafetyValveLedU - !DEC$ ATTRIBUTES ALIAS: 'GetCloseSafetyValveLedU' :: GetCloseSafetyValveLedU - implicit none - GetCloseSafetyValveLedU = Get_CloseSafetyValveLed() - end function - - logical function GetFillMouseHoleLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFillMouseHoleLedU - !DEC$ ATTRIBUTES ALIAS: 'GetFillMouseHoleLedU' :: GetFillMouseHoleLedU - implicit none - GetFillMouseHoleLedU = Get_FillMouseHoleLed() - end function - - logical function GetIrIBopLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIrIBopLedU - !DEC$ ATTRIBUTES ALIAS: 'GetIrIBopLedU' :: GetIrIBopLedU - implicit none - GetIrIBopLedU = Get_IrIBopLed() - end function - - logical function GetIrSafetyValveLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIrSafetyValveLedU - !DEC$ ATTRIBUTES ALIAS: 'GetIrSafetyValveLedU' :: GetIrSafetyValveLedU - implicit none - GetIrSafetyValveLedU = Get_IrSafetyValveLed() - end function - - logical function GetLatchLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetLatchLedU - !DEC$ ATTRIBUTES ALIAS: 'GetLatchLedU' :: GetLatchLedU - implicit none - GetLatchLedU = Get_LatchLed() - end function - - logical function GetOpenKellyCockLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetOpenKellyCockLedU - !DEC$ ATTRIBUTES ALIAS: 'GetOpenKellyCockLedU' :: GetOpenKellyCockLedU - implicit none - GetOpenKellyCockLedU = Get_OpenKellyCockLed() - end function - - logical function GetOpenSafetyValveLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetOpenSafetyValveLedU - !DEC$ ATTRIBUTES ALIAS: 'GetOpenSafetyValveLedU' :: GetOpenSafetyValveLedU - implicit none - GetOpenSafetyValveLedU = Get_OpenSafetyValveLed() - end function - - logical function GetSlipsNotification() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSlipsNotification - !DEC$ ATTRIBUTES ALIAS: 'GetSlipsNotification' :: GetSlipsNotification - implicit none - GetSlipsNotification = Get_SlipsNotification() - end function - - logical function GetSwingLedU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwingLedU - !DEC$ ATTRIBUTES ALIAS: 'GetSwingLedU' :: GetSwingLedU - implicit none - GetSwingLedU = Get_SwingLed() - end function - - logical function GetTongNotification() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTongNotification - !DEC$ ATTRIBUTES ALIAS: 'GetTongNotification' :: GetTongNotification - implicit none - GetTongNotification = Get_TongNotification() - end function - - logical function GetUnlatchLed() - !DEC$ ATTRIBUTES DLLEXPORT :: GetUnlatchLed - !DEC$ ATTRIBUTES ALIAS: 'GetUnlatchLed' :: GetUnlatchLed - implicit none - GetUnlatchLed = Get_UnlatchLed() - end function - - logical function GetInstallFillupHeadPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetInstallFillupHeadPermission - !DEC$ ATTRIBUTES ALIAS: 'GetInstallFillupHeadPermission' :: GetInstallFillupHeadPermission - implicit none - GetInstallFillupHeadPermission = Get_InstallFillupHeadPermission() - end function - - logical function GetInstallMudBucketPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetInstallMudBucketPermission - !DEC$ ATTRIBUTES ALIAS: 'GetInstallMudBucketPermission' :: GetInstallMudBucketPermission - implicit none - GetInstallMudBucketPermission = Get_InstallMudBucketPermission() - end function - - logical function GetIrIbopPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIrIbopPermission - !DEC$ ATTRIBUTES ALIAS: 'GetIrIbopPermission' :: GetIrIbopPermission - implicit none - GetIrIbopPermission = Get_IrIbopPermission() - end function - - logical function GetIrSafetyValvePermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIrSafetyValvePermission - !DEC$ ATTRIBUTES ALIAS: 'GetIrSafetyValvePermission' :: GetIrSafetyValvePermission - implicit none - GetIrSafetyValvePermission = Get_IrSafetyValvePermission() - end function - - logical function GetRemoveFillupHeadPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetRemoveFillupHeadPermission - !DEC$ ATTRIBUTES ALIAS: 'GetRemoveFillupHeadPermission' :: GetRemoveFillupHeadPermission - implicit none - GetRemoveFillupHeadPermission = Get_RemoveFillupHeadPermission() - end function - - logical function GetRemoveMudBucketPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetRemoveMudBucketPermission - !DEC$ ATTRIBUTES ALIAS: 'GetRemoveMudBucketPermission' :: GetRemoveMudBucketPermission - implicit none - GetRemoveMudBucketPermission = Get_RemoveMudBucketPermission() - end function - - real function GetHookHeightU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetHookHeightU - !DEC$ ATTRIBUTES ALIAS: 'GetHookHeightU' :: GetHookHeightU - implicit none - GetHookHeightU = Get_HookHeight() - end function - - real(8) function GetIbopHeight() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIbopHeight - !DEC$ ATTRIBUTES ALIAS: 'GetIbopHeight' :: GetIbopHeight - implicit none - GetIbopHeight = Get_IbopHeight() - end function - - real(8) function GetNearFloorConnection() - !DEC$ ATTRIBUTES DLLEXPORT :: GetNearFloorConnection - !DEC$ ATTRIBUTES ALIAS: 'GetNearFloorConnection' :: GetNearFloorConnection - implicit none - GetNearFloorConnection = Get_NearFloorConnection() - end function - - real(8) function GetSafetyValveHeight() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSafetyValveHeight - !DEC$ ATTRIBUTES ALIAS: 'GetSafetyValveHeight' :: GetSafetyValveHeight - implicit none - GetSafetyValveHeight = Get_SafetyValveHeight() - end function - - logical function GetSlackOff() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSlackOff - !DEC$ ATTRIBUTES ALIAS: 'GetSlackOff' :: GetSlackOff - implicit none - GetSlackOff = Get_SlackOff() - end function - - integer function GetStandRackU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetStandRackU - !DEC$ ATTRIBUTES ALIAS: 'GetStandRackU' :: GetStandRackU - implicit none - GetStandRackU = Get_StandRack() - end function - - real(8) function GetRotaryRpmU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryRpmU - !DEC$ ATTRIBUTES ALIAS: 'GetRotaryRpmU' :: GetRotaryRpmU - implicit none - GetRotaryRpmU = GetRotaryRpm() - end function - - real(8) function GetStringPressure() - !DEC$ ATTRIBUTES DLLEXPORT :: GetStringPressure - !DEC$ ATTRIBUTES ALIAS: 'GetStringPressure' :: GetStringPressure - implicit none - GetStringPressure = Get_StringPressure() - end function - - logical function GetZeroStringSpeed() - !DEC$ ATTRIBUTES DLLEXPORT :: GetZeroStringSpeed - !DEC$ ATTRIBUTES ALIAS: 'GetZeroStringSpeed' :: GetZeroStringSpeed - implicit none - GetZeroStringSpeed = Get_ZeroStringSpeed() - end function - - real(8) function GetFlowRateU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowRateU - !DEC$ ATTRIBUTES ALIAS: 'GetFlowRateU' :: GetFlowRateU - implicit none - GetFlowRateU = GetFlowRate() - end function - - real(8) function GetPedalU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetPedalU - !DEC$ ATTRIBUTES ALIAS: 'GetPedalU' :: GetPedalU - implicit none - GetPedalU = GetPedal() - end function - - real(8) function GetFloorHeightU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFloorHeightU - !DEC$ ATTRIBUTES ALIAS: 'GetFloorHeightU' :: GetFloorHeightU - implicit none - GetFloorHeightU = RigSize%RigFloorHeight - end function - - real(8) function GetCrownHeightU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetCrownHeightU - !DEC$ ATTRIBUTES ALIAS: 'GetCrownHeightU' :: GetCrownHeightU - implicit none - GetCrownHeightU = RigSize%CrownHeight - end function - - real(8) function GetKellyHoseVibrationRateU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetKellyHoseVibrationRateU - !DEC$ ATTRIBUTES ALIAS: 'GetKellyHoseVibrationRateU' :: GetKellyHoseVibrationRateU - implicit none - GetKellyHoseVibrationRateU = GetKellyHoseVibrationRate() - end function - - integer function GetDriveTypeU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetDriveTypeU - !DEC$ ATTRIBUTES ALIAS: 'GetDriveTypeU' :: GetDriveTypeU - implicit none - - GetDriveTypeU = Hoisting%DriveType - end function - - logical function GetElevatorConnectionPossibility() - !DEC$ ATTRIBUTES DLLEXPORT :: GetElevatorConnectionPossibility - !DEC$ ATTRIBUTES ALIAS: 'GetElevatorConnectionPossibility' :: GetElevatorConnectionPossibility - implicit none - GetElevatorConnectionPossibility = Get_ElevatorConnectionPossible() - end function - - logical function GetJointConnectionPossibility() - !DEC$ ATTRIBUTES DLLEXPORT :: GetJointConnectionPossibility - !DEC$ ATTRIBUTES ALIAS: 'GetJointConnectionPossibility' :: GetJointConnectionPossibility - implicit none - GetJointConnectionPossibility = Get_JointConnectionPossible() - end function - - logical function GetElevatorPickup() - !DEC$ ATTRIBUTES DLLEXPORT :: GetElevatorPickup - !DEC$ ATTRIBUTES ALIAS: 'GetElevatorPickup' :: GetElevatorPickup - implicit none - GetElevatorPickup = Get_ElevatorPickup() - end function - - logical function GetNearFloorPosition() - !DEC$ ATTRIBUTES DLLEXPORT :: GetNearFloorPosition - !DEC$ ATTRIBUTES ALIAS: 'GetNearFloorPosition' :: GetNearFloorPosition - implicit none - GetNearFloorPosition = Get_NearFloorPosition() - end function - - logical function GetSingleSetInMouseHole() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSingleSetInMouseHole - !DEC$ ATTRIBUTES ALIAS: 'GetSingleSetInMouseHole' :: GetSingleSetInMouseHole - implicit none - GetSingleSetInMouseHole = Get_SingleSetInMouseHole() - end function - - logical function GetSwingCenter() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwingCenter - !DEC$ ATTRIBUTES ALIAS: 'GetSwingCenter' :: GetSwingCenter - implicit none - !GetSwingCenter = Get_SwingCenter() - GetSwingCenter = .false. - end function - - integer function GetMudBucket() - !DEC$ ATTRIBUTES DLLEXPORT :: GetMudBucket - !DEC$ ATTRIBUTES ALIAS: 'GetMudBucket' :: GetMudBucket - implicit none - GetMudBucket = Get_MudBucket() - end function - - integer function GetElevator() - !DEC$ ATTRIBUTES DLLEXPORT :: GetElevator - !DEC$ ATTRIBUTES ALIAS: 'GetElevator' :: GetElevator - implicit none - GetElevator = Get_Elevator() - end function - - integer function GetFlow() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlow - !DEC$ ATTRIBUTES ALIAS: 'GetFlow' :: GetFlow - implicit none - GetFlow = 0 - end function - - integer function GetFillupHead() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFillupHead - !DEC$ ATTRIBUTES ALIAS: 'GetFillupHead' :: GetFillupHead - implicit none - GetFillupHead = Get_FillupHead() - end function - - integer function GetIbop() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIbop - !DEC$ ATTRIBUTES ALIAS: 'GetIbop' :: GetIbop - implicit none - GetIbop = Get_Ibop() - end function - - integer function GetKelly() - !DEC$ ATTRIBUTES DLLEXPORT :: GetKelly - !DEC$ ATTRIBUTES ALIAS: 'GetKelly' :: GetKelly - implicit none - GetKelly = Get_Kelly() - end function - - integer function GetMouseHole() - !DEC$ ATTRIBUTES DLLEXPORT :: GetMouseHole - !DEC$ ATTRIBUTES ALIAS: 'GetMouseHole' :: GetMouseHole - implicit none - GetMouseHole = Get_MouseHole() - end function - - integer function GetOperationCondition() - !DEC$ ATTRIBUTES DLLEXPORT :: GetOperationCondition - !DEC$ ATTRIBUTES ALIAS: 'GetOperationCondition' :: GetOperationCondition - implicit none - GetOperationCondition = Get_OperationCondition() - end function - - integer function GetSafetyValve() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSafetyValve - !DEC$ ATTRIBUTES ALIAS: 'GetSafetyValve' :: GetSafetyValve - implicit none - GetSafetyValve = Get_SafetyValve() - end function - - integer function GetSlips() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSlips - !DEC$ ATTRIBUTES ALIAS: 'GetSlips' :: GetSlips - implicit none - GetSlips = Get_Slips() - end function - - integer function GetSwing() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwing - !DEC$ ATTRIBUTES ALIAS: 'GetSwing' :: GetSwing - implicit none - GetSwing = Get_Swing() - end function - - - - - integer function GetTong() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTong - !DEC$ ATTRIBUTES ALIAS: 'GetTong' :: GetTong - implicit none - GetTong = Get_Tong() - end function - - integer function GetStringUpdateU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetStringUpdateU - !DEC$ ATTRIBUTES ALIAS: 'GetStringUpdateU' :: GetStringUpdateU - implicit none - GetStringUpdateU = Get_StringUpdate() - end function - - - - real(8) function GetNewHookHeightU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetNewHookHeightU - !DEC$ ATTRIBUTES ALIAS: 'GetNewHookHeightU' :: GetNewHookHeightU - implicit none - !GetNewHookHeightU = Get_NewHookHeight() - GetNewHookHeightU = 0d0 - end function - - real(8) function GetBlowoutFromStringPercentU() - !DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromStringPercentU - !DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromStringPercentU' :: GetBlowoutFromStringPercentU - implicit none - GetBlowoutFromStringPercentU = GetBlowoutFromStringPercent() - end function - - - - - - logical function GetMakeupTong() - !DEC$ ATTRIBUTES DLLEXPORT :: GetMakeupTong - !DEC$ ATTRIBUTES ALIAS: 'GetMakeupTong' :: GetMakeupTong - implicit none - !GetMakeupTong = Get_MakeupTong() - GetMakeupTong = .false. - end function - - logical function GetBreakupTong() - !DEC$ ATTRIBUTES DLLEXPORT :: GetBreakupTong - !DEC$ ATTRIBUTES ALIAS: 'GetBreakupTong' :: GetBreakupTong - implicit none - !GetBreakupTong = Get_BreakupTong() - GetBreakupTong = .false. - end function - - logical function GetSlipsSet() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSlipsSet - !DEC$ ATTRIBUTES ALIAS: 'GetSlipsSet' :: GetSlipsSet - implicit none - !GetSlipsSet = Get_SlipsSetU() - GetSlipsSet = .false. - end function - - logical function GetSlipsUnSet() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSlipsUnSet - !DEC$ ATTRIBUTES ALIAS: 'GetSlipsUnSet' :: GetSlipsUnSet - implicit none - !GetSlipsUnSet = Get_SlipsUnSetU() - GetSlipsUnSet = .false. - end function - - logical function GetLatch() - !DEC$ ATTRIBUTES DLLEXPORT :: GetLatch - !DEC$ ATTRIBUTES ALIAS: 'GetLatch' :: GetLatch - implicit none - !GetLatch = Get_Latch() - GetLatch = .false. - end function - - logical function GetUnlatch() - !DEC$ ATTRIBUTES DLLEXPORT :: GetUnlatch - !DEC$ ATTRIBUTES ALIAS: 'GetUnlatch' :: GetUnlatch - implicit none - !GetUnlatch = Get_Unlatch() - GetUnlatch = .false. - end function - - logical function GetOutOfMouseHole() - !DEC$ ATTRIBUTES DLLEXPORT :: GetOutOfMouseHole - !DEC$ ATTRIBUTES ALIAS: 'GetOutOfMouseHole' :: GetOutOfMouseHole - implicit none - !GetOutOfMouseHole = Get_OutOfMouseHole() - GetOutOfMouseHole = .false. - end function - - logical function GetIsKellyBushingSetInTable() - !DEC$ ATTRIBUTES DLLEXPORT :: GetIsKellyBushingSetInTable - !DEC$ ATTRIBUTES ALIAS: 'GetIsKellyBushingSetInTable' :: GetIsKellyBushingSetInTable - implicit none - GetIsKellyBushingSetInTable = Get_IsKellyBushingSetInTable() - end function - - - - - - - - - - ! TempVars - logical function GetSignal1U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal1U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal1U' :: GetSignal1U - implicit none - !GetSignal1U = GetSignal1() - GetSignal1U = .false. - end function - - logical function GetSignal2U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal2U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal2U' :: GetSignal2U - implicit none - !GetSignal2U = GetSignal2() - GetSignal2U = .false. - end function - - logical function GetSignal3U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal3U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal3U' :: GetSignal3U - implicit none - !GetSignal3U = GetSignal3() - GetSignal3U = .false. - end function - - logical function GetSignal4U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal4U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal4U' :: GetSignal4U - implicit none - !GetSignal4U = GetSignal4() - GetSignal4U = .false. - end function - - logical function GetSignal5U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal5U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal5U' :: GetSignal5U - implicit none - !GetSignal5U = GetSignal5() - GetSignal5U = .false. - end function - - logical function GetSignal6U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal6U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal6U' :: GetSignal6U - implicit none - !GetSignal6U = GetSignal6() - GetSignal6U = .false. - end function - - logical function GetSignal7U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal7U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal7U' :: GetSignal7U - implicit none - !GetSignal7U = GetSignal7() - GetSignal7U = .false. - end function - - logical function GetSignal8U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal8U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal8U' :: GetSignal8U - implicit none - !GetSignal8U = GetSignal8() - GetSignal8U = .false. - end function - - logical function GetSignal9U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal9U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal9U' :: GetSignal9U - implicit none - !GetSignal9U = GetSignal9() - GetSignal9U = .false. - end function - - logical function GetSignal10U() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal10U - !DEC$ ATTRIBUTES ALIAS: 'GetSignal10U' :: GetSignal10U - implicit none - !GetSignal10U = GetSignal10() - GetSignal10U = .false. - end function - - - real(8) function GetTopJiontHeight() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTopJiontHeight - !DEC$ ATTRIBUTES ALIAS: 'GetTopJiontHeight' :: GetTopJiontHeight - use TD_DrillStemComponents - implicit none - GetTopJiontHeight = TD_TopJointHeight - end function - - - - logical function GetBlowoutFromStringT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromStringT - !DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromStringT' :: GetBlowoutFromStringT - implicit none - GetBlowoutFromStringT = Get_BlowoutFromString() - end function - - logical function GetBlowoutFromAnnularT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromAnnularT - !DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromAnnularT' :: GetBlowoutFromAnnularT - implicit none - GetBlowoutFromAnnularT = Get_BlowoutFromAnnular() - end function - - logical function GetFlowFromReturnLineT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowFromReturnLineT - !DEC$ ATTRIBUTES ALIAS: 'GetFlowFromReturnLineT' :: GetFlowFromReturnLineT - implicit none - GetFlowFromReturnLineT = Get_FlowFromReturnLine() - end function - - real function GetFlowFromKellyT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowFromKellyT - !DEC$ ATTRIBUTES ALIAS: 'GetFlowFromKellyT' :: GetFlowFromKellyT - implicit none - GetFlowFromKellyT = Get_FlowFromKelly() - end function - - logical function GetFlowKellyDisconnectT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowKellyDisconnectT - !DEC$ ATTRIBUTES ALIAS: 'GetFlowKellyDisconnectT' :: GetFlowKellyDisconnectT - implicit none - GetFlowKellyDisconnectT = Get_FlowKellyDisconnect() - end function - - logical function GetFlowPipeDisconnectT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowPipeDisconnectT - !DEC$ ATTRIBUTES ALIAS: 'GetFlowPipeDisconnectT' :: GetFlowPipeDisconnectT - implicit none - GetFlowPipeDisconnectT = Get_FlowPipeDisconnect() - end function - - - !integer function GetFlowKellyDisconnectT2() - !!DEC$ ATTRIBUTES DLLEXPORT :: GetFlowKellyDisconnectT2 - !!DEC$ ATTRIBUTES ALIAS: 'GetFlowKellyDisconnectT2' :: GetFlowKellyDisconnectT2 - ! implicit none - ! GetFlowKellyDisconnectT2 = Get_FlowKellyDisconnect2() - !end function - - !integer function GetFlowPipeDisconnectT2() - !!DEC$ ATTRIBUTES DLLEXPORT :: GetFlowPipeDisconnectT2 - !!DEC$ ATTRIBUTES ALIAS: 'GetFlowPipeDisconnectT2' :: GetFlowPipeDisconnectT2 - ! implicit none - ! GetFlowPipeDisconnectT2 = Get_FlowPipeDisconnect2() - !end function - - - logical function GetSingleOutOfMouseHole() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSingleOutOfMouseHole - !DEC$ ATTRIBUTES ALIAS: 'GetSingleOutOfMouseHole' :: GetSingleOutOfMouseHole - implicit none - GetSingleOutOfMouseHole = .true. !Get_SingleOutOfMouseHole() - end function - - - - - - - - - - - - - - - - - - integer function GetTdsSwing() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsSwing - !DEC$ ATTRIBUTES ALIAS: 'GetTdsSwing' :: GetTdsSwing - use CTdsSwingEnumVariables - implicit none - GetTdsSwing = Get_TdsSwing() - end function - - integer function GetTdsSpine() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsSpine - !DEC$ ATTRIBUTES ALIAS: 'GetTdsSpine' :: GetTdsSpine - use CTdsSpineEnumVariables - implicit none - GetTdsSpine = Get_TdsSpine() - end function - - integer function GetTdsTong() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsTong - !DEC$ ATTRIBUTES ALIAS: 'GetTdsTong' :: GetTdsTong - use CTdsTongEnumVariables - implicit none - GetTdsTong = Get_TdsTong() - end function - - integer function GetTdsBackupClamp() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsBackupClamp - !DEC$ ATTRIBUTES ALIAS: 'GetTdsBackupClamp' :: GetTdsBackupClamp - use CTdsBackupClampVariables - implicit none - GetTdsBackupClamp = Get_TdsBackupClamp() - end function - - - - - - logical function GetTdsConnectionPossibility() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsConnectionPossibility - !DEC$ ATTRIBUTES ALIAS: 'GetTdsConnectionPossibility' :: GetTdsConnectionPossibility - implicit none - GetTdsConnectionPossibility = Get_TdsConnectionPossible() - end function - - logical function GetTdsStemIn() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsStemIn - !DEC$ ATTRIBUTES ALIAS: 'GetTdsStemIn' :: GetTdsStemIn - implicit none - GetTdsStemIn = Get_TdsStemIn() - end function - - - - logical function GetFillupHeadPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetFillupHeadPermission - !DEC$ ATTRIBUTES ALIAS: 'GetFillupHeadPermission' :: GetFillupHeadPermission - use CFillupHeadPermissionVariables - implicit none - GetFillupHeadPermission = Get_FillupHeadPermission() - end function - - logical function GetSwingDrillPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwingDrillPermission - !DEC$ ATTRIBUTES ALIAS: 'GetSwingDrillPermission' :: GetSwingDrillPermission - use CSwingDrillPermissionVariables - implicit none - GetSwingDrillPermission = Get_SwingDrillPermission() - end function - - logical function GetSwingOffPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwingOffPermission - !DEC$ ATTRIBUTES ALIAS: 'GetSwingOffPermission' :: GetSwingOffPermission - use CSwingOffPermissionVariables - implicit none - GetSwingOffPermission = Get_SwingOffPermission() - end function - - logical function GetSwingTiltPermission() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSwingTiltPermission - !DEC$ ATTRIBUTES ALIAS: 'GetSwingTiltPermission' :: GetSwingTiltPermission - use CSwingTiltPermissionVariables - implicit none - GetSwingTiltPermission = Get_SwingTiltPermission() - end function - - - real(8) function GetTdsStemJointHeight() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsStemJointHeight - !DEC$ ATTRIBUTES ALIAS: 'GetTdsStemJointHeight' :: GetTdsStemJointHeight - implicit none - GetTdsStemJointHeight = 10.0 - end function - - - - integer function GetTdsConnectionModes() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsConnectionModes - !DEC$ ATTRIBUTES ALIAS: 'GetTdsConnectionModes' :: GetTdsConnectionModes - use CTdsConnectionModesEnumVariables - implicit none - GetTdsConnectionModes = Get_TdsConnectionModes() - end function - - integer function GetTdsElevatorModes() - !DEC$ ATTRIBUTES DLLEXPORT :: GetTdsElevatorModes - !DEC$ ATTRIBUTES ALIAS: 'GetTdsElevatorModes' :: GetTdsElevatorModes - use CTdsElevatorModesEnumVariables - implicit none - GetTdsElevatorModes = Get_TdsElevatorModes() - end function - -end module TestOperationScenarios \ No newline at end of file diff --git a/CSharp/OperationScenarios/Test/TestOperationScenariosVariables.f90 b/CSharp/OperationScenarios/Test/TestOperationScenariosVariables.f90 deleted file mode 100644 index 06b1f52..0000000 --- a/CSharp/OperationScenarios/Test/TestOperationScenariosVariables.f90 +++ /dev/null @@ -1,96 +0,0 @@ -module TestOperationScenariosVariables - implicit none - public - - ! Input vars - - ! Output vars - integer :: ElevatorConnection - integer :: KellyConnection - logical :: CloseKellyCockLed - logical :: CloseSafetyValveLed - logical :: FillMouseHoleLed - logical :: IrIBopLed - logical :: IrSafetyValveLed - logical :: LatchLed - logical :: OpenKellyCockLed - logical :: OpenSafetyValveLed - logical :: SlipsNotification - logical :: SwingLed - logical :: TongNotification - logical :: UnlatchLed - logical :: InstallFillupHeadPermission - logical :: InstallMudBucketPermission - logical :: IrIbopPermission - logical :: IrSafetyValvePermission - logical :: RemoveFillupHeadPermission - logical :: RemoveMudBucketPermission - real(8) :: HookHeightU - real(8) :: IbopHeight - real(8) :: NearFloorConnection - real(8) :: SafetyValveHeight - logical :: SlackOff - integer :: StandRackU - real(8) :: RotaryRpmU - real(8) :: StringPressure - logical :: ZeroStringSpeed - real(8) :: FlowRateU - real(8) :: PedalU - real(8) :: FloorHeightU - real(8) :: CrownHeightU - real(8) :: KellyHoseVibrationRateU - integer :: DriveTypeU - logical :: ElevatorConnected - logical :: JointConnectionPossibility - logical :: NearMonkeyBoardPosition - logical :: NearFloorPosition - logical :: SingleSetInMouseHole - logical :: SwingCenter - integer :: MudBucket - integer :: Elevator - integer :: Flow - integer :: FillupHead - integer :: Ibop - integer :: Kelly - integer :: MouseHole - integer :: OperationCondition - integer :: SafetyValve - integer :: Slips - integer :: Swing - integer :: Tong - integer :: StringUpdateU - integer :: NewHookHeightU - integer :: BlowoutFromStringPercentU - logical :: MakeupTong - logical :: BreakupTong - logical :: SlipsSet - logical :: SlipsUnSet - logical :: Latch - logical :: Unlatch - logical :: OutOfMouseHole - logical :: IsKellyBushingSetInTable - - - logical :: Signal1U - logical :: Signal2U - logical :: Signal3U - logical :: Signal4U - logical :: Signal5U - logical :: Signal6U - logical :: Signal7U - logical :: Signal8U - logical :: Signal9U - logical :: Signal10U - - logical :: BlowoutFromStringT - logical :: BlowoutFromAnnularT - logical :: FlowFromReturnLineT - logical :: FlowFromKellyT - logical :: FlowKellyDisconnectT - logical :: FlowPipeDisconnectT - - logical :: SingleOutOfMouseHole - - - contains -end module TestOperationScenariosVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Unity/CUnityInputs.f90 b/CSharp/OperationScenarios/Unity/CUnityInputs.f90 index 2025c2a..852f50e 100644 --- a/CSharp/OperationScenarios/Unity/CUnityInputs.f90 +++ b/CSharp/OperationScenarios/Unity/CUnityInputs.f90 @@ -1,90 +1,64 @@ module CUnityInputs use CVoidEventHandlerCollection implicit none - - logical :: ElevatorConnectionPossible - logical :: JointConnectionPossible - logical :: IsKellyBushingSetInTable - logical :: ElevatorPickup - logical :: NearFloorPosition - logical :: SingleSetInMouseHole - !logical :: SwingCenter - !logical :: MakeupTong - !logical :: BreakupTong - !logical :: SlipsSet - !logical :: SlipsUnSet - !logical :: Latch - !logical :: Unlatch - !logical :: OutOfMouseHole - !real(8) :: NewHookHeight - logical :: TdsConnectionPossible - logical :: TdsStemIn - - - private :: ElevatorConnectionPossible - private :: JointConnectionPossible - private :: IsKellyBushingSetInTable - private :: ElevatorPickup - private :: NearFloorPosition - private :: singleSetInMouseHole - !private :: SwingCenter - !private :: MakeupTong - !private :: BreakupTong - !private :: SlipsSet - !private :: SlipsUnSet - !private :: Latch - !private :: Unlatch - !private :: OutOfMouseHole - !private :: NewHookHeight - private :: TdsConnectionPossible - private :: TdsStemIn + type :: UnityInputsType + logical :: ElevatorConnectionPossible + logical :: JointConnectionPossible + logical :: IsKellyBushingSetInTable + logical :: ElevatorPickup + logical :: NearFloorPosition + logical :: SingleSetInMouseHole + logical :: TdsConnectionPossible + logical :: TdsStemIn + + ! private :: ElevatorConnectionPossible + ! private :: JointConnectionPossible + ! private :: IsKellyBushingSetInTable + ! private :: ElevatorPickup + ! private :: NearFloorPosition + ! private :: SingleSetInMouseHole + ! private :: TdsConnectionPossible + ! private :: TdsStemIn + + ! public - public - - type(VoidEventHandlerCollection) :: OnElevatorConnectionPossibleChange - type(VoidEventHandlerCollection) :: OnJointConnectionPossibleChange - type(VoidEventHandlerCollection) :: OnIsKellyBushingSetInTableChange - type(VoidEventHandlerCollection) :: OnElevatorPickupChange - type(VoidEventHandlerCollection) :: OnNearFloorPositionChange - type(VoidEventHandlerCollection) :: OnSingleSetInMouseHoleChange - !type(VoidEventHandlerCollection) :: OnSwingCenterChange - !type(VoidEventHandlerCollection) :: OnNewHookHeightChange - - !type(VoidEventHandlerCollection) :: OnMakeupTongChange - !type(VoidEventHandlerCollection) :: OnBreakupTongChange - !type(VoidEventHandlerCollection) :: OnSlipsSetChange - !type(VoidEventHandlerCollection) :: OnSlipsUnSetChange - !type(VoidEventHandlerCollection) :: OnLatchChange - !type(VoidEventHandlerCollection) :: OnUnlatchChange - !type(VoidEventHandlerCollection) :: OnOutOfMouseHoleChange - - type(VoidEventHandlerCollection) :: OnTdsConnectionPossibleChange - type(VoidEventHandlerCollection) :: OnTdsStemInChange + type(VoidEventHandlerCollection) :: OnElevatorConnectionPossibleChange + type(VoidEventHandlerCollection) :: OnJointConnectionPossibleChange + type(VoidEventHandlerCollection) :: OnIsKellyBushingSetInTableChange + type(VoidEventHandlerCollection) :: OnElevatorPickupChange + type(VoidEventHandlerCollection) :: OnNearFloorPositionChange + type(VoidEventHandlerCollection) :: OnSingleSetInMouseHoleChange + + type(VoidEventHandlerCollection) :: OnTdsConnectionPossibleChange + type(VoidEventHandlerCollection) :: OnTdsStemInChange + end type UnityInputsType + + type(UnityInputsType)::UnityInputs contains ! Input routines - subroutine Set_OutOfMouseHole(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_OutOfMouseHole - !DEC$ ATTRIBUTES ALIAS: 'Set_OutOfMouseHole' :: Set_OutOfMouseHole - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(OutOfMouseHole == v) return -!#endif -! OutOfMouseHole = v -! call OnOutOfMouseHoleChange%RunAll() -!#ifdef deb -! print*, 'OutOfMouseHole=', OutOfMouseHole -!#endif - end subroutine +! subroutine Set_OutOfMouseHole(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_OutOfMouseHole +! !DEC$ ATTRIBUTES ALIAS: 'Set_OutOfMouseHole' :: Set_OutOfMouseHole +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(OutOfMouseHole == v) return +! !#endif +! ! OutOfMouseHole = v +! ! call OnOutOfMouseHoleChange%RunAll() +! !#ifdef deb +! ! print*, 'OutOfMouseHole=', OutOfMouseHole +! !#endif +! end subroutine - !logical function Get_OutOfMouseHole() - ! implicit none - ! Get_OutOfMouseHole = OutOfMouseHole - !end function +! !logical function Get_OutOfMouseHole() +! ! implicit none +! ! Get_OutOfMouseHole = OutOfMouseHole +! !end function @@ -97,25 +71,25 @@ module CUnityInputs - subroutine Set_Unlatch(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_Unlatch - !DEC$ ATTRIBUTES ALIAS: 'Set_Unlatch' :: Set_Unlatch - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(Unlatch == v) return -!#endif -! Unlatch = v -! call OnUnlatchChange%RunAll() -!#ifdef deb -! print*, 'Unlatch=', Unlatch -!#endif - end subroutine +! subroutine Set_Unlatch(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_Unlatch +! !DEC$ ATTRIBUTES ALIAS: 'Set_Unlatch' :: Set_Unlatch +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(Unlatch == v) return +! !#endif +! ! Unlatch = v +! ! call OnUnlatchChange%RunAll() +! !#ifdef deb +! ! print*, 'Unlatch=', Unlatch +! !#endif +! end subroutine - !logical function Get_Unlatch() - ! implicit none - ! Get_Unlatch = Unlatch - !end function +! !logical function Get_Unlatch() +! ! implicit none +! ! Get_Unlatch = Unlatch +! !end function @@ -130,25 +104,25 @@ module CUnityInputs - subroutine Set_Latch(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_Latch - !DEC$ ATTRIBUTES ALIAS: 'Set_Latch' :: Set_Latch - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(Latch == v) return -!#endif -! Latch = v -! call OnLatchChange%RunAll() -!#ifdef deb -! print*, 'Latch=', Latch -!#endif - end subroutine +! subroutine Set_Latch(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_Latch +! !DEC$ ATTRIBUTES ALIAS: 'Set_Latch' :: Set_Latch +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(Latch == v) return +! !#endif +! ! Latch = v +! ! call OnLatchChange%RunAll() +! !#ifdef deb +! ! print*, 'Latch=', Latch +! !#endif +! end subroutine - !logical function Get_Latch() - ! implicit none - ! Get_Latch = Latch - !end function +! !logical function Get_Latch() +! ! implicit none +! ! Get_Latch = Latch +! !end function @@ -165,25 +139,25 @@ module CUnityInputs - subroutine Set_SlipsUnSet(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsUnSet - !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsUnSet' :: Set_SlipsUnSet - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(SlipsUnSet == v) return -!#endif -! SlipsUnSet = v -! call OnSlipsUnSetChange%RunAll() -!#ifdef deb -! print*, 'SlipsUnSet=', SlipsUnSet -!#endif - end subroutine +! subroutine Set_SlipsUnSet(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsUnSet +! !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsUnSet' :: Set_SlipsUnSet +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(SlipsUnSet == v) return +! !#endif +! ! SlipsUnSet = v +! ! call OnSlipsUnSetChange%RunAll() +! !#ifdef deb +! ! print*, 'SlipsUnSet=', SlipsUnSet +! !#endif +! end subroutine - !logical function Get_SlipsUnSet() - ! implicit none - ! Get_SlipsUnSet = SlipsUnSet - !end function +! !logical function Get_SlipsUnSet() +! ! implicit none +! ! Get_SlipsUnSet = SlipsUnSet +! !end function @@ -197,25 +171,25 @@ module CUnityInputs - subroutine Set_SlipsSet(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsSet - !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsSet' :: Set_SlipsSet - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(SlipsSet == v) return -!#endif -! SlipsSet = v -! call OnSlipsSetChange%RunAll() -!#ifdef deb -! print*, 'SlipsSet=', SlipsSet -!#endif - end subroutine +! subroutine Set_SlipsSet(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsSet +! !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsSet' :: Set_SlipsSet +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(SlipsSet == v) return +! !#endif +! ! SlipsSet = v +! ! call OnSlipsSetChange%RunAll() +! !#ifdef deb +! ! print*, 'SlipsSet=', SlipsSet +! !#endif +! end subroutine - !logical function Get_SlipsSet() - ! implicit none - ! Get_SlipsSet = SlipsSet - !end function +! !logical function Get_SlipsSet() +! ! implicit none +! ! Get_SlipsSet = SlipsSet +! !end function @@ -227,25 +201,25 @@ module CUnityInputs - subroutine Set_BreakupTong(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_BreakupTong - !DEC$ ATTRIBUTES ALIAS: 'Set_BreakupTong' :: Set_BreakupTong - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(BreakupTong == v) return -!#endif -! BreakupTong = v -! call OnBreakupTongChange%RunAll() -!#ifdef deb -! print*, 'BreakupTong=', BreakupTong -!#endif - end subroutine +! subroutine Set_BreakupTong(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_BreakupTong +! !DEC$ ATTRIBUTES ALIAS: 'Set_BreakupTong' :: Set_BreakupTong +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(BreakupTong == v) return +! !#endif +! ! BreakupTong = v +! ! call OnBreakupTongChange%RunAll() +! !#ifdef deb +! ! print*, 'BreakupTong=', BreakupTong +! !#endif +! end subroutine - !logical function Get_BreakupTong() - ! implicit none - ! Get_BreakupTong = BreakupTong - !end function +! !logical function Get_BreakupTong() +! ! implicit none +! ! Get_BreakupTong = BreakupTong +! !end function @@ -255,25 +229,25 @@ module CUnityInputs - subroutine Set_MakeupTong(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_MakeupTong - !DEC$ ATTRIBUTES ALIAS: 'Set_MakeupTong' :: Set_MakeupTong - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(MakeupTong == v) return -!#endif -! MakeupTong = v -! call OnMakeupTongChange%RunAll() -!#ifdef deb -! print*, 'MakeupTong=', MakeupTong -!#endif - end subroutine +! subroutine Set_MakeupTong(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_MakeupTong +! !DEC$ ATTRIBUTES ALIAS: 'Set_MakeupTong' :: Set_MakeupTong +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(MakeupTong == v) return +! !#endif +! ! MakeupTong = v +! ! call OnMakeupTongChange%RunAll() +! !#ifdef deb +! ! print*, 'MakeupTong=', MakeupTong +! !#endif +! end subroutine - !logical function Get_MakeupTong() - ! implicit none - ! Get_MakeupTong = MakeupTong - !end function +! !logical function Get_MakeupTong() +! ! implicit none +! ! Get_MakeupTong = MakeupTong +! !end function @@ -295,25 +269,25 @@ module CUnityInputs - subroutine Set_NewHookHeight(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_NewHookHeight - !DEC$ ATTRIBUTES ALIAS: 'Set_NewHookHeight' :: Set_NewHookHeight - implicit none - real(8), intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(NewHookHeight == v) return -!#endif -! NewHookHeight = v -! call OnNewHookHeightChange%RunAll() -!#ifdef deb -! print*, 'NewHookHeight=', NewHookHeight -!#endif - end subroutine +! subroutine Set_NewHookHeight(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_NewHookHeight +! !DEC$ ATTRIBUTES ALIAS: 'Set_NewHookHeight' :: Set_NewHookHeight +! implicit none +! real(8), intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(NewHookHeight == v) return +! !#endif +! ! NewHookHeight = v +! ! call OnNewHookHeightChange%RunAll() +! !#ifdef deb +! ! print*, 'NewHookHeight=', NewHookHeight +! !#endif +! end subroutine - !real(8) function Get_NewHookHeight() - ! implicit none - ! Get_NewHookHeight = NewHookHeight - !end function +! !real(8) function Get_NewHookHeight() +! ! implicit none +! ! Get_NewHookHeight = NewHookHeight +! !end function @@ -323,33 +297,33 @@ module CUnityInputs - subroutine Set_ElevatorConnectionPossible(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorConnectionPossible - !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorConnectionPossible' :: Set_ElevatorConnectionPossible - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(ElevatorConnectionPossible == v) return -#endif - ElevatorConnectionPossible = v - call OnElevatorConnectionPossibleChange%RunAll() -#ifdef deb - print*, 'ElevatorConnectionPossible=', ElevatorConnectionPossible -#endif - end subroutine +! subroutine Set_ElevatorConnectionPossible(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorConnectionPossible +! !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorConnectionPossible' :: Set_ElevatorConnectionPossible +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%ElevatorConnectionPossible == v) return +! #endif +! UnityInputs%ElevatorConnectionPossible = v +! call UnityInputs%OnElevatorConnectionPossibleChange%RunAll() +! #ifdef deb +! print*, 'ElevatorConnectionPossible=', UnityInputs%ElevatorConnectionPossible +! #endif +! end subroutine logical function Get_ElevatorConnectionPossible() implicit none - Get_ElevatorConnectionPossible = ElevatorConnectionPossible + Get_ElevatorConnectionPossible = UnityInputs%ElevatorConnectionPossible end function - logical function Get_ElevatorConnectionPossible_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorConnectionPossible_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorConnectionPossible_WN' :: Get_ElevatorConnectionPossible_WN - implicit none - Get_ElevatorConnectionPossible_WN = ElevatorConnectionPossible - !Get_ElevatorConnectionPossible_WN = .true. - end function + ! logical function Get_ElevatorConnectionPossible_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorConnectionPossible_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorConnectionPossible_WN' :: Get_ElevatorConnectionPossible_WN + ! implicit none + ! Get_ElevatorConnectionPossible_WN = UnityInputs%ElevatorConnectionPossible + ! !Get_ElevatorConnectionPossible_WN = .true. + ! end function @@ -358,64 +332,64 @@ module CUnityInputs - subroutine Set_JointConnectionPossible(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_JointConnectionPossible - !DEC$ ATTRIBUTES ALIAS: 'Set_JointConnectionPossible' :: Set_JointConnectionPossible - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(JointConnectionPossible == v) return -#endif - JointConnectionPossible = v - call OnJointConnectionPossibleChange%RunAll() -#ifdef deb - print*, 'JointConnectionPossible=', JointConnectionPossible -#endif - end subroutine +! subroutine Set_JointConnectionPossible(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_JointConnectionPossible +! !DEC$ ATTRIBUTES ALIAS: 'Set_JointConnectionPossible' :: Set_JointConnectionPossible +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%JointConnectionPossible == v) return +! #endif +! UnityInputs%JointConnectionPossible = v +! call UnityInputs%OnJointConnectionPossibleChange%RunAll() +! #ifdef deb +! print*, 'JointConnectionPossible=', UnityInputs%JointConnectionPossible +! #endif +! end subroutine logical function Get_JointConnectionPossible() implicit none - Get_JointConnectionPossible = JointConnectionPossible + Get_JointConnectionPossible = UnityInputs%JointConnectionPossible end function - logical function Get_JointConnectionPossible_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_JointConnectionPossible_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_JointConnectionPossible_WN' :: Get_JointConnectionPossible_WN - implicit none - Get_JointConnectionPossible_WN = JointConnectionPossible - end function + ! logical function Get_JointConnectionPossible_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_JointConnectionPossible_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_JointConnectionPossible_WN' :: Get_JointConnectionPossible_WN + ! implicit none + ! Get_JointConnectionPossible_WN = UnityInputs%JointConnectionPossible + ! end function - subroutine Set_IsKellyBushingSetInTable(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_IsKellyBushingSetInTable - !DEC$ ATTRIBUTES ALIAS: 'Set_IsKellyBushingSetInTable' :: Set_IsKellyBushingSetInTable - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(IsKellyBushingSetInTable == v) return -#endif - IsKellyBushingSetInTable = v - call OnIsKellyBushingSetInTableChange%RunAll() -#ifdef deb - print*, 'IsKellyBushingSetInTable=', IsKellyBushingSetInTable -#endif - end subroutine +! subroutine Set_IsKellyBushingSetInTable(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_IsKellyBushingSetInTable +! !DEC$ ATTRIBUTES ALIAS: 'Set_IsKellyBushingSetInTable' :: Set_IsKellyBushingSetInTable +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%IsKellyBushingSetInTable == v) return +! #endif +! UnityInputs%IsKellyBushingSetInTable = v +! call UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() +! #ifdef deb +! print*, 'IsKellyBushingSetInTable=', UnityInputs%IsKellyBushingSetInTable +! #endif +! end subroutine logical function Get_IsKellyBushingSetInTable() implicit none - Get_IsKellyBushingSetInTable = IsKellyBushingSetInTable + Get_IsKellyBushingSetInTable = UnityInputs%IsKellyBushingSetInTable end function - logical function Get_IsKellyBushingSetInTable_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_IsKellyBushingSetInTable_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_IsKellyBushingSetInTable_WN' :: Get_IsKellyBushingSetInTable_WN - implicit none - Get_IsKellyBushingSetInTable_WN = IsKellyBushingSetInTable - end function + ! logical function Get_IsKellyBushingSetInTable_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_IsKellyBushingSetInTable_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_IsKellyBushingSetInTable_WN' :: Get_IsKellyBushingSetInTable_WN + ! implicit none + ! Get_IsKellyBushingSetInTable_WN = UnityInputs%IsKellyBushingSetInTable + ! end function @@ -423,33 +397,33 @@ module CUnityInputs - subroutine Set_ElevatorPickup(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorPickup - !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorPickup' :: Set_ElevatorPickup - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(ElevatorPickup == v) return -#endif - ElevatorPickup = v - call OnElevatorPickupChange%RunAll() -#ifdef deb - print*, 'ElevatorPickup =', ElevatorPickup -#endif - end subroutine +! subroutine Set_ElevatorPickup(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorPickup +! !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorPickup' :: Set_ElevatorPickup +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%ElevatorPickup == v) return +! #endif +! UnityInputs%ElevatorPickup = v +! call UnityInputs%OnElevatorPickupChange%RunAll() +! #ifdef deb +! print*, 'ElevatorPickup =', UnityInputs%ElevatorPickup +! #endif +! end subroutine logical function Get_ElevatorPickup() implicit none - Get_ElevatorPickup = ElevatorPickup + Get_ElevatorPickup = UnityInputs%ElevatorPickup end function - logical function Get_ElevatorPickup_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorPickup_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorPickup_WN' :: Get_ElevatorPickup_WN - implicit none - Get_ElevatorPickup_WN = ElevatorPickup - end function + ! logical function Get_ElevatorPickup_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorPickup_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorPickup_WN' :: Get_ElevatorPickup_WN + ! implicit none + ! Get_ElevatorPickup_WN = UnityInputs%ElevatorPickup + ! end function @@ -461,35 +435,35 @@ module CUnityInputs implicit none logical, intent(in) :: v #ifdef ExcludeExtraChanges - if(NearFloorPosition == v) return + if(UnityInputs%NearFloorPosition == v) return #endif - NearFloorPosition = v - call OnNearFloorPositionChange%RunAll() + UnityInputs%NearFloorPosition = v + call UnityInputs%OnNearFloorPositionChange%RunAll() #ifdef deb - print*, 'NearFloorPosition =', NearFloorPosition + print*, 'NearFloorPosition =', UnityInputs%NearFloorPosition #endif end subroutine - subroutine Set_NearFloorPosition_WN(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_NearFloorPosition_WN - !DEC$ ATTRIBUTES ALIAS: 'Set_NearFloorPosition_WN' :: Set_NearFloorPosition_WN - implicit none - logical, intent(in) :: v - call Set_NearFloorPosition(v) - end subroutine + ! subroutine Set_NearFloorPosition_WN(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: Set_NearFloorPosition_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Set_NearFloorPosition_WN' :: Set_NearFloorPosition_WN + ! implicit none + ! logical, intent(in) :: v + ! call Set_NearFloorPosition(v) + ! end subroutine logical function Get_NearFloorPosition() implicit none - Get_NearFloorPosition = NearFloorPosition + Get_NearFloorPosition = UnityInputs%NearFloorPosition end function - logical function Get_NearFloorPosition_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_NearFloorPosition_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_NearFloorPosition_WN' :: Get_NearFloorPosition_WN - implicit none - Get_NearFloorPosition_WN = NearFloorPosition - end function +! logical function Get_NearFloorPosition_WN() +! !DEC$ ATTRIBUTES DLLEXPORT :: Get_NearFloorPosition_WN +! !DEC$ ATTRIBUTES ALIAS: 'Get_NearFloorPosition_WN' :: Get_NearFloorPosition_WN +! implicit none +! Get_NearFloorPosition_WN = UnityInputs%NearFloorPosition +! end function @@ -499,33 +473,33 @@ module CUnityInputs - subroutine Set_SingleSetInMouseHole(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SingleSetInMouseHole - !DEC$ ATTRIBUTES ALIAS: 'Set_SingleSetInMouseHole' :: Set_SingleSetInMouseHole - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(SingleSetInMouseHole == v) return -#endif - SingleSetInMouseHole = v - call OnSingleSetInMouseHoleChange%RunAll() -#ifdef deb - print*, 'singleSetInMouseHole=', SingleSetInMouseHole -#endif - end subroutine +! subroutine Set_SingleSetInMouseHole(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_SingleSetInMouseHole +! !DEC$ ATTRIBUTES ALIAS: 'Set_SingleSetInMouseHole' :: Set_SingleSetInMouseHole +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%SingleSetInMouseHole == v) return +! #endif +! UnityInputs%SingleSetInMouseHole = v +! call UnityInputs%OnSingleSetInMouseHoleChange%RunAll() +! #ifdef deb +! print*, 'singleSetInMouseHole=', UnityInputs%SingleSetInMouseHole +! #endif +! end subroutine logical function Get_SingleSetInMouseHole() implicit none - Get_SingleSetInMouseHole = SingleSetInMouseHole + Get_SingleSetInMouseHole = UnityInputs%SingleSetInMouseHole end function - logical function Get_SingleSetInMouseHole_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_SingleSetInMouseHole_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_SingleSetInMouseHole_WN' :: Get_SingleSetInMouseHole_WN - implicit none - Get_SingleSetInMouseHole_WN = SingleSetInMouseHole - end function + ! logical function Get_SingleSetInMouseHole_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_SingleSetInMouseHole_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_SingleSetInMouseHole_WN' :: Get_SingleSetInMouseHole_WN + ! implicit none + ! Get_SingleSetInMouseHole_WN = UnityInputs%SingleSetInMouseHole + ! end function @@ -534,22 +508,22 @@ module CUnityInputs - subroutine Set_SwingCenter(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingCenter - !DEC$ ATTRIBUTES ALIAS: 'Set_SwingCenter' :: Set_SwingCenter - !USE CSwingEnum - implicit none - logical, intent(in) :: v -!#ifdef ExcludeExtraChanges -! if(SwingCenter == v) return -!#endif -! SwingCenter = v -! call OnSwingCenterChange%RunAll() -! !if(SwingCenter .and. Get_Swing() /= SWING_WELL ) call Set_Swing(SWING_WELL) -!#ifdef deb -! print*, 'SwingCenter=', SwingCenter -!#endif - end subroutine +! subroutine Set_SwingCenter(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingCenter +! !DEC$ ATTRIBUTES ALIAS: 'Set_SwingCenter' :: Set_SwingCenter +! !USE CSwingEnum +! implicit none +! logical, intent(in) :: v +! !#ifdef ExcludeExtraChanges +! ! if(SwingCenter == v) return +! !#endif +! ! SwingCenter = v +! ! call OnSwingCenterChange%RunAll() +! ! !if(SwingCenter .and. Get_Swing() /= SWING_WELL ) call Set_Swing(SWING_WELL) +! !#ifdef deb +! ! print*, 'SwingCenter=', SwingCenter +! !#endif +! end subroutine !logical function Get_SwingCenter() ! implicit none @@ -568,63 +542,63 @@ module CUnityInputs !top drive - subroutine Set_TdsConnectionPossible(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionPossible - !DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionPossible' :: Set_TdsConnectionPossible - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(TdsConnectionPossible == v) return -#endif - TdsConnectionPossible = v - call OnTdsConnectionPossibleChange%RunAll() -#ifdef deb - print*, 'TdsConnectionPossible=', TdsConnectionPossible -#endif - end subroutine +! subroutine Set_TdsConnectionPossible(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionPossible +! !DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionPossible' :: Set_TdsConnectionPossible +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%TdsConnectionPossible == v) return +! #endif +! UnityInputs%TdsConnectionPossible = v +! call UnityInputs%OnTdsConnectionPossibleChange%RunAll() +! #ifdef deb +! print*, 'TdsConnectionPossible=', UnityInputs%TdsConnectionPossible +! #endif +! end subroutine logical function Get_TdsConnectionPossible() implicit none - Get_TdsConnectionPossible = TdsConnectionPossible + Get_TdsConnectionPossible = UnityInputs%TdsConnectionPossible end function - logical function Get_TdsConnectionPossible_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionPossible_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionPossible_WN' :: Get_TdsConnectionPossible_WN - implicit none - Get_TdsConnectionPossible_WN = TdsConnectionPossible - !Get_TdsConnectionPossible_WN = .true. - end function - - - - subroutine Set_TdsStemIn(v) - !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsStemIn - !DEC$ ATTRIBUTES ALIAS: 'Set_TdsStemIn' :: Set_TdsStemIn - implicit none - logical, intent(in) :: v -#ifdef ExcludeExtraChanges - if(TdsStemIn == v) return -#endif - TdsStemIn = v - call OnTdsStemInChange%RunAll() -#ifdef deb - print*, 'TdsStemIn=', TdsStemIn -#endif - end subroutine +! logical function Get_TdsConnectionPossible_WN() +! !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionPossible_WN +! !DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionPossible_WN' :: Get_TdsConnectionPossible_WN +! implicit none +! Get_TdsConnectionPossible_WN = UnityInputs%TdsConnectionPossible +! !Get_TdsConnectionPossible_WN = .true. +! end function + + + +! subroutine Set_TdsStemIn(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsStemIn +! !DEC$ ATTRIBUTES ALIAS: 'Set_TdsStemIn' :: Set_TdsStemIn +! implicit none +! logical, intent(in) :: v +! #ifdef ExcludeExtraChanges +! if(UnityInputs%TdsStemIn == v) return +! #endif +! UnityInputs%TdsStemIn = v +! call UnityInputs%OnTdsStemInChange%RunAll() +! #ifdef deb +! print*, 'TdsStemIn=', UnityInputs%TdsStemIn +! #endif +! end subroutine logical function Get_TdsStemIn() implicit none - Get_TdsStemIn = TdsStemIn + Get_TdsStemIn = UnityInputs%TdsStemIn end function - logical function Get_TdsStemIn_WN() - !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsStemIn_WN - !DEC$ ATTRIBUTES ALIAS: 'Get_TdsStemIn_WN' :: Get_TdsStemIn_WN - implicit none - Get_TdsStemIn_WN = TdsStemIn - !Get_TdsStemIn_WN = .true. - end function + ! logical function Get_TdsStemIn_WN() + ! !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsStemIn_WN + ! !DEC$ ATTRIBUTES ALIAS: 'Get_TdsStemIn_WN' :: Get_TdsStemIn_WN + ! implicit none + ! Get_TdsStemIn_WN = UnityInputs%TdsStemIn + ! !Get_TdsStemIn_WN = .true. + ! end function diff --git a/CSharp/OperationScenarios/Unity/CUnityOutputs.f90 b/CSharp/OperationScenarios/Unity/CUnityOutputs.f90 index 663057e..56ce23e 100644 --- a/CSharp/OperationScenarios/Unity/CUnityOutputs.f90 +++ b/CSharp/OperationScenarios/Unity/CUnityOutputs.f90 @@ -1,55 +1,21 @@ module CUnityOutputs implicit none - - real(8) :: KellyHoseVibrationRate - real(8) :: BlowoutFromStringPercent - real(8) :: Pedal - real(8) :: FlowRate - real(8) :: RotaryRpm - !logical :: Signal1 - !logical :: Signal2 - !logical :: Signal3 - !logical :: Signal4 - !logical :: Signal5 - !logical :: Signal6 - !logical :: Signal7 - !logical :: Signal8 - !logical :: Signal9 - !logical :: Signal10 - logical :: BlowoutFromString - logical :: BlowoutFromAnnular - logical :: FlowFromReturnLine - real :: FlowFromKelly - real :: FlowFromFillupHead - logical :: FlowKellyDisconnect - logical :: FlowPipeDisconnect - - - private :: KellyHoseVibrationRate - private :: BlowoutFromStringPercent - private :: Pedal - private :: FlowRate - private :: RotaryRpm - !private :: Signal1 - !private :: Signal2 - !private :: Signal3 - !private :: Signal4 - !private :: Signal5 - !private :: Signal6 - !private :: Signal7 - !private :: Signal8 - !private :: Signal9 - !private :: Signal10 - private :: BlowoutFromString - private :: BlowoutFromAnnular - private :: FlowFromReturnLine - private :: FlowFromKelly - private :: FlowFromFillupHead - private :: FlowKellyDisconnect - private :: FlowPipeDisconnect - - public - + type :: UnityOutputsType + real(8) :: KellyHoseVibrationRate + real(8) :: BlowoutFromStringPercent + real(8) :: Pedal + real(8) :: FlowRate + real(8) :: RotaryRpm + logical :: BlowoutFromString + logical :: BlowoutFromAnnular + logical :: FlowFromReturnLine + real :: FlowFromKelly + real :: FlowFromFillupHead + logical :: FlowKellyDisconnect + logical :: FlowPipeDisconnect + end type UnityOutputsType + type(UnityOutputsType):: UnityOutputs + contains subroutine Setup() @@ -71,7 +37,7 @@ module CUnityOutputs subroutine Set_BlowoutFromString(v) implicit none logical, intent (in) :: v - BlowoutFromString = v + UnityOutputs%BlowoutFromString = v #ifdef deb print*, 'BlowoutFromString=', v #endif @@ -79,7 +45,7 @@ module CUnityOutputs logical function Get_BlowoutFromString() implicit none - Get_BlowoutFromString = BlowoutFromString + Get_BlowoutFromString = UnityOutputs%BlowoutFromString end function subroutine Set_BlowoutFromString_WN(v) @@ -94,7 +60,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromString_WN !DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromString_WN' :: Get_BlowoutFromString_WN implicit none - Get_BlowoutFromString_WN = BlowoutFromString + Get_BlowoutFromString_WN = UnityOutputs%BlowoutFromString !Get_BlowoutFromString = .TRUE. end function @@ -103,7 +69,7 @@ module CUnityOutputs subroutine Set_BlowoutFromAnnular(v) implicit none logical, intent (in) :: v - BlowoutFromAnnular = v + UnityOutputs%BlowoutFromAnnular = v #ifdef deb print*, 'BlowoutFromAnnular=', v #endif @@ -111,7 +77,7 @@ module CUnityOutputs logical function Get_BlowoutFromAnnular() implicit none - Get_BlowoutFromAnnular = BlowoutFromAnnular + Get_BlowoutFromAnnular = UnityOutputs%BlowoutFromAnnular end function subroutine Set_BlowoutFromAnnular_WN(v) @@ -126,7 +92,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromAnnular_WN !DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromAnnular_WN' :: Get_BlowoutFromAnnular_WN implicit none - Get_BlowoutFromAnnular_WN = BlowoutFromAnnular + Get_BlowoutFromAnnular_WN = UnityOutputs%BlowoutFromAnnular end function @@ -136,7 +102,7 @@ module CUnityOutputs subroutine Set_FlowFromReturnLine(v) implicit none logical, intent (in) :: v - FlowFromReturnLine = v + UnityOutputs%FlowFromReturnLine = v #ifdef deb print*, 'FlowFromReturnLine=', v #endif @@ -144,7 +110,7 @@ module CUnityOutputs logical function Get_FlowFromReturnLine() implicit none - Get_FlowFromReturnLine = FlowFromReturnLine + Get_FlowFromReturnLine = UnityOutputs%FlowFromReturnLine end function @@ -160,7 +126,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromReturnLine_WN !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromReturnLine_WN' :: Get_FlowFromReturnLine_WN implicit none - Get_FlowFromReturnLine_WN = FlowFromReturnLine + Get_FlowFromReturnLine_WN = UnityOutputs%FlowFromReturnLine !Get_FlowFromReturnLine_WN = .FALSE. end function @@ -169,7 +135,7 @@ module CUnityOutputs subroutine Set_FlowFromKelly(v) implicit none real, intent (in) :: v - FlowFromKelly = v + UnityOutputs%FlowFromKelly = v #ifdef deb print*, 'FlowFromKelly=', v #endif @@ -177,7 +143,7 @@ module CUnityOutputs real function Get_FlowFromKelly() implicit none - Get_FlowFromKelly = FlowFromKelly + Get_FlowFromKelly = UnityOutputs%FlowFromKelly end function @@ -194,9 +160,9 @@ module CUnityOutputs !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromKelly_WN' :: Get_FlowFromKelly_WN implicit none #ifdef deb - print*, 'FlowFromKellyR=', FlowFromKelly + print*, 'FlowFromKellyR=', UnityOutputs%FlowFromKelly #endif - Get_FlowFromKelly_WN = FlowFromKelly + Get_FlowFromKelly_WN = UnityOutputs%FlowFromKelly !Get_FlowFromKelly = .FALSE. end function @@ -206,7 +172,7 @@ module CUnityOutputs subroutine Set_FlowFromFillupHead(v) implicit none real, intent (in) :: v - FlowFromFillupHead = v + UnityOutputs%FlowFromFillupHead = v #ifdef deb print*, 'FlowFromFillupHead=', v #endif @@ -214,7 +180,7 @@ module CUnityOutputs real function Get_FlowFromFillupHead() implicit none - Get_FlowFromFillupHead = FlowFromFillupHead + Get_FlowFromFillupHead = UnityOutputs%FlowFromFillupHead end function @@ -231,9 +197,9 @@ module CUnityOutputs !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromFillupHead_WN' :: Get_FlowFromFillupHead_WN implicit none #ifdef deb - print*, 'FlowFromFillupHeadR=', FlowFromFillupHead + print*, 'FlowFromFillupHeadR=', UnityOutputs%FlowFromFillupHead #endif - Get_FlowFromFillupHead_WN = FlowFromFillupHead + Get_FlowFromFillupHead_WN = UnityOutputs%FlowFromFillupHead !Get_FlowFromFillupHead = .FALSE. end function @@ -244,7 +210,7 @@ module CUnityOutputs subroutine Set_FlowKellyDisconnect(v) implicit none logical, intent (in) :: v - FlowKellyDisconnect = v + UnityOutputs%FlowKellyDisconnect = v #ifdef deb print*, 'FlowKellyDisconnect=', v #endif @@ -252,7 +218,7 @@ module CUnityOutputs logical function Get_FlowKellyDisconnect() implicit none - Get_FlowKellyDisconnect = FlowKellyDisconnect + Get_FlowKellyDisconnect = UnityOutputs%FlowKellyDisconnect end function @@ -268,7 +234,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowKellyDisconnect_WN !DEC$ ATTRIBUTES ALIAS: 'Get_FlowKellyDisconnect_WN' :: Get_FlowKellyDisconnect_WN implicit none - Get_FlowKellyDisconnect_WN = FlowKellyDisconnect + Get_FlowKellyDisconnect_WN = UnityOutputs%FlowKellyDisconnect !Get_FlowKellyDisconnect_WN = .false. end function @@ -278,7 +244,7 @@ module CUnityOutputs subroutine Set_FlowPipeDisconnect(v) implicit none logical, intent (in) :: v - FlowPipeDisconnect = v + UnityOutputs%FlowPipeDisconnect = v #ifdef deb print*, 'FlowPipeDisconnect=', v #endif @@ -286,7 +252,7 @@ module CUnityOutputs logical function Get_FlowPipeDisconnect() implicit none - Get_FlowPipeDisconnect = FlowPipeDisconnect + Get_FlowPipeDisconnect = UnityOutputs%FlowPipeDisconnect end function @@ -302,7 +268,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowPipeDisconnect_WN !DEC$ ATTRIBUTES ALIAS: 'Get_FlowPipeDisconnect_WN' :: Get_FlowPipeDisconnect_WN implicit none - Get_FlowPipeDisconnect_WN = FlowPipeDisconnect + Get_FlowPipeDisconnect_WN = UnityOutputs%FlowPipeDisconnect !Get_FlowPipeDisconnect_WN = .false. end function @@ -335,7 +301,7 @@ module CUnityOutputs subroutine Set_BlowoutFromStringPercent(v) implicit none real(8), intent (in) :: v - BlowoutFromStringPercent = v + UnityOutputs%BlowoutFromStringPercent = v #ifdef deb print*, 'BlowoutFromStringPercent=', v #endif @@ -343,7 +309,7 @@ module CUnityOutputs real(8) function GetBlowoutFromStringPercent() implicit none - GetBlowoutFromStringPercent = BlowoutFromStringPercent + GetBlowoutFromStringPercent = UnityOutputs%BlowoutFromStringPercent end function @@ -360,7 +326,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromStringPercent_WN !DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromStringPercent_WN' :: GetBlowoutFromStringPercent_WN implicit none - GetBlowoutFromStringPercent_WN = BlowoutFromStringPercent + GetBlowoutFromStringPercent_WN = UnityOutputs%BlowoutFromStringPercent !GetBlowoutFromStringPercent_WN = 0d0 end function @@ -377,22 +343,22 @@ module CUnityOutputs real(8), intent (in) :: spm1, spm2 real :: total total = (spm1 + spm2)/2 - KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0) + UnityOutputs%KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0) #ifdef deb - print*, 'KellyHoseVibrationRate=', KellyHoseVibrationRate + print*, 'KellyHoseVibrationRate=', UnityOutputs%KellyHoseVibrationRate #endif end subroutine real(8) function GetKellyHoseVibrationRate() implicit none - GetKellyHoseVibrationRate = KellyHoseVibrationRate + GetKellyHoseVibrationRate = UnityOutputs%KellyHoseVibrationRate end function real(8) function GetKellyHoseVibrationRate_WN() !DEC$ ATTRIBUTES DLLEXPORT :: GetKellyHoseVibrationRate_WN !DEC$ ATTRIBUTES ALIAS: 'GetKellyHoseVibrationRate_WN' :: GetKellyHoseVibrationRate_WN implicit none - GetKellyHoseVibrationRate_WN = KellyHoseVibrationRate + GetKellyHoseVibrationRate_WN = UnityOutputs%KellyHoseVibrationRate end function @@ -401,7 +367,7 @@ module CUnityOutputs subroutine Set_Pedal(v) implicit none real(8), intent (in) :: v - Pedal = v + UnityOutputs%Pedal = v #ifdef deb print*, 'Pedal=', v #endif @@ -409,7 +375,7 @@ module CUnityOutputs real(8) function GetPedal() implicit none - GetPedal = Pedal + GetPedal = UnityOutputs%Pedal end function subroutine Set_Pedal_WN(v) @@ -424,7 +390,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: GetPedal_WN !DEC$ ATTRIBUTES ALIAS: 'GetPedal_WN' :: GetPedal_WN implicit none - GetPedal_WN = Pedal + GetPedal_WN = UnityOutputs%Pedal !GetPedal = 50d0 end function @@ -435,7 +401,7 @@ module CUnityOutputs subroutine Set_FlowRate(v) implicit none real(8), intent (in) :: v - FlowRate = v + UnityOutputs%FlowRate = v #ifdef deb print*, 'FlowRate=', v #endif @@ -444,7 +410,7 @@ module CUnityOutputs real(8) function GetFlowRate() implicit none - GetFlowRate = FlowRate + GetFlowRate = UnityOutputs%FlowRate end function @@ -460,7 +426,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowRate_WN !DEC$ ATTRIBUTES ALIAS: 'GetFlowRate_WN' :: GetFlowRate_WN implicit none - GetFlowRate_WN = FlowRate + GetFlowRate_WN = UnityOutputs%FlowRate !GetFlowRate_WN = 50d0 end function @@ -470,7 +436,7 @@ module CUnityOutputs subroutine Set_RotaryRpm(v) implicit none real(8), intent (in) :: v - RotaryRpm = v + UnityOutputs%RotaryRpm = v #ifdef deb print*, 'RotaryRpm=', v #endif @@ -478,7 +444,7 @@ module CUnityOutputs real(8) function GetRotaryRpm() implicit none - GetRotaryRpm = RotaryRpm + GetRotaryRpm = UnityOutputs%RotaryRpm end function @@ -494,7 +460,7 @@ module CUnityOutputs !DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryRpm_WN !DEC$ ATTRIBUTES ALIAS: 'GetRotaryRpm_WN' :: GetRotaryRpm_WN implicit none - GetRotaryRpm_WN = RotaryRpm + GetRotaryRpm_WN = UnityOutputs%RotaryRpm end function diff --git a/CSharp/OperationScenarios/UnitySignals/CTongEnum.f90 b/CSharp/OperationScenarios/UnitySignals/CTongEnum.f90 index bb4b1c5..8bae7b7 100644 --- a/CSharp/OperationScenarios/UnitySignals/CTongEnum.f90 +++ b/CSharp/OperationScenarios/UnitySignals/CTongEnum.f90 @@ -106,7 +106,7 @@ module CTongEnum subroutine ButtonPress_Makeup_TongNotification() - use CTongNotificationVariables + use NotificationVariables implicit none diff --git a/CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 b/CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 new file mode 100644 index 0000000..97287dd --- /dev/null +++ b/CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 @@ -0,0 +1,478 @@ +module UnitySignalVariables + use CVoidEventHandlerCollection + use CIntegerEventHandlerCollection + + type:: UnitySignalsType + integer :: MudBucket = 0 + type(VoidEventHandlerCollection) :: OnMudBucketChange + integer :: Elevator = 0 + type(VoidEventHandlerCollection) :: OnElevatorChange + integer :: FillupHead = 0 + type(VoidEventHandlerCollection) :: OnFillupHeadChange + integer :: Ibop = 0 + type(VoidEventHandlerCollection) :: OnIbopChange + integer :: Kelly = 0 + type(VoidEventHandlerCollection) :: OnKellyChange + integer :: MouseHole = 0 + type(VoidEventHandlerCollection) :: OnMouseHoleChange + integer :: OperationCondition = 0 + type(VoidEventHandlerCollection) :: OnOperationConditionChange + type(IntegerEventHandlerCollection) :: OnOperationConditionChangeInt + integer :: SafetyValve = 0 + type(VoidEventHandlerCollection) :: OnSafetyValveChange + integer :: operation = 0 + integer :: Slips = 0 + integer :: Slips_S = 0 + type(VoidEventHandlerCollection) :: OnSlipsChange + integer :: Swing = 0 + integer :: Swing_S = 0 + type(VoidEventHandlerCollection) :: OnSwingChange + integer :: TdsBackupClamp = 0 + type(VoidEventHandlerCollection) :: OnTdsBackupClampChange + integer :: TdsSpine = 0 + type(VoidEventHandlerCollection) :: OnTdsSpineChange + integer :: TdsSwing = 0 + type(VoidEventHandlerCollection) :: OnTdsSwingChange + integer :: TdsTong = 0 + type(VoidEventHandlerCollection) :: OnTdsTongChange + integer :: Tong = 0 + integer :: Tong_S = 0 + type(VoidEventHandlerCollection) :: OnTongChange + end type UnitySignalsType + type(UnitySignalsType):: unitySignals + + enum, bind(c) + enumerator TONG_NEUTRAL + enumerator TONG_BREAKOUT_BEGIN + enumerator TONG_BREAKOUT_END + enumerator TONG_MAKEUP_BEGIN + enumerator TONG_MAKEUP_END + + enumerator TDS_SWING_NEUTRAL + enumerator TDS_SWING_OFF_BEGIN + enumerator TDS_SWING_OFF_END + enumerator TDS_SWING_DRILL_BEGIN + enumerator TDS_SWING_DRILL_END + enumerator TDS_SWING_TILT_BEGIN + enumerator TDS_SWING_TILT_END + + enumerator TDS_SPINE_NEUTRAL + enumerator TDS_SPINE_CONNECT_BEGIN + enumerator TDS_SPINE_CONNECT_END + enumerator TDS_SPINE_DISCONNECT_BEGIN + enumerator TDS_SPINE_DISCONNECT_END + + enumerator BACKUP_CLAMP_OFF_END + enumerator BACKUP_CLAMP_OFF_BEGIN + enumerator BACKUP_CLAMP_FW_BEGIN + enumerator BACKUP_CLAMP_FW_END + + enumerator SWING_NEUTRAL + enumerator SWING_MOUSE_HOLE_BEGIN + enumerator SWING_MOUSE_HOLE_END + enumerator SWING_RAT_HOLE_BEGIN + enumerator SWING_RAT_HOLE_END + enumerator SWING_WELL_BEGIN + enumerator SWING_WELL_END + end enum + enum, bind(c) + enumerator TDS_TONG_BREAKOUT_END + enumerator TDS_TONG_BREAKOUT_BEGIN + enumerator TDS_TONG_MAKEUP_BEGIN + enumerator TDS_TONG_MAKEUP_END + + enumerator SAFETY_VALVE_NEUTRAL + enumerator SAFETY_VALVE_REMOVE + enumerator SAFETY_VALVE_INSTALL + + end enum + enum, bind(c) + enumerator OPERATION_DRILL + enumerator OPERATION_TRIP + end enum + enum, bind(c) + enumerator SLIPS_NEUTRAL + enumerator SLIPS_SET_BEGIN + enumerator SLIPS_SET_END + enumerator SLIPS_UNSET_BEGIN + enumerator SLIPS_UNSET_END + + enumerator MOUSE_HOLE_NEUTRAL + enumerator MOUSE_HOLE_FILL + enumerator MOUSE_HOLE_EMPTY + + enumerator KELLY_NEUTRAL + enumerator KELLY_INSTALL + enumerator KELLY_REMOVE + + !enumerator FILLUP_HEAD_NEUTRAL + enumerator FILLUP_HEAD_REMOVE + enumerator FILLUP_HEAD_INSTALL + + enumerator ELEVATOR_NEUTRAL + + enumerator ELEVATOR_LATCH_STRING_BEGIN + enumerator ELEVATOR_LATCH_STRING_END + + enumerator ELEVATOR_UNLATCH_STRING_BEGIN + enumerator ELEVATOR_UNLATCH_STRING_END + + enumerator ELEVATOR_LATCH_STAND_BEGIN + enumerator ELEVATOR_LATCH_STAND_END + + enumerator ELEVATOR_UNLATCH_STAND_BEGIN + enumerator ELEVATOR_UNLATCH_STAND_END + + enumerator ELEVATOR_LATCH_SINGLE_BEGIN + enumerator ELEVATOR_LATCH_SINGLE_END + + enumerator ELEVATOR_UNLATCH_SINGLE_BEGIN + enumerator ELEVATOR_UNLATCH_SINGLE_END + + !enumerator MUD_BUCKET_NEUTRAL + enumerator MUD_BUCKET_REMOVE + enumerator MUD_BUCKET_INSTALL + + !enumerator IBOP_NEUTRAL + enumerator IBOP_REMOVE + enumerator IBOP_INSTALL + end enum + + contains + + subroutine Set_Ibop_Install() + implicit none + call Set_Ibop(IBOP_INSTALL) + end subroutine + + subroutine Set_Ibop_Remove() + implicit none + call Set_Ibop(IBOP_REMOVE) + end subroutine + + subroutine Set_Tong(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Tong == v) return + #endif + UnitySignals%Tong = v + #ifdef deb + print*, 'Tong=', UnitySignals%Tong + #endif + call UnitySignals%OnTongChange%RunAll() + end subroutine + + integer function Get_Tong() + implicit none + Get_Tong = UnitySignals%Tong + end function + + + subroutine Set_TdsTong(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%TdsTong == v) return + #endif + UnitySignals%TdsTong = v + #ifdef deb + print*, 'TdsTong=', UnitySignals%TdsTong + #endif + call UnitySignals%OnTdsTongChange%RunAll() + end subroutine + + integer function Get_TdsTong() + implicit none + Get_TdsTong = UnitySignals%TdsTong + end function + + + subroutine Set_TdsSwing(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%TdsSwing == v) return + #endif + UnitySignals%TdsSwing = v + #ifdef deb + print*, 'TdsSwing=', UnitySignals%TdsSwing + #endif + call UnitySignals%OnTdsSwingChange%RunAll() + end subroutine + + integer function Get_TdsSwing() + implicit none + Get_TdsSwing = UnitySignals%TdsSwing + end function + + + subroutine Set_TdsSpine(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%TdsSpine == v) return + #endif + UnitySignals%TdsSpine = v + #ifdef deb + print*, 'TdsSpine=', UnitySignals%TdsSpine + #endif + call UnitySignals%OnTdsSpineChange%RunAll() + end subroutine + + integer function Get_TdsSpine() + implicit none + Get_TdsSpine = UnitySignals%TdsSpine + end function + + + subroutine Set_TdsBackupClamp(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%TdsBackupClamp == v) return + #endif + UnitySignals%TdsBackupClamp = v + #ifdef deb + print*, 'TdsBackupClamp=', UnitySignals%TdsBackupClamp + #endif + call UnitySignals%OnTdsBackupClampChange%RunAll() + end subroutine + + integer function Get_TdsBackupClamp() + implicit none + Get_TdsBackupClamp = UnitySignals%TdsBackupClamp + end function + + + subroutine Set_Swing(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Swing == v) return + #endif + UnitySignals%Swing = v + #ifdef deb + print*, 'Swing=', UnitySignals%Swing + #endif + call UnitySignals%OnSwingChange%RunAll() + end subroutine + + integer function Get_Swing() + implicit none + Get_Swing = UnitySignals%Swing + end function + + + subroutine Set_Slips(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Slips == v) return + #endif + UnitySignals%Slips = v + #ifdef deb + print*, 'Slips=', UnitySignals%Slips + #endif + call UnitySignals%OnSlipsChange%RunAll() + end subroutine + + integer function Get_Slips() + implicit none + Get_Slips = UnitySignals%Slips + end function + + subroutine Set_Operation(i) + implicit none + integer, intent (in) :: i + UnitySignals%operation = i + end subroutine + + subroutine Set_SafetyValve(v) + implicit none + integer , intent(in) :: v +#ifdef ExcludeExtraChanges + if(UnitySignals%SafetyValve == v) return +#endif + UnitySignals%SafetyValve = v +#ifdef deb + if(UnitySignals%SafetyValve == SAFETY_VALVE_NEUTRAL) then + print*, 'SafetyValve=SAFETY_VALVE_NEUTRAL' + else if (UnitySignals%SafetyValve == SAFETY_VALVE_INSTALL) then + print*, 'SafetyValve=SAFETY_VALVE_INSTALL' + else if (UnitySignals%SafetyValve == SAFETY_VALVE_INSTALL) then + print*, 'SafetyValve=SAFETY_VALVE_REMOVE' + endif +#endif + call UnitySignals%OnSafetyValveChange%RunAll() + end subroutine + + integer function Get_SafetyValve() + implicit none + Get_SafetyValve = UnitySignals%SafetyValve + end function + + subroutine Set_SafetyValve_Install() + implicit none + call Set_SafetyValve(SAFETY_VALVE_INSTALL) + end subroutine + + subroutine Set_SafetyValve_Remove() + implicit none + call Set_SafetyValve(SAFETY_VALVE_REMOVE) + end subroutine + + + subroutine Set_OperationCondition(v) + ! use CKellyEnumVariables + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%OperationCondition == v) return + #endif + UnitySignals%OperationCondition = v + #ifdef deb + print*, 'OperationCondition=', UnitySignals%OperationCondition + #endif + call UnitySignals%OnOperationConditionChange%RunAll() + call UnitySignals%OnOperationConditionChangeInt%RunAll(UnitySignals%OperationCondition) + end subroutine + + integer function Get_OperationCondition() + implicit none + Get_OperationCondition = UnitySignals%OperationCondition + end function + + + subroutine Set_MouseHole(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%MouseHole == v) return + #endif + !call sleep(2) + UnitySignals%MouseHole = v + #ifdef deb + print*, 'MouseHole=', UnitySignals%MouseHole + #endif + call UnitySignals%OnMouseHoleChange%RunAll() + end subroutine + + integer function Get_MouseHole() + implicit none + Get_MouseHole = UnitySignals%MouseHole + end function + + + + subroutine Set_Kelly(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Kelly == v) return + #endif + UnitySignals%Kelly = v + #ifdef deb + print*, 'Kelly=', UnitySignals%Kelly + #endif + call UnitySignals%OnKellyChange%RunAll() + end subroutine + + integer function Get_Kelly() + implicit none + Get_Kelly = UnitySignals%Kelly + end function + + + subroutine Set_Ibop(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Ibop == v) return + #endif + UnitySignals%Ibop = v + #ifdef deb + print*, 'Ibop=', UnitySignals%Ibop + #endif + call UnitySignals%OnIbopChange%RunAll() + end subroutine + + integer function Get_Ibop() + implicit none + Get_Ibop = UnitySignals%Ibop + end function + + + subroutine Set_FillupHead(v) + use CManifolds, only: ToggleFillupHead + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%FillupHead == v) return + #endif + UnitySignals%FillupHead = v + + if (UnitySignals%FillupHead == FILLUP_HEAD_INSTALL) then + call ToggleFillupHead(.true.) + else if (UnitySignals%FillupHead == FILLUP_HEAD_REMOVE) then + call ToggleFillupHead(.false.) + endif + + #ifdef deb + print*, 'FillupHead=', UnitySignals%FillupHead + #endif + call UnitySignals%OnFillupHeadChange%RunAll() + end subroutine + + integer function Get_FillupHead() + implicit none + Get_FillupHead = UnitySignals%FillupHead + end function + + + subroutine Set_Elevator(v) + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%Elevator == v) return + #endif + UnitySignals%Elevator = v + #ifdef deb + print*, 'Elevator=', UnitySignals%Elevator + #endif + call UnitySignals%OnElevatorChange%RunAll() + end subroutine + + integer function Get_Elevator() + implicit none + Get_Elevator = UnitySignals%Elevator + end function + + + + subroutine Set_MudBucket(v) + use CManifolds, only: ToggleMudBox + implicit none + integer , intent(in) :: v + #ifdef ExcludeExtraChanges + if(UnitySignals%MudBucket == v) return + #endif + UnitySignals%MudBucket = v + if (UnitySignals%MudBucket == MUD_BUCKET_INSTALL) then + call ToggleMudBox(.true.) + else if (UnitySignals%MudBucket == MUD_BUCKET_REMOVE) then + call ToggleMudBox(.false.) + endif + #ifdef deb + print*, 'MudBucket=', UnitySignals%MudBucket + #endif + call UnitySignals%OnMudBucketChange%RunAll() + end subroutine + + integer function Get_MudBucket() + implicit none + Get_MudBucket = UnitySignals%MudBucket + end function + + +end module UnitySignalVariables \ No newline at end of file diff --git a/CSharp/Problems/CBitProblems.f90 b/CSharp/Problems/CBitProblems.f90 index 8b38696..35e46ad 100644 --- a/CSharp/Problems/CBitProblems.f90 +++ b/CSharp/Problems/CBitProblems.f90 @@ -10,7 +10,7 @@ module CBitProblems !DEC$ ATTRIBUTES ALIAS: 'SetPlugJets' :: SetPlugJets implicit none type(CProblem), intent(in) :: v - PlugJets = SetDue(v, ChangePlugJets) + BitProblems%PlugJets = SetDue(v, ChangePlugJets) #ifdef deb !print*, 'PlugJets%ProblemType=', PlugJets%ProblemType !print*, 'PlugJets%StatusType=', PlugJets%StatusType @@ -18,10 +18,10 @@ module CBitProblems !print*, 'PlugJets%DueValue=', PlugJets%DueValue call Log_3("==============================") - call Log_3("PlugJets%ProblemType=", PlugJets%ProblemType) - call Log_3("PlugJets%StatusType=", PlugJets%StatusType) - call Log_3("PlugJets%Value=", PlugJets%Value) - call Log_3("PlugJets%DueValue=", PlugJets%DueValue) + call Log_3("PlugJets%ProblemType=", BitProblems%PlugJets%ProblemType) + call Log_3("PlugJets%StatusType=", BitProblems%PlugJets%StatusType) + call Log_3("PlugJets%Value=", BitProblems%PlugJets%Value) + call Log_3("PlugJets%DueValue=", BitProblems%PlugJets%DueValue) call Log_3("==============================") #endif end subroutine @@ -31,12 +31,12 @@ module CBitProblems !DEC$ ATTRIBUTES ALIAS: 'SetJetWashout' :: SetJetWashout implicit none type(CProblem), intent(in) :: v - JetWashout = SetDue(v, ChangeJetWashout) + BitProblems%JetWashout = SetDue(v, ChangeJetWashout) #ifdef deb - print*, 'JetWashout%ProblemType=', JetWashout%ProblemType - print*, 'JetWashout%StatusType=', JetWashout%StatusType - print*, 'JetWashout%Value=', JetWashout%Value - print*, 'JetWashout%DueValue=', JetWashout%DueValue + print*, 'JetWashout%ProblemType=', BitProblems%JetWashout%ProblemType + print*, 'JetWashout%StatusType=', BitProblems%JetWashout%StatusType + print*, 'JetWashout%Value=', BitProblems%JetWashout%Value + print*, 'JetWashout%DueValue=', BitProblems%JetWashout%DueValue #endif end subroutine @@ -45,9 +45,9 @@ module CBitProblems !DEC$ ATTRIBUTES ALIAS: 'SetPlugJetsCount' :: SetPlugJetsCount implicit none integer, intent(in) :: v - PlugJetsCount = v + BitProblems%PlugJetsCount = v #ifdef deb - print*, 'PlugJetsCount=', PlugJetsCount + print*, 'PlugJetsCount=', BitProblems%PlugJetsCount #endif end subroutine @@ -56,9 +56,9 @@ module CBitProblems !DEC$ ATTRIBUTES ALIAS: 'SetJetWashoutCount' :: SetJetWashoutCount implicit none integer, intent(in) :: v - JetWashoutCount = v + BitProblems%JetWashoutCount = v #ifdef deb - print*, 'JetWashoutCount=', JetWashoutCount + print*, 'JetWashoutCount=', BitProblems%JetWashoutCount #endif end subroutine diff --git a/CSharp/Problems/CBitProblemsVariables.f90 b/CSharp/Problems/CBitProblemsVariables.f90 index 512a901..cc08cef 100644 --- a/CSharp/Problems/CBitProblemsVariables.f90 +++ b/CSharp/Problems/CBitProblemsVariables.f90 @@ -5,20 +5,24 @@ module CBitProblemsVariables public ! Input vars - type(CProblem) :: PlugJets - type(CProblem) :: JetWashout - integer :: PlugJetsCount - integer :: JetWashoutCount - - procedure (ActionInteger), pointer :: PlugJetsPtr - procedure (ActionInteger), pointer :: JetWashoutPtr - + type:: BitProblemsType + type(CProblem) :: PlugJets + type(CProblem) :: JetWashout + integer :: PlugJetsCount + integer :: JetWashoutCount + + ! procedure (ActionInteger), pointer :: PlugJetsPtr + ! procedure (ActionInteger), pointer :: JetWashoutPtr + end type BitProblemsType + type(BitProblemsType)::BitProblems + contains + subroutine ProcessBitProblemsDueTime(time) implicit none integer :: time - if(PlugJets%ProblemType == Time_ProblemType) call ProcessDueTime(PlugJets, ChangePlugJets, time) - if(JetWashout%ProblemType == Time_ProblemType) call ProcessDueTime(JetWashout, ChangeJetWashout, time) + if(BitProblems%PlugJets%ProblemType == Time_ProblemType) call ProcessDueTime(BitProblems%PlugJets, ChangePlugJets, time) + if(BitProblems%JetWashout%ProblemType == Time_ProblemType) call ProcessDueTime(BitProblems%JetWashout, ChangeJetWashout, time) end subroutine @@ -26,8 +30,8 @@ module CBitProblemsVariables implicit none integer :: strokes - if(PlugJets%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PlugJets, ChangePlugJets, strokes) - if(JetWashout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(JetWashout, ChangeJetWashout, strokes) + if(BitProblems%PlugJets%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BitProblems%PlugJets, ChangePlugJets, strokes) + if(BitProblems%JetWashout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BitProblems%JetWashout, ChangeJetWashout, strokes) end subroutine @@ -35,8 +39,8 @@ module CBitProblemsVariables implicit none real(8) :: volume - if(PlugJets%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PlugJets, ChangePlugJets, volume) - if(JetWashout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(JetWashout, ChangeJetWashout, volume) + if(BitProblems%PlugJets%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BitProblems%PlugJets, ChangePlugJets, volume) + if(BitProblems%JetWashout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BitProblems%JetWashout, ChangeJetWashout, volume) end subroutine @@ -44,8 +48,8 @@ module CBitProblemsVariables implicit none real(8) :: distance - if(PlugJets%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PlugJets, ChangePlugJets, distance) - if(JetWashout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(JetWashout, ChangeJetWashout, distance) + if(BitProblems%PlugJets%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BitProblems%PlugJets, ChangePlugJets, distance) + if(BitProblems%JetWashout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BitProblems%JetWashout, ChangeJetWashout, distance) end subroutine @@ -53,7 +57,7 @@ module CBitProblemsVariables USE FricPressDropVars implicit none integer, intent (in) :: status - if(associated(PlugJetsPtr)) call PlugJetsPtr(status) + ! if(associated(BitProblems%PlugJetsPtr)) call BitProblems%PlugJetsPtr(status) if(status == Clear_StatusType) BitJetsPlugged = 0 if(status == Executed_StatusType) BitJetsPlugged = 1 endsubroutine @@ -62,7 +66,7 @@ module CBitProblemsVariables USE FricPressDropVars implicit none integer, intent (in) :: status - if(associated(JetWashoutPtr)) call JetWashoutPtr(status) + ! if(associated(BitProblems%JetWashoutPtr)) call BitProblems%JetWashoutPtr(status) if(status == Clear_StatusType) BitJetsWashedOut = 0 if(status == Executed_StatusType) BitJetsWashedOut = 1 endsubroutine @@ -76,20 +80,20 @@ module CBitProblemsVariables - subroutine SubscribePlugJets(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePlugJets - !DEC$ ATTRIBUTES ALIAS: 'SubscribePlugJets' :: SubscribePlugJets - implicit none - procedure (ActionInteger) :: v - PlugJetsPtr => v - end subroutine + ! subroutine SubscribePlugJets(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePlugJets + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribePlugJets' :: SubscribePlugJets + ! implicit none + ! procedure (ActionInteger) :: v + ! BitProblems%PlugJetsPtr => v + ! end subroutine - subroutine SubscribeJetWashout(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeJetWashout - !DEC$ ATTRIBUTES ALIAS: 'SubscribeJetWashout' :: SubscribeJetWashout - implicit none - procedure (ActionInteger) :: v - JetWashoutPtr => v - end subroutine + ! subroutine SubscribeJetWashout(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeJetWashout + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeJetWashout' :: SubscribeJetWashout + ! implicit none + ! procedure (ActionInteger) :: v + ! BitProblems%JetWashoutPtr => v + ! end subroutine end module CBitProblemsVariables \ No newline at end of file diff --git a/CSharp/Problems/CBopProblems.f90 b/CSharp/Problems/CBopProblems.f90 index 5fc1b12..ee912ba 100644 --- a/CSharp/Problems/CBopProblems.f90 +++ b/CSharp/Problems/CBopProblems.f90 @@ -11,11 +11,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAnnularWash' :: SetAnnularWash implicit none type(CProblem), intent(in) :: v - AnnularWash = SetDue(v, ChangeAnnularWash) + BopProblems%AnnularWash = SetDue(v, ChangeAnnularWash) #ifdef deb - print*, 'AnnularWash%ProblemType=', AnnularWash%ProblemType - print*, 'AnnularWash%StatusType=', AnnularWash%StatusType - print*, 'AnnularWash%Value=', AnnularWash%Value + print*, 'AnnularWash%ProblemType=', BopProblems%AnnularWash%ProblemType + print*, 'AnnularWash%StatusType=', BopProblems%AnnularWash%StatusType + print*, 'AnnularWash%Value=', BopProblems%AnnularWash%Value #endif end subroutine @@ -24,11 +24,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAnnularFail' :: SetAnnularFail implicit none type(CProblem), intent(in) :: v - AnnularFail = SetDue(v, ChangeAnnularFail) + BopProblems%AnnularFail = SetDue(v, ChangeAnnularFail) #ifdef deb - print*, 'AnnularFail%ProblemType=', AnnularFail%ProblemType - print*, 'AnnularFail%StatusType=', AnnularFail%StatusType - print*, 'AnnularFail%Value=', AnnularFail%Value + print*, 'AnnularFail%ProblemType=', BopProblems%AnnularFail%ProblemType + print*, 'AnnularFail%StatusType=', BopProblems%AnnularFail%StatusType + print*, 'AnnularFail%Value=', BopProblems%AnnularFail%Value #endif end subroutine @@ -37,11 +37,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAnnularLeak' :: SetAnnularLeak implicit none type(CProblem), intent(in) :: v - AnnularLeak = SetDue(v, ChangeAnnularLeak) + BopProblems%AnnularLeak = SetDue(v, ChangeAnnularLeak) #ifdef deb - print*, 'AnnularLeak%ProblemType=', AnnularLeak%ProblemType - print*, 'AnnularLeak%StatusType=', AnnularLeak%StatusType - print*, 'AnnularLeak%Value=', AnnularLeak%Value + print*, 'AnnularLeak%ProblemType=', BopProblems%AnnularLeak%ProblemType + print*, 'AnnularLeak%StatusType=', BopProblems%AnnularLeak%StatusType + print*, 'AnnularLeak%Value=', BopProblems%AnnularLeak%Value #endif end subroutine @@ -50,11 +50,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetUpperRamWash' :: SetUpperRamWash implicit none type(CProblem), intent(in) :: v - UpperRamWash = SetDue(v, ChangeUpperRamWash) + BopProblems%UpperRamWash = SetDue(v, ChangeUpperRamWash) #ifdef deb - print*, 'UpperRamWash%ProblemType=', UpperRamWash%ProblemType - print*, 'UpperRamWash%StatusType=', UpperRamWash%StatusType - print*, 'UpperRamWash%Value=', UpperRamWash%Value + print*, 'UpperRamWash%ProblemType=', BopProblems%UpperRamWash%ProblemType + print*, 'UpperRamWash%StatusType=', BopProblems%UpperRamWash%StatusType + print*, 'UpperRamWash%Value=', BopProblems%UpperRamWash%Value #endif end subroutine @@ -63,11 +63,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetUpperRamFail' :: SetUpperRamFail implicit none type(CProblem), intent(in) :: v - UpperRamFail = SetDue(v, ChangeUpperRamFail) + BopProblems%UpperRamFail = SetDue(v, ChangeUpperRamFail) #ifdef deb - print*, 'UpperRamFail%ProblemType=', UpperRamFail%ProblemType - print*, 'UpperRamFail%StatusType=', UpperRamFail%StatusType - print*, 'UpperRamFail%Value=', UpperRamFail%Value + print*, 'UpperRamFail%ProblemType=', BopProblems%UpperRamFail%ProblemType + print*, 'UpperRamFail%StatusType=', BopProblems%UpperRamFail%StatusType + print*, 'UpperRamFail%Value=', BopProblems%UpperRamFail%Value #endif end subroutine @@ -76,11 +76,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetUpperRamLeak' :: SetUpperRamLeak implicit none type(CProblem), intent(in) :: v - UpperRamLeak = SetDue(v, ChangeUpperRamLeak) + BopProblems%UpperRamLeak = SetDue(v, ChangeUpperRamLeak) #ifdef deb - print*, 'UpperRamLeak%ProblemType=', UpperRamLeak%ProblemType - print*, 'UpperRamLeak%StatusType=', UpperRamLeak%StatusType - print*, 'UpperRamLeak%Value=', UpperRamLeak%Value + print*, 'UpperRamLeak%ProblemType=', BopProblems%UpperRamLeak%ProblemType + print*, 'UpperRamLeak%StatusType=', BopProblems%UpperRamLeak%StatusType + print*, 'UpperRamLeak%Value=', BopProblems%UpperRamLeak%Value #endif end subroutine @@ -89,11 +89,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetMiddleRamWash' :: SetMiddleRamWash implicit none type(CProblem), intent(in) :: v - MiddleRamWash = SetDue(v, ChangeMiddleRamWash) + BopProblems%MiddleRamWash = SetDue(v, ChangeMiddleRamWash) #ifdef deb - print*, 'MiddleRamWash%ProblemType=', MiddleRamWash%ProblemType - print*, 'MiddleRamWash%StatusType=', MiddleRamWash%StatusType - print*, 'MiddleRamWash%Value=', MiddleRamWash%Value + print*, 'MiddleRamWash%ProblemType=', BopProblems%MiddleRamWash%ProblemType + print*, 'MiddleRamWash%StatusType=', BopProblems%MiddleRamWash%StatusType + print*, 'MiddleRamWash%Value=', BopProblems%MiddleRamWash%Value #endif end subroutine @@ -102,11 +102,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetMiddleRamFail' :: SetMiddleRamFail implicit none type(CProblem), intent(in) :: v - MiddleRamFail = SetDue(v, ChangeMiddleRamFail) + BopProblems%MiddleRamFail = SetDue(v, ChangeMiddleRamFail) #ifdef deb - print*, 'MiddleRamFail%ProblemType=', MiddleRamFail%ProblemType - print*, 'MiddleRamFail%StatusType=', MiddleRamFail%StatusType - print*, 'MiddleRamFail%Value=', MiddleRamFail%Value + print*, 'MiddleRamFail%ProblemType=', BopProblems%MiddleRamFail%ProblemType + print*, 'MiddleRamFail%StatusType=', BopProblems%MiddleRamFail%StatusType + print*, 'MiddleRamFail%Value=', BopProblems%MiddleRamFail%Value #endif end subroutine @@ -115,11 +115,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetMiddleRamLeak' :: SetMiddleRamLeak implicit none type(CProblem), intent(in) :: v - MiddleRamLeak = SetDue(v, ChangeMiddleRamLeak) + BopProblems%MiddleRamLeak = SetDue(v, ChangeMiddleRamLeak) #ifdef deb - print*, 'MiddleRamLeak%ProblemType=', MiddleRamLeak%ProblemType - print*, 'MiddleRamLeak%StatusType=', MiddleRamLeak%StatusType - print*, 'MiddleRamLeak%Value=', MiddleRamLeak%Value + print*, 'MiddleRamLeak%ProblemType=', BopProblems%MiddleRamLeak%ProblemType + print*, 'MiddleRamLeak%StatusType=', BopProblems%MiddleRamLeak%StatusType + print*, 'MiddleRamLeak%Value=', BopProblems%MiddleRamLeak%Value #endif end subroutine @@ -128,11 +128,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetLowerRamWash' :: SetLowerRamWash implicit none type(CProblem), intent(in) :: v - LowerRamWash = SetDue(v, ChangeLowerRamWash) + BopProblems%LowerRamWash = SetDue(v, ChangeLowerRamWash) #ifdef deb - print*, 'LowerRamWash%ProblemType=', LowerRamWash%ProblemType - print*, 'LowerRamWash%StatusType=', LowerRamWash%StatusType - print*, 'LowerRamWash%Value=', LowerRamWash%Value + print*, 'LowerRamWash%ProblemType=', BopProblems%LowerRamWash%ProblemType + print*, 'LowerRamWash%StatusType=', BopProblems%LowerRamWash%StatusType + print*, 'LowerRamWash%Value=', BopProblems%LowerRamWash%Value #endif end subroutine @@ -141,11 +141,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetLowerRamFail' :: SetLowerRamFail implicit none type(CProblem), intent(in) :: v - LowerRamFail = SetDue(v, ChangeLowerRamFail) + BopProblems%LowerRamFail = SetDue(v, ChangeLowerRamFail) #ifdef deb - print*, 'LowerRamFail%ProblemType=', LowerRamFail%ProblemType - print*, 'LowerRamFail%StatusType=', LowerRamFail%StatusType - print*, 'LowerRamFail%Value=', LowerRamFail%Value + print*, 'LowerRamFail%ProblemType=', BopProblems%LowerRamFail%ProblemType + print*, 'LowerRamFail%StatusType=', BopProblems%LowerRamFail%StatusType + print*, 'LowerRamFail%Value=', BopProblems%LowerRamFail%Value #endif end subroutine @@ -154,11 +154,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetLowerRamLeak' :: SetLowerRamLeak implicit none type(CProblem), intent(in) :: v - LowerRamLeak = SetDue(v, ChangeLowerRamLeak) + BopProblems%LowerRamLeak = SetDue(v, ChangeLowerRamLeak) #ifdef deb - print*, 'LowerRamLeak%ProblemType=', LowerRamLeak%ProblemType - print*, 'LowerRamLeak%StatusType=', LowerRamLeak%StatusType - print*, 'LowerRamLeak%Value=', LowerRamLeak%Value + print*, 'LowerRamLeak%ProblemType=', BopProblems%LowerRamLeak%ProblemType + print*, 'LowerRamLeak%StatusType=', BopProblems%LowerRamLeak%StatusType + print*, 'LowerRamLeak%Value=', BopProblems%LowerRamLeak%Value #endif end subroutine @@ -167,11 +167,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorPumpFail' :: SetAccumulatorPumpFail implicit none type(CProblem), intent(in) :: v - AccumulatorPumpFail = SetDue(v, ChangeAccumulatorPumpFail) + BopProblems%AccumulatorPumpFail = SetDue(v, ChangeAccumulatorPumpFail) #ifdef deb - print*, 'AccumulatorPumpFail%ProblemType=', AccumulatorPumpFail%ProblemType - print*, 'AccumulatorPumpFail%StatusType=', AccumulatorPumpFail%StatusType - print*, 'AccumulatorPumpFail%Value=', AccumulatorPumpFail%Value + print*, 'AccumulatorPumpFail%ProblemType=', BopProblems%AccumulatorPumpFail%ProblemType + print*, 'AccumulatorPumpFail%StatusType=', BopProblems%AccumulatorPumpFail%StatusType + print*, 'AccumulatorPumpFail%Value=', BopProblems%AccumulatorPumpFail%Value #endif end subroutine @@ -180,11 +180,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorPumpLeak' :: SetAccumulatorPumpLeak implicit none type(CProblem), intent(in) :: v - AccumulatorPumpLeak = SetDue(v, ChangeAccumulatorPumpLeak) + BopProblems%AccumulatorPumpLeak = SetDue(v, ChangeAccumulatorPumpLeak) #ifdef deb - print*, 'AccumulatorPumpLeak%ProblemType=', AccumulatorPumpLeak%ProblemType - print*, 'AccumulatorPumpLeak%StatusType=', AccumulatorPumpLeak%StatusType - print*, 'AccumulatorPumpLeak%Value=', AccumulatorPumpLeak%Value + print*, 'AccumulatorPumpLeak%ProblemType=', BopProblems%AccumulatorPumpLeak%ProblemType + print*, 'AccumulatorPumpLeak%StatusType=', BopProblems%AccumulatorPumpLeak%StatusType + print*, 'AccumulatorPumpLeak%Value=', BopProblems%AccumulatorPumpLeak%Value #endif end subroutine @@ -193,11 +193,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorSystemFail' :: SetAccumulatorSystemFail implicit none type(CProblem), intent(in) :: v - AccumulatorSystemFail = SetDue(v, ChangeAccumulatorSystemFail) + BopProblems%AccumulatorSystemFail = SetDue(v, ChangeAccumulatorSystemFail) #ifdef deb - print*, 'AccumulatorSystemFail%ProblemType=', AccumulatorSystemFail%ProblemType - print*, 'AccumulatorSystemFail%StatusType=', AccumulatorSystemFail%StatusType - print*, 'AccumulatorSystemFail%Value=', AccumulatorSystemFail%Value + print*, 'AccumulatorSystemFail%ProblemType=', BopProblems%AccumulatorSystemFail%ProblemType + print*, 'AccumulatorSystemFail%StatusType=', BopProblems%AccumulatorSystemFail%StatusType + print*, 'AccumulatorSystemFail%Value=', BopProblems%AccumulatorSystemFail%Value #endif end subroutine @@ -206,11 +206,11 @@ module CBopProblems !DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorSystemLeak' :: SetAccumulatorSystemLeak implicit none type(CProblem), intent(in) :: v - AccumulatorSystemLeak = SetDue(v, ChangeAccumulatorSystemLeak) + BopProblems%AccumulatorSystemLeak = SetDue(v, ChangeAccumulatorSystemLeak) #ifdef deb - print*, 'AccumulatorSystemLeak%ProblemType=', AccumulatorSystemLeak%ProblemType - print*, 'AccumulatorSystemLeak%StatusType=', AccumulatorSystemLeak%StatusType - print*, 'AccumulatorSystemLeak%Value=', AccumulatorSystemLeak%Value + print*, 'AccumulatorSystemLeak%ProblemType=', BopProblems%AccumulatorSystemLeak%ProblemType + print*, 'AccumulatorSystemLeak%StatusType=', BopProblems%AccumulatorSystemLeak%StatusType + print*, 'AccumulatorSystemLeak%Value=', BopProblems%AccumulatorSystemLeak%Value #endif end subroutine diff --git a/CSharp/Problems/CBopProblemsVariables.f90 b/CSharp/Problems/CBopProblemsVariables.f90 index 3af9260..1a59bf2 100644 --- a/CSharp/Problems/CBopProblemsVariables.f90 +++ b/CSharp/Problems/CBopProblemsVariables.f90 @@ -1,135 +1,137 @@ module CBopProblemsVariables use CProblemDifinition - implicit none - public + implicit none + public ! Input vars - type(CProblem) :: AnnularWash - type(CProblem) :: AnnularFail - type(CProblem) :: AnnularLeak - type(CProblem) :: UpperRamWash - type(CProblem) :: UpperRamFail - type(CProblem) :: UpperRamLeak - type(CProblem) :: MiddleRamWash - type(CProblem) :: MiddleRamFail - type(CProblem) :: MiddleRamLeak - type(CProblem) :: LowerRamWash - type(CProblem) :: LowerRamFail - type(CProblem) :: LowerRamLeak - type(CProblem) :: AccumulatorPumpFail - type(CProblem) :: AccumulatorPumpLeak - type(CProblem) :: AccumulatorSystemFail - type(CProblem) :: AccumulatorSystemLeak - - - procedure (ActionInteger), pointer :: AnnularWashPtr - procedure (ActionInteger), pointer :: AnnularFailPtr - procedure (ActionInteger), pointer :: AnnularLeakPtr - procedure (ActionInteger), pointer :: UpperRamWashPtr - procedure (ActionInteger), pointer :: UpperRamFailPtr - procedure (ActionInteger), pointer :: UpperRamLeakPtr - procedure (ActionInteger), pointer :: MiddleRamWashPtr - procedure (ActionInteger), pointer :: MiddleRamFailPtr - procedure (ActionInteger), pointer :: MiddleRamLeakPtr - procedure (ActionInteger), pointer :: LowerRamWashPtr - procedure (ActionInteger), pointer :: LowerRamFailPtr - procedure (ActionInteger), pointer :: LowerRamLeakPtr - procedure (ActionInteger), pointer :: AccumulatorPumpFailPtr - procedure (ActionInteger), pointer :: AccumulatorPumpLeakPtr - procedure (ActionInteger), pointer :: AccumulatorSystemFailPtr - procedure (ActionInteger), pointer :: AccumulatorSystemLeakPtr + type::BopProblemsType + type(CProblem) :: AnnularWash + type(CProblem) :: AnnularFail + type(CProblem) :: AnnularLeak + type(CProblem) :: UpperRamWash + type(CProblem) :: UpperRamFail + type(CProblem) :: UpperRamLeak + type(CProblem) :: MiddleRamWash + type(CProblem) :: MiddleRamFail + type(CProblem) :: MiddleRamLeak + type(CProblem) :: LowerRamWash + type(CProblem) :: LowerRamFail + type(CProblem) :: LowerRamLeak + type(CProblem) :: AccumulatorPumpFail + type(CProblem) :: AccumulatorPumpLeak + type(CProblem) :: AccumulatorSystemFail + type(CProblem) :: AccumulatorSystemLeak + end type BopProblemsType + type(BopProblemsType)::BopProblems + + ! procedure (ActionInteger), pointer :: AnnularWashPtr + ! procedure (ActionInteger), pointer :: AnnularFailPtr + ! procedure (ActionInteger), pointer :: AnnularLeakPtr + ! procedure (ActionInteger), pointer :: UpperRamWashPtr + ! procedure (ActionInteger), pointer :: UpperRamFailPtr + ! procedure (ActionInteger), pointer :: UpperRamLeakPtr + ! procedure (ActionInteger), pointer :: MiddleRamWashPtr + ! procedure (ActionInteger), pointer :: MiddleRamFailPtr + ! procedure (ActionInteger), pointer :: MiddleRamLeakPtr + ! procedure (ActionInteger), pointer :: LowerRamWashPtr + ! procedure (ActionInteger), pointer :: LowerRamFailPtr + ! procedure (ActionInteger), pointer :: LowerRamLeakPtr + ! procedure (ActionInteger), pointer :: AccumulatorPumpFailPtr + ! procedure (ActionInteger), pointer :: AccumulatorPumpLeakPtr + ! procedure (ActionInteger), pointer :: AccumulatorSystemFailPtr + ! procedure (ActionInteger), pointer :: AccumulatorSystemLeakPtr contains subroutine ProcessBopProblemsDueTime(time) implicit none integer :: time - if(AnnularWash%ProblemType == Time_ProblemType) call ProcessDueTime(AnnularWash, ChangeAnnularWash, time) - if(AnnularFail%ProblemType == Time_ProblemType) call ProcessDueTime(AnnularFail, ChangeAnnularFail, time) - if(AnnularLeak%ProblemType == Time_ProblemType) call ProcessDueTime(AnnularLeak, ChangeAnnularLeak, time) - if(UpperRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(UpperRamWash, ChangeUpperRamWash, time) - if(UpperRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(UpperRamFail, ChangeUpperRamFail, time) - if(UpperRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(UpperRamLeak, ChangeUpperRamLeak, time) - if(MiddleRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(MiddleRamWash, ChangeMiddleRamWash, time) - if(MiddleRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(MiddleRamFail, ChangeMiddleRamFail, time) - if(MiddleRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(MiddleRamLeak, ChangeMiddleRamLeak, time) - if(LowerRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(LowerRamWash, ChangeLowerRamWash, time) - if(LowerRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(LowerRamFail, ChangeLowerRamFail, time) - if(LowerRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(LowerRamLeak, ChangeLowerRamLeak, time) - if(AccumulatorPumpFail%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorPumpFail, ChangeAccumulatorPumpFail, time) - if(AccumulatorPumpLeak%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, time) - if(AccumulatorSystemFail%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorSystemFail, ChangeAccumulatorSystemFail, time) - if(AccumulatorSystemLeak%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, time) + if(BopProblems%AnnularWash%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AnnularWash, ChangeAnnularWash, time) + if(BopProblems%AnnularFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AnnularFail, ChangeAnnularFail, time) + if(BopProblems%AnnularLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AnnularLeak, ChangeAnnularLeak, time) + if(BopProblems%UpperRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%UpperRamWash, ChangeUpperRamWash, time) + if(BopProblems%UpperRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%UpperRamFail, ChangeUpperRamFail, time) + if(BopProblems%UpperRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%UpperRamLeak, ChangeUpperRamLeak, time) + if(BopProblems%MiddleRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%MiddleRamWash, ChangeMiddleRamWash, time) + if(BopProblems%MiddleRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%MiddleRamFail, ChangeMiddleRamFail, time) + if(BopProblems%MiddleRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, time) + if(BopProblems%LowerRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%LowerRamWash, ChangeLowerRamWash, time) + if(BopProblems%LowerRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%LowerRamFail, ChangeLowerRamFail, time) + if(BopProblems%LowerRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%LowerRamLeak, ChangeLowerRamLeak, time) + if(BopProblems%AccumulatorPumpFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, time) + if(BopProblems%AccumulatorPumpLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, time) + if(BopProblems%AccumulatorSystemFail%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, time) + if(BopProblems%AccumulatorSystemLeak%ProblemType == Time_ProblemType) call ProcessDueTime(BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, time) end subroutine subroutine ProcessBopProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(AnnularWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AnnularWash, ChangeAnnularWash, strokes) - if(AnnularFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AnnularFail, ChangeAnnularFail, strokes) - if(AnnularLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AnnularLeak, ChangeAnnularLeak, strokes) - if(UpperRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(UpperRamWash, ChangeUpperRamWash, strokes) - if(UpperRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(UpperRamFail, ChangeUpperRamFail, strokes) - if(UpperRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(UpperRamLeak, ChangeUpperRamLeak, strokes) - if(MiddleRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MiddleRamWash, ChangeMiddleRamWash, strokes) - if(MiddleRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MiddleRamFail, ChangeMiddleRamFail, strokes) - if(MiddleRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MiddleRamLeak, ChangeMiddleRamLeak, strokes) - if(LowerRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LowerRamWash, ChangeLowerRamWash, strokes) - if(LowerRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LowerRamFail, ChangeLowerRamFail, strokes) - if(LowerRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LowerRamLeak, ChangeLowerRamLeak, strokes) - if(AccumulatorPumpFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorPumpFail, ChangeAccumulatorPumpFail, strokes) - if(AccumulatorPumpLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, strokes) - if(AccumulatorSystemFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorSystemFail, ChangeAccumulatorSystemFail, strokes) - if(AccumulatorSystemLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, strokes) + if(BopProblems%AnnularWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AnnularWash, ChangeAnnularWash, strokes) + if(BopProblems%AnnularFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AnnularFail, ChangeAnnularFail, strokes) + if(BopProblems%AnnularLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AnnularLeak, ChangeAnnularLeak, strokes) + if(BopProblems%UpperRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%UpperRamWash, ChangeUpperRamWash, strokes) + if(BopProblems%UpperRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%UpperRamFail, ChangeUpperRamFail, strokes) + if(BopProblems%UpperRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%UpperRamLeak, ChangeUpperRamLeak, strokes) + if(BopProblems%MiddleRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%MiddleRamWash, ChangeMiddleRamWash, strokes) + if(BopProblems%MiddleRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%MiddleRamFail, ChangeMiddleRamFail, strokes) + if(BopProblems%MiddleRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, strokes) + if(BopProblems%LowerRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%LowerRamWash, ChangeLowerRamWash, strokes) + if(BopProblems%LowerRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%LowerRamFail, ChangeLowerRamFail, strokes) + if(BopProblems%LowerRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%LowerRamLeak, ChangeLowerRamLeak, strokes) + if(BopProblems%AccumulatorPumpFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, strokes) + if(BopProblems%AccumulatorPumpLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, strokes) + if(BopProblems%AccumulatorSystemFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, strokes) + if(BopProblems%AccumulatorSystemLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, strokes) end subroutine subroutine ProcessBopProblemsDueVolumePumped(volume) implicit none real(8) :: volume - if(AnnularWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AnnularWash, ChangeAnnularWash, volume) - if(AnnularFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AnnularFail, ChangeAnnularFail, volume) - if(AnnularLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AnnularLeak, ChangeAnnularLeak, volume) - if(UpperRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(UpperRamWash, ChangeUpperRamWash, volume) - if(UpperRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(UpperRamFail, ChangeUpperRamFail, volume) - if(UpperRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(UpperRamLeak, ChangeUpperRamLeak, volume) - if(MiddleRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MiddleRamWash, ChangeMiddleRamWash, volume) - if(MiddleRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MiddleRamFail, ChangeMiddleRamFail, volume) - if(MiddleRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MiddleRamLeak, ChangeMiddleRamLeak, volume) - if(LowerRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LowerRamWash, ChangeLowerRamWash, volume) - if(LowerRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LowerRamFail, ChangeLowerRamFail, volume) - if(LowerRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LowerRamLeak, ChangeLowerRamLeak, volume) - if(AccumulatorPumpFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorPumpFail, ChangeAccumulatorPumpFail, volume) - if(AccumulatorPumpLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, volume) - if(AccumulatorSystemFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorSystemFail, ChangeAccumulatorSystemFail,volume) - if(AccumulatorSystemLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, volume) + if(BopProblems%AnnularWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AnnularWash, ChangeAnnularWash, volume) + if(BopProblems%AnnularFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AnnularFail, ChangeAnnularFail, volume) + if(BopProblems%AnnularLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AnnularLeak, ChangeAnnularLeak, volume) + if(BopProblems%UpperRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%UpperRamWash, ChangeUpperRamWash, volume) + if(BopProblems%UpperRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%UpperRamFail, ChangeUpperRamFail, volume) + if(BopProblems%UpperRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%UpperRamLeak, ChangeUpperRamLeak, volume) + if(BopProblems%MiddleRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%MiddleRamWash, ChangeMiddleRamWash, volume) + if(BopProblems%MiddleRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%MiddleRamFail, ChangeMiddleRamFail, volume) + if(BopProblems%MiddleRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, volume) + if(BopProblems%LowerRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%LowerRamWash, ChangeLowerRamWash, volume) + if(BopProblems%LowerRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%LowerRamFail, ChangeLowerRamFail, volume) + if(BopProblems%LowerRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%LowerRamLeak, ChangeLowerRamLeak, volume) + if(BopProblems%AccumulatorPumpFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, volume) + if(BopProblems%AccumulatorPumpLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, volume) + if(BopProblems%AccumulatorSystemFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail,volume) + if(BopProblems%AccumulatorSystemLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, volume) end subroutine subroutine ProcessBopProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance - if(AnnularWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AnnularWash, ChangeAnnularWash, distance) - if(AnnularFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AnnularFail, ChangeAnnularFail, distance) - if(AnnularLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AnnularLeak, ChangeAnnularLeak, distance) - if(UpperRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(UpperRamWash, ChangeUpperRamWash, distance) - if(UpperRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(UpperRamFail, ChangeUpperRamFail, distance) - if(UpperRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(UpperRamLeak, ChangeUpperRamLeak, distance) - if(MiddleRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MiddleRamWash, ChangeMiddleRamWash, distance) - if(MiddleRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MiddleRamFail, ChangeMiddleRamFail, distance) - if(MiddleRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MiddleRamLeak, ChangeMiddleRamLeak, distance) - if(LowerRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LowerRamWash, ChangeLowerRamWash, distance) - if(LowerRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LowerRamFail, ChangeLowerRamFail, distance) - if(LowerRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LowerRamLeak, ChangeLowerRamLeak, distance) - if(AccumulatorPumpFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorPumpFail, ChangeAccumulatorPumpFail, distance) - if(AccumulatorPumpLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, distance) - if(AccumulatorSystemFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorSystemFail, ChangeAccumulatorSystemFail, distance) - if(AccumulatorSystemLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, distance) + if(BopProblems%AnnularWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AnnularWash, ChangeAnnularWash, distance) + if(BopProblems%AnnularFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AnnularFail, ChangeAnnularFail, distance) + if(BopProblems%AnnularLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AnnularLeak, ChangeAnnularLeak, distance) + if(BopProblems%UpperRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%UpperRamWash, ChangeUpperRamWash, distance) + if(BopProblems%UpperRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%UpperRamFail, ChangeUpperRamFail, distance) + if(BopProblems%UpperRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%UpperRamLeak, ChangeUpperRamLeak, distance) + if(BopProblems%MiddleRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%MiddleRamWash, ChangeMiddleRamWash, distance) + if(BopProblems%MiddleRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%MiddleRamFail, ChangeMiddleRamFail, distance) + if(BopProblems%MiddleRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, distance) + if(BopProblems%LowerRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%LowerRamWash, ChangeLowerRamWash, distance) + if(BopProblems%LowerRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%LowerRamFail, ChangeLowerRamFail, distance) + if(BopProblems%LowerRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%LowerRamLeak, ChangeLowerRamLeak, distance) + if(BopProblems%AccumulatorPumpFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, distance) + if(BopProblems%AccumulatorPumpLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, distance) + if(BopProblems%AccumulatorSystemFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, distance) + if(BopProblems%AccumulatorSystemLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, distance) end subroutine subroutine ChangeAnnularWash(status) implicit none integer, intent (in) :: status - if(associated(AnnularWashPtr)) call AnnularWashPtr(status) + ! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(status) !if(status == Clear_StatusType) print*,'On_AnnularWash_Clear' !if(status == Executed_StatusType) print*,'On_AnnularWash_Execute' endsubroutine @@ -138,7 +140,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(AnnularFailPtr)) call AnnularFailPtr(status) + ! ! if(associated(AnnularFailPtr)) call AnnularFailPtr(status) if(status == Clear_StatusType) AnnularFailureMalf = 0 if(status == Executed_StatusType) AnnularFailureMalf = 1 endsubroutine @@ -147,7 +149,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(AnnularLeakPtr)) call AnnularLeakPtr(status) + ! ! if(associated(AnnularLeakPtr)) call AnnularLeakPtr(status) if(status == Clear_StatusType) AnnularLeakMalf = 0 if(status == Executed_StatusType) AnnularLeakMalf = 1 endsubroutine @@ -157,7 +159,7 @@ module CBopProblemsVariables subroutine ChangeUpperRamWash(status) implicit none integer, intent (in) :: status - if(associated(UpperRamWashPtr)) call UpperRamWashPtr(status) + ! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(status) !if(status == Clear_StatusType) print*,'On_UpperRamWash_Clear' !if(status == Executed_StatusType) print*,'On_UpperRamWash_Execute' endsubroutine @@ -166,7 +168,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(UpperRamFailPtr)) call UpperRamFailPtr(status) + ! ! if(associated(UpperRamFailPtr)) call UpperRamFailPtr(status) if(status == Clear_StatusType) UpperRamsFailureMalf = 0 if(status == Executed_StatusType) UpperRamsFailureMalf = 1 endsubroutine @@ -175,7 +177,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(UpperRamLeakPtr)) call UpperRamLeakPtr(status) + ! ! if(associated(UpperRamLeakPtr)) call UpperRamLeakPtr(status) if(status == Clear_StatusType) UpperRamsLeakMalf = 0 if(status == Executed_StatusType) UpperRamsLeakMalf = 1 endsubroutine @@ -184,7 +186,7 @@ module CBopProblemsVariables subroutine ChangeMiddleRamWash(status) implicit none integer, intent (in) :: status - if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(status) + ! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(status) !if(status == Clear_StatusType) print*,'On_MiddleRamWash_Clear' !if(status == Executed_StatusType) print*,'On_MiddleRamWash_Execute' endsubroutine @@ -193,7 +195,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(MiddleRamFailPtr)) call MiddleRamFailPtr(status) + ! if(associated(MiddleRamFailPtr)) call MiddleRamFailPtr(status) if(status == Clear_StatusType) MiddleRamsFailureMalf = 0 if(status == Executed_StatusType) MiddleRamsFailureMalf = 1 endsubroutine @@ -202,7 +204,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(MiddleRamLeakPtr)) call MiddleRamLeakPtr(status) + ! ! if(associated(MiddleRamLeakPtr)) call MiddleRamLeakPtr(status) if(status == Clear_StatusType) MiddleRamsLeakMalf = 0 if(status == Executed_StatusType) MiddleRamsLeakMalf = 1 endsubroutine @@ -212,7 +214,7 @@ module CBopProblemsVariables subroutine ChangeLowerRamWash(status) implicit none integer, intent (in) :: status - if(associated(LowerRamWashPtr)) call LowerRamWashPtr(status) + ! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(status) !if(status == Clear_StatusType) print*,'On_LowerRamWash_Clear' !if(status == Executed_StatusType) print*,'On_LowerRamWash_Execute' endsubroutine @@ -221,7 +223,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(LowerRamFailPtr)) call LowerRamFailPtr(status) + ! ! if(associated(LowerRamFailPtr)) call LowerRamFailPtr(status) if(status == Clear_StatusType) LowerRamsFailureMalf = 0 if(status == Executed_StatusType) LowerRamsFailureMalf = 1 endsubroutine @@ -230,7 +232,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(LowerRamLeakPtr)) call LowerRamLeakPtr(status) + ! if(associated(LowerRamLeakPtr)) call LowerRamLeakPtr(status) if(status == Clear_StatusType) LowerRamsLeakMalf = 0 if(status == Executed_StatusType) LowerRamsLeakMalf = 1 endsubroutine @@ -239,7 +241,7 @@ module CBopProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(AccumulatorPumpFailPtr)) call AccumulatorPumpFailPtr(status) + ! if(associated(AccumulatorPumpFailPtr)) call AccumulatorPumpFailPtr(status) if(status == Clear_StatusType) AccPupmsFailMalf = 0 if(status == Executed_StatusType) AccPupmsFailMalf = 1 endsubroutine @@ -247,7 +249,7 @@ module CBopProblemsVariables subroutine ChangeAccumulatorPumpLeak(status) implicit none integer, intent (in) :: status - if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(status) + ! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(status) !if(status == Clear_StatusType) print*,'On_AccumulatorPumpLeak_Clear' !if(status == Executed_StatusType) print*,'On_AccumulatorPumpLeak_Execute' endsubroutine @@ -255,7 +257,7 @@ module CBopProblemsVariables subroutine ChangeAccumulatorSystemFail(status) implicit none integer, intent (in) :: status - if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(status) + ! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(status) !if(status == Clear_StatusType) print*,'On_AccumulatorSystemFail_Clear' !if(status == Executed_StatusType) print*,'On_AccumulatorSystemFail_Execute' endsubroutine @@ -263,7 +265,7 @@ module CBopProblemsVariables subroutine ChangeAccumulatorSystemLeak(status) implicit none integer, intent (in) :: status - if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(status) + ! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(status) !if(status == Clear_StatusType) print*,'On_AccumulatorSystemLeak_Clear' !if(status == Executed_StatusType) print*,'On_AccumulatorSystemLeak_Execute' endsubroutine @@ -279,136 +281,136 @@ module CBopProblemsVariables - subroutine SubscribeAnnularWash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularWash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularWash' :: SubscribeAnnularWash - implicit none - procedure (ActionInteger) :: v - AnnularWashPtr => v - end subroutine + ! subroutine SubscribeAnnularWash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularWash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularWash' :: SubscribeAnnularWash + ! implicit none + ! procedure (ActionInteger) :: v + ! AnnularWashPtr => v + ! end subroutine - subroutine SubscribeAnnularFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularFail' :: SubscribeAnnularFail - implicit none - procedure (ActionInteger) :: v - AnnularFailPtr => v - end subroutine + ! subroutine SubscribeAnnularFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularFail' :: SubscribeAnnularFail + ! implicit none + ! procedure (ActionInteger) :: v + ! AnnularFailPtr => v + ! end subroutine - subroutine SubscribeAnnularLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularLeak' :: SubscribeAnnularLeak - implicit none - procedure (ActionInteger) :: v - AnnularLeakPtr => v - end subroutine + ! subroutine SubscribeAnnularLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularLeak' :: SubscribeAnnularLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! AnnularLeakPtr => v + ! end subroutine - subroutine SubscribeUpperRamWash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamWash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamWash' :: SubscribeUpperRamWash - implicit none - procedure (ActionInteger) :: v - UpperRamWashPtr => v - end subroutine - - subroutine SubscribeUpperRamFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamFail' :: SubscribeUpperRamFail - implicit none - procedure (ActionInteger) :: v - UpperRamFailPtr => v - end subroutine + ! subroutine SubscribeUpperRamWash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamWash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamWash' :: SubscribeUpperRamWash + ! implicit none + ! procedure (ActionInteger) :: v + ! UpperRamWashPtr => v + ! end subroutine + + ! subroutine SubscribeUpperRamFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamFail' :: SubscribeUpperRamFail + ! implicit none + ! procedure (ActionInteger) :: v + ! UpperRamFailPtr => v + ! end subroutine - subroutine SubscribeUpperRamLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamLeak' :: SubscribeUpperRamLeak - implicit none - procedure (ActionInteger) :: v - UpperRamLeakPtr => v - end subroutine + ! subroutine SubscribeUpperRamLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpperRamLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpperRamLeak' :: SubscribeUpperRamLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! UpperRamLeakPtr => v + ! end subroutine - subroutine SubscribeMiddleRamWash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamWash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamWash' :: SubscribeMiddleRamWash - implicit none - procedure (ActionInteger) :: v - MiddleRamWashPtr => v - end subroutine - - subroutine SubscribeMiddleRamFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamFail' :: SubscribeMiddleRamFail - implicit none - procedure (ActionInteger) :: v - MiddleRamFailPtr => v - end subroutine + ! subroutine SubscribeMiddleRamWash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamWash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamWash' :: SubscribeMiddleRamWash + ! implicit none + ! procedure (ActionInteger) :: v + ! MiddleRamWashPtr => v + ! end subroutine + + ! subroutine SubscribeMiddleRamFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamFail' :: SubscribeMiddleRamFail + ! implicit none + ! procedure (ActionInteger) :: v + ! MiddleRamFailPtr => v + ! end subroutine - subroutine SubscribeMiddleRamLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamLeak' :: SubscribeMiddleRamLeak - implicit none - procedure (ActionInteger) :: v - MiddleRamLeakPtr => v - end subroutine + ! subroutine SubscribeMiddleRamLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMiddleRamLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMiddleRamLeak' :: SubscribeMiddleRamLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! MiddleRamLeakPtr => v + ! end subroutine - subroutine SubscribeLowerRamWash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamWash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamWash' :: SubscribeLowerRamWash - implicit none - procedure (ActionInteger) :: v - LowerRamWashPtr => v - end subroutine - - subroutine SubscribeLowerRamFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamFail' :: SubscribeLowerRamFail - implicit none - procedure (ActionInteger) :: v - LowerRamFailPtr => v - end subroutine + ! subroutine SubscribeLowerRamWash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamWash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamWash' :: SubscribeLowerRamWash + ! implicit none + ! procedure (ActionInteger) :: v + ! LowerRamWashPtr => v + ! end subroutine + + ! subroutine SubscribeLowerRamFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamFail' :: SubscribeLowerRamFail + ! implicit none + ! procedure (ActionInteger) :: v + ! LowerRamFailPtr => v + ! end subroutine - subroutine SubscribeLowerRamLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamLeak' :: SubscribeLowerRamLeak - implicit none - procedure (ActionInteger) :: v - LowerRamLeakPtr => v - end subroutine + ! subroutine SubscribeLowerRamLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLowerRamLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeLowerRamLeak' :: SubscribeLowerRamLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! LowerRamLeakPtr => v + ! end subroutine - subroutine SubscribeAccumulatorPumpFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPumpFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPumpFail' :: SubscribeAccumulatorPumpFail - implicit none - procedure (ActionInteger) :: v - AccumulatorPumpFailPtr => v - end subroutine + ! subroutine SubscribeAccumulatorPumpFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPumpFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPumpFail' :: SubscribeAccumulatorPumpFail + ! implicit none + ! procedure (ActionInteger) :: v + ! AccumulatorPumpFailPtr => v + ! end subroutine - subroutine SubscribeAccumulatorPumpLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPumpLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPumpLeak' :: SubscribeAccumulatorPumpLeak - implicit none - procedure (ActionInteger) :: v - AccumulatorPumpLeakPtr => v - end subroutine + ! subroutine SubscribeAccumulatorPumpLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPumpLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPumpLeak' :: SubscribeAccumulatorPumpLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! AccumulatorPumpLeakPtr => v + ! end subroutine - subroutine SubscribeAccumulatorSystemFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorSystemFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorSystemFail' :: SubscribeAccumulatorSystemFail - implicit none - procedure (ActionInteger) :: v - AccumulatorSystemFailPtr => v - end subroutine + ! subroutine SubscribeAccumulatorSystemFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorSystemFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorSystemFail' :: SubscribeAccumulatorSystemFail + ! implicit none + ! procedure (ActionInteger) :: v + ! AccumulatorSystemFailPtr => v + ! end subroutine - subroutine SubscribeAccumulatorSystemLeak(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorSystemLeak - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorSystemLeak' :: SubscribeAccumulatorSystemLeak - implicit none - procedure (ActionInteger) :: v - AccumulatorSystemLeakPtr => v - end subroutine + ! subroutine SubscribeAccumulatorSystemLeak(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorSystemLeak + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorSystemLeak' :: SubscribeAccumulatorSystemLeak + ! implicit none + ! procedure (ActionInteger) :: v + ! AccumulatorSystemLeakPtr => v + ! end subroutine diff --git a/CSharp/Problems/CChokeProblems.f90 b/CSharp/Problems/CChokeProblems.f90 index a70aaad..0acddc9 100644 --- a/CSharp/Problems/CChokeProblems.f90 +++ b/CSharp/Problems/CChokeProblems.f90 @@ -10,11 +10,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke1Plugged' :: SetHydraulicChoke1Plugged implicit none type(CProblem), intent(in) :: v - HydraulicChoke1Plugged = SetDue(v, ChangeHydraulicChoke1Plugged) + ChokeProblems%HydraulicChoke1Plugged = SetDue(v, ChangeHydraulicChoke1Plugged) #ifdef deb - print*, 'HydraulicChoke1Plugged%ProblemType=', HydraulicChoke1Plugged%ProblemType - print*, 'HydraulicChoke1Plugged%StatusType=', HydraulicChoke1Plugged%StatusType - print*, 'HydraulicChoke1Plugged%Value=', HydraulicChoke1Plugged%Value + print*, 'HydraulicChoke1Plugged%ProblemType=', ChokeProblems%HydraulicChoke1Plugged%ProblemType + print*, 'HydraulicChoke1Plugged%StatusType=', ChokeProblems%HydraulicChoke1Plugged%StatusType + print*, 'HydraulicChoke1Plugged%Value=', ChokeProblems%HydraulicChoke1Plugged%Value #endif end subroutine @@ -23,11 +23,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke1Fail' :: SetHydraulicChoke1Fail implicit none type(CProblem), intent(in) :: v - HydraulicChoke1Fail = SetDue(v, ChangeHydraulicChoke1Fail) + ChokeProblems%HydraulicChoke1Fail = SetDue(v, ChangeHydraulicChoke1Fail) #ifdef deb - print*, 'HydraulicChoke1Fail%ProblemType=', HydraulicChoke1Fail%ProblemType - print*, 'HydraulicChoke1Fail%StatusType=', HydraulicChoke1Fail%StatusType - print*, 'HydraulicChoke1Fail%Value=', HydraulicChoke1Fail%Value + print*, 'HydraulicChoke1Fail%ProblemType=', ChokeProblems%HydraulicChoke1Fail%ProblemType + print*, 'HydraulicChoke1Fail%StatusType=', ChokeProblems%HydraulicChoke1Fail%StatusType + print*, 'HydraulicChoke1Fail%Value=', ChokeProblems%HydraulicChoke1Fail%Value #endif end subroutine @@ -36,11 +36,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke1Washout' :: SetHydraulicChoke1Washout implicit none type(CProblem), intent(in) :: v - HydraulicChoke1Washout = SetDue(v, ChangeHydraulicChoke1Washout) + ChokeProblems%HydraulicChoke1Washout = SetDue(v, ChangeHydraulicChoke1Washout) #ifdef deb - print*, 'HydraulicChoke1Washout%ProblemType=', HydraulicChoke1Washout%ProblemType - print*, 'HydraulicChoke1Washout%StatusType=', HydraulicChoke1Washout%StatusType - print*, 'HydraulicChoke1Washout%Value=', HydraulicChoke1Washout%Value + print*, 'HydraulicChoke1Washout%ProblemType=', ChokeProblems%HydraulicChoke1Washout%ProblemType + print*, 'HydraulicChoke1Washout%StatusType=', ChokeProblems%HydraulicChoke1Washout%StatusType + print*, 'HydraulicChoke1Washout%Value=', ChokeProblems%HydraulicChoke1Washout%Value #endif end subroutine @@ -49,9 +49,9 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke1PluggedPercent' :: SetHydraulicChoke1PluggedPercent implicit none integer, intent(in) :: v - HydraulicChoke1PluggedPercent = v + ChokeProblems%HydraulicChoke1PluggedPercent = v #ifdef deb - print*, 'HydraulicChoke1PluggedPercent=', HydraulicChoke1PluggedPercent + print*, 'HydraulicChoke1PluggedPercent=', ChokeProblems%HydraulicChoke1PluggedPercent #endif end subroutine @@ -60,11 +60,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke2Plugged' :: SetHydraulicChoke2Plugged implicit none type(CProblem), intent(in) :: v - HydraulicChoke2Plugged = SetDue(v, ChangeHydraulicChoke2Plugged) + ChokeProblems%HydraulicChoke2Plugged = SetDue(v, ChangeHydraulicChoke2Plugged) #ifdef deb - print*, 'HydraulicChoke2Plugged%ProblemType=', HydraulicChoke2Plugged%ProblemType - print*, 'HydraulicChoke2Plugged%StatusType=', HydraulicChoke2Plugged%StatusType - print*, 'HydraulicChoke2Plugged%Value=', HydraulicChoke2Plugged%Value + print*, 'HydraulicChoke2Plugged%ProblemType=', ChokeProblems%HydraulicChoke2Plugged%ProblemType + print*, 'HydraulicChoke2Plugged%StatusType=', ChokeProblems%HydraulicChoke2Plugged%StatusType + print*, 'HydraulicChoke2Plugged%Value=', ChokeProblems%HydraulicChoke2Plugged%Value #endif end subroutine @@ -73,11 +73,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke2Fail' :: SetHydraulicChoke2Fail implicit none type(CProblem), intent(in) :: v - HydraulicChoke2Fail = SetDue(v, ChangeHydraulicChoke2Fail) + ChokeProblems%HydraulicChoke2Fail = SetDue(v, ChangeHydraulicChoke2Fail) #ifdef deb - print*, 'HydraulicChoke2Fail%ProblemType=', HydraulicChoke2Fail%ProblemType - print*, 'HydraulicChoke2Fail%StatusType=', HydraulicChoke2Fail%StatusType - print*, 'HydraulicChoke2Fail%Value=', HydraulicChoke2Fail%Value + print*, 'HydraulicChoke2Fail%ProblemType=', ChokeProblems%HydraulicChoke2Fail%ProblemType + print*, 'HydraulicChoke2Fail%StatusType=', ChokeProblems%HydraulicChoke2Fail%StatusType + print*, 'HydraulicChoke2Fail%Value=', ChokeProblems%HydraulicChoke2Fail%Value #endif end subroutine @@ -86,11 +86,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke2Washout' :: SetHydraulicChoke2Washout implicit none type(CProblem), intent(in) :: v - HydraulicChoke2Washout = SetDue(v, ChangeHydraulicChoke2Washout) + ChokeProblems%HydraulicChoke2Washout = SetDue(v, ChangeHydraulicChoke2Washout) #ifdef deb - print*, 'HydraulicChoke2Washout%ProblemType=', HydraulicChoke2Washout%ProblemType - print*, 'HydraulicChoke2Washout%StatusType=', HydraulicChoke2Washout%StatusType - print*, 'HydraulicChoke2Washout%Value=', HydraulicChoke2Washout%Value + print*, 'HydraulicChoke2Washout%ProblemType=', ChokeProblems%HydraulicChoke2Washout%ProblemType + print*, 'HydraulicChoke2Washout%StatusType=', ChokeProblems%HydraulicChoke2Washout%StatusType + print*, 'HydraulicChoke2Washout%Value=', ChokeProblems%HydraulicChoke2Washout%Value #endif end subroutine @@ -99,9 +99,9 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetHydraulicChoke2PluggedPercent' :: SetHydraulicChoke2PluggedPercent implicit none integer, intent(in) :: v - HydraulicChoke2PluggedPercent = v + ChokeProblems%HydraulicChoke2PluggedPercent = v #ifdef deb - print*, 'HydraulicChoke2PluggedPercent=', HydraulicChoke2PluggedPercent + print*, 'HydraulicChoke2PluggedPercent=', ChokeProblems%HydraulicChoke2PluggedPercent #endif end subroutine @@ -110,11 +110,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke1Plugged' :: SetManualChoke1Plugged implicit none type(CProblem), intent(in) :: v - ManualChoke1Plugged = SetDue(v, ChangeManualChoke1Plugged) + ChokeProblems%ManualChoke1Plugged = SetDue(v, ChangeManualChoke1Plugged) #ifdef deb - print*, 'ManualChoke1Plugged%ProblemType=', ManualChoke1Plugged%ProblemType - print*, 'ManualChoke1Plugged%StatusType=', ManualChoke1Plugged%StatusType - print*, 'ManualChoke1Plugged%Value=', ManualChoke1Plugged%Value + print*, 'ManualChoke1Plugged%ProblemType=', ChokeProblems%ManualChoke1Plugged%ProblemType + print*, 'ManualChoke1Plugged%StatusType=', ChokeProblems%ManualChoke1Plugged%StatusType + print*, 'ManualChoke1Plugged%Value=', ChokeProblems%ManualChoke1Plugged%Value #endif end subroutine @@ -123,11 +123,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke1Fail' :: SetManualChoke1Fail implicit none type(CProblem), intent(in) :: v - ManualChoke1Fail = SetDue(v, ChangeManualChoke1Fail) + ChokeProblems%ManualChoke1Fail = SetDue(v, ChangeManualChoke1Fail) #ifdef deb - print*, 'ManualChoke1Fail%ProblemType=', ManualChoke1Fail%ProblemType - print*, 'ManualChoke1Fail%StatusType=', ManualChoke1Fail%StatusType - print*, 'ManualChoke1Fail%Value=', ManualChoke1Fail%Value + print*, 'ManualChoke1Fail%ProblemType=', ChokeProblems%ManualChoke1Fail%ProblemType + print*, 'ManualChoke1Fail%StatusType=', ChokeProblems%ManualChoke1Fail%StatusType + print*, 'ManualChoke1Fail%Value=', ChokeProblems%ManualChoke1Fail%Value #endif end subroutine @@ -136,11 +136,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke1Washout' :: SetManualChoke1Washout implicit none type(CProblem), intent(in) :: v - ManualChoke1Washout = SetDue(v, ChangeManualChoke1Washout) + ChokeProblems%ManualChoke1Washout = SetDue(v, ChangeManualChoke1Washout) #ifdef deb - print*, 'ManualChoke1Washout%ProblemType=', ManualChoke1Washout%ProblemType - print*, 'ManualChoke1Washout%StatusType=', ManualChoke1Washout%StatusType - print*, 'ManualChoke1Washout%Value=', ManualChoke1Washout%Value + print*, 'ManualChoke1Washout%ProblemType=', ChokeProblems%ManualChoke1Washout%ProblemType + print*, 'ManualChoke1Washout%StatusType=', ChokeProblems%ManualChoke1Washout%StatusType + print*, 'ManualChoke1Washout%Value=', ChokeProblems%ManualChoke1Washout%Value #endif end subroutine @@ -149,9 +149,9 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke1PluggedPercent' :: SetManualChoke1PluggedPercent implicit none integer, intent(in) :: v - ManualChoke1PluggedPercent = v + ChokeProblems%ManualChoke1PluggedPercent = v #ifdef deb - print*, 'ManualChoke1PluggedPercent=', ManualChoke1PluggedPercent + print*, 'ManualChoke1PluggedPercent=', ChokeProblems%ManualChoke1PluggedPercent #endif end subroutine @@ -160,11 +160,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke2Plugged' :: SetManualChoke2Plugged implicit none type(CProblem), intent(in) :: v - ManualChoke2Plugged = SetDue(v, ChangeManualChoke2Plugged) + ChokeProblems%ManualChoke2Plugged = SetDue(v, ChangeManualChoke2Plugged) #ifdef deb - print*, 'ManualChoke2Plugged%ProblemType=', ManualChoke2Plugged%ProblemType - print*, 'ManualChoke2Plugged%StatusType=', ManualChoke2Plugged%StatusType - print*, 'ManualChoke2Plugged%Value=', ManualChoke2Plugged%Value + print*, 'ManualChoke2Plugged%ProblemType=', ChokeProblems%ManualChoke2Plugged%ProblemType + print*, 'ManualChoke2Plugged%StatusType=', ChokeProblems%ManualChoke2Plugged%StatusType + print*, 'ManualChoke2Plugged%Value=', ChokeProblems%ManualChoke2Plugged%Value #endif end subroutine @@ -173,11 +173,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke2Fail' :: SetManualChoke2Fail implicit none type(CProblem), intent(in) :: v - ManualChoke2Fail = SetDue(v, ChangeManualChoke2Fail) + ChokeProblems%ManualChoke2Fail = SetDue(v, ChangeManualChoke2Fail) #ifdef deb - print*, 'ManualChoke2Fail%ProblemType=', ManualChoke2Fail%ProblemType - print*, 'ManualChoke2Fail%StatusType=', ManualChoke2Fail%StatusType - print*, 'ManualChoke2Fail%Value=', ManualChoke2Fail%Value + print*, 'ManualChoke2Fail%ProblemType=', ChokeProblems%ManualChoke2Fail%ProblemType + print*, 'ManualChoke2Fail%StatusType=', ChokeProblems%ManualChoke2Fail%StatusType + print*, 'ManualChoke2Fail%Value=', ChokeProblems%ManualChoke2Fail%Value #endif end subroutine @@ -186,11 +186,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke2Washout' :: SetManualChoke2Washout implicit none type(CProblem), intent(in) :: v - ManualChoke2Washout = SetDue(v, ChangeManualChoke2Washout) + ChokeProblems%ManualChoke2Washout = SetDue(v, ChangeManualChoke2Washout) #ifdef deb - print*, 'ManualChoke2Washout%ProblemType=', ManualChoke2Washout%ProblemType - print*, 'ManualChoke2Washout%StatusType=', ManualChoke2Washout%StatusType - print*, 'ManualChoke2Washout%Value=', ManualChoke2Washout%Value + print*, 'ManualChoke2Washout%ProblemType=', ChokeProblems%ManualChoke2Washout%ProblemType + print*, 'ManualChoke2Washout%StatusType=', ChokeProblems%ManualChoke2Washout%StatusType + print*, 'ManualChoke2Washout%Value=', ChokeProblems%ManualChoke2Washout%Value #endif end subroutine @@ -199,9 +199,9 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetManualChoke2PluggedPercent' :: SetManualChoke2PluggedPercent implicit none integer, intent(in) :: v - ManualChoke2PluggedPercent = v + ChokeProblems%ManualChoke2PluggedPercent = v #ifdef deb - print*, 'ManualChoke2PluggedPercent=', ManualChoke2PluggedPercent + print*, 'ManualChoke2PluggedPercent=', ChokeProblems%ManualChoke2PluggedPercent #endif end subroutine @@ -210,11 +210,11 @@ module CChokeProblems !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelAirFail' :: SetChokePanelAirFail implicit none type(CProblem), intent(in) :: v - ChokePanelAirFail = SetDue(v, ChangeChokePanelAirFail) + ChokeProblems%ChokePanelAirFail = SetDue(v, ChangeChokePanelAirFail) #ifdef deb - print*, 'ChokePanelAirFail%ProblemType=', ChokePanelAirFail%ProblemType - print*, 'ChokePanelAirFail%StatusType=', ChokePanelAirFail%StatusType - print*, 'ChokePanelAirFail%Value=', ChokePanelAirFail%Value + print*, 'ChokePanelAirFail%ProblemType=', ChokeProblems%ChokePanelAirFail%ProblemType + print*, 'ChokePanelAirFail%StatusType=', ChokeProblems%ChokePanelAirFail%StatusType + print*, 'ChokePanelAirFail%Value=', ChokeProblems%ChokePanelAirFail%Value #endif end subroutine diff --git a/CSharp/Problems/CChokeProblemsVariables.f90 b/CSharp/Problems/CChokeProblemsVariables.f90 index 26c3fc3..34af960 100644 --- a/CSharp/Problems/CChokeProblemsVariables.f90 +++ b/CSharp/Problems/CChokeProblemsVariables.f90 @@ -5,110 +5,112 @@ module CChokeProblemsVariables public ! Input vars - type(CProblem) :: HydraulicChoke1Plugged - type(CProblem) :: HydraulicChoke1Fail - type(CProblem) :: HydraulicChoke1Washout - integer :: HydraulicChoke1PluggedPercent - type(CProblem) :: HydraulicChoke2Plugged - type(CProblem) :: HydraulicChoke2Fail - type(CProblem) :: HydraulicChoke2Washout - integer :: HydraulicChoke2PluggedPercent - type(CProblem) :: ManualChoke1Plugged - type(CProblem) :: ManualChoke1Fail - type(CProblem) :: ManualChoke1Washout - integer :: ManualChoke1PluggedPercent - type(CProblem) :: ManualChoke2Plugged - type(CProblem) :: ManualChoke2Fail - type(CProblem) :: ManualChoke2Washout - integer :: ManualChoke2PluggedPercent - type(CProblem) :: ChokePanelAirFail - - procedure (ActionInteger), pointer :: HydraulicChoke1PluggedPtr - procedure (ActionInteger), pointer :: HydraulicChoke1FailPtr - procedure (ActionInteger), pointer :: HydraulicChoke1WashoutPtr - procedure (ActionInteger), pointer :: HydraulicChoke2PluggedPtr - procedure (ActionInteger), pointer :: HydraulicChoke2FailPtr - procedure (ActionInteger), pointer :: HydraulicChoke2WashoutPtr - procedure (ActionInteger), pointer :: ManualChoke1PluggedPtr - procedure (ActionInteger), pointer :: ManualChoke1FailPtr - procedure (ActionInteger), pointer :: ManualChoke1WashoutPtr - procedure (ActionInteger), pointer :: ManualChoke2PluggedPtr - procedure (ActionInteger), pointer :: ManualChoke2FailPtr - procedure (ActionInteger), pointer :: ManualChoke2WashoutPtr - procedure (ActionInteger), pointer :: ChokePanelAirFailPtr + type:: ChokeProblemsType + type(CProblem) :: HydraulicChoke1Plugged + type(CProblem) :: HydraulicChoke1Fail + type(CProblem) :: HydraulicChoke1Washout + integer :: HydraulicChoke1PluggedPercent + type(CProblem) :: HydraulicChoke2Plugged + type(CProblem) :: HydraulicChoke2Fail + type(CProblem) :: HydraulicChoke2Washout + integer :: HydraulicChoke2PluggedPercent + type(CProblem) :: ManualChoke1Plugged + type(CProblem) :: ManualChoke1Fail + type(CProblem) :: ManualChoke1Washout + integer :: ManualChoke1PluggedPercent + type(CProblem) :: ManualChoke2Plugged + type(CProblem) :: ManualChoke2Fail + type(CProblem) :: ManualChoke2Washout + integer :: ManualChoke2PluggedPercent + type(CProblem) :: ChokePanelAirFail + end type ChokeProblemsType + type(ChokeProblemsType)::ChokeProblems + ! procedure (ActionInteger), pointer :: HydraulicChoke1PluggedPtr + ! procedure (ActionInteger), pointer :: HydraulicChoke1FailPtr + ! procedure (ActionInteger), pointer :: HydraulicChoke1WashoutPtr + ! procedure (ActionInteger), pointer :: HydraulicChoke2PluggedPtr + ! procedure (ActionInteger), pointer :: HydraulicChoke2FailPtr + ! procedure (ActionInteger), pointer :: HydraulicChoke2WashoutPtr + ! procedure (ActionInteger), pointer :: ManualChoke1PluggedPtr + ! procedure (ActionInteger), pointer :: ManualChoke1FailPtr + ! procedure (ActionInteger), pointer :: ManualChoke1WashoutPtr + ! procedure (ActionInteger), pointer :: ManualChoke2PluggedPtr + ! procedure (ActionInteger), pointer :: ManualChoke2FailPtr + ! procedure (ActionInteger), pointer :: ManualChoke2WashoutPtr + ! procedure (ActionInteger), pointer :: ChokePanelAirFailPtr contains subroutine ProcessChokeProblemsDueTime(time) implicit none integer :: time - if(HydraulicChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, time) - if(HydraulicChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, time) - if(HydraulicChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, time) - if(HydraulicChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, time) - if(HydraulicChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, time) - if(HydraulicChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, time) - if(ManualChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke1Plugged, ChangeManualChoke1Plugged, time) - if(ManualChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke1Fail, ChangeManualChoke1Fail, time) - if(ManualChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke1Washout, ChangeManualChoke1Washout, time) - if(ManualChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke2Plugged, ChangeManualChoke2Plugged, time) - if(ManualChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke2Fail, ChangeManualChoke2Fail, time) - if(ManualChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ManualChoke2Washout, ChangeManualChoke2Washout, time) - if(ChokePanelAirFail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokePanelAirFail, ChangeChokePanelAirFail, time) + if(ChokeProblems%HydraulicChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, time) + if(ChokeProblems%HydraulicChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, time) + if(ChokeProblems%HydraulicChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, time) + if(ChokeProblems%HydraulicChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, time) + if(ChokeProblems%HydraulicChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, time) + if(ChokeProblems%HydraulicChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, time) + if(ChokeProblems%ManualChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, time) + if(ChokeProblems%ManualChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, time) + if(ChokeProblems%ManualChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, time) + if(ChokeProblems%ManualChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, time) + if(ChokeProblems%ManualChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, time) + if(ChokeProblems%ManualChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, time) + if(ChokeProblems%ChokePanelAirFail%ProblemType == Time_ProblemType) call ProcessDueTime(ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, time) end subroutine subroutine ProcessChokeProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(HydraulicChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, strokes) - if(HydraulicChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, strokes) - if(HydraulicChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, strokes) - if(HydraulicChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, strokes) - if(HydraulicChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, strokes) - if(HydraulicChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, strokes) - if(ManualChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke1Plugged, ChangeManualChoke1Plugged, strokes) - if(ManualChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke1Fail, ChangeManualChoke1Fail, strokes) - if(ManualChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke1Washout, ChangeManualChoke1Washout, strokes) - if(ManualChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke2Plugged, ChangeManualChoke2Plugged, strokes) - if(ManualChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke2Fail, ChangeManualChoke2Fail, strokes) - if(ManualChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManualChoke2Washout, ChangeManualChoke2Washout, strokes) - if(ChokePanelAirFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokePanelAirFail, ChangeChokePanelAirFail, strokes) + if(ChokeProblems%HydraulicChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, strokes) + if(ChokeProblems%HydraulicChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, strokes) + if(ChokeProblems%HydraulicChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, strokes) + if(ChokeProblems%HydraulicChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, strokes) + if(ChokeProblems%HydraulicChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, strokes) + if(ChokeProblems%HydraulicChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, strokes) + if(ChokeProblems%ManualChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, strokes) + if(ChokeProblems%ManualChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, strokes) + if(ChokeProblems%ManualChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, strokes) + if(ChokeProblems%ManualChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, strokes) + if(ChokeProblems%ManualChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, strokes) + if(ChokeProblems%ManualChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, strokes) + if(ChokeProblems%ChokePanelAirFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, strokes) end subroutine subroutine ProcessChokeProblemsDueVolumePumped(volume) implicit none real(8) :: volume - if(HydraulicChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, volume) - if(HydraulicChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, volume) - if(HydraulicChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, volume) - if(HydraulicChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, volume) - if(HydraulicChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, volume) - if(HydraulicChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, volume) - if(ManualChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke1Plugged, ChangeManualChoke1Plugged, volume) - if(ManualChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke1Fail, ChangeManualChoke1Fail, volume) - if(ManualChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke1Washout, ChangeManualChoke1Washout, volume) - if(ManualChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke2Plugged, ChangeManualChoke2Plugged, volume) - if(ManualChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke2Fail, ChangeManualChoke2Fail, volume) - if(ManualChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManualChoke2Washout, ChangeManualChoke2Washout, volume) - if(ChokePanelAirFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokePanelAirFail, ChangeChokePanelAirFail, volume) + if(ChokeProblems%HydraulicChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, volume) + if(ChokeProblems%HydraulicChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, volume) + if(ChokeProblems%HydraulicChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, volume) + if(ChokeProblems%HydraulicChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, volume) + if(ChokeProblems%HydraulicChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, volume) + if(ChokeProblems%HydraulicChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, volume) + if(ChokeProblems%ManualChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, volume) + if(ChokeProblems%ManualChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, volume) + if(ChokeProblems%ManualChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, volume) + if(ChokeProblems%ManualChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, volume) + if(ChokeProblems%ManualChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, volume) + if(ChokeProblems%ManualChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, volume) + if(ChokeProblems%ChokePanelAirFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, volume) end subroutine subroutine ProcessChokeProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance - if(HydraulicChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, distance) - if(HydraulicChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, distance) - if(HydraulicChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, distance) - if(HydraulicChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, distance) - if(HydraulicChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, distance) - if(HydraulicChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, distance) - if(ManualChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke1Plugged, ChangeManualChoke1Plugged, distance) - if(ManualChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke1Fail, ChangeManualChoke1Fail, distance) - if(ManualChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke1Washout, ChangeManualChoke1Washout, distance) - if(ManualChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke2Plugged, ChangeManualChoke2Plugged, distance) - if(ManualChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke2Fail, ChangeManualChoke2Fail, distance) - if(ManualChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManualChoke2Washout, ChangeManualChoke2Washout, distance) - if(ChokePanelAirFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokePanelAirFail, ChangeChokePanelAirFail, distance) + if(ChokeProblems%HydraulicChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, distance) + if(ChokeProblems%HydraulicChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, distance) + if(ChokeProblems%HydraulicChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, distance) + if(ChokeProblems%HydraulicChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, distance) + if(ChokeProblems%HydraulicChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, distance) + if(ChokeProblems%HydraulicChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, distance) + if(ChokeProblems%ManualChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, distance) + if(ChokeProblems%ManualChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, distance) + if(ChokeProblems%ManualChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, distance) + if(ChokeProblems%ManualChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, distance) + if(ChokeProblems%ManualChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, distance) + if(ChokeProblems%ManualChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, distance) + if(ChokeProblems%ChokePanelAirFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, distance) end subroutine @@ -118,7 +120,7 @@ module CChokeProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(HydraulicChoke1PluggedPtr)) call HydraulicChoke1PluggedPtr(status) + ! if(associated(HydraulicChoke1PluggedPtr)) call HydraulicChoke1PluggedPtr(status) if(status == Clear_StatusType) CHOOKE(1)%PlugMalf = 0 if(status == Executed_StatusType) CHOOKE(1)%PlugMalf = 1 endsubroutine @@ -127,7 +129,7 @@ module CChokeProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(HydraulicChoke1FailPtr)) call HydraulicChoke1FailPtr(status) + ! if(associated(HydraulicChoke1FailPtr)) call HydraulicChoke1FailPtr(status) if(status == Clear_StatusType) CHOOKE(1)%FailMalf = 0 if(status == Executed_StatusType) CHOOKE(1)%FailMalf = 1 endsubroutine @@ -137,7 +139,7 @@ module CChokeProblemsVariables use CChokeManifoldVariables implicit none integer, intent (in) :: status - if(associated(HydraulicChoke1WashoutPtr)) call HydraulicChoke1WashoutPtr(status) + ! if(associated(HydraulicChoke1WashoutPtr)) call HydraulicChoke1WashoutPtr(status) if(status == Clear_StatusType) CHOOKE(1)%WashoutMalf = 0 if(status == Executed_StatusType) CHOOKE(1)%WashoutMalf = 1 @@ -149,7 +151,7 @@ module CChokeProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(HydraulicChoke2PluggedPtr)) call HydraulicChoke2PluggedPtr(status) + ! if(associated(HydraulicChoke2PluggedPtr)) call HydraulicChoke2PluggedPtr(status) if(status == Clear_StatusType) CHOOKE(2)%PlugMalf = 0 if(status == Executed_StatusType) CHOOKE(2)%PlugMalf = 1 endsubroutine @@ -158,7 +160,7 @@ module CChokeProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(HydraulicChoke2FailPtr)) call HydraulicChoke2FailPtr(status) + ! if(associated(HydraulicChoke2FailPtr)) call HydraulicChoke2FailPtr(status) if(status == Clear_StatusType) CHOOKE(2)%FailMalf = 0 if(status == Executed_StatusType) CHOOKE(2)%FailMalf = 1 endsubroutine @@ -168,7 +170,7 @@ module CChokeProblemsVariables use CChokeManifoldVariables implicit none integer, intent (in) :: status - if(associated(HydraulicChoke2WashoutPtr)) call HydraulicChoke2WashoutPtr(status) + ! if(associated(HydraulicChoke2WashoutPtr)) call HydraulicChoke2WashoutPtr(status) if(status == Clear_StatusType) CHOOKE(2)%WashoutMalf = 0 if(status == Executed_StatusType) CHOOKE(2)%WashoutMalf = 1 @@ -180,7 +182,7 @@ module CChokeProblemsVariables USE FricPressDropVars implicit none integer, intent (in) :: status - if(associated(ManualChoke1PluggedPtr)) call ManualChoke1PluggedPtr(status) + ! if(associated(ManualChoke1PluggedPtr)) call ManualChoke1PluggedPtr(status) if(status == Clear_StatusType) ManChoke1Plug = 0 if(status == Executed_StatusType) ManChoke1Plug = 1 endsubroutine @@ -188,7 +190,7 @@ module CChokeProblemsVariables subroutine ChangeManualChoke1Fail(status) implicit none integer, intent (in) :: status - if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status) + ! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status) !if(status == Clear_StatusType) print*,'On_ManualChoke1Fail_Clear' !if(status == Executed_StatusType) print*,'On_ManualChoke1Fail_Execute' endsubroutine @@ -198,7 +200,7 @@ module CChokeProblemsVariables use CChokeManifoldVariables implicit none integer, intent (in) :: status - if(associated(ManualChoke1WashoutPtr)) call ManualChoke1WashoutPtr(status) + ! if(associated(ManualChoke1WashoutPtr)) call ManualChoke1WashoutPtr(status) if(status == Clear_StatusType) ManChoke1Washout = 0 if(status == Executed_StatusType) ManChoke1Washout = 1 @@ -210,7 +212,7 @@ module CChokeProblemsVariables USE FricPressDropVars implicit none integer, intent (in) :: status - if(associated(ManualChoke2PluggedPtr)) call ManualChoke2PluggedPtr(status) + ! if(associated(ManualChoke2PluggedPtr)) call ManualChoke2PluggedPtr(status) if(status == Clear_StatusType) ManChoke2Plug = 0 if(status == Executed_StatusType) ManChoke2Plug = 1 endsubroutine @@ -218,7 +220,7 @@ module CChokeProblemsVariables subroutine ChangeManualChoke2Fail(status) implicit none integer, intent (in) :: status - if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status) + ! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status) !if(status == Clear_StatusType) print*,'On_ManualChoke2Fail_Clear' !if(status == Executed_StatusType) print*,'On_ManualChoke2Fail_Execute' endsubroutine @@ -228,7 +230,7 @@ module CChokeProblemsVariables use CChokeManifoldVariables implicit none integer, intent (in) :: status - if(associated(ManualChoke2WashoutPtr)) call ManualChoke2WashoutPtr(status) + ! if(associated(ManualChoke2WashoutPtr)) call ManualChoke2WashoutPtr(status) if(status == Clear_StatusType) ManChoke2Washout = 0 if(status == Executed_StatusType) ManChoke2Washout = 1 @@ -240,7 +242,7 @@ module CChokeProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(ChokePanelAirFailPtr)) call ChokePanelAirFailPtr(status) + ! if(associated(ChokePanelAirFailPtr)) call ChokePanelAirFailPtr(status) if(status == Clear_StatusType) ChokeAirFail = 0 if(status == Executed_StatusType) ChokeAirFail = 1 endsubroutine @@ -260,108 +262,108 @@ module CChokeProblemsVariables - subroutine SubscribeHydraulicChoke1Plugged(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Plugged - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Plugged' :: SubscribeHydraulicChoke1Plugged - implicit none - procedure (ActionInteger) :: v - HydraulicChoke1PluggedPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke1Plugged(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Plugged + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Plugged' :: SubscribeHydraulicChoke1Plugged + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke1PluggedPtr => v + ! end subroutine - subroutine SubscribeHydraulicChoke1Fail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Fail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Fail' :: SubscribeHydraulicChoke1Fail - implicit none - procedure (ActionInteger) :: v - HydraulicChoke1FailPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke1Fail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Fail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Fail' :: SubscribeHydraulicChoke1Fail + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke1FailPtr => v + ! end subroutine - subroutine SubscribeHydraulicChoke1Washout(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Washout - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Washout' :: SubscribeHydraulicChoke1Washout - implicit none - procedure (ActionInteger) :: v - HydraulicChoke1WashoutPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke1Washout(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke1Washout + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke1Washout' :: SubscribeHydraulicChoke1Washout + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke1WashoutPtr => v + ! end subroutine - subroutine SubscribeHydraulicChoke2Plugged(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Plugged - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Plugged' :: SubscribeHydraulicChoke2Plugged - implicit none - procedure (ActionInteger) :: v - HydraulicChoke2PluggedPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke2Plugged(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Plugged + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Plugged' :: SubscribeHydraulicChoke2Plugged + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke2PluggedPtr => v + ! end subroutine - subroutine SubscribeHydraulicChoke2Fail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Fail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Fail' :: SubscribeHydraulicChoke2Fail - implicit none - procedure (ActionInteger) :: v - HydraulicChoke2FailPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke2Fail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Fail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Fail' :: SubscribeHydraulicChoke2Fail + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke2FailPtr => v + ! end subroutine - subroutine SubscribeHydraulicChoke2Washout(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Washout - !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Washout' :: SubscribeHydraulicChoke2Washout - implicit none - procedure (ActionInteger) :: v - HydraulicChoke2WashoutPtr => v - end subroutine + ! subroutine SubscribeHydraulicChoke2Washout(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeHydraulicChoke2Washout + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeHydraulicChoke2Washout' :: SubscribeHydraulicChoke2Washout + ! implicit none + ! procedure (ActionInteger) :: v + ! HydraulicChoke2WashoutPtr => v + ! end subroutine - subroutine SubscribeManualChoke1Plugged(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Plugged - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Plugged' :: SubscribeManualChoke1Plugged - implicit none - procedure (ActionInteger) :: v - ManualChoke1PluggedPtr => v - end subroutine + ! subroutine SubscribeManualChoke1Plugged(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Plugged + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Plugged' :: SubscribeManualChoke1Plugged + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke1PluggedPtr => v + ! end subroutine - subroutine SubscribeManualChoke1Fail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Fail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Fail' :: SubscribeManualChoke1Fail - implicit none - procedure (ActionInteger) :: v - ManualChoke1FailPtr => v - end subroutine + ! subroutine SubscribeManualChoke1Fail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Fail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Fail' :: SubscribeManualChoke1Fail + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke1FailPtr => v + ! end subroutine - subroutine SubscribeManualChoke1Washout(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Washout - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Washout' :: SubscribeManualChoke1Washout - implicit none - procedure (ActionInteger) :: v - ManualChoke1WashoutPtr => v - end subroutine + ! subroutine SubscribeManualChoke1Washout(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke1Washout + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke1Washout' :: SubscribeManualChoke1Washout + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke1WashoutPtr => v + ! end subroutine - subroutine SubscribeManualChoke2Plugged(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Plugged - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Plugged' :: SubscribeManualChoke2Plugged - implicit none - procedure (ActionInteger) :: v - ManualChoke2PluggedPtr => v - end subroutine + ! subroutine SubscribeManualChoke2Plugged(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Plugged + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Plugged' :: SubscribeManualChoke2Plugged + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke2PluggedPtr => v + ! end subroutine - subroutine SubscribeManualChoke2Fail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Fail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Fail' :: SubscribeManualChoke2Fail - implicit none - procedure (ActionInteger) :: v - ManualChoke2FailPtr => v - end subroutine + ! subroutine SubscribeManualChoke2Fail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Fail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Fail' :: SubscribeManualChoke2Fail + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke2FailPtr => v + ! end subroutine - subroutine SubscribeManualChoke2Washout(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Washout - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Washout' :: SubscribeManualChoke2Washout - implicit none - procedure (ActionInteger) :: v - ManualChoke2WashoutPtr => v - end subroutine + ! subroutine SubscribeManualChoke2Washout(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManualChoke2Washout + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManualChoke2Washout' :: SubscribeManualChoke2Washout + ! implicit none + ! procedure (ActionInteger) :: v + ! ManualChoke2WashoutPtr => v + ! end subroutine - subroutine SubscribeChokePanelAirFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeChokePanelAirFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeChokePanelAirFail' :: SubscribeChokePanelAirFail - implicit none - procedure (ActionInteger) :: v - ChokePanelAirFailPtr => v - end subroutine + ! subroutine SubscribeChokePanelAirFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeChokePanelAirFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeChokePanelAirFail' :: SubscribeChokePanelAirFail + ! implicit none + ! procedure (ActionInteger) :: v + ! ChokePanelAirFailPtr => v + ! end subroutine end module CChokeProblemsVariables \ No newline at end of file diff --git a/CSharp/Problems/CDrillStemProblems.f90 b/CSharp/Problems/CDrillStemProblems.f90 index c6aa4ff..6e7a9f0 100644 --- a/CSharp/Problems/CDrillStemProblems.f90 +++ b/CSharp/Problems/CDrillStemProblems.f90 @@ -10,11 +10,11 @@ module CDrillStemProblems !DEC$ ATTRIBUTES ALIAS: 'SetStringDragIncrease' :: SetStringDragIncrease implicit none type(CProblem), intent(in) :: v - StringDragIncrease = SetDue(v, ChangeStringDragIncrease) + DrillStemProblems%StringDragIncrease = SetDue(v, ChangeStringDragIncrease) #ifdef deb - print*, 'StringDragIncrease%ProblemType=', StringDragIncrease%ProblemType - print*, 'StringDragIncrease%StatusType=', StringDragIncrease%StatusType - print*, 'StringDragIncrease%Value=', StringDragIncrease%Value + print*, 'StringDragIncrease%ProblemType=', DrillStemProblems%StringDragIncrease%ProblemType + print*, 'StringDragIncrease%StatusType=', DrillStemProblems%StringDragIncrease%StatusType + print*, 'StringDragIncrease%Value=', DrillStemProblems%StringDragIncrease%Value #endif end subroutine @@ -23,11 +23,11 @@ module CDrillStemProblems !DEC$ ATTRIBUTES ALIAS: 'SetStringTorqueIncrease' :: SetStringTorqueIncrease implicit none type(CProblem), intent(in) :: v - StringTorqueIncrease = SetDue(v, ChangeStringTorqueIncrease) + DrillStemProblems%StringTorqueIncrease = SetDue(v, ChangeStringTorqueIncrease) #ifdef deb - print*, 'StringTorqueIncrease%ProblemType=', StringTorqueIncrease%ProblemType - print*, 'StringTorqueIncrease%StatusType=', StringTorqueIncrease%StatusType - print*, 'StringTorqueIncrease%Value=', StringTorqueIncrease%Value + print*, 'StringTorqueIncrease%ProblemType=', DrillStemProblems%StringTorqueIncrease%ProblemType + print*, 'StringTorqueIncrease%StatusType=', DrillStemProblems%StringTorqueIncrease%StatusType + print*, 'StringTorqueIncrease%Value=', DrillStemProblems%StringTorqueIncrease%Value #endif end subroutine @@ -36,11 +36,11 @@ module CDrillStemProblems !DEC$ ATTRIBUTES ALIAS: 'SetStringTorqueFluctuation' :: SetStringTorqueFluctuation implicit none type(CProblem), intent(in) :: v - StringTorqueFluctuation = SetDue(v, ChangeStringTorqueFluctuation) + DrillStemProblems%StringTorqueFluctuation = SetDue(v, ChangeStringTorqueFluctuation) #ifdef deb - print*, 'StringTorqueFluctuation%ProblemType=', StringTorqueFluctuation%ProblemType - print*, 'StringTorqueFluctuation%StatusType=', StringTorqueFluctuation%StatusType - print*, 'StringTorqueFluctuation%Value=', StringTorqueFluctuation%Value + print*, 'StringTorqueFluctuation%ProblemType=', DrillStemProblems%StringTorqueFluctuation%ProblemType + print*, 'StringTorqueFluctuation%StatusType=', DrillStemProblems%StringTorqueFluctuation%StatusType + print*, 'StringTorqueFluctuation%Value=', DrillStemProblems%StringTorqueFluctuation%Value #endif end subroutine @@ -49,9 +49,9 @@ module CDrillStemProblems !DEC$ ATTRIBUTES ALIAS: 'SetStringDragIncreaseTime' :: SetStringDragIncreaseTime implicit none real(8), intent(in) :: v - StringDragIncreaseTime = v + DrillStemProblems%StringDragIncreaseTime = v #ifdef deb - print*, 'StringDragIncreaseTime=', StringDragIncreaseTime + print*, 'StringDragIncreaseTime=', DrillStemProblems%StringDragIncreaseTime #endif end subroutine @@ -60,9 +60,9 @@ module CDrillStemProblems !DEC$ ATTRIBUTES ALIAS: 'SetStringTorqueIncreaseTime' :: SetStringTorqueIncreaseTime implicit none real(8), intent(in) :: v - StringTorqueIncreaseTime = v + DrillStemProblems%StringTorqueIncreaseTime = v #ifdef deb - print*, 'StringTorqueIncreaseTime=', StringTorqueIncreaseTime + print*, 'StringTorqueIncreaseTime=', DrillStemProblems%StringTorqueIncreaseTime #endif end subroutine diff --git a/CSharp/Problems/CDrillStemProblemsVariables.f90 b/CSharp/Problems/CDrillStemProblemsVariables.f90 index 9c2cb1c..0b75380 100644 --- a/CSharp/Problems/CDrillStemProblemsVariables.f90 +++ b/CSharp/Problems/CDrillStemProblemsVariables.f90 @@ -4,49 +4,51 @@ module CDrillStemProblemsVariables public ! Input vars - type(CProblem) :: StringDragIncrease - type(CProblem) :: StringTorqueIncrease - type(CProblem) :: StringTorqueFluctuation - real(8) :: StringDragIncreaseTime - real(8) :: StringTorqueIncreaseTime - - - procedure (ActionInteger), pointer :: StringDragIncreasePtr - procedure (ActionInteger), pointer :: StringTorqueIncreasePtr - procedure (ActionInteger), pointer :: StringTorqueFluctuationPtr + type:: DrillStemProblemsType + type(CProblem) :: StringDragIncrease + type(CProblem) :: StringTorqueIncrease + type(CProblem) :: StringTorqueFluctuation + real(8) :: StringDragIncreaseTime + real(8) :: StringTorqueIncreaseTime + end type DrillStemProblemsType + type(DrillStemProblemsType)::DrillStemProblems + + ! procedure (ActionInteger), pointer :: StringDragIncreasePtr + ! procedure (ActionInteger), pointer :: StringTorqueIncreasePtr + ! procedure (ActionInteger), pointer :: StringTorqueFluctuationPtr contains subroutine ProcessDrillStemProblemsDueTime(time) implicit none integer :: time - if(StringDragIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(StringDragIncrease, ChangeStringDragIncrease, time) - if(StringTorqueIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(StringTorqueIncrease, ChangeStringTorqueIncrease, time) - if(StringTorqueFluctuation%ProblemType == Time_ProblemType) call ProcessDueTime(StringTorqueFluctuation, ChangeStringTorqueFluctuation, time) + if(DrillStemProblems%StringDragIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, time) + if(DrillStemProblems%StringTorqueIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, time) + if(DrillStemProblems%StringTorqueFluctuation%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, time) end subroutine subroutine ProcessDrillStemProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(StringDragIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StringDragIncrease, ChangeStringDragIncrease, strokes) - if(StringTorqueIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StringTorqueIncrease, ChangeStringTorqueIncrease, strokes) - if(StringTorqueFluctuation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StringTorqueFluctuation, ChangeStringTorqueFluctuation, strokes) + if(DrillStemProblems%StringDragIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, strokes) + if(DrillStemProblems%StringTorqueIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, strokes) + if(DrillStemProblems%StringTorqueFluctuation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, strokes) end subroutine subroutine ProcessDrillStemProblemsDueVolumePumped(volume) implicit none real(8) :: volume - if(StringDragIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StringDragIncrease, ChangeStringDragIncrease, volume) - if(StringTorqueIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StringTorqueIncrease, ChangeStringTorqueIncrease, volume) - if(StringTorqueFluctuation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StringTorqueFluctuation, ChangeStringTorqueFluctuation, volume) + if(DrillStemProblems%StringDragIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, volume) + if(DrillStemProblems%StringTorqueIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, volume) + if(DrillStemProblems%StringTorqueFluctuation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, volume) end subroutine subroutine ProcessDrillStemProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance - if(StringDragIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StringDragIncrease, ChangeStringDragIncrease, distance) - if(StringTorqueIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StringTorqueIncrease, ChangeStringTorqueIncrease, distance) - if(StringTorqueFluctuation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StringTorqueFluctuation, ChangeStringTorqueFluctuation, distance) + if(DrillStemProblems%StringDragIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, distance) + if(DrillStemProblems%StringTorqueIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, distance) + if(DrillStemProblems%StringTorqueFluctuation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, distance) end subroutine @@ -54,7 +56,7 @@ module CDrillStemProblemsVariables subroutine ChangeStringDragIncrease(status) implicit none integer, intent (in) :: status - if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status) + ! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status) !if(status == Clear_StatusType) print*,'On_StringDragIncrease_Clear' !if(status == Executed_StatusType) print*,'On_StringDragIncrease_Execute' endsubroutine @@ -62,7 +64,7 @@ module CDrillStemProblemsVariables subroutine ChangeStringTorqueIncrease(status) implicit none integer, intent (in) :: status - if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status) + ! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status) !if(status == Clear_StatusType) print*,'On_StringTorqueIncrease_Clear' !if(status == Executed_StatusType) print*,'On_StringTorqueIncrease_Execute' endsubroutine @@ -70,7 +72,7 @@ module CDrillStemProblemsVariables subroutine ChangeStringTorqueFluctuation(status) implicit none integer, intent (in) :: status - if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status) + ! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status) !if(status == Clear_StatusType) print*,'On_StringTorqueFluctuation_Clear' !if(status == Executed_StatusType) print*,'On_StringTorqueFluctuation_Execute' endsubroutine @@ -83,29 +85,29 @@ module CDrillStemProblemsVariables - subroutine SubscribeStringDragIncrease(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringDragIncrease - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringDragIncrease' :: SubscribeStringDragIncrease - implicit none - procedure (ActionInteger) :: v - StringDragIncreasePtr => v - end subroutine + ! subroutine SubscribeStringDragIncrease(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringDragIncrease + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringDragIncrease' :: SubscribeStringDragIncrease + ! implicit none + ! procedure (ActionInteger) :: v + ! StringDragIncreasePtr => v + ! end subroutine - subroutine SubscribeStringTorqueIncrease(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueIncrease - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueIncrease' :: SubscribeStringTorqueIncrease - implicit none - procedure (ActionInteger) :: v - StringTorqueIncreasePtr => v - end subroutine + ! subroutine SubscribeStringTorqueIncrease(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueIncrease + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueIncrease' :: SubscribeStringTorqueIncrease + ! implicit none + ! procedure (ActionInteger) :: v + ! StringTorqueIncreasePtr => v + ! end subroutine - subroutine SubscribeStringTorqueFluctuation(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueFluctuation - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueFluctuation' :: SubscribeStringTorqueFluctuation - implicit none - procedure (ActionInteger) :: v - StringTorqueFluctuationPtr => v - end subroutine + ! subroutine SubscribeStringTorqueFluctuation(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueFluctuation + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueFluctuation' :: SubscribeStringTorqueFluctuation + ! implicit none + ! procedure (ActionInteger) :: v + ! StringTorqueFluctuationPtr => v + ! end subroutine diff --git a/CSharp/Problems/CGaugesProblems.f90 b/CSharp/Problems/CGaugesProblems.f90 index 30bd0d8..7082bde 100644 --- a/CSharp/Problems/CGaugesProblems.f90 +++ b/CSharp/Problems/CGaugesProblems.f90 @@ -10,11 +10,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetWeightIndicator' :: SetWeightIndicator implicit none type(CProblem), intent(in) :: v - WeightIndicator = SetDue(v, ChangeWeightIndicator) + GaugesProblems%WeightIndicator = SetDue(v, ChangeWeightIndicator) #ifdef deb - print*, 'WeightIndicator%ProblemType=', WeightIndicator%ProblemType - print*, 'WeightIndicator%StatusType=', WeightIndicator%StatusType - print*, 'WeightIndicator%Value=', WeightIndicator%Value + print*, 'WeightIndicator%ProblemType=', GaugesProblems%WeightIndicator%ProblemType + print*, 'WeightIndicator%StatusType=', GaugesProblems%WeightIndicator%StatusType + print*, 'WeightIndicator%Value=', GaugesProblems%WeightIndicator%Value #endif end subroutine @@ -23,11 +23,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetRotaryRpm' :: SetRotaryRpm implicit none type(CProblem), intent(in) :: v - RotaryRpm = SetDue(v, ChangeRotaryRpm) + GaugesProblems%RotaryRpm = SetDue(v, ChangeRotaryRpm) #ifdef deb - print*, 'RotaryRpm%ProblemType=', RotaryRpm%ProblemType - print*, 'RotaryRpm%StatusType=', RotaryRpm%StatusType - print*, 'RotaryRpm%Value=', RotaryRpm%Value + print*, 'RotaryRpm%ProblemType=', GaugesProblems%RotaryRpm%ProblemType + print*, 'RotaryRpm%StatusType=', GaugesProblems%RotaryRpm%StatusType + print*, 'RotaryRpm%Value=', GaugesProblems%RotaryRpm%Value #endif end subroutine @@ -36,11 +36,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetRotaryTorque' :: SetRotaryTorque implicit none type(CProblem), intent(in) :: v - RotaryTorque = SetDue(v, ChangeRotaryTorque) + GaugesProblems%RotaryTorque = SetDue(v, ChangeRotaryTorque) #ifdef deb - print*, 'RotaryTorque%ProblemType=', RotaryTorque%ProblemType - print*, 'RotaryTorque%StatusType=', RotaryTorque%StatusType - print*, 'RotaryTorque%Value=', RotaryTorque%Value + print*, 'RotaryTorque%ProblemType=', GaugesProblems%RotaryTorque%ProblemType + print*, 'RotaryTorque%StatusType=', GaugesProblems%RotaryTorque%StatusType + print*, 'RotaryTorque%Value=', GaugesProblems%RotaryTorque%Value #endif end subroutine @@ -49,11 +49,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetStandPipePressure' :: SetStandPipePressure implicit none type(CProblem), intent(in) :: v - StandPipePressure = SetDue(v, ChangeStandPipePressure) + GaugesProblems%StandPipePressure = SetDue(v, ChangeStandPipePressure) #ifdef deb - print*, 'StandPipePressure%ProblemType=', StandPipePressure%ProblemType - print*, 'StandPipePressure%StatusType=', StandPipePressure%StatusType - print*, 'StandPipePressure%Value=', StandPipePressure%Value + print*, 'StandPipePressure%ProblemType=', GaugesProblems%StandPipePressure%ProblemType + print*, 'StandPipePressure%StatusType=', GaugesProblems%StandPipePressure%StatusType + print*, 'StandPipePressure%Value=', GaugesProblems%StandPipePressure%Value #endif end subroutine @@ -62,11 +62,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetCasingPressure' :: SetCasingPressure implicit none type(CProblem), intent(in) :: v - CasingPressure = SetDue(v, ChangeCasingPressure) + GaugesProblems%CasingPressure = SetDue(v, ChangeCasingPressure) #ifdef deb - print*, 'CasingPressure%ProblemType=', CasingPressure%ProblemType - print*, 'CasingPressure%StatusType=', CasingPressure%StatusType - print*, 'CasingPressure%Value=', CasingPressure%Value + print*, 'CasingPressure%ProblemType=', GaugesProblems%CasingPressure%ProblemType + print*, 'CasingPressure%StatusType=', GaugesProblems%CasingPressure%StatusType + print*, 'CasingPressure%Value=', GaugesProblems%CasingPressure%Value #endif end subroutine @@ -75,11 +75,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetPump1Strokes' :: SetPump1Strokes implicit none type(CProblem), intent(in) :: v - Pump1Strokes = SetDue(v, ChangePump1Strokes) + GaugesProblems%Pump1Strokes = SetDue(v, ChangePump1Strokes) #ifdef deb - print*, 'Pump1Strokes%ProblemType=', Pump1Strokes%ProblemType - print*, 'Pump1Strokes%StatusType=', Pump1Strokes%StatusType - print*, 'Pump1Strokes%Value=', Pump1Strokes%Value + print*, 'Pump1Strokes%ProblemType=', GaugesProblems%Pump1Strokes%ProblemType + print*, 'Pump1Strokes%StatusType=', GaugesProblems%Pump1Strokes%StatusType + print*, 'Pump1Strokes%Value=', GaugesProblems%Pump1Strokes%Value #endif end subroutine @@ -88,11 +88,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetPump2Strokes' :: SetPump2Strokes implicit none type(CProblem), intent(in) :: v - Pump2Strokes = SetDue(v, ChangePump2Strokes) + GaugesProblems%Pump2Strokes = SetDue(v, ChangePump2Strokes) #ifdef deb - print*, 'Pump2Strokes%ProblemType=', Pump2Strokes%ProblemType - print*, 'Pump2Strokes%StatusType=', Pump2Strokes%StatusType - print*, 'Pump2Strokes%Value=', Pump2Strokes%Value + print*, 'Pump2Strokes%ProblemType=', GaugesProblems%Pump2Strokes%ProblemType + print*, 'Pump2Strokes%StatusType=', GaugesProblems%Pump2Strokes%StatusType + print*, 'Pump2Strokes%Value=', GaugesProblems%Pump2Strokes%Value #endif end subroutine @@ -101,11 +101,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetReturnLineTemperature' :: SetReturnLineTemperature implicit none type(CProblem), intent(in) :: v - ReturnLineTemperature = SetDue(v, ChangeReturnLineTemperature) + GaugesProblems%ReturnLineTemperature = SetDue(v, ChangeReturnLineTemperature) #ifdef deb - print*, 'ReturnLineTemperature%ProblemType=', ReturnLineTemperature%ProblemType - print*, 'ReturnLineTemperature%StatusType=', ReturnLineTemperature%StatusType - print*, 'ReturnLineTemperature%Value=', ReturnLineTemperature%Value + print*, 'ReturnLineTemperature%ProblemType=', GaugesProblems%ReturnLineTemperature%ProblemType + print*, 'ReturnLineTemperature%StatusType=', GaugesProblems%ReturnLineTemperature%StatusType + print*, 'ReturnLineTemperature%Value=', GaugesProblems%ReturnLineTemperature%Value #endif end subroutine @@ -114,11 +114,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetTripTank' :: SetTripTank implicit none type(CProblem), intent(in) :: v - TripTank = SetDue(v, ChangeTripTank) + GaugesProblems%TripTank = SetDue(v, ChangeTripTank) #ifdef deb - print*, 'TripTank%ProblemType=', TripTank%ProblemType - print*, 'TripTank%StatusType=', TripTank%StatusType - print*, 'TripTank%Value=', TripTank%Value + print*, 'TripTank%ProblemType=', GaugesProblems%TripTank%ProblemType + print*, 'TripTank%StatusType=', GaugesProblems%TripTank%StatusType + print*, 'TripTank%Value=', GaugesProblems%TripTank%Value #endif end subroutine @@ -127,11 +127,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetPitGainLoss' :: SetPitGainLoss implicit none type(CProblem), intent(in) :: v - PitGainLoss = SetDue(v, ChangePitGainLoss) + GaugesProblems%PitGainLoss = SetDue(v, ChangePitGainLoss) #ifdef deb - print*, 'PitGainLoss%ProblemType=', PitGainLoss%ProblemType - print*, 'PitGainLoss%StatusType=', PitGainLoss%StatusType - print*, 'PitGainLoss%Value=', PitGainLoss%Value + print*, 'PitGainLoss%ProblemType=', GaugesProblems%PitGainLoss%ProblemType + print*, 'PitGainLoss%StatusType=', GaugesProblems%PitGainLoss%StatusType + print*, 'PitGainLoss%Value=', GaugesProblems%PitGainLoss%Value #endif end subroutine @@ -140,11 +140,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetMudTankVolume' :: SetMudTankVolume implicit none type(CProblem), intent(in) :: v - MudTankVolume = SetDue(v, ChangeMudTankVolume) + GaugesProblems%MudTankVolume = SetDue(v, ChangeMudTankVolume) #ifdef deb - print*, 'MudTankVolume%ProblemType=', MudTankVolume%ProblemType - print*, 'MudTankVolume%StatusType=', MudTankVolume%StatusType - print*, 'MudTankVolume%Value=', MudTankVolume%Value + print*, 'MudTankVolume%ProblemType=', GaugesProblems%MudTankVolume%ProblemType + print*, 'MudTankVolume%StatusType=', GaugesProblems%MudTankVolume%StatusType + print*, 'MudTankVolume%Value=', GaugesProblems%MudTankVolume%Value #endif end subroutine @@ -153,11 +153,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetReturnMudFlow' :: SetReturnMudFlow implicit none type(CProblem), intent(in) :: v - ReturnMudFlow = SetDue(v, ChangeReturnMudFlow) + GaugesProblems%ReturnMudFlow = SetDue(v, ChangeReturnMudFlow) #ifdef deb - print*, 'ReturnMudFlow%ProblemType=', ReturnMudFlow%ProblemType - print*, 'ReturnMudFlow%StatusType=', ReturnMudFlow%StatusType - print*, 'ReturnMudFlow%Value=', ReturnMudFlow%Value + print*, 'ReturnMudFlow%ProblemType=', GaugesProblems%ReturnMudFlow%ProblemType + print*, 'ReturnMudFlow%StatusType=', GaugesProblems%ReturnMudFlow%StatusType + print*, 'ReturnMudFlow%Value=', GaugesProblems%ReturnMudFlow%Value #endif end subroutine @@ -166,11 +166,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetTorqueLimit' :: SetTorqueLimit implicit none type(CProblem), intent(in) :: v - TorqueLimit = SetDue(v, ChangeTorqueLimit) + GaugesProblems%TorqueLimit = SetDue(v, ChangeTorqueLimit) #ifdef deb - print*, 'TorqueLimit%ProblemType=', TorqueLimit%ProblemType - print*, 'TorqueLimit%StatusType=', TorqueLimit%StatusType - print*, 'TorqueLimit%Value=', TorqueLimit%Value + print*, 'TorqueLimit%ProblemType=', GaugesProblems%TorqueLimit%ProblemType + print*, 'TorqueLimit%StatusType=', GaugesProblems%TorqueLimit%StatusType + print*, 'TorqueLimit%Value=', GaugesProblems%TorqueLimit%Value #endif end subroutine @@ -179,11 +179,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetPowerLimit' :: SetPowerLimit implicit none type(CProblem), intent(in) :: v - PowerLimit = SetDue(v, ChangePowerLimit) + GaugesProblems%PowerLimit = SetDue(v, ChangePowerLimit) #ifdef deb - print*, 'PowerLimit%ProblemType=', PowerLimit%ProblemType - print*, 'PowerLimit%StatusType=', PowerLimit%StatusType - print*, 'PowerLimit%Value=', PowerLimit%Value + print*, 'PowerLimit%ProblemType=', GaugesProblems%PowerLimit%ProblemType + print*, 'PowerLimit%StatusType=', GaugesProblems%PowerLimit%StatusType + print*, 'PowerLimit%Value=', GaugesProblems%PowerLimit%Value #endif end subroutine @@ -192,11 +192,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorPressure' :: SetAccumulatorPressure implicit none type(CProblem), intent(in) :: v - AccumulatorPressure = SetDue(v, ChangeAccumulatorPressure) + GaugesProblems%AccumulatorPressure = SetDue(v, ChangeAccumulatorPressure) #ifdef deb - print*, 'AccumulatorPressure%ProblemType=', AccumulatorPressure%ProblemType - print*, 'AccumulatorPressure%StatusType=', AccumulatorPressure%StatusType - print*, 'AccumulatorPressure%Value=', AccumulatorPressure%Value + print*, 'AccumulatorPressure%ProblemType=', GaugesProblems%AccumulatorPressure%ProblemType + print*, 'AccumulatorPressure%StatusType=', GaugesProblems%AccumulatorPressure%StatusType + print*, 'AccumulatorPressure%Value=', GaugesProblems%AccumulatorPressure%Value #endif end subroutine @@ -205,11 +205,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetManifoldPressure' :: SetManifoldPressure implicit none type(CProblem), intent(in) :: v - ManifoldPressure = SetDue(v, ChangeManifoldPressure) + GaugesProblems%ManifoldPressure = SetDue(v, ChangeManifoldPressure) #ifdef deb - print*, 'ManifoldPressure%ProblemType=', ManifoldPressure%ProblemType - print*, 'ManifoldPressure%StatusType=', ManifoldPressure%StatusType - print*, 'ManifoldPressure%Value=', ManifoldPressure%Value + print*, 'ManifoldPressure%ProblemType=', GaugesProblems%ManifoldPressure%ProblemType + print*, 'ManifoldPressure%StatusType=', GaugesProblems%ManifoldPressure%StatusType + print*, 'ManifoldPressure%Value=', GaugesProblems%ManifoldPressure%Value #endif end subroutine @@ -218,11 +218,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetAnnularPressure' :: SetAnnularPressure implicit none type(CProblem), intent(in) :: v - AnnularPressure = SetDue(v, ChangeAnnularPressure) + GaugesProblems%AnnularPressure = SetDue(v, ChangeAnnularPressure) #ifdef deb - print*, 'AnnularPressure%ProblemType=', AnnularPressure%ProblemType - print*, 'AnnularPressure%StatusType=', AnnularPressure%StatusType - print*, 'AnnularPressure%Value=', AnnularPressure%Value + print*, 'AnnularPressure%ProblemType=', GaugesProblems%AnnularPressure%ProblemType + print*, 'AnnularPressure%StatusType=', GaugesProblems%AnnularPressure%StatusType + print*, 'AnnularPressure%Value=', GaugesProblems%AnnularPressure%Value #endif end subroutine @@ -231,11 +231,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetRigAirPressure' :: SetRigAirPressure implicit none type(CProblem), intent(in) :: v - RigAirPressure = SetDue(v, ChangeRigAirPressure) + GaugesProblems%RigAirPressure = SetDue(v, ChangeRigAirPressure) #ifdef deb - print*, 'RigAirPressure%ProblemType=', RigAirPressure%ProblemType - print*, 'RigAirPressure%StatusType=', RigAirPressure%StatusType - print*, 'RigAirPressure%Value=', RigAirPressure%Value + print*, 'RigAirPressure%ProblemType=', GaugesProblems%RigAirPressure%ProblemType + print*, 'RigAirPressure%StatusType=', GaugesProblems%RigAirPressure%StatusType + print*, 'RigAirPressure%Value=', GaugesProblems%RigAirPressure%Value #endif end subroutine @@ -244,11 +244,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetStandPipe1' :: SetStandPipe1 implicit none type(CProblem), intent(in) :: v - StandPipe1 = SetDue(v, ChangeStandPipe1) + GaugesProblems%StandPipe1 = SetDue(v, ChangeStandPipe1) #ifdef deb - print*, 'StandPipe1%ProblemType=', StandPipe1%ProblemType - print*, 'StandPipe1%StatusType=', StandPipe1%StatusType - print*, 'StandPipe1%Value=', StandPipe1%Value + print*, 'StandPipe1%ProblemType=', GaugesProblems%StandPipe1%ProblemType + print*, 'StandPipe1%StatusType=', GaugesProblems%StandPipe1%StatusType + print*, 'StandPipe1%Value=', GaugesProblems%StandPipe1%Value #endif end subroutine @@ -257,11 +257,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetStandPipe2' :: SetStandPipe2 implicit none type(CProblem), intent(in) :: v - StandPipe2 = SetDue(v, ChangeStandPipe2) + GaugesProblems%StandPipe2 = SetDue(v, ChangeStandPipe2) #ifdef deb - print*, 'StandPipe2%ProblemType=', StandPipe2%ProblemType - print*, 'StandPipe2%StatusType=', StandPipe2%StatusType - print*, 'StandPipe2%Value=', StandPipe2%Value + print*, 'StandPipe2%ProblemType=', GaugesProblems%StandPipe2%ProblemType + print*, 'StandPipe2%StatusType=', GaugesProblems%StandPipe2%StatusType + print*, 'StandPipe2%Value=', GaugesProblems%StandPipe2%Value #endif end subroutine @@ -270,11 +270,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetDrillPipePressure' :: SetDrillPipePressure implicit none type(CProblem), intent(in) :: v - DrillPipePressure = SetDue(v, ChangeDrillPipePressure) + GaugesProblems%DrillPipePressure = SetDue(v, ChangeDrillPipePressure) #ifdef deb - print*, 'DrillPipePressure%ProblemType=', DrillPipePressure%ProblemType - print*, 'DrillPipePressure%StatusType=', DrillPipePressure%StatusType - print*, 'DrillPipePressure%Value=', DrillPipePressure%Value + print*, 'DrillPipePressure%ProblemType=', GaugesProblems%DrillPipePressure%ProblemType + print*, 'DrillPipePressure%StatusType=', GaugesProblems%DrillPipePressure%StatusType + print*, 'DrillPipePressure%Value=', GaugesProblems%DrillPipePressure%Value #endif end subroutine @@ -283,11 +283,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetChokePosition' :: SetChokePosition implicit none type(CProblem), intent(in) :: v - ChokePosition = SetDue(v, ChangeChokePosition) + GaugesProblems%ChokePosition = SetDue(v, ChangeChokePosition) #ifdef deb - print*, 'ChokePosition%ProblemType=', ChokePosition%ProblemType - print*, 'ChokePosition%StatusType=', ChokePosition%StatusType - print*, 'ChokePosition%Value=', ChokePosition%Value + print*, 'ChokePosition%ProblemType=', GaugesProblems%ChokePosition%ProblemType + print*, 'ChokePosition%StatusType=', GaugesProblems%ChokePosition%StatusType + print*, 'ChokePosition%Value=', GaugesProblems%ChokePosition%Value #endif end subroutine @@ -296,11 +296,11 @@ module CGaugesProblems !DEC$ ATTRIBUTES ALIAS: 'SetCasingPressure2' :: SetCasingPressure2 implicit none type(CProblem), intent(in) :: v - CasingPressure2 = SetDue(v, ChangeCasingPressure2) + GaugesProblems%CasingPressure2 = SetDue(v, ChangeCasingPressure2) #ifdef deb - print*, 'CasingPressure2%ProblemType=', CasingPressure2%ProblemType - print*, 'CasingPressure2%StatusType=', CasingPressure2%StatusType - print*, 'CasingPressure2%Value=', CasingPressure2%Value + print*, 'CasingPressure2%ProblemType=', GaugesProblems%CasingPressure2%ProblemType + print*, 'CasingPressure2%StatusType=', GaugesProblems%CasingPressure2%StatusType + print*, 'CasingPressure2%Value=', GaugesProblems%CasingPressure2%Value #endif end subroutine diff --git a/CSharp/Problems/CGaugesProblemsVariables.f90 b/CSharp/Problems/CGaugesProblemsVariables.f90 index a114297..a127547 100644 --- a/CSharp/Problems/CGaugesProblemsVariables.f90 +++ b/CSharp/Problems/CGaugesProblemsVariables.f90 @@ -2,57 +2,58 @@ module CGaugesProblemsVariables use CProblemDifinition implicit none public - - type(CProblem) :: WeightIndicator - type(CProblem) :: RotaryRpm - type(CProblem) :: RotaryTorque - type(CProblem) :: StandPipePressure - type(CProblem) :: CasingPressure - type(CProblem) :: Pump1Strokes - type(CProblem) :: Pump2Strokes - type(CProblem) :: ReturnLineTemperature - type(CProblem) :: TripTank - type(CProblem) :: PitGainLoss - type(CProblem) :: MudTankVolume - type(CProblem) :: ReturnMudFlow - type(CProblem) :: TorqueLimit - type(CProblem) :: PowerLimit - type(CProblem) :: AccumulatorPressure - type(CProblem) :: ManifoldPressure - type(CProblem) :: AnnularPressure - type(CProblem) :: RigAirPressure - type(CProblem) :: StandPipe1 - type(CProblem) :: StandPipe2 - type(CProblem) :: DrillPipePressure - type(CProblem) :: ChokePosition - type(CProblem) :: CasingPressure2 - - - - - procedure (ActionInteger), pointer :: WeightIndicatorPtr - procedure (ActionInteger), pointer :: RotaryRpmPtr - procedure (ActionInteger), pointer :: RotaryTorquePtr - procedure (ActionInteger), pointer :: StandPipePressurePtr - procedure (ActionInteger), pointer :: CasingPressurePtr - procedure (ActionInteger), pointer :: Pump1StrokesPtr - procedure (ActionInteger), pointer :: Pump2StrokesPtr - procedure (ActionInteger), pointer :: ReturnLineTemperaturePtr - procedure (ActionInteger), pointer :: TripTankPtr - procedure (ActionInteger), pointer :: PitGainLossPtr - procedure (ActionInteger), pointer :: MudTankVolumePtr - procedure (ActionInteger), pointer :: ReturnMudFlowPtr - procedure (ActionInteger), pointer :: TorqueLimitPtr - procedure (ActionInteger), pointer :: PowerLimitPtr - procedure (ActionInteger), pointer :: AccumulatorPressurePtr - procedure (ActionInteger), pointer :: ManifoldPressurePtr - procedure (ActionInteger), pointer :: AnnularPressurePtr - procedure (ActionInteger), pointer :: RigAirPressurePtr - procedure (ActionInteger), pointer :: StandPipe1Ptr - procedure (ActionInteger), pointer :: StandPipe2Ptr - procedure (ActionInteger), pointer :: DrillPipePressurePtr - procedure (ActionInteger), pointer :: ChokePositionPtr - procedure (ActionInteger), pointer :: CasingPressure2Ptr + type :: GaugesProblemsType + type(CProblem) :: WeightIndicator + type(CProblem) :: RotaryRpm + type(CProblem) :: RotaryTorque + type(CProblem) :: StandPipePressure + type(CProblem) :: CasingPressure + type(CProblem) :: Pump1Strokes + type(CProblem) :: Pump2Strokes + type(CProblem) :: ReturnLineTemperature + type(CProblem) :: TripTank + type(CProblem) :: PitGainLoss + type(CProblem) :: MudTankVolume + type(CProblem) :: ReturnMudFlow + type(CProblem) :: TorqueLimit + type(CProblem) :: PowerLimit + type(CProblem) :: AccumulatorPressure + type(CProblem) :: ManifoldPressure + type(CProblem) :: AnnularPressure + type(CProblem) :: RigAirPressure + type(CProblem) :: StandPipe1 + type(CProblem) :: StandPipe2 + type(CProblem) :: DrillPipePressure + type(CProblem) :: ChokePosition + type(CProblem) :: CasingPressure2 + end type GaugesProblemsType + type(GaugesProblemsType)::GaugesProblems + + + + ! procedure (ActionInteger), pointer :: WeightIndicatorPtr + ! procedure (ActionInteger), pointer :: RotaryRpmPtr + ! procedure (ActionInteger), pointer :: RotaryTorquePtr + ! procedure (ActionInteger), pointer :: StandPipePressurePtr + ! procedure (ActionInteger), pointer :: CasingPressurePtr + ! procedure (ActionInteger), pointer :: Pump1StrokesPtr + ! procedure (ActionInteger), pointer :: Pump2StrokesPtr + ! procedure (ActionInteger), pointer :: ReturnLineTemperaturePtr + ! procedure (ActionInteger), pointer :: TripTankPtr + ! procedure (ActionInteger), pointer :: PitGainLossPtr + ! procedure (ActionInteger), pointer :: MudTankVolumePtr + ! procedure (ActionInteger), pointer :: ReturnMudFlowPtr + ! procedure (ActionInteger), pointer :: TorqueLimitPtr + ! procedure (ActionInteger), pointer :: PowerLimitPtr + ! procedure (ActionInteger), pointer :: AccumulatorPressurePtr + ! procedure (ActionInteger), pointer :: ManifoldPressurePtr + ! procedure (ActionInteger), pointer :: AnnularPressurePtr + ! procedure (ActionInteger), pointer :: RigAirPressurePtr + ! procedure (ActionInteger), pointer :: StandPipe1Ptr + ! procedure (ActionInteger), pointer :: StandPipe2Ptr + ! procedure (ActionInteger), pointer :: DrillPipePressurePtr + ! procedure (ActionInteger), pointer :: ChokePositionPtr + ! procedure (ActionInteger), pointer :: CasingPressure2Ptr contains @@ -60,113 +61,113 @@ module CGaugesProblemsVariables subroutine ProcessGaugesProblemsDueTime(time) implicit none integer :: time - if(WeightIndicator%ProblemType == Time_ProblemType) call ProcessDueTime(WeightIndicator, ChangeWeightIndicator, time) - if(RotaryRpm%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryRpm, ChangeRotaryRpm, time) - if(RotaryTorque%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryTorque, ChangeRotaryTorque, time) - if(StandPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipePressure, ChangeStandPipePressure, time) - if(CasingPressure%ProblemType == Time_ProblemType) call ProcessDueTime(CasingPressure, ChangeCasingPressure, time) - if(Pump1Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(Pump1Strokes, ChangePump1Strokes, time) - if(Pump2Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(Pump2Strokes, ChangePump2Strokes, time) - if(ReturnLineTemperature%ProblemType == Time_ProblemType) call ProcessDueTime(ReturnLineTemperature, ChangeReturnLineTemperature, time) - if(TripTank%ProblemType == Time_ProblemType) call ProcessDueTime(TripTank, ChangeTripTank, time) - if(PitGainLoss%ProblemType == Time_ProblemType) call ProcessDueTime(PitGainLoss, ChangePitGainLoss, time) - if(MudTankVolume%ProblemType == Time_ProblemType) call ProcessDueTime(MudTankVolume, ChangeMudTankVolume, time) - if(ReturnMudFlow%ProblemType == Time_ProblemType) call ProcessDueTime(ReturnMudFlow, ChangeReturnMudFlow, time) - if(TorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(TorqueLimit, ChangeTorqueLimit, time) - if(PowerLimit%ProblemType == Time_ProblemType) call ProcessDueTime(PowerLimit, ChangePowerLimit, time) - if(AccumulatorPressure%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorPressure, ChangeAccumulatorPressure, time) - if(ManifoldPressure%ProblemType == Time_ProblemType) call ProcessDueTime(ManifoldPressure, ChangeManifoldPressure, time) - if(AnnularPressure%ProblemType == Time_ProblemType) call ProcessDueTime(AnnularPressure, ChangeAnnularPressure, time) - if(RigAirPressure%ProblemType == Time_ProblemType) call ProcessDueTime(RigAirPressure, ChangeRigAirPressure, time) - if(StandPipe1%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipe1, ChangeStandPipe1, time) - if(StandPipe2%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipe2, ChangeStandPipe2, time) - if(DrillPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(DrillPipePressure, ChangeDrillPipePressure, time) - if(ChokePosition%ProblemType == Time_ProblemType) call ProcessDueTime(ChokePosition, ChangeChokePosition, time) - if(CasingPressure2%ProblemType == Time_ProblemType) call ProcessDueTime(CasingPressure2, ChangeCasingPressure2, time) + if(GaugesProblems%WeightIndicator%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%WeightIndicator, ChangeWeightIndicator, time) + if(GaugesProblems%RotaryRpm%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%RotaryRpm, ChangeRotaryRpm, time) + if(GaugesProblems%RotaryTorque%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%RotaryTorque, ChangeRotaryTorque, time) + if(GaugesProblems%StandPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%StandPipePressure, ChangeStandPipePressure, time) + if(GaugesProblems%CasingPressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%CasingPressure, ChangeCasingPressure, time) + if(GaugesProblems%Pump1Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%Pump1Strokes, ChangePump1Strokes, time) + if(GaugesProblems%Pump2Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%Pump2Strokes, ChangePump2Strokes, time) + if(GaugesProblems%ReturnLineTemperature%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, time) + if(GaugesProblems%TripTank%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%TripTank, ChangeTripTank, time) + if(GaugesProblems%PitGainLoss%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%PitGainLoss, ChangePitGainLoss, time) + if(GaugesProblems%MudTankVolume%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%MudTankVolume, ChangeMudTankVolume, time) + if(GaugesProblems%ReturnMudFlow%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, time) + if(GaugesProblems%TorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%TorqueLimit, ChangeTorqueLimit, time) + if(GaugesProblems%PowerLimit%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%PowerLimit, ChangePowerLimit, time) + if(GaugesProblems%AccumulatorPressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, time) + if(GaugesProblems%ManifoldPressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%ManifoldPressure, ChangeManifoldPressure, time) + if(GaugesProblems%AnnularPressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%AnnularPressure, ChangeAnnularPressure, time) + if(GaugesProblems%RigAirPressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%RigAirPressure, ChangeRigAirPressure, time) + if(GaugesProblems%StandPipe1%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%StandPipe1, ChangeStandPipe1, time) + if(GaugesProblems%StandPipe2%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%StandPipe2, ChangeStandPipe2, time) + if(GaugesProblems%DrillPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, time) + if(GaugesProblems%ChokePosition%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%ChokePosition, ChangeChokePosition, time) + if(GaugesProblems%CasingPressure2%ProblemType == Time_ProblemType) call ProcessDueTime(GaugesProblems%CasingPressure2, ChangeCasingPressure2, time) end subroutine subroutine ProcessGaugesProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(WeightIndicator%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(WeightIndicator, ChangeWeightIndicator, strokes) - if(RotaryRpm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryRpm, ChangeRotaryRpm, strokes) - if(RotaryTorque%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryTorque, ChangeRotaryTorque, strokes) - if(StandPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipePressure, ChangeStandPipePressure, strokes) - if(CasingPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CasingPressure, ChangeCasingPressure, strokes) - if(Pump1Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump1Strokes, ChangePump1Strokes, strokes) - if(Pump2Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump2Strokes, ChangePump2Strokes, strokes) - if(ReturnLineTemperature%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ReturnLineTemperature, ChangeReturnLineTemperature, strokes) - if(TripTank%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(TripTank, ChangeTripTank, strokes) - if(PitGainLoss%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PitGainLoss, ChangePitGainLoss, strokes) - if(MudTankVolume%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTankVolume, ChangeMudTankVolume, strokes) - if(ReturnMudFlow%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ReturnMudFlow, ChangeReturnMudFlow, strokes) - if(TorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(TorqueLimit, ChangeTorqueLimit, strokes) - if(PowerLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PowerLimit, ChangePowerLimit, strokes) - if(AccumulatorPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorPressure, ChangeAccumulatorPressure, strokes) - if(ManifoldPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManifoldPressure, ChangeManifoldPressure, strokes) - if(AnnularPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AnnularPressure, ChangeAnnularPressure, strokes) - if(RigAirPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RigAirPressure, ChangeRigAirPressure, strokes) - if(StandPipe1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipe1, ChangeStandPipe1, strokes) - if(StandPipe2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipe2, ChangeStandPipe2, strokes) - if(DrillPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillPipePressure, ChangeDrillPipePressure, strokes) - if(ChokePosition%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokePosition, ChangeChokePosition, strokes) - if(CasingPressure2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CasingPressure2, ChangeCasingPressure2, strokes) + if(GaugesProblems%WeightIndicator%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%WeightIndicator, ChangeWeightIndicator, strokes) + if(GaugesProblems%RotaryRpm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%RotaryRpm, ChangeRotaryRpm, strokes) + if(GaugesProblems%RotaryTorque%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%RotaryTorque, ChangeRotaryTorque, strokes) + if(GaugesProblems%StandPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%StandPipePressure, ChangeStandPipePressure, strokes) + if(GaugesProblems%CasingPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%CasingPressure, ChangeCasingPressure, strokes) + if(GaugesProblems%Pump1Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%Pump1Strokes, ChangePump1Strokes, strokes) + if(GaugesProblems%Pump2Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%Pump2Strokes, ChangePump2Strokes, strokes) + if(GaugesProblems%ReturnLineTemperature%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, strokes) + if(GaugesProblems%TripTank%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%TripTank, ChangeTripTank, strokes) + if(GaugesProblems%PitGainLoss%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%PitGainLoss, ChangePitGainLoss, strokes) + if(GaugesProblems%MudTankVolume%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%MudTankVolume, ChangeMudTankVolume, strokes) + if(GaugesProblems%ReturnMudFlow%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, strokes) + if(GaugesProblems%TorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%TorqueLimit, ChangeTorqueLimit, strokes) + if(GaugesProblems%PowerLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%PowerLimit, ChangePowerLimit, strokes) + if(GaugesProblems%AccumulatorPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, strokes) + if(GaugesProblems%ManifoldPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%ManifoldPressure, ChangeManifoldPressure, strokes) + if(GaugesProblems%AnnularPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%AnnularPressure, ChangeAnnularPressure, strokes) + if(GaugesProblems%RigAirPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%RigAirPressure, ChangeRigAirPressure, strokes) + if(GaugesProblems%StandPipe1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%StandPipe1, ChangeStandPipe1, strokes) + if(GaugesProblems%StandPipe2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%StandPipe2, ChangeStandPipe2, strokes) + if(GaugesProblems%DrillPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, strokes) + if(GaugesProblems%ChokePosition%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%ChokePosition, ChangeChokePosition, strokes) + if(GaugesProblems%CasingPressure2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(GaugesProblems%CasingPressure2, ChangeCasingPressure2, strokes) end subroutine subroutine ProcessGaugesProblemsDueVolumePumped(volume) implicit none real(8) :: volume - if(WeightIndicator%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(WeightIndicator, ChangeWeightIndicator, volume) - if(RotaryRpm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryRpm, ChangeRotaryRpm, volume) - if(RotaryTorque%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryTorque, ChangeRotaryTorque, volume) - if(StandPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipePressure, ChangeStandPipePressure, volume) - if(CasingPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CasingPressure, ChangeCasingPressure, volume) - if(Pump1Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump1Strokes, ChangePump1Strokes, volume) - if(Pump2Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump2Strokes, ChangePump2Strokes, volume) - if(ReturnLineTemperature%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ReturnLineTemperature, ChangeReturnLineTemperature, volume) - if(TripTank%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(TripTank, ChangeTripTank, volume) - if(PitGainLoss%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PitGainLoss, ChangePitGainLoss, volume) - if(MudTankVolume%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTankVolume, ChangeMudTankVolume, volume) - if(ReturnMudFlow%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ReturnMudFlow, ChangeReturnMudFlow, volume) - if(TorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(TorqueLimit, ChangeTorqueLimit, volume) - if(PowerLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PowerLimit, ChangePowerLimit, volume) - if(AccumulatorPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorPressure, ChangeAccumulatorPressure, volume) - if(ManifoldPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManifoldPressure, ChangeManifoldPressure, volume) - if(AnnularPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AnnularPressure, ChangeAnnularPressure, volume) - if(RigAirPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RigAirPressure, ChangeRigAirPressure, volume) - if(StandPipe1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipe1, ChangeStandPipe1, volume) - if(StandPipe2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipe2, ChangeStandPipe2, volume) - if(DrillPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillPipePressure, ChangeDrillPipePressure, volume) - if(ChokePosition%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokePosition, ChangeChokePosition, volume) - if(CasingPressure2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CasingPressure2, ChangeCasingPressure2, volume) + if(GaugesProblems%WeightIndicator%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%WeightIndicator, ChangeWeightIndicator, volume) + if(GaugesProblems%RotaryRpm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%RotaryRpm, ChangeRotaryRpm, volume) + if(GaugesProblems%RotaryTorque%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%RotaryTorque, ChangeRotaryTorque, volume) + if(GaugesProblems%StandPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%StandPipePressure, ChangeStandPipePressure, volume) + if(GaugesProblems%CasingPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%CasingPressure, ChangeCasingPressure, volume) + if(GaugesProblems%Pump1Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%Pump1Strokes, ChangePump1Strokes, volume) + if(GaugesProblems%Pump2Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%Pump2Strokes, ChangePump2Strokes, volume) + if(GaugesProblems%ReturnLineTemperature%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, volume) + if(GaugesProblems%TripTank%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%TripTank, ChangeTripTank, volume) + if(GaugesProblems%PitGainLoss%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%PitGainLoss, ChangePitGainLoss, volume) + if(GaugesProblems%MudTankVolume%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%MudTankVolume, ChangeMudTankVolume, volume) + if(GaugesProblems%ReturnMudFlow%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, volume) + if(GaugesProblems%TorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%TorqueLimit, ChangeTorqueLimit, volume) + if(GaugesProblems%PowerLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%PowerLimit, ChangePowerLimit, volume) + if(GaugesProblems%AccumulatorPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, volume) + if(GaugesProblems%ManifoldPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%ManifoldPressure, ChangeManifoldPressure, volume) + if(GaugesProblems%AnnularPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%AnnularPressure, ChangeAnnularPressure, volume) + if(GaugesProblems%RigAirPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%RigAirPressure, ChangeRigAirPressure, volume) + if(GaugesProblems%StandPipe1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%StandPipe1, ChangeStandPipe1, volume) + if(GaugesProblems%StandPipe2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%StandPipe2, ChangeStandPipe2, volume) + if(GaugesProblems%DrillPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, volume) + if(GaugesProblems%ChokePosition%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%ChokePosition, ChangeChokePosition, volume) + if(GaugesProblems%CasingPressure2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(GaugesProblems%CasingPressure2, ChangeCasingPressure2, volume) end subroutine subroutine ProcessGaugesProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance - if(WeightIndicator%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(WeightIndicator, ChangeWeightIndicator, distance) - if(RotaryRpm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryRpm, ChangeRotaryRpm, distance) - if(RotaryTorque%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryTorque, ChangeRotaryTorque, distance) - if(StandPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipePressure, ChangeStandPipePressure, distance) - if(CasingPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CasingPressure, ChangeCasingPressure, distance) - if(Pump1Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump1Strokes, ChangePump1Strokes, distance) - if(Pump2Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump2Strokes, ChangePump2Strokes, distance) - if(ReturnLineTemperature%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ReturnLineTemperature, ChangeReturnLineTemperature, distance) - if(TripTank%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(TripTank, ChangeTripTank, distance) - if(PitGainLoss%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PitGainLoss, ChangePitGainLoss, distance) - if(MudTankVolume%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTankVolume, ChangeMudTankVolume, distance) - if(ReturnMudFlow%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ReturnMudFlow, ChangeReturnMudFlow, distance) - if(TorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(TorqueLimit, ChangeTorqueLimit, distance) - if(PowerLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PowerLimit, ChangePowerLimit, distance) - if(AccumulatorPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorPressure, ChangeAccumulatorPressure, distance) - if(ManifoldPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManifoldPressure, ChangeManifoldPressure, distance) - if(AnnularPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AnnularPressure, ChangeAnnularPressure, distance) - if(RigAirPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RigAirPressure, ChangeRigAirPressure, distance) - if(StandPipe1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipe1, ChangeStandPipe1, distance) - if(StandPipe2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipe2, ChangeStandPipe2, distance) - if(DrillPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillPipePressure, ChangeDrillPipePressure, distance) - if(ChokePosition%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokePosition, ChangeChokePosition, distance) - if(CasingPressure2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CasingPressure2, ChangeCasingPressure2, distance) + if(GaugesProblems%WeightIndicator%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%WeightIndicator, ChangeWeightIndicator, distance) + if(GaugesProblems%RotaryRpm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%RotaryRpm, ChangeRotaryRpm, distance) + if(GaugesProblems%RotaryTorque%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%RotaryTorque, ChangeRotaryTorque, distance) + if(GaugesProblems%StandPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%StandPipePressure, ChangeStandPipePressure, distance) + if(GaugesProblems%CasingPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%CasingPressure, ChangeCasingPressure, distance) + if(GaugesProblems%Pump1Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%Pump1Strokes, ChangePump1Strokes, distance) + if(GaugesProblems%Pump2Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%Pump2Strokes, ChangePump2Strokes, distance) + if(GaugesProblems%ReturnLineTemperature%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, distance) + if(GaugesProblems%TripTank%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%TripTank, ChangeTripTank, distance) + if(GaugesProblems%PitGainLoss%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%PitGainLoss, ChangePitGainLoss, distance) + if(GaugesProblems%MudTankVolume%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%MudTankVolume, ChangeMudTankVolume, distance) + if(GaugesProblems%ReturnMudFlow%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, distance) + if(GaugesProblems%TorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%TorqueLimit, ChangeTorqueLimit, distance) + if(GaugesProblems%PowerLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%PowerLimit, ChangePowerLimit, distance) + if(GaugesProblems%AccumulatorPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, distance) + if(GaugesProblems%ManifoldPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%ManifoldPressure, ChangeManifoldPressure, distance) + if(GaugesProblems%AnnularPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%AnnularPressure, ChangeAnnularPressure, distance) + if(GaugesProblems%RigAirPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%RigAirPressure, ChangeRigAirPressure, distance) + if(GaugesProblems%StandPipe1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%StandPipe1, ChangeStandPipe1, distance) + if(GaugesProblems%StandPipe2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%StandPipe2, ChangeStandPipe2, distance) + if(GaugesProblems%DrillPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, distance) + if(GaugesProblems%ChokePosition%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%ChokePosition, ChangeChokePosition, distance) + if(GaugesProblems%CasingPressure2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(GaugesProblems%CasingPressure2, ChangeCasingPressure2, distance) end subroutine @@ -181,7 +182,7 @@ module CGaugesProblemsVariables use TD_GeneralData implicit none integer, intent (in) :: status - if(associated(WeightIndicatorPtr)) call WeightIndicatorPtr(status) + ! if(associated(WeightIndicatorPtr)) call WeightIndicatorPtr(status) if(status == Clear_StatusType) TD_WeightIndicatorMalf = 0 if(status == Executed_StatusType) TD_WeightIndicatorMalf = 1 endsubroutine @@ -190,7 +191,7 @@ module CGaugesProblemsVariables use RTable_VARIABLES implicit none integer, intent (in) :: status - if(associated(RotaryRpmPtr)) call RotaryRpmPtr(status) + ! if(associated(RotaryRpmPtr)) call RotaryRpmPtr(status) if(status == Clear_StatusType) RTable%RpmGaugeMalf = 0 if(status == Executed_StatusType) RTable%RpmGaugeMalf = 1 endsubroutine @@ -199,7 +200,7 @@ module CGaugesProblemsVariables use RTable_VARIABLES implicit none integer, intent (in) :: status - if(associated(RotaryTorquePtr)) call RotaryTorquePtr(status) + ! if(associated(RotaryTorquePtr)) call RotaryTorquePtr(status) if(status == Clear_StatusType) RTable%TorqueGaugeMalf = 0 if(status == Executed_StatusType) RTable%TorqueGaugeMalf = 1 endsubroutine @@ -208,7 +209,7 @@ module CGaugesProblemsVariables use MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(StandPipePressurePtr)) call StandPipePressurePtr(status) + ! if(associated(StandPipePressurePtr)) call StandPipePressurePtr(status) if(status == Clear_StatusType) StandPipePressure_DataDisplayMalf = 0 if(status == Executed_StatusType) StandPipePressure_DataDisplayMalf = 1 endsubroutine @@ -217,7 +218,7 @@ module CGaugesProblemsVariables USE FricPressDropVars implicit none integer, intent (in) :: status - if(associated(CasingPressurePtr)) call CasingPressurePtr(status) + ! if(associated(CasingPressurePtr)) call CasingPressurePtr(status) if(status == Clear_StatusType) CasingPressure_DataDisplayMalF = 0 if(status == Executed_StatusType) CasingPressure_DataDisplayMalF = 1 endsubroutine @@ -226,7 +227,7 @@ module CGaugesProblemsVariables use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump1StrokesPtr)) call Pump1StrokesPtr(status) + ! if(associated(Pump1StrokesPtr)) call Pump1StrokesPtr(status) if(status == Clear_StatusType) PUMP(1)%SPMGaugeMalf = 0 if(status == Executed_StatusType) PUMP(1)%SPMGaugeMalf = 1 endsubroutine @@ -235,7 +236,7 @@ module CGaugesProblemsVariables use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump2StrokesPtr)) call Pump2StrokesPtr(status) + ! if(associated(Pump2StrokesPtr)) call Pump2StrokesPtr(status) if(status == Clear_StatusType) PUMP(2)%SPMGaugeMalf = 0 if(status == Executed_StatusType) PUMP(2)%SPMGaugeMalf = 1 endsubroutine @@ -243,7 +244,7 @@ module CGaugesProblemsVariables subroutine ChangeReturnLineTemperature(status) implicit none integer, intent (in) :: status - if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status) + ! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status) !if(status == Clear_StatusType) print*,'On_ReturnLineTemperature_Clear' !if(status == Executed_StatusType) print*,'On_ReturnLineTemperature_Execute' endsubroutine @@ -252,7 +253,7 @@ module CGaugesProblemsVariables USE MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(TripTankPtr)) call TripTankPtr(status) + ! if(associated(TripTankPtr)) call TripTankPtr(status) if(status == Clear_StatusType) TripTankPressure_DataDisplayMalf = 0 if(status == Executed_StatusType) TripTankPressure_DataDisplayMalf = 1 endsubroutine @@ -261,7 +262,7 @@ module CGaugesProblemsVariables USE MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(PitGainLossPtr)) call PitGainLossPtr(status) + ! if(associated(PitGainLossPtr)) call PitGainLossPtr(status) if(status == Clear_StatusType) PitGainLossGaugeMalf = 0 if(status == Executed_StatusType) PitGainLossGaugeMalf = 1 endsubroutine @@ -269,7 +270,7 @@ module CGaugesProblemsVariables subroutine ChangeMudTankVolume(status) implicit none integer, intent (in) :: status - if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status) + ! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status) !if(status == Clear_StatusType) print*,'On_MudTankVolume_Clear' !if(status == Executed_StatusType) print*,'On_MudTankVolume_Execute' endsubroutine @@ -277,7 +278,7 @@ module CGaugesProblemsVariables subroutine ChangeReturnMudFlow(status) implicit none integer, intent (in) :: status - if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status) + ! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status) !if(status == Clear_StatusType) print*,'On_ReturnMudFlow_Clear' !if(status == Executed_StatusType) print*,'On_ReturnMudFlow_Execute' endsubroutine @@ -286,7 +287,7 @@ module CGaugesProblemsVariables use RTable_VARIABLES implicit none integer, intent (in) :: status - if(associated(TorqueLimitPtr)) call TorqueLimitPtr(status) + ! if(associated(TorqueLimitPtr)) call TorqueLimitPtr(status) if(status == Clear_StatusType) RTable%TorqueLimitGaugeMalf = 0 if(status == Executed_StatusType) RTable%TorqueLimitGaugeMalf = 1 endsubroutine @@ -294,7 +295,7 @@ module CGaugesProblemsVariables subroutine ChangePowerLimit(status) implicit none integer, intent (in) :: status - if(associated(PowerLimitPtr)) call PowerLimitPtr(status) + ! if(associated(PowerLimitPtr)) call PowerLimitPtr(status) !if(status == Clear_StatusType) print*,'On_PowerLimit_Clear' !if(status == Executed_StatusType) print*,'On_PowerLimit_Execute' endsubroutine @@ -303,7 +304,7 @@ module CGaugesProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(AccumulatorPressurePtr)) call AccumulatorPressurePtr(status) + ! if(associated(AccumulatorPressurePtr)) call AccumulatorPressurePtr(status) if(status == Clear_StatusType) AccumulatorPressureGaugeMalf = 0 if(status == Executed_StatusType) AccumulatorPressureGaugeMalf = 1 endsubroutine @@ -312,7 +313,7 @@ module CGaugesProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(ManifoldPressurePtr)) call ManifoldPressurePtr(status) + ! if(associated(ManifoldPressurePtr)) call ManifoldPressurePtr(status) if(status == Clear_StatusType) ManifoldPressureGaugeMalf = 0 if(status == Executed_StatusType) ManifoldPressureGaugeMalf = 1 endsubroutine @@ -321,7 +322,7 @@ module CGaugesProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(AnnularPressurePtr)) call AnnularPressurePtr(status) + ! if(associated(AnnularPressurePtr)) call AnnularPressurePtr(status) if(status == Clear_StatusType) AnnularPressureGaugeMalf = 0 if(status == Executed_StatusType) AnnularPressureGaugeMalf = 1 endsubroutine @@ -330,7 +331,7 @@ module CGaugesProblemsVariables USE VARIABLES implicit none integer, intent (in) :: status - if(associated(RigAirPressurePtr)) call RigAirPressurePtr(status) + ! if(associated(RigAirPressurePtr)) call RigAirPressurePtr(status) if(status == Clear_StatusType) AirSupplyPressureGaugeMalf = 0 if(status == Executed_StatusType) AirSupplyPressureGaugeMalf = 1 endsubroutine @@ -339,7 +340,7 @@ module CGaugesProblemsVariables use MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(StandPipe1Ptr)) call StandPipe1Ptr(status) + ! if(associated(StandPipe1Ptr)) call StandPipe1Ptr(status) if(status == Clear_StatusType) StandPipeGauge1Malf = 0 if(status == Executed_StatusType) StandPipeGauge1Malf = 1 endsubroutine @@ -348,7 +349,7 @@ module CGaugesProblemsVariables use MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(StandPipe2Ptr)) call StandPipe2Ptr(status) + ! if(associated(StandPipe2Ptr)) call StandPipe2Ptr(status) if(status == Clear_StatusType) StandPipeGauge2Malf = 0 if(status == Executed_StatusType) StandPipeGauge2Malf = 1 endsubroutine @@ -357,7 +358,7 @@ module CGaugesProblemsVariables use MudSystemVARIABLES implicit none integer, intent (in) :: status - if(associated(DrillPipePressurePtr)) call DrillPipePressurePtr(status) + ! if(associated(DrillPipePressurePtr)) call DrillPipePressurePtr(status) if(status == Clear_StatusType) DrillPipePressureMalf = 0 if(status == Executed_StatusType) DrillPipePressureMalf = 1 endsubroutine @@ -366,7 +367,7 @@ module CGaugesProblemsVariables USE CHOKEVARIABLES implicit none integer, intent (in) :: status - if(associated(ChokePositionPtr)) call ChokePositionPtr(status) + ! if(associated(ChokePositionPtr)) call ChokePositionPtr(status) if(status == Clear_StatusType) GaugeChokePositionMailf = 0 if(status == Executed_StatusType) GaugeChokePositionMailf = 1 endsubroutine @@ -375,7 +376,7 @@ module CGaugesProblemsVariables use FricPressDropVars implicit none integer, intent (in) :: status - if(associated(CasingPressure2Ptr)) call CasingPressure2Ptr(status) + ! if(associated(CasingPressure2Ptr)) call CasingPressure2Ptr(status) if(status == Clear_StatusType) CasingPressure_ChokeMalF = 0 if(status == Executed_StatusType) CasingPressure_ChokeMalF = 1 endsubroutine @@ -395,189 +396,189 @@ module CGaugesProblemsVariables - subroutine SubscribeWeightIndicator(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeWeightIndicator - !DEC$ ATTRIBUTES ALIAS: 'SubscribeWeightIndicator' :: SubscribeWeightIndicator - implicit none - procedure (ActionInteger) :: v - WeightIndicatorPtr => v - end subroutine + ! subroutine SubscribeWeightIndicator(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeWeightIndicator + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeWeightIndicator' :: SubscribeWeightIndicator + ! implicit none + ! procedure (ActionInteger) :: v + ! WeightIndicatorPtr => v + ! end subroutine - subroutine SubscribeRotaryRpm(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryRpm - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryRpm' :: SubscribeRotaryRpm - implicit none - procedure (ActionInteger) :: v - RotaryRpmPtr => v - end subroutine + ! subroutine SubscribeRotaryRpm(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryRpm + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryRpm' :: SubscribeRotaryRpm + ! implicit none + ! procedure (ActionInteger) :: v + ! RotaryRpmPtr => v + ! end subroutine - subroutine SubscribeRotaryTorque(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryTorque - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryTorque' :: SubscribeRotaryTorque - implicit none - procedure (ActionInteger) :: v - RotaryTorquePtr => v - end subroutine + ! subroutine SubscribeRotaryTorque(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryTorque + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryTorque' :: SubscribeRotaryTorque + ! implicit none + ! procedure (ActionInteger) :: v + ! RotaryTorquePtr => v + ! end subroutine - subroutine SubscribeStandPipePressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipePressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipePressure' :: SubscribeStandPipePressure - implicit none - procedure (ActionInteger) :: v - StandPipePressurePtr => v - end subroutine + ! subroutine SubscribeStandPipePressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipePressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipePressure' :: SubscribeStandPipePressure + ! implicit none + ! procedure (ActionInteger) :: v + ! StandPipePressurePtr => v + ! end subroutine - subroutine SubscribeCasingPressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure' :: SubscribeCasingPressure - implicit none - procedure (ActionInteger) :: v - CasingPressurePtr => v - end subroutine + ! subroutine SubscribeCasingPressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure' :: SubscribeCasingPressure + ! implicit none + ! procedure (ActionInteger) :: v + ! CasingPressurePtr => v + ! end subroutine - subroutine SubscribePump1Strokes(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump1Strokes - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump1Strokes' :: SubscribePump1Strokes - implicit none - procedure (ActionInteger) :: v - Pump1StrokesPtr => v - end subroutine + ! subroutine SubscribePump1Strokes(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump1Strokes + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribePump1Strokes' :: SubscribePump1Strokes + ! implicit none + ! procedure (ActionInteger) :: v + ! Pump1StrokesPtr => v + ! end subroutine - subroutine SubscribePump2Strokes(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump2Strokes - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump2Strokes' :: SubscribePump2Strokes - implicit none - procedure (ActionInteger) :: v - Pump2StrokesPtr => v - end subroutine + ! subroutine SubscribePump2Strokes(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump2Strokes + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribePump2Strokes' :: SubscribePump2Strokes + ! implicit none + ! procedure (ActionInteger) :: v + ! Pump2StrokesPtr => v + ! end subroutine - subroutine SubscribeReturnLineTemperature(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnLineTemperature - !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnLineTemperature' :: SubscribeReturnLineTemperature - implicit none - procedure (ActionInteger) :: v - ReturnLineTemperaturePtr => v - end subroutine + ! subroutine SubscribeReturnLineTemperature(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnLineTemperature + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnLineTemperature' :: SubscribeReturnLineTemperature + ! implicit none + ! procedure (ActionInteger) :: v + ! ReturnLineTemperaturePtr => v + ! end subroutine - subroutine SubscribeTripTank(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTripTank - !DEC$ ATTRIBUTES ALIAS: 'SubscribeTripTank' :: SubscribeTripTank - implicit none - procedure (ActionInteger) :: v - TripTankPtr => v - end subroutine + ! subroutine SubscribeTripTank(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTripTank + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeTripTank' :: SubscribeTripTank + ! implicit none + ! procedure (ActionInteger) :: v + ! TripTankPtr => v + ! end subroutine - subroutine SubscribePitGainLoss(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePitGainLoss - !DEC$ ATTRIBUTES ALIAS: 'SubscribePitGainLoss' :: SubscribePitGainLoss - implicit none - procedure (ActionInteger) :: v - PitGainLossPtr => v - end subroutine + ! subroutine SubscribePitGainLoss(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePitGainLoss + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribePitGainLoss' :: SubscribePitGainLoss + ! implicit none + ! procedure (ActionInteger) :: v + ! PitGainLossPtr => v + ! end subroutine - subroutine SubscribeMudTankVolume(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudTankVolume - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMudTankVolume' :: SubscribeMudTankVolume - implicit none - procedure (ActionInteger) :: v - MudTankVolumePtr => v - end subroutine + ! subroutine SubscribeMudTankVolume(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudTankVolume + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMudTankVolume' :: SubscribeMudTankVolume + ! implicit none + ! procedure (ActionInteger) :: v + ! MudTankVolumePtr => v + ! end subroutine - subroutine SubscribeReturnMudFlow(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnMudFlow - !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnMudFlow' :: SubscribeReturnMudFlow - implicit none - procedure (ActionInteger) :: v - ReturnMudFlowPtr => v - end subroutine + ! subroutine SubscribeReturnMudFlow(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnMudFlow + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnMudFlow' :: SubscribeReturnMudFlow + ! implicit none + ! procedure (ActionInteger) :: v + ! ReturnMudFlowPtr => v + ! end subroutine - subroutine SubscribeTorqueLimit(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTorqueLimit - !DEC$ ATTRIBUTES ALIAS: 'SubscribeTorqueLimit' :: SubscribeTorqueLimit - implicit none - procedure (ActionInteger) :: v - TorqueLimitPtr => v - end subroutine + ! subroutine SubscribeTorqueLimit(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTorqueLimit + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeTorqueLimit' :: SubscribeTorqueLimit + ! implicit none + ! procedure (ActionInteger) :: v + ! TorqueLimitPtr => v + ! end subroutine - subroutine SubscribePowerLimit(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePowerLimit - !DEC$ ATTRIBUTES ALIAS: 'SubscribePowerLimit' :: SubscribePowerLimit - implicit none - procedure (ActionInteger) :: v - PowerLimitPtr => v - end subroutine + ! subroutine SubscribePowerLimit(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePowerLimit + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribePowerLimit' :: SubscribePowerLimit + ! implicit none + ! procedure (ActionInteger) :: v + ! PowerLimitPtr => v + ! end subroutine - subroutine SubscribeAccumulatorPressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPressure' :: SubscribeAccumulatorPressure - implicit none - procedure (ActionInteger) :: v - AccumulatorPressurePtr => v - end subroutine + ! subroutine SubscribeAccumulatorPressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPressure' :: SubscribeAccumulatorPressure + ! implicit none + ! procedure (ActionInteger) :: v + ! AccumulatorPressurePtr => v + ! end subroutine - subroutine SubscribeManifoldPressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManifoldPressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeManifoldPressure' :: SubscribeManifoldPressure - implicit none - procedure (ActionInteger) :: v - ManifoldPressurePtr => v - end subroutine + ! subroutine SubscribeManifoldPressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManifoldPressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeManifoldPressure' :: SubscribeManifoldPressure + ! implicit none + ! procedure (ActionInteger) :: v + ! ManifoldPressurePtr => v + ! end subroutine - subroutine SubscribeAnnularPressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularPressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularPressure' :: SubscribeAnnularPressure - implicit none - procedure (ActionInteger) :: v - AnnularPressurePtr => v - end subroutine + ! subroutine SubscribeAnnularPressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularPressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularPressure' :: SubscribeAnnularPressure + ! implicit none + ! procedure (ActionInteger) :: v + ! AnnularPressurePtr => v + ! end subroutine - subroutine SubscribeRigAirPressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAirPressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAirPressure' :: SubscribeRigAirPressure - implicit none - procedure (ActionInteger) :: v - RigAirPressurePtr => v - end subroutine + ! subroutine SubscribeRigAirPressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAirPressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAirPressure' :: SubscribeRigAirPressure + ! implicit none + ! procedure (ActionInteger) :: v + ! RigAirPressurePtr => v + ! end subroutine - subroutine SubscribeStandPipe1(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe1 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe1' :: SubscribeStandPipe1 - implicit none - procedure (ActionInteger) :: v - StandPipe1Ptr => v - end subroutine + ! subroutine SubscribeStandPipe1(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe1 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe1' :: SubscribeStandPipe1 + ! implicit none + ! procedure (ActionInteger) :: v + ! StandPipe1Ptr => v + ! end subroutine - subroutine SubscribeStandPipe2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe2' :: SubscribeStandPipe2 - implicit none - procedure (ActionInteger) :: v - StandPipe2Ptr => v - end subroutine + ! subroutine SubscribeStandPipe2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe2' :: SubscribeStandPipe2 + ! implicit none + ! procedure (ActionInteger) :: v + ! StandPipe2Ptr => v + ! end subroutine - subroutine SubscribeDrillPipePressure(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDrillPipePressure - !DEC$ ATTRIBUTES ALIAS: 'SubscribeDrillPipePressure' :: SubscribeDrillPipePressure - implicit none - procedure (ActionInteger) :: v - DrillPipePressurePtr => v - end subroutine + ! subroutine SubscribeDrillPipePressure(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDrillPipePressure + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeDrillPipePressure' :: SubscribeDrillPipePressure + ! implicit none + ! procedure (ActionInteger) :: v + ! DrillPipePressurePtr => v + ! end subroutine - subroutine SubscribeChokePosition(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeChokePosition - !DEC$ ATTRIBUTES ALIAS: 'SubscribeChokePosition' :: SubscribeChokePosition - implicit none - procedure (ActionInteger) :: v - ChokePositionPtr => v - end subroutine + ! subroutine SubscribeChokePosition(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeChokePosition + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeChokePosition' :: SubscribeChokePosition + ! implicit none + ! procedure (ActionInteger) :: v + ! ChokePositionPtr => v + ! end subroutine - subroutine SubscribeCasingPressure2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure2' :: SubscribeCasingPressure2 - implicit none - procedure (ActionInteger) :: v - CasingPressure2Ptr => v - end subroutine + ! subroutine SubscribeCasingPressure2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure2' :: SubscribeCasingPressure2 + ! implicit none + ! procedure (ActionInteger) :: v + ! CasingPressure2Ptr => v + ! end subroutine diff --git a/CSharp/Problems/CHoistingProblems.f90 b/CSharp/Problems/CHoistingProblems.f90 index 295d536..ccba4f2 100644 --- a/CSharp/Problems/CHoistingProblems.f90 +++ b/CSharp/Problems/CHoistingProblems.f90 @@ -10,11 +10,11 @@ module CHoistingProblems !DEC$ ATTRIBUTES ALIAS: 'SetMotorFail' :: SetMotorFail implicit none type(CProblem), intent(in) :: v - MotorFail = SetDue(v, ChangeMotorFail) + HoistingProblems%MotorFail = SetDue(v, ChangeMotorFail) #ifdef deb - print*, 'MotorFail%ProblemType=', MotorFail%ProblemType - print*, 'MotorFail%StatusType=', MotorFail%StatusType - print*, 'MotorFail%Value=', MotorFail%Value + print*, 'MotorFail%ProblemType=', HoistingProblems%MotorFail%ProblemType + print*, 'MotorFail%StatusType=', HoistingProblems%MotorFail%StatusType + print*, 'MotorFail%Value=', HoistingProblems%MotorFail%Value #endif end subroutine @@ -23,11 +23,11 @@ module CHoistingProblems !DEC$ ATTRIBUTES ALIAS: 'SetClutchEngage' :: SetClutchEngage implicit none type(CProblem), intent(in) :: v - ClutchEngage = SetDue(v, ChangeClutchEngage) + HoistingProblems%ClutchEngage = SetDue(v, ChangeClutchEngage) #ifdef deb - print*, 'ClutchEngage%ProblemType=', ClutchEngage%ProblemType - print*, 'ClutchEngage%StatusType=', ClutchEngage%StatusType - print*, 'ClutchEngage%Value=', ClutchEngage%Value + print*, 'ClutchEngage%ProblemType=', HoistingProblems%ClutchEngage%ProblemType + print*, 'ClutchEngage%StatusType=', HoistingProblems%ClutchEngage%StatusType + print*, 'ClutchEngage%Value=', HoistingProblems%ClutchEngage%Value #endif end subroutine @@ -36,11 +36,11 @@ module CHoistingProblems !DEC$ ATTRIBUTES ALIAS: 'SetClutchDisengage' :: SetClutchDisengage implicit none type(CProblem), intent(in) :: v - ClutchDisengage = SetDue(v, ChangeClutchDisengage) + HoistingProblems%ClutchDisengage = SetDue(v, ChangeClutchDisengage) #ifdef deb - print*, 'ClutchDisengage%ProblemType=', ClutchDisengage%ProblemType - print*, 'ClutchDisengage%StatusType=', ClutchDisengage%StatusType - print*, 'ClutchDisengage%Value=', ClutchDisengage%Value + print*, 'ClutchDisengage%ProblemType=', HoistingProblems%ClutchDisengage%ProblemType + print*, 'ClutchDisengage%StatusType=', HoistingProblems%ClutchDisengage%StatusType + print*, 'ClutchDisengage%Value=', HoistingProblems%ClutchDisengage%Value #endif end subroutine diff --git a/CSharp/Problems/CHoistingProblemsVariables.f90 b/CSharp/Problems/CHoistingProblemsVariables.f90 index fa98360..e8d40f1 100644 --- a/CSharp/Problems/CHoistingProblemsVariables.f90 +++ b/CSharp/Problems/CHoistingProblemsVariables.f90 @@ -4,13 +4,15 @@ module CHoistingProblemsVariables public ! Input vars - type(CProblem) :: MotorFail - type(CProblem) :: ClutchEngage - type(CProblem) :: ClutchDisengage - - procedure (ActionInteger), pointer :: MotorFailPtr - procedure (ActionInteger), pointer :: ClutchEngagePtr - procedure (ActionInteger), pointer :: ClutchDisengagePtr + type :: HoistingProblemsType + type(CProblem) :: MotorFail + type(CProblem) :: ClutchEngage + type(CProblem) :: ClutchDisengage + end type HoistingProblemsType + type(HoistingProblemsType):: HoistingProblems + ! procedure (ActionInteger), pointer :: MotorFailPtr + ! procedure (ActionInteger), pointer :: ClutchEngagePtr + ! procedure (ActionInteger), pointer :: ClutchDisengagePtr contains @@ -18,33 +20,33 @@ module CHoistingProblemsVariables subroutine ProcessHoistingProblemsDueTime(time) implicit none integer :: time - if(MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(MotorFail, ChangeMotorFail, time) - if(ClutchEngage%ProblemType == Time_ProblemType) call ProcessDueTime(ClutchEngage, ChangeClutchEngage, time) - if(ClutchDisengage%ProblemType == Time_ProblemType) call ProcessDueTime(ClutchDisengage, ChangeClutchDisengage, time) + if(HoistingProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%MotorFail, ChangeMotorFail, time) + if(HoistingProblems%ClutchEngage%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%ClutchEngage, ChangeClutchEngage, time) + if(HoistingProblems%ClutchDisengage%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, time) end subroutine subroutine ProcessHoistingProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MotorFail, ChangeMotorFail, strokes) - if(ClutchEngage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ClutchEngage, ChangeClutchEngage, strokes) - if(ClutchDisengage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ClutchDisengage, ChangeClutchDisengage, strokes) + if(HoistingProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%MotorFail, ChangeMotorFail, strokes) + if(HoistingProblems%ClutchEngage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%ClutchEngage, ChangeClutchEngage, strokes) + if(HoistingProblems%ClutchDisengage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, strokes) end subroutine subroutine ProcessHoistingProblemsDueVolumePumped(volume) implicit none real(8) :: volume - if(MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MotorFail, ChangeMotorFail, volume) - if(ClutchEngage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ClutchEngage, ChangeClutchEngage, volume) - if(ClutchDisengage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ClutchDisengage, ChangeClutchDisengage, volume) + if(HoistingProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%MotorFail, ChangeMotorFail, volume) + if(HoistingProblems%ClutchEngage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%ClutchEngage, ChangeClutchEngage, volume) + if(HoistingProblems%ClutchDisengage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, volume) end subroutine subroutine ProcessHoistingProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance - if(MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MotorFail, ChangeMotorFail, distance) - if(ClutchEngage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ClutchEngage, ChangeClutchEngage, distance) - if(ClutchDisengage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ClutchDisengage, ChangeClutchDisengage, distance) + if(HoistingProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%MotorFail, ChangeMotorFail, distance) + if(HoistingProblems%ClutchEngage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%ClutchEngage, ChangeClutchEngage, distance) + if(HoistingProblems%ClutchDisengage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, distance) end subroutine @@ -56,7 +58,7 @@ module CHoistingProblemsVariables use Drawworks_VARIABLES implicit none integer, intent (in) :: status - if(associated(MotorFailPtr)) call MotorFailPtr(status) + ! if(associated(MotorFailPtr)) call MotorFailPtr(status) if(status == Clear_StatusType) Drawworks%MotorFaileMalf=0 if(status == Executed_StatusType) Drawworks%MotorFaileMalf=1 endsubroutine @@ -65,7 +67,7 @@ module CHoistingProblemsVariables use Drawworks_VARIABLES implicit none integer, intent (in) :: status - if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status) + ! if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status) if(status == Clear_StatusType) Drawworks%ClutchEngageMalf=0 if(status == Executed_StatusType) Drawworks%ClutchEngageMalf=1 endsubroutine @@ -74,7 +76,7 @@ module CHoistingProblemsVariables use Drawworks_VARIABLES implicit none integer, intent (in) :: status - if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status) + ! if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status) if(status == Clear_StatusType) Drawworks%ClutchDisengageMalf=0 if(status == Executed_StatusType) Drawworks%ClutchDisengageMalf=1 endsubroutine @@ -88,29 +90,29 @@ module CHoistingProblemsVariables - subroutine SubscribeMotorFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail' :: SubscribeMotorFail - implicit none - procedure (ActionInteger) :: v - MotorFailPtr => v - end subroutine + ! subroutine SubscribeMotorFail(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail' :: SubscribeMotorFail + ! implicit none + ! procedure (ActionInteger) :: v + ! MotorFailPtr => v + ! end subroutine - subroutine SubscribeClutchEngage(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchEngage - !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchEngage' :: SubscribeClutchEngage - implicit none - procedure (ActionInteger) :: v - ClutchEngagePtr => v - end subroutine + ! subroutine SubscribeClutchEngage(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchEngage + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchEngage' :: SubscribeClutchEngage + ! implicit none + ! procedure (ActionInteger) :: v + ! ClutchEngagePtr => v + ! end subroutine - subroutine SubscribeClutchDisengage(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchDisengage - !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchDisengage' :: SubscribeClutchDisengage - implicit none - procedure (ActionInteger) :: v - ClutchDisengagePtr => v - end subroutine + ! subroutine SubscribeClutchDisengage(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchDisengage + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchDisengage' :: SubscribeClutchDisengage + ! implicit none + ! procedure (ActionInteger) :: v + ! ClutchDisengagePtr => v + ! end subroutine end module CHoistingProblemsVariables \ No newline at end of file diff --git a/CSharp/Problems/CKickProblems.f90 b/CSharp/Problems/CKickProblems.f90 index e4b913b..6728f3b 100644 --- a/CSharp/Problems/CKickProblems.f90 +++ b/CSharp/Problems/CKickProblems.f90 @@ -10,11 +10,11 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetKick' :: SetKick implicit none type(CProblem), intent(in) :: v - Kick = SetDue(v, ChangeKick) + KickProblems%Kick = SetDue(v, ChangeKick) #ifdef deb - print*, 'Kick%ProblemType=', Kick%ProblemType - print*, 'Kick%StatusType=', Kick%StatusType - print*, 'Kick%Value=', Kick%Value + print*, 'Kick%ProblemType=', KickProblems%Kick%ProblemType + print*, 'Kick%StatusType=', KickProblems%Kick%StatusType + print*, 'Kick%Value=', KickProblems%Kick%Value #endif end subroutine @@ -23,9 +23,9 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetFluidTypeP' :: SetFluidTypeP implicit none integer, intent(in) :: v - FluidType = v + KickProblems%FluidType = v #ifdef deb - print*, 'FluidType=', FluidType + print*, 'FluidType=', KickProblems%FluidType #endif end subroutine @@ -34,9 +34,9 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetFlowRateP' :: SetFlowRateP implicit none real*8, intent(in) :: v - FlowRate = v + KickProblems%FlowRate = v #ifdef deb - print*, 'FlowRate=', FlowRate + print*, 'FlowRate=', KickProblems%FlowRate #endif end subroutine @@ -45,9 +45,9 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetOverBalancePressure' :: SetOverBalancePressure implicit none real*8, intent(in) :: v - OverBalancePressure = v + KickProblems%OverBalancePressure = v #ifdef deb - print*, 'OverBalancePressure=', OverBalancePressure + print*, 'OverBalancePressure=', KickProblems%OverBalancePressure #endif end subroutine @@ -56,9 +56,9 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetIsAutoMigrationRateSelectedP' :: SetIsAutoMigrationRateSelectedP implicit none logical, intent(in) :: v - IsAutoMigrationRateSelected = v + KickProblems%IsAutoMigrationRateSelected = v #ifdef deb - print*, 'IsAutoMigrationRateSelected=', IsAutoMigrationRateSelected + print*, 'IsAutoMigrationRateSelected=', KickProblems%IsAutoMigrationRateSelected #endif end subroutine @@ -67,9 +67,9 @@ module CKickProblems !DEC$ ATTRIBUTES ALIAS: 'SetAutoMigrationRateP' :: SetAutoMigrationRateP implicit none real*8, intent(in) :: v - AutoMigrationRate = v + KickProblems%AutoMigrationRate = v #ifdef deb - print*, 'AutoMigrationRate=', AutoMigrationRate + print*, 'AutoMigrationRate=', KickProblems%AutoMigrationRate #endif end subroutine diff --git a/CSharp/Problems/CKickProblemsVariables.f90 b/CSharp/Problems/CKickProblemsVariables.f90 index 3eae2d9..e5fd098 100644 --- a/CSharp/Problems/CKickProblemsVariables.f90 +++ b/CSharp/Problems/CKickProblemsVariables.f90 @@ -10,14 +10,16 @@ module CKickProblemsVariables ! Input vars - type(CProblem) :: Kick - integer :: FluidType - integer :: FlowRate - integer :: OverBalancePressure - logical :: IsAutoMigrationRateSelected - real(8) :: AutoMigrationRate - - procedure (ActionInteger), pointer :: KickPtr + type :: KickProblemsType + type(CProblem) :: Kick + integer :: FluidType + integer :: FlowRate + integer :: OverBalancePressure + logical :: IsAutoMigrationRateSelected + real(8) :: AutoMigrationRate + end type KickProblemsType + type(KickProblemsType)::KickProblems + ! procedure (ActionInteger), pointer :: KickPtr contains @@ -26,7 +28,7 @@ module CKickProblemsVariables implicit none integer :: time - if(Kick%ProblemType == Time_ProblemType) call ProcessDueTime(Kick, ChangeKick, time) + if(KickProblems%Kick%ProblemType == Time_ProblemType) call ProcessDueTime(KickProblems%Kick, ChangeKick, time) end subroutine @@ -34,7 +36,7 @@ module CKickProblemsVariables implicit none integer :: strokes - if(Kick%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Kick, ChangeKick, strokes) + if(KickProblems%Kick%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(KickProblems%Kick, ChangeKick, strokes) end subroutine @@ -42,7 +44,7 @@ module CKickProblemsVariables implicit none real(8) :: volume - if(Kick%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Kick, ChangeKick, volume) + if(KickProblems%Kick%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(KickProblems%Kick, ChangeKick, volume) end subroutine @@ -50,14 +52,14 @@ module CKickProblemsVariables implicit none real(8) :: distance - if(Kick%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Kick, ChangeKick, distance) + if(KickProblems%Kick%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(KickProblems%Kick, ChangeKick, distance) end subroutine subroutine ChangeKick(status) implicit none integer, intent (in) :: status - if(associated(KickPtr)) call KickPtr(status) + ! if(associated(KickProblems%KickPtr)) call KickProblems%KickPtr(status) !if(status == Clear_StatusType) print*,'On_Kick_Clear' !if(status == Executed_StatusType) print*,'On_Kick_Execute' endsubroutine @@ -73,13 +75,13 @@ module CKickProblemsVariables - subroutine SubscribeKick(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeKick - !DEC$ ATTRIBUTES ALIAS: 'SubscribeKick' :: SubscribeKick - implicit none - procedure (ActionInteger) :: v - KickPtr => v - end subroutine + ! subroutine SubscribeKick(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeKick + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeKick' :: SubscribeKick + ! implicit none + ! procedure (ActionInteger) :: v + ! KickProblems%KickPtr => v + ! end subroutine diff --git a/CSharp/Problems/CLostProblems.f90 b/CSharp/Problems/CLostProblems.f90 index fd28a11..7401864 100644 --- a/CSharp/Problems/CLostProblems.f90 +++ b/CSharp/Problems/CLostProblems.f90 @@ -10,11 +10,11 @@ module CLostProblems !DEC$ ATTRIBUTES ALIAS: 'SetLostCirculation' :: SetLostCirculation implicit none type(CProblem), intent(in) :: v - LostCirculation = SetDue(v, ChangeLostCirculation) + LostProblems%LostCirculation = SetDue(v, ChangeLostCirculation) #ifdef deb - print*, 'LostCirculation%ProblemType=', LostCirculation%ProblemType - print*, 'LostCirculation%StatusType=', LostCirculation%StatusType - print*, 'LostCirculation%Value=', LostCirculation%Value + print*, 'LostCirculation%ProblemType=', LostProblems%LostCirculation%ProblemType + print*, 'LostCirculation%StatusType=', LostProblems%LostCirculation%StatusType + print*, 'LostCirculation%Value=', LostProblems%LostCirculation%Value #endif end subroutine @@ -23,9 +23,9 @@ module CLostProblems !DEC$ ATTRIBUTES ALIAS: 'SetFlowRate' :: SetFlowRate implicit none real*8, intent(in) :: v - FlowRate = v + LostProblems%FlowRate = v #ifdef deb - print*, 'FlowRate=', FlowRate + print*, 'FlowRate=', LostProblems%FlowRate #endif end subroutine diff --git a/CSharp/Problems/CLostProblemsVariables.f90 b/CSharp/Problems/CLostProblemsVariables.f90 index aae9ca9..e3f296e 100644 --- a/CSharp/Problems/CLostProblemsVariables.f90 +++ b/CSharp/Problems/CLostProblemsVariables.f90 @@ -1,29 +1,30 @@ module CLostProblemsVariables use CProblemDifinition implicit none - public + public ! Input vars - type(CProblem) :: LostCirculation - real(8) :: FlowRate + type::LostProblemsType + type(CProblem) :: LostCirculation + real(8) :: FlowRate + end type LostProblemsType + type(LostProblemsType)::LostProblems - procedure (ActionInteger), pointer :: LostCirculationPtr + ! procedure (ActionInteger), pointer :: LostCirculationPtr contains subroutine ProcessLostProblemsDueTime(time) implicit none integer :: time - - if(LostCirculation%ProblemType == Time_ProblemType) call ProcessDueTime(LostCirculation, ChangeLostCirculation, time) - + if(LostProblems%LostCirculation%ProblemType == Time_ProblemType) call ProcessDueTime(LostProblems%LostCirculation, ChangeLostCirculation, time) end subroutine subroutine ProcessLostProblemsDuePumpStrokes(strokes) implicit none integer :: strokes - if(LostCirculation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LostCirculation, ChangeLostCirculation, strokes) + if(LostProblems%LostCirculation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LostProblems%LostCirculation, ChangeLostCirculation, strokes) end subroutine @@ -31,7 +32,7 @@ module CLostProblemsVariables implicit none real(8) :: volume - if(LostCirculation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LostCirculation, ChangeLostCirculation, volume) + if(LostProblems%LostCirculation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LostProblems%LostCirculation, ChangeLostCirculation, volume) end subroutine @@ -39,7 +40,7 @@ module CLostProblemsVariables implicit none real(8) :: distance - if(LostCirculation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LostCirculation, ChangeLostCirculation, distance) + if(LostProblems%LostCirculation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LostProblems%LostCirculation, ChangeLostCirculation, distance) end subroutine @@ -49,7 +50,7 @@ module CLostProblemsVariables subroutine ChangeLostCirculation(status) implicit none integer, intent (in) :: status - if(associated(LostCirculationPtr)) call LostCirculationPtr(status) + ! if(associated(LostCirculationPtr)) call LostCirculationPtr(status) !if(status == Clear_StatusType) print*,'On_LostCirculation_Clear' !if(status == Executed_StatusType) print*,'On_LostCirculation_Execute' endsubroutine @@ -62,12 +63,12 @@ module CLostProblemsVariables - subroutine SubscribeLostCirculation(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLostCirculation - !DEC$ ATTRIBUTES ALIAS: 'SubscribeLostCirculation' :: SubscribeLostCirculation - implicit none - procedure (ActionInteger) :: v - LostCirculationPtr => v - end subroutine + ! subroutine SubscribeLostCirculation(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLostCirculation + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeLostCirculation' :: SubscribeLostCirculation + ! implicit none + ! procedure (ActionInteger) :: v + ! LostCirculationPtr => v + ! end subroutine end module CLostProblemsVariables \ No newline at end of file diff --git a/CSharp/Problems/CMudTreatmentProblems.f90 b/CSharp/Problems/CMudTreatmentProblems.f90 index 2b1f5bd..4a174b9 100644 --- a/CSharp/Problems/CMudTreatmentProblems.f90 +++ b/CSharp/Problems/CMudTreatmentProblems.f90 @@ -10,7 +10,7 @@ module CMudTreatmentProblems !DEC$ ATTRIBUTES ALIAS: 'SetDegasser' :: SetDegasser implicit none type(CProblem), intent(in) :: v - Degasser = SetDue(v, ChangeDegasser) + MudTreatmentProblems%Degasser = SetDue(v, ChangeDegasser) #ifdef deb print*, 'Degasser%ProblemType=', V%ProblemType print*, 'Degasser%StatusType=', V%StatusType @@ -23,7 +23,7 @@ module CMudTreatmentProblems !DEC$ ATTRIBUTES ALIAS: 'SetShaleShaker' :: SetShaleShaker implicit none type(CProblem), intent(in) :: v - ShaleShaker = SetDue(v, ChangeShaleShaker) + MudTreatmentProblems%ShaleShaker = SetDue(v, ChangeShaleShaker) #ifdef deb print*, 'ShaleShaker%ProblemType=', V%ProblemType print*, 'ShaleShaker%StatusType=', V%StatusType @@ -36,7 +36,7 @@ module CMudTreatmentProblems !DEC$ ATTRIBUTES ALIAS: 'SetDesander' :: SetDesander implicit none type(CProblem), intent(in) :: v - Desander = SetDue(v, ChangeDesander) + MudTreatmentProblems%Desander = SetDue(v, ChangeDesander) #ifdef deb print*, 'Desander%ProblemType=', V%ProblemType print*, 'Desander%StatusType=', V%StatusType @@ -49,7 +49,7 @@ module CMudTreatmentProblems !DEC$ ATTRIBUTES ALIAS: 'SetDesilter' :: SetDesilter implicit none type(CProblem), intent(in) :: v - Desilter = SetDue(v, ChangeDesilter) + MudTreatmentProblems%Desilter = SetDue(v, ChangeDesilter) #ifdef deb print*, 'Desilter%ProblemType=', V%ProblemType print*, 'Desilter%StatusType=', V%StatusType diff --git a/CSharp/Problems/CMudTreatmentProblemsVariables.f90 b/CSharp/Problems/CMudTreatmentProblemsVariables.f90 index 9be98eb..15a9761 100644 --- a/CSharp/Problems/CMudTreatmentProblemsVariables.f90 +++ b/CSharp/Problems/CMudTreatmentProblemsVariables.f90 @@ -4,16 +4,18 @@ module CMudTreatmentProblemsVariables public ! Input vars - type(CProblem) :: Degasser - type(CProblem) :: ShaleShaker - type(CProblem) :: Desander - type(CProblem) :: Desilter + Type::MudTreatmentProblemsType + type(CProblem) :: Degasser + type(CProblem) :: ShaleShaker + type(CProblem) :: Desander + type(CProblem) :: Desilter + end type MudTreatmentProblemsType + type(MudTreatmentProblemsType)::MudTreatmentProblems - - procedure (ActionInteger), pointer :: DegasserPtr - procedure (ActionInteger), pointer :: ShaleShakerPtr - procedure (ActionInteger), pointer :: DesanderPtr - procedure (ActionInteger), pointer :: DesilterPtr + ! procedure (ActionInteger), pointer :: DegasserPtr + ! procedure (ActionInteger), pointer :: ShaleShakerPtr + ! procedure (ActionInteger), pointer :: DesanderPtr + ! procedure (ActionInteger), pointer :: DesilterPtr contains @@ -21,10 +23,10 @@ module CMudTreatmentProblemsVariables implicit none integer :: time - if(Degasser%ProblemType == Time_ProblemType) call ProcessDueTime(Degasser, ChangeDegasser, time) - if(ShaleShaker%ProblemType == Time_ProblemType) call ProcessDueTime(ShaleShaker, ChangeShaleShaker, time) - if(Desander%ProblemType == Time_ProblemType) call ProcessDueTime(Desander, ChangeDesander, time) - if(Desilter%ProblemType == Time_ProblemType) call ProcessDueTime(Desilter, ChangeDesilter, time) + if(MudTreatmentProblems%Degasser%ProblemType == Time_ProblemType) call ProcessDueTime(MudTreatmentProblems%Degasser, ChangeDegasser, time) + if(MudTreatmentProblems%ShaleShaker%ProblemType == Time_ProblemType) call ProcessDueTime(MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, time) + if(MudTreatmentProblems%Desander%ProblemType == Time_ProblemType) call ProcessDueTime(MudTreatmentProblems%Desander, ChangeDesander, time) + if(MudTreatmentProblems%Desilter%ProblemType == Time_ProblemType) call ProcessDueTime(MudTreatmentProblems%Desilter, ChangeDesilter, time) end subroutine @@ -33,10 +35,10 @@ module CMudTreatmentProblemsVariables implicit none integer :: strokes - if(Degasser%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Degasser, ChangeDegasser, strokes) - if(ShaleShaker%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ShaleShaker, ChangeShaleShaker, strokes) - if(Desander%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Desander, ChangeDesander, strokes) - if(Desilter%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Desilter, ChangeDesilter, strokes) + if(MudTreatmentProblems%Degasser%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTreatmentProblems%Degasser, ChangeDegasser, strokes) + if(MudTreatmentProblems%ShaleShaker%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, strokes) + if(MudTreatmentProblems%Desander%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTreatmentProblems%Desander, ChangeDesander, strokes) + if(MudTreatmentProblems%Desilter%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTreatmentProblems%Desilter, ChangeDesilter, strokes) end subroutine @@ -45,10 +47,10 @@ module CMudTreatmentProblemsVariables implicit none real(8) :: volume - if(Degasser%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Degasser, ChangeDegasser, volume) - if(ShaleShaker%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ShaleShaker, ChangeShaleShaker, volume) - if(Desander%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Desander, ChangeDesander, volume) - if(Desilter%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Desilter, ChangeDesilter, volume) + if(MudTreatmentProblems%Degasser%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTreatmentProblems%Degasser, ChangeDegasser, volume) + if(MudTreatmentProblems%ShaleShaker%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, volume) + if(MudTreatmentProblems%Desander%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTreatmentProblems%Desander, ChangeDesander, volume) + if(MudTreatmentProblems%Desilter%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTreatmentProblems%Desilter, ChangeDesilter, volume) end subroutine @@ -56,10 +58,10 @@ module CMudTreatmentProblemsVariables implicit none real(8) :: distance - if(Degasser%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Degasser, ChangeDegasser, distance) - if(ShaleShaker%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ShaleShaker, ChangeShaleShaker, distance) - if(Desander%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Desander, ChangeDesander, distance) - if(Desilter%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Desilter, ChangeDesilter, distance) + if(MudTreatmentProblems%Degasser%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTreatmentProblems%Degasser, ChangeDegasser, distance) + if(MudTreatmentProblems%ShaleShaker%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, distance) + if(MudTreatmentProblems%Desander%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTreatmentProblems%Desander, ChangeDesander, distance) + if(MudTreatmentProblems%Desilter%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTreatmentProblems%Desilter, ChangeDesilter, distance) end subroutine @@ -72,7 +74,7 @@ module CMudTreatmentProblemsVariables subroutine ChangeDegasser(status) implicit none integer, intent (in) :: status - if(associated(DegasserPtr)) call DegasserPtr(status) + !if(associated(DegasserPtr)) call DegasserPtr(status) !if(status == Clear_StatusType) print*,'On_Degasser_Clear' !if(status == Executed_StatusType) print*,'On_Degasser_Execute' endsubroutine @@ -80,7 +82,7 @@ module CMudTreatmentProblemsVariables subroutine ChangeShaleShaker(status) implicit none integer, intent (in) :: status - if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status) + !if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status) !if(status == Clear_StatusType) print*,'On_ShaleShaker_Clear' !if(status == Executed_StatusType) print*,'On_ShaleShaker_Execute' endsubroutine @@ -88,7 +90,7 @@ module CMudTreatmentProblemsVariables subroutine ChangeDesander(status) implicit none integer, intent (in) :: status - if(associated(DesanderPtr)) call DesanderPtr(status) + !if(associated(DesanderPtr)) call DesanderPtr(status) !if(status == Clear_StatusType) print*,'On_Desander_Clear' !if(status == Executed_StatusType) print*,'On_Desander_Execute' endsubroutine @@ -96,7 +98,7 @@ module CMudTreatmentProblemsVariables subroutine ChangeDesilter(status) implicit none integer, intent (in) :: status - if(associated(DesilterPtr)) call DesilterPtr(status) + !if(associated(DesilterPtr)) call DesilterPtr(status) !if(status == Clear_StatusType) print*,'On_Desilter_Clear' !if(status == Executed_StatusType) print*,'On_Desilter_Execute' endsubroutine @@ -116,37 +118,37 @@ module CMudTreatmentProblemsVariables - subroutine SubscribeDegasser(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDegasser - !DEC$ ATTRIBUTES ALIAS: 'SubscribeDegasser' :: SubscribeDegasser - implicit none - procedure (ActionInteger) :: v - DegasserPtr => v - end subroutine + ! subroutine SubscribeDegasser(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDegasser + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeDegasser' :: SubscribeDegasser + ! implicit none + ! procedure (ActionInteger) :: v + ! DegasserPtr => v + ! end subroutine - subroutine SubscribeShaleShaker(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeShaleShaker - !DEC$ ATTRIBUTES ALIAS: 'SubscribeShaleShaker' :: SubscribeShaleShaker - implicit none - procedure (ActionInteger) :: v - ShaleShakerPtr => v - end subroutine + ! subroutine SubscribeShaleShaker(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeShaleShaker + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeShaleShaker' :: SubscribeShaleShaker + ! implicit none + ! procedure (ActionInteger) :: v + ! ShaleShakerPtr => v + ! end subroutine - subroutine SubscribeDesander(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesander - !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesander' :: SubscribeDesander - implicit none - procedure (ActionInteger) :: v - DesanderPtr => v - end subroutine + ! subroutine SubscribeDesander(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesander + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesander' :: SubscribeDesander + ! implicit none + ! procedure (ActionInteger) :: v + ! DesanderPtr => v + ! end subroutine - subroutine SubscribeDesilter(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesilter - !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesilter' :: SubscribeDesilter - implicit none - procedure (ActionInteger) :: v - DesilterPtr => v - end subroutine + ! subroutine SubscribeDesilter(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesilter + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesilter' :: SubscribeDesilter + ! implicit none + ! procedure (ActionInteger) :: v + ! DesilterPtr => v + ! end subroutine diff --git a/CSharp/Problems/COtherProblems.f90 b/CSharp/Problems/COtherProblems.f90 index 4dd4a5b..7e618fe 100644 --- a/CSharp/Problems/COtherProblems.f90 +++ b/CSharp/Problems/COtherProblems.f90 @@ -10,7 +10,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetRigAlarm' :: SetRigAlarm implicit none type(CProblem), intent(in) :: v - RigAlarm = SetDue(v, ChangeRigAlarm) + OtherProblems%RigAlarm = SetDue(v, ChangeRigAlarm) #ifdef deb print*, 'RigAlarm%ProblemType=', V%ProblemType print*, 'RigAlarm%StatusType=', V%StatusType @@ -23,7 +23,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetRigWaterSupply' :: SetRigWaterSupply implicit none type(CProblem), intent(in) :: v - RigWaterSupply = SetDue(v, ChangeRigWaterSupply) + OtherProblems%RigWaterSupply = SetDue(v, ChangeRigWaterSupply) #ifdef deb print*, 'RigWaterSupply%ProblemType=', V%ProblemType print*, 'RigWaterSupply%StatusType=', V%StatusType @@ -36,7 +36,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetRigAir' :: SetRigAir implicit none type(CProblem), intent(in) :: v - RigAir = SetDue(v, ChangeRigAir) + OtherProblems%RigAir = SetDue(v, ChangeRigAir) #ifdef deb print*, 'RigAir%ProblemType=', V%ProblemType print*, 'RigAir%StatusType=', V%StatusType @@ -49,7 +49,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetGen1' :: SetGen1 implicit none type(CProblem), intent(in) :: v - Gen1 = SetDue(v, ChangeGen1) + OtherProblems%Gen1 = SetDue(v, ChangeGen1) #ifdef deb print*, 'Gen1%ProblemType=', V%ProblemType print*, 'Gen1%StatusType=', V%StatusType @@ -62,7 +62,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetGen2' :: SetGen2 implicit none type(CProblem), intent(in) :: v - Gen2 = SetDue(v, ChangeGen2) + OtherProblems%Gen2 = SetDue(v, ChangeGen2) #ifdef deb print*, 'Gen2%ProblemType=', V%ProblemType print*, 'Gen2%StatusType=', V%StatusType @@ -75,7 +75,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetGen3' :: SetGen3 implicit none type(CProblem), intent(in) :: v - Gen3 = SetDue(v, ChangeGen3) + OtherProblems%Gen3 = SetDue(v, ChangeGen3) #ifdef deb print*, 'Gen3%ProblemType=', V%ProblemType print*, 'Gen3%StatusType=', V%StatusType @@ -88,7 +88,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetGen4' :: SetGen4 implicit none type(CProblem), intent(in) :: v - Gen4 = SetDue(v, ChangeGen4) + OtherProblems%Gen4 = SetDue(v, ChangeGen4) #ifdef deb print*, 'Gen4%ProblemType=', V%ProblemType print*, 'Gen4%StatusType=', V%StatusType @@ -101,7 +101,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetScr1' :: SetScr1 implicit none type(CProblem), intent(in) :: v - Scr1 = SetDue(v, ChangeScr1) + OtherProblems%Scr1 = SetDue(v, ChangeScr1) #ifdef deb print*, 'Scr1%ProblemType=', V%ProblemType print*, 'Scr1%StatusType=', V%StatusType @@ -114,7 +114,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetScr2' :: SetScr2 implicit none type(CProblem), intent(in) :: v - Scr2 = SetDue(v, ChangeScr2) + OtherProblems%Scr2 = SetDue(v, ChangeScr2) #ifdef deb print*, 'Scr2%ProblemType=', V%ProblemType print*, 'Scr2%StatusType=', V%StatusType @@ -127,7 +127,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetScr3' :: SetScr3 implicit none type(CProblem), intent(in) :: v - Scr3 = SetDue(v, ChangeScr3) + OtherProblems%Scr3 = SetDue(v, ChangeScr3) #ifdef deb print*, 'Scr3%ProblemType=', V%ProblemType print*, 'Scr3%StatusType=', V%StatusType @@ -140,7 +140,7 @@ module COtherProblems !DEC$ ATTRIBUTES ALIAS: 'SetScr4' :: SetScr4 implicit none type(CProblem), intent(in) :: v - Scr4 = SetDue(v, ChangeScr4) + OtherProblems%Scr4 = SetDue(v, ChangeScr4) #ifdef deb print*, 'Scr4%ProblemType=', V%ProblemType print*, 'Scr4%StatusType=', V%StatusType diff --git a/CSharp/Problems/COtherProblemsVariables.f90 b/CSharp/Problems/COtherProblemsVariables.f90 index f3a158d..e93e491 100644 --- a/CSharp/Problems/COtherProblemsVariables.f90 +++ b/CSharp/Problems/COtherProblemsVariables.f90 @@ -4,29 +4,31 @@ module COtherProblemsVariables public ! Input vars - type(CProblem) :: RigAlarm - type(CProblem) :: RigWaterSupply - type(CProblem) :: RigAir - type(CProblem) :: Gen1 - type(CProblem) :: Gen2 - type(CProblem) :: Gen3 - type(CProblem) :: Gen4 - type(CProblem) :: Scr1 - type(CProblem) :: Scr2 - type(CProblem) :: Scr3 - type(CProblem) :: Scr4 - - procedure (ActionInteger), pointer :: RigAlarmPtr - procedure (ActionInteger), pointer :: RigWaterSupplyPtr - procedure (ActionInteger), pointer :: RigAirPtr - procedure (ActionInteger), pointer :: Gen1Ptr - procedure (ActionInteger), pointer :: Gen2Ptr - procedure (ActionInteger), pointer :: Gen3Ptr - procedure (ActionInteger), pointer :: Gen4Ptr - procedure (ActionInteger), pointer :: Scr1Ptr - procedure (ActionInteger), pointer :: Scr2Ptr - procedure (ActionInteger), pointer :: Scr3Ptr - procedure (ActionInteger), pointer :: Scr4Ptr + TYPE:: OtherProblemsType + type(CProblem) :: RigAlarm + type(CProblem) :: RigWaterSupply + type(CProblem) :: RigAir + type(CProblem) :: Gen1 + type(CProblem) :: Gen2 + type(CProblem) :: Gen3 + type(CProblem) :: Gen4 + type(CProblem) :: Scr1 + type(CProblem) :: Scr2 + type(CProblem) :: Scr3 + type(CProblem) :: Scr4 + end type OtherProblemsType + type(OtherProblemsType)::OtherProblems + ! procedure (ActionInteger), pointer :: RigAlarmPtr + ! procedure (ActionInteger), pointer :: RigWaterSupplyPtr + ! procedure (ActionInteger), pointer :: RigAirPtr + ! procedure (ActionInteger), pointer :: Gen1Ptr + ! procedure (ActionInteger), pointer :: Gen2Ptr + ! procedure (ActionInteger), pointer :: Gen3Ptr + ! procedure (ActionInteger), pointer :: Gen4Ptr + ! procedure (ActionInteger), pointer :: Scr1Ptr + ! procedure (ActionInteger), pointer :: Scr2Ptr + ! procedure (ActionInteger), pointer :: Scr3Ptr + ! procedure (ActionInteger), pointer :: Scr4Ptr contains @@ -34,17 +36,17 @@ module COtherProblemsVariables implicit none integer :: time - if(RigAlarm%ProblemType == Time_ProblemType) call ProcessDueTime(RigAlarm, ChangeRigAlarm, time) - if(RigWaterSupply%ProblemType == Time_ProblemType) call ProcessDueTime(RigWaterSupply, ChangeRigWaterSupply, time) - if(RigAir%ProblemType == Time_ProblemType) call ProcessDueTime(RigAir, ChangeRigAir, time) - if(Gen1%ProblemType == Time_ProblemType) call ProcessDueTime(Gen1, ChangeGen1, time) - if(Gen2%ProblemType == Time_ProblemType) call ProcessDueTime(Gen2, ChangeGen2, time) - if(Gen3%ProblemType == Time_ProblemType) call ProcessDueTime(Gen3, ChangeGen3, time) - if(Gen4%ProblemType == Time_ProblemType) call ProcessDueTime(Gen4, ChangeGen4, time) - if(Scr1%ProblemType == Time_ProblemType) call ProcessDueTime(Scr1, ChangeScr1, time) - if(Scr2%ProblemType == Time_ProblemType) call ProcessDueTime(Scr2, ChangeScr2, time) - if(Scr3%ProblemType == Time_ProblemType) call ProcessDueTime(Scr3, ChangeScr3, time) - if(Scr4%ProblemType == Time_ProblemType) call ProcessDueTime(Scr4, ChangeScr4, time) + if(OtherProblems%RigAlarm%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%RigAlarm, ChangeRigAlarm, time) + if(OtherProblems%RigWaterSupply%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%RigWaterSupply, ChangeRigWaterSupply, time) + if(OtherProblems%RigAir%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%RigAir, ChangeRigAir, time) + if(OtherProblems%Gen1%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Gen1, ChangeGen1, time) + if(OtherProblems%Gen2%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Gen2, ChangeGen2, time) + if(OtherProblems%Gen3%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Gen3, ChangeGen3, time) + if(OtherProblems%Gen4%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Gen4, ChangeGen4, time) + if(OtherProblems%Scr1%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Scr1, ChangeScr1, time) + if(OtherProblems%Scr2%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Scr2, ChangeScr2, time) + if(OtherProblems%Scr3%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Scr3, ChangeScr3, time) + if(OtherProblems%Scr4%ProblemType == Time_ProblemType) call ProcessDueTime(OtherProblems%Scr4, ChangeScr4, time) end subroutine @@ -52,17 +54,17 @@ module COtherProblemsVariables implicit none integer :: strokes - if(RigAlarm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RigAlarm, ChangeRigAlarm, strokes) - if(RigWaterSupply%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RigWaterSupply, ChangeRigWaterSupply, strokes) - if(RigAir%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RigAir, ChangeRigAir, strokes) - if(Gen1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Gen1, ChangeGen1, strokes) - if(Gen2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Gen2, ChangeGen2, strokes) - if(Gen3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Gen3, ChangeGen3, strokes) - if(Gen4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Gen4, ChangeGen4, strokes) - if(Scr1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Scr1, ChangeScr1, strokes) - if(Scr2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Scr2, ChangeScr2, strokes) - if(Scr3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Scr3, ChangeScr3, strokes) - if(Scr4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Scr4, ChangeScr4, strokes) + if(OtherProblems%RigAlarm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%RigAlarm, ChangeRigAlarm, strokes) + if(OtherProblems%RigWaterSupply%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%RigWaterSupply, ChangeRigWaterSupply, strokes) + if(OtherProblems%RigAir%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%RigAir, ChangeRigAir, strokes) + if(OtherProblems%Gen1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Gen1, ChangeGen1, strokes) + if(OtherProblems%Gen2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Gen2, ChangeGen2, strokes) + if(OtherProblems%Gen3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Gen3, ChangeGen3, strokes) + if(OtherProblems%Gen4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Gen4, ChangeGen4, strokes) + if(OtherProblems%Scr1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Scr1, ChangeScr1, strokes) + if(OtherProblems%Scr2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Scr2, ChangeScr2, strokes) + if(OtherProblems%Scr3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Scr3, ChangeScr3, strokes) + if(OtherProblems%Scr4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OtherProblems%Scr4, ChangeScr4, strokes) end subroutine @@ -70,17 +72,17 @@ module COtherProblemsVariables implicit none real(8) :: volume - if(RigAlarm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RigAlarm, ChangeRigAlarm, volume) - if(RigWaterSupply%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RigWaterSupply, ChangeRigWaterSupply, volume) - if(RigAir%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RigAir, ChangeRigAir, volume) - if(Gen1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Gen1, ChangeGen1, volume) - if(Gen2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Gen2, ChangeGen2, volume) - if(Gen3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Gen3, ChangeGen3, volume) - if(Gen4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Gen4, ChangeGen4, volume) - if(Scr1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Scr1, ChangeScr1, volume) - if(Scr2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Scr2, ChangeScr2, volume) - if(Scr3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Scr3, ChangeScr3, volume) - if(Scr4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Scr4, ChangeScr4, volume) + if(OtherProblems%RigAlarm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%RigAlarm, ChangeRigAlarm, volume) + if(OtherProblems%RigWaterSupply%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%RigWaterSupply, ChangeRigWaterSupply, volume) + if(OtherProblems%RigAir%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%RigAir, ChangeRigAir, volume) + if(OtherProblems%Gen1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Gen1, ChangeGen1, volume) + if(OtherProblems%Gen2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Gen2, ChangeGen2, volume) + if(OtherProblems%Gen3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Gen3, ChangeGen3, volume) + if(OtherProblems%Gen4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Gen4, ChangeGen4, volume) + if(OtherProblems%Scr1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Scr1, ChangeScr1, volume) + if(OtherProblems%Scr2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Scr2, ChangeScr2, volume) + if(OtherProblems%Scr3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Scr3, ChangeScr3, volume) + if(OtherProblems%Scr4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OtherProblems%Scr4, ChangeScr4, volume) end subroutine @@ -88,17 +90,17 @@ module COtherProblemsVariables implicit none real(8) :: distance - if(RigAlarm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RigAlarm, ChangeRigAlarm, distance) - if(RigWaterSupply%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RigWaterSupply, ChangeRigWaterSupply, distance) - if(RigAir%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RigAir, ChangeRigAir, distance) - if(Gen1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Gen1, ChangeGen1, distance) - if(Gen2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Gen2, ChangeGen2, distance) - if(Gen3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Gen3, ChangeGen3, distance) - if(Gen4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Gen4, ChangeGen4, distance) - if(Scr1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Scr1, ChangeScr1, distance) - if(Scr2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Scr2, ChangeScr2, distance) - if(Scr3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Scr3, ChangeScr3, distance) - if(Scr4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Scr4, ChangeScr4, distance) + if(OtherProblems%RigAlarm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%RigAlarm, ChangeRigAlarm, distance) + if(OtherProblems%RigWaterSupply%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%RigWaterSupply, ChangeRigWaterSupply, distance) + if(OtherProblems%RigAir%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%RigAir, ChangeRigAir, distance) + if(OtherProblems%Gen1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Gen1, ChangeGen1, distance) + if(OtherProblems%Gen2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Gen2, ChangeGen2, distance) + if(OtherProblems%Gen3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Gen3, ChangeGen3, distance) + if(OtherProblems%Gen4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Gen4, ChangeGen4, distance) + if(OtherProblems%Scr1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Scr1, ChangeScr1, distance) + if(OtherProblems%Scr2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Scr2, ChangeScr2, distance) + if(OtherProblems%Scr3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Scr3, ChangeScr3, distance) + if(OtherProblems%Scr4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OtherProblems%Scr4, ChangeScr4, distance) end subroutine @@ -106,7 +108,7 @@ module COtherProblemsVariables subroutine ChangeRigAlarm(status) implicit none integer, intent (in) :: status - if(associated(RigAlarmPtr)) call RigAlarmPtr(status) + !if(associated(RigAlarmPtr)) call RigAlarmPtr(status) !if(status == Clear_StatusType) print*,'On_RigAlarm_Clear' !if(status == Executed_StatusType) print*,'On_RigAlarm_Execute' endsubroutine @@ -114,7 +116,7 @@ module COtherProblemsVariables subroutine ChangeRigWaterSupply(status) implicit none integer, intent (in) :: status - if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status) + !if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status) !if(status == Clear_StatusType) print*,'On_RigWaterSupply_Clear' !if(status == Executed_StatusType) print*,'On_RigWaterSupply_Execute' endsubroutine @@ -123,7 +125,7 @@ module COtherProblemsVariables use VARIABLES implicit none integer, intent (in) :: status - if(associated(RigAirPtr)) call RigAirPtr(status) + !if(associated(RigAirPtr)) call RigAirPtr(status) if(status == Clear_StatusType) RigAirMalf = 0 if(status == Executed_StatusType) RigAirMalf = 1 endsubroutine @@ -131,7 +133,7 @@ module COtherProblemsVariables subroutine ChangeGen1(status) implicit none integer, intent (in) :: status - if(associated(Gen1Ptr)) call Gen1Ptr(status) + !if(associated(Gen1Ptr)) call Gen1Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen1_Clear' !if(status == Executed_StatusType) print*,'On_Gen1_Execute' endsubroutine @@ -139,7 +141,7 @@ module COtherProblemsVariables subroutine ChangeGen2(status) implicit none integer, intent (in) :: status - if(associated(Gen2Ptr)) call Gen2Ptr(status) + !if(associated(Gen2Ptr)) call Gen2Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen2_Clear' !if(status == Executed_StatusType) print*,'On_Gen2_Execute' endsubroutine @@ -147,7 +149,7 @@ module COtherProblemsVariables subroutine ChangeGen3(status) implicit none integer, intent (in) :: status - if(associated(Gen3Ptr)) call Gen3Ptr(status) + !if(associated(Gen3Ptr)) call Gen3Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen3_Clear' !if(status == Executed_StatusType) print*,'On_Gen3_Execute' endsubroutine @@ -155,7 +157,7 @@ module COtherProblemsVariables subroutine ChangeGen4(status) implicit none integer, intent (in) :: status - if(associated(Gen4Ptr)) call Gen4Ptr(status) + !if(associated(Gen4Ptr)) call Gen4Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen4_Clear' !if(status == Executed_StatusType) print*,'On_Gen4_Execute' endsubroutine @@ -163,7 +165,7 @@ module COtherProblemsVariables subroutine ChangeScr1(status) implicit none integer, intent (in) :: status - if(associated(Scr1Ptr)) call Scr1Ptr(status) + !if(associated(Scr1Ptr)) call Scr1Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr1_Clear' !if(status == Executed_StatusType) print*,'On_Scr1_Execute' endsubroutine @@ -171,7 +173,7 @@ module COtherProblemsVariables subroutine ChangeScr2(status) implicit none integer, intent (in) :: status - if(associated(Scr2Ptr)) call Scr2Ptr(status) + !if(associated(Scr2Ptr)) call Scr2Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr2_Clear' !if(status == Executed_StatusType) print*,'On_Scr2_Execute' endsubroutine @@ -179,7 +181,7 @@ module COtherProblemsVariables subroutine ChangeScr3(status) implicit none integer, intent (in) :: status - if(associated(Scr3Ptr)) call Scr3Ptr(status) + !if(associated(Scr3Ptr)) call Scr3Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr3_Clear' !if(status == Executed_StatusType) print*,'On_Scr3_Execute' endsubroutine @@ -187,7 +189,7 @@ module COtherProblemsVariables subroutine ChangeScr4(status) implicit none integer, intent (in) :: status - if(associated(Scr4Ptr)) call Scr4Ptr(status) + !if(associated(Scr4Ptr)) call Scr4Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr4_Clear' !if(status == Executed_StatusType) print*,'On_Scr4_Execute' endsubroutine @@ -203,93 +205,93 @@ module COtherProblemsVariables - subroutine SubscribeRigAlarm(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAlarm - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAlarm' :: SubscribeRigAlarm - implicit none - procedure (ActionInteger) :: v - RigAlarmPtr => v - end subroutine + ! subroutine SubscribeRigAlarm(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAlarm + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAlarm' :: SubscribeRigAlarm + ! implicit none + ! procedure (ActionInteger) :: v + ! RigAlarmPtr => v + ! end subroutine - subroutine SubscribeRigWaterSupply(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigWaterSupply - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigWaterSupply' :: SubscribeRigWaterSupply - implicit none - procedure (ActionInteger) :: v - RigWaterSupplyPtr => v - end subroutine + ! subroutine SubscribeRigWaterSupply(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigWaterSupply + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigWaterSupply' :: SubscribeRigWaterSupply + ! implicit none + ! procedure (ActionInteger) :: v + ! RigWaterSupplyPtr => v + ! end subroutine - subroutine SubscribeRigAir(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAir - !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAir' :: SubscribeRigAir - implicit none - procedure (ActionInteger) :: v - RigAirPtr => v - end subroutine + ! subroutine SubscribeRigAir(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAir + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAir' :: SubscribeRigAir + ! implicit none + ! procedure (ActionInteger) :: v + ! RigAirPtr => v + ! end subroutine - subroutine SubscribeGen1(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen1 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen1' :: SubscribeGen1 - implicit none - procedure (ActionInteger) :: v - Gen1Ptr => v - end subroutine + ! subroutine SubscribeGen1(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen1 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen1' :: SubscribeGen1 + ! implicit none + ! procedure (ActionInteger) :: v + ! Gen1Ptr => v + ! end subroutine - subroutine SubscribeGen2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen2' :: SubscribeGen2 - implicit none - procedure (ActionInteger) :: v - Gen2Ptr => v - end subroutine + ! subroutine SubscribeGen2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen2' :: SubscribeGen2 + ! implicit none + ! procedure (ActionInteger) :: v + ! Gen2Ptr => v + ! end subroutine - subroutine SubscribeGen3(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen3 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen3' :: SubscribeGen3 - implicit none - procedure (ActionInteger) :: v - Gen3Ptr => v - end subroutine + ! subroutine SubscribeGen3(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen3 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen3' :: SubscribeGen3 + ! implicit none + ! procedure (ActionInteger) :: v + ! Gen3Ptr => v + ! end subroutine - subroutine SubscribeGen4(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen4 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen4' :: SubscribeGen4 - implicit none - procedure (ActionInteger) :: v - Gen4Ptr => v - end subroutine + ! subroutine SubscribeGen4(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeGen4 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeGen4' :: SubscribeGen4 + ! implicit none + ! procedure (ActionInteger) :: v + ! Gen4Ptr => v + ! end subroutine - subroutine SubscribeScr1(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr1 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr1' :: SubscribeScr1 - implicit none - procedure (ActionInteger) :: v - Scr1Ptr => v - end subroutine + ! subroutine SubscribeScr1(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr1 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr1' :: SubscribeScr1 + ! implicit none + ! procedure (ActionInteger) :: v + ! Scr1Ptr => v + ! end subroutine - subroutine SubscribeScr2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr2' :: SubscribeScr2 - implicit none - procedure (ActionInteger) :: v - Scr2Ptr => v - end subroutine + ! subroutine SubscribeScr2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr2' :: SubscribeScr2 + ! implicit none + ! procedure (ActionInteger) :: v + ! Scr2Ptr => v + ! end subroutine - subroutine SubscribeScr3(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr3 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr3' :: SubscribeScr3 - implicit none - procedure (ActionInteger) :: v - Scr3Ptr => v - end subroutine + ! subroutine SubscribeScr3(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr3 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr3' :: SubscribeScr3 + ! implicit none + ! procedure (ActionInteger) :: v + ! Scr3Ptr => v + ! end subroutine - subroutine SubscribeScr4(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr4 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr4' :: SubscribeScr4 - implicit none - procedure (ActionInteger) :: v - Scr4Ptr => v - end subroutine + ! subroutine SubscribeScr4(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr4 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr4' :: SubscribeScr4 + ! implicit none + ! procedure (ActionInteger) :: v + ! Scr4Ptr => v + ! end subroutine diff --git a/CSharp/Problems/CProblemDifinition.f90 b/CSharp/Problems/CProblemDifinition.f90 index ea23d40..affd98a 100644 --- a/CSharp/Problems/CProblemDifinition.f90 +++ b/CSharp/Problems/CProblemDifinition.f90 @@ -31,82 +31,82 @@ module CProblemDifinition if(problem%StatusType == Executed_StatusType .and. associated(action)) call action(Executed_StatusType) end subroutine - type(CProblem) function SetDue(problem, action) - use CSimulationVariables + ! type(CProblem) function SetDue(problem, action) + ! ! use CSimulationVariables - implicit none - type(CProblem), intent(in) :: problem - procedure (ActionInteger), pointer, intent(in) :: action - real(8) :: CurrentTime - real(8) :: CurrentPumpStrokes - real(8) :: CurrentVolumePumped - real(8) :: CurrentDistanceDrilled - real(8) :: Due + ! implicit none + ! type(CProblem), intent(in) :: problem + ! procedure (ActionInteger), pointer, intent(in) :: action + ! real(8) :: CurrentTime + ! real(8) :: CurrentPumpStrokes + ! real(8) :: CurrentVolumePumped + ! real(8) :: CurrentDistanceDrilled + ! real(8) :: Due - CurrentTime = 0 - CurrentPumpStrokes = 0 - CurrentVolumePumped = 0 - CurrentDistanceDrilled = 0 + ! CurrentTime = 0 + ! CurrentPumpStrokes = 0 + ! CurrentVolumePumped = 0 + ! CurrentDistanceDrilled = 0 - SetDue = problem + ! SetDue = problem - if(problem%StatusType == Clear_StatusType .and. associated(action)) then - call action(Clear_StatusType) - SetDue%DueValue = 0 - return - endif + ! if(problem%StatusType == Clear_StatusType .and. associated(action)) then + ! call action(Clear_StatusType) + ! SetDue%DueValue = 0 + ! return + ! endif - select case (problem%ProblemType) - case(Time_ProblemType) - select case (SimulationState) - case(SimulationState_Stopped) - CurrentTime = 0 - case(SimulationState_Started) - CurrentTime = dble(SimulationTime) - case(SimulationState_Paused) - CurrentTime = dble(SimulationTime) - end select - Due = problem%Value + CurrentTime - case(PumpStrokes_ProblemType) - select case (SimulationState) - case(SimulationState_Stopped) - CurrentPumpStrokes = 0 - case(SimulationState_Started) - CurrentPumpStrokes = TotalPumpStrokes - case(SimulationState_Paused) - CurrentPumpStrokes = TotalPumpStrokes - end select - Due = problem%Value + CurrentPumpStrokes - case(VolumePumped_ProblemType) - select case (SimulationState) - case(SimulationState_Stopped) - CurrentVolumePumped = 0 - case(SimulationState_Started) - CurrentVolumePumped = TotalVolumePumped - case(SimulationState_Paused) - CurrentVolumePumped = TotalVolumePumped - end select - Due = problem%Value + CurrentVolumePumped - case(DistanceDrilled_ProblemType) - select case (SimulationState) - case(SimulationState_Stopped) - CurrentDistanceDrilled = 0 - case(SimulationState_Started) - CurrentDistanceDrilled = DistanceDrilled - case(SimulationState_Paused) - CurrentDistanceDrilled = DistanceDrilled - end select - Due = problem%Value + CurrentDistanceDrilled - end select + ! select case (problem%ProblemType) + ! case(Time_ProblemType) + ! select case (SimulationState) + ! case(SimulationState_Stopped) + ! CurrentTime = 0 + ! case(SimulationState_Started) + ! CurrentTime = dble(SimulationTime) + ! case(SimulationState_Paused) + ! CurrentTime = dble(SimulationTime) + ! end select + ! Due = problem%Value + CurrentTime + ! case(PumpStrokes_ProblemType) + ! select case (SimulationState) + ! case(SimulationState_Stopped) + ! CurrentPumpStrokes = 0 + ! case(SimulationState_Started) + ! CurrentPumpStrokes = TotalPumpStrokes + ! case(SimulationState_Paused) + ! CurrentPumpStrokes = TotalPumpStrokes + ! end select + ! Due = problem%Value + CurrentPumpStrokes + ! case(VolumePumped_ProblemType) + ! select case (SimulationState) + ! case(SimulationState_Stopped) + ! CurrentVolumePumped = 0 + ! case(SimulationState_Started) + ! CurrentVolumePumped = TotalVolumePumped + ! case(SimulationState_Paused) + ! CurrentVolumePumped = TotalVolumePumped + ! end select + ! Due = problem%Value + CurrentVolumePumped + ! case(DistanceDrilled_ProblemType) + ! select case (SimulationState) + ! case(SimulationState_Stopped) + ! CurrentDistanceDrilled = 0 + ! case(SimulationState_Started) + ! CurrentDistanceDrilled = DistanceDrilled + ! case(SimulationState_Paused) + ! CurrentDistanceDrilled = DistanceDrilled + ! end select + ! Due = problem%Value + CurrentDistanceDrilled + ! end select - SetDue%DueValue = Due + ! SetDue%DueValue = Due - end function SetDue + ! end function SetDue subroutine ProcessDueTime(problem, action, time) - use CSimulationVariables + ! use CSimulationVariables use CLog3 implicit none type(CProblem) :: problem @@ -118,7 +118,7 @@ module CProblemDifinition end subroutine subroutine ProcessDuePumpStrokes(problem, action, strokes) - use CSimulationVariables + ! use CSimulationVariables implicit none type(CProblem) :: problem procedure (ActionInteger), pointer, intent(in) :: action @@ -129,7 +129,7 @@ module CProblemDifinition end subroutine subroutine ProcessDueVolumePumped(problem, action, volume) - use CSimulationVariables + ! use CSimulationVariables implicit none type(CProblem) :: problem procedure (ActionInteger), pointer, intent(in) :: action @@ -140,7 +140,7 @@ module CProblemDifinition end subroutine subroutine ProcessDueDistanceDrilled(problem, action, distance) - use CSimulationVariables + ! use CSimulationVariables implicit none type(CProblem) :: problem procedure (ActionInteger), pointer, intent(in) :: action diff --git a/CSharp/Problems/CPumpProblems.f90 b/CSharp/Problems/CPumpProblems.f90 index e79c161..3a858e0 100644 --- a/CSharp/Problems/CPumpProblems.f90 +++ b/CSharp/Problems/CPumpProblems.f90 @@ -4,83 +4,83 @@ module CPumpProblems public contains - ! Input routines - subroutine SetPump1PowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetPump1PowerFail - !DEC$ ATTRIBUTES ALIAS: 'SetPump1PowerFail' :: SetPump1PowerFail - implicit none - type(CProblem), intent(in) :: v - Pump1PowerFail = SetDue(v, ChangePump1PowerFail) -#ifdef deb - print*, 'Pump1PowerFail%ProblemType=', V%ProblemType - print*, 'Pump1PowerFail%StatusType=', V%StatusType - print*, 'Pump1PowerFail%Value=', V%Value -#endif - end subroutine +! ! Input routines +! subroutine SetPump1PowerFail(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetPump1PowerFail +! !DEC$ ATTRIBUTES ALIAS: 'SetPump1PowerFail' :: SetPump1PowerFail +! implicit none +! type(CProblem), intent(in) :: v +! Pump1PowerFail = SetDue(v, ChangePump1PowerFail) +! #ifdef deb +! print*, 'Pump1PowerFail%ProblemType=', V%ProblemType +! print*, 'Pump1PowerFail%StatusType=', V%StatusType +! print*, 'Pump1PowerFail%Value=', V%Value +! #endif +! end subroutine - subroutine SetPump1BlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetPump1BlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SetPump1BlowPopOffValve' :: SetPump1BlowPopOffValve - implicit none - type(CProblem), intent(in) :: v - Pump1BlowPopOffValve = SetDue(v, ChangePump1BlowPopOffValve) -#ifdef deb - print*, 'Pump1BlowPopOffValve%ProblemType=', V%ProblemType - print*, 'Pump1BlowPopOffValve%StatusType=', V%StatusType - print*, 'Pump1BlowPopOffValve%Value=', V%Value -#endif - end subroutine +! subroutine SetPump1BlowPopOffValve(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetPump1BlowPopOffValve +! !DEC$ ATTRIBUTES ALIAS: 'SetPump1BlowPopOffValve' :: SetPump1BlowPopOffValve +! implicit none +! type(CProblem), intent(in) :: v +! PumpProblems%Pump1BlowPopOffValve = SetDue(v, ChangePump1BlowPopOffValve) +! #ifdef deb +! print*, 'Pump1BlowPopOffValve%ProblemType=', V%ProblemType +! print*, 'Pump1BlowPopOffValve%StatusType=', V%StatusType +! print*, 'Pump1BlowPopOffValve%Value=', V%Value +! #endif +! end subroutine - subroutine SetPump2PowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetPump2PowerFail - !DEC$ ATTRIBUTES ALIAS: 'SetPump2PowerFail' :: SetPump2PowerFail - implicit none - type(CProblem), intent(in) :: v - Pump2PowerFail = SetDue(v, ChangePump2PowerFail) -#ifdef deb - print*, 'Pump2PowerFail%ProblemType=', V%ProblemType - print*, 'Pump2PowerFail%StatusType=', V%StatusType - print*, 'Pump2PowerFail%Value=', V%Value -#endif - end subroutine +! subroutine SetPump2PowerFail(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetPump2PowerFail +! !DEC$ ATTRIBUTES ALIAS: 'SetPump2PowerFail' :: SetPump2PowerFail +! implicit none +! type(CProblem), intent(in) :: v +! PumpProblems%Pump2PowerFail = SetDue(v, ChangePump2PowerFail) +! #ifdef deb +! print*, 'Pump2PowerFail%ProblemType=', V%ProblemType +! print*, 'Pump2PowerFail%StatusType=', V%StatusType +! print*, 'Pump2PowerFail%Value=', V%Value +! #endif +! end subroutine - subroutine SetPump2BlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetPump2BlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SetPump2BlowPopOffValve' :: SetPump2BlowPopOffValve - implicit none - type(CProblem), intent(in) :: v - Pump2BlowPopOffValve = SetDue(v, ChangePump2BlowPopOffValve) -#ifdef deb - print*, 'Pump2BlowPopOffValve%ProblemType=', V%ProblemType - print*, 'Pump2BlowPopOffValve%StatusType=', V%StatusType - print*, 'Pump2BlowPopOffValve%Value=', V%Value -#endif - end subroutine +! subroutine SetPump2BlowPopOffValve(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetPump2BlowPopOffValve +! !DEC$ ATTRIBUTES ALIAS: 'SetPump2BlowPopOffValve' :: SetPump2BlowPopOffValve +! implicit none +! type(CProblem), intent(in) :: v +! PumpProblems%Pump2BlowPopOffValve = SetDue(v, ChangePump2BlowPopOffValve) +! #ifdef deb +! print*, 'Pump2BlowPopOffValve%ProblemType=', V%ProblemType +! print*, 'Pump2BlowPopOffValve%StatusType=', V%StatusType +! print*, 'Pump2BlowPopOffValve%Value=', V%Value +! #endif +! end subroutine - subroutine SetCementPumpPowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpPowerFail - !DEC$ ATTRIBUTES ALIAS: 'SetCementPumpPowerFail' :: SetCementPumpPowerFail - implicit none - type(CProblem), intent(in) :: v - CementPumpPowerFail = SetDue(v, ChangeCementPumpPowerFail) -#ifdef deb - print*, 'CementPumpPowerFail%ProblemType=', V%ProblemType - print*, 'CementPumpPowerFail%StatusType=', V%StatusType - print*, 'CementPumpPowerFail%Value=', V%Value -#endif - end subroutine +! subroutine SetCementPumpPowerFail(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpPowerFail +! !DEC$ ATTRIBUTES ALIAS: 'SetCementPumpPowerFail' :: SetCementPumpPowerFail +! implicit none +! type(CProblem), intent(in) :: v +! PumpProblems%CementPumpPowerFail = SetDue(v, ChangeCementPumpPowerFail) +! #ifdef deb +! print*, 'CementPumpPowerFail%ProblemType=', V%ProblemType +! print*, 'CementPumpPowerFail%StatusType=', V%StatusType +! print*, 'CementPumpPowerFail%Value=', V%Value +! #endif +! end subroutine - subroutine SetCementPumpBlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpBlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SetCementPumpBlowPopOffValve' :: SetCementPumpBlowPopOffValve - implicit none - type(CProblem), intent(in) :: v - CementPumpBlowPopOffValve = SetDue(v, ChangeCementPumpBlowPopOffValve) -#ifdef deb - print*, 'CementPumpBlowPopOffValve%ProblemType=', V%ProblemType - print*, 'CementPumpBlowPopOffValve%StatusType=', V%StatusType - print*, 'CementPumpBlowPopOffValve%Value=', V%Value -#endif - end subroutine +! subroutine SetCementPumpBlowPopOffValve(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpBlowPopOffValve +! !DEC$ ATTRIBUTES ALIAS: 'SetCementPumpBlowPopOffValve' :: SetCementPumpBlowPopOffValve +! implicit none +! type(CProblem), intent(in) :: v +! PumpProblems%CementPumpBlowPopOffValve = SetDue(v, ChangeCementPumpBlowPopOffValve) +! #ifdef deb +! print*, 'CementPumpBlowPopOffValve%ProblemType=', V%ProblemType +! print*, 'CementPumpBlowPopOffValve%StatusType=', V%StatusType +! print*, 'CementPumpBlowPopOffValve%Value=', V%Value +! #endif +! end subroutine end module CPumpProblems \ No newline at end of file diff --git a/CSharp/Problems/CPumpProblemsVariables.f90 b/CSharp/Problems/CPumpProblemsVariables.f90 index d633d87..3896e9a 100644 --- a/CSharp/Problems/CPumpProblemsVariables.f90 +++ b/CSharp/Problems/CPumpProblemsVariables.f90 @@ -4,19 +4,22 @@ module CPumpProblemsVariables public ! Input vars - type(CProblem) :: Pump1PowerFail - type(CProblem) :: Pump1BlowPopOffValve - type(CProblem) :: Pump2PowerFail - type(CProblem) :: Pump2BlowPopOffValve - type(CProblem) :: CementPumpPowerFail - type(CProblem) :: CementPumpBlowPopOffValve - - procedure (ActionInteger), pointer :: Pump1PowerFailPtr - procedure (ActionInteger), pointer :: Pump1BlowPopOffValvePtr - procedure (ActionInteger), pointer :: Pump2PowerFailPtr - procedure (ActionInteger), pointer :: Pump2BlowPopOffValvePtr - procedure (ActionInteger), pointer :: CementPumpPowerFailPtr - procedure (ActionInteger), pointer :: CementPumpBlowPopOffValvePtr + type :: PumpProblemsType + type(CProblem) :: Pump1PowerFail + type(CProblem) :: Pump1BlowPopOffValve + type(CProblem) :: Pump2PowerFail + type(CProblem) :: Pump2BlowPopOffValve + type(CProblem) :: CementPumpPowerFail + type(CProblem) :: CementPumpBlowPopOffValve + end type PumpProblemsType + type(PumpProblemsType)::PumpProblems + + ! procedure (ActionInteger), pointer :: Pump1PowerFailPtr + ! procedure (ActionInteger), pointer :: Pump1BlowPopOffValvePtr + ! procedure (ActionInteger), pointer :: Pump2PowerFailPtr + ! procedure (ActionInteger), pointer :: Pump2BlowPopOffValvePtr + ! procedure (ActionInteger), pointer :: CementPumpPowerFailPtr + ! procedure (ActionInteger), pointer :: CementPumpBlowPopOffValvePtr contains @@ -25,12 +28,12 @@ module CPumpProblemsVariables implicit none integer :: time - if(Pump1PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(Pump1PowerFail, ChangePump1PowerFail, time) - if(Pump1BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, time) - if(Pump2PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(Pump2PowerFail, ChangePump2PowerFail, time) - if(Pump2BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, time) - if(CementPumpPowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(CementPumpPowerFail, ChangeCementPumpPowerFail, time) - if(CementPumpBlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, time) + if(PumpProblems%Pump1PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%Pump1PowerFail, ChangePump1PowerFail, time) + if(PumpProblems%Pump1BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, time) + if(PumpProblems%Pump2PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%Pump2PowerFail, ChangePump2PowerFail, time) + if(PumpProblems%Pump2BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, time) + if(PumpProblems%CementPumpPowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, time) + if(PumpProblems%CementPumpBlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, time) end subroutine @@ -38,12 +41,12 @@ module CPumpProblemsVariables implicit none integer :: strokes - if(Pump1PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump1PowerFail, ChangePump1PowerFail, strokes) - if(Pump1BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, strokes) - if(Pump2PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump2PowerFail, ChangePump2PowerFail, strokes) - if(Pump2BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, strokes) - if(CementPumpPowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CementPumpPowerFail, ChangeCementPumpPowerFail, strokes) - if(CementPumpBlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, strokes) + if(PumpProblems%Pump1PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%Pump1PowerFail, ChangePump1PowerFail, strokes) + if(PumpProblems%Pump1BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, strokes) + if(PumpProblems%Pump2PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%Pump2PowerFail, ChangePump2PowerFail, strokes) + if(PumpProblems%Pump2BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, strokes) + if(PumpProblems%CementPumpPowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, strokes) + if(PumpProblems%CementPumpBlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, strokes) end subroutine @@ -51,12 +54,12 @@ module CPumpProblemsVariables implicit none real(8) :: volume - if(Pump1PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump1PowerFail, ChangePump1PowerFail, volume) - if(Pump1BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, volume) - if(Pump2PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump2PowerFail, ChangePump2PowerFail, volume) - if(Pump2BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, volume) - if(CementPumpPowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CementPumpPowerFail, ChangeCementPumpPowerFail, volume) - if(CementPumpBlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, volume) + if(PumpProblems%Pump1PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%Pump1PowerFail, ChangePump1PowerFail, volume) + if(PumpProblems%Pump1BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, volume) + if(PumpProblems%Pump2PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%Pump2PowerFail, ChangePump2PowerFail, volume) + if(PumpProblems%Pump2BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, volume) + if(PumpProblems%CementPumpPowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, volume) + if(PumpProblems%CementPumpBlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, volume) end subroutine @@ -64,12 +67,12 @@ module CPumpProblemsVariables implicit none real(8) :: distance - if(Pump1PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump1PowerFail, ChangePump1PowerFail, distance) - if(Pump1BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, distance) - if(Pump2PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump2PowerFail, ChangePump2PowerFail, distance) - if(Pump2BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, distance) - if(CementPumpPowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CementPumpPowerFail, ChangeCementPumpPowerFail, distance) - if(CementPumpBlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, distance) + if(PumpProblems%Pump1PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%Pump1PowerFail, ChangePump1PowerFail, distance) + if(PumpProblems%Pump1BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, distance) + if(PumpProblems%Pump2PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%Pump2PowerFail, ChangePump2PowerFail, distance) + if(PumpProblems%Pump2BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, distance) + if(PumpProblems%CementPumpPowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, distance) + if(PumpProblems%CementPumpBlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, distance) end subroutine @@ -87,7 +90,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump1PowerFailPtr)) call Pump1PowerFailPtr(status) + !if(associated(Pump1PowerFailPtr)) call Pump1PowerFailPtr(status) if(status == Clear_StatusType) PUMP(1)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(1)%PowerFailMalf=1 endsubroutine @@ -96,7 +99,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump1BlowPopOffValvePtr)) call Pump1BlowPopOffValvePtr(status) + !if(associated(Pump1BlowPopOffValvePtr)) call Pump1BlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(1)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(1)%BlowPopOffMalf=1 endsubroutine @@ -105,7 +108,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump2PowerFailPtr)) call Pump2PowerFailPtr(status) + !if(associated(Pump2PowerFailPtr)) call Pump2PowerFailPtr(status) if(status == Clear_StatusType) PUMP(2)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(2)%PowerFailMalf=1 endsubroutine @@ -114,7 +117,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(Pump2BlowPopOffValvePtr)) call Pump2BlowPopOffValvePtr(status) + !if(associated(Pump2BlowPopOffValvePtr)) call Pump2BlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(2)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(2)%BlowPopOffMalf=1 endsubroutine @@ -123,7 +126,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(CementPumpPowerFailPtr)) call CementPumpPowerFailPtr(status) + !if(associated(CementPumpPowerFailPtr)) call CementPumpPowerFailPtr(status) if(status == Clear_StatusType) PUMP(3)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(3)%PowerFailMalf=1 endsubroutine @@ -132,7 +135,7 @@ module CPumpProblemsVariables Use Pumps_VARIABLES implicit none integer, intent (in) :: status - if(associated(CementPumpBlowPopOffValvePtr)) call CementPumpBlowPopOffValvePtr(status) + !if(associated(CementPumpBlowPopOffValvePtr)) call CementPumpBlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(3)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(3)%BlowPopOffMalf=1 endsubroutine @@ -149,60 +152,7 @@ module CPumpProblemsVariables - - - subroutine SubscribePump1PowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump1PowerFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump1PowerFail' :: SubscribePump1PowerFail - implicit none - procedure (ActionInteger) :: v - Pump1PowerFailPtr => v - end subroutine - - subroutine SubscribePump1BlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump1BlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump1BlowPopOffValve' :: SubscribePump1BlowPopOffValve - implicit none - procedure (ActionInteger) :: v - Pump1BlowPopOffValvePtr => v - end subroutine - - subroutine SubscribePump2PowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump2PowerFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump2PowerFail' :: SubscribePump2PowerFail - implicit none - procedure (ActionInteger) :: v - Pump2PowerFailPtr => v - end subroutine - - subroutine SubscribePump2BlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump2BlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SubscribePump2BlowPopOffValve' :: SubscribePump2BlowPopOffValve - implicit none - procedure (ActionInteger) :: v - Pump2BlowPopOffValvePtr => v - end subroutine - - subroutine SubscribeCementPumpPowerFail(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCementPumpPowerFail - !DEC$ ATTRIBUTES ALIAS: 'SubscribeCementPumpPowerFail' :: SubscribeCementPumpPowerFail - implicit none - procedure (ActionInteger) :: v - CementPumpPowerFailPtr => v - end subroutine - - subroutine SubscribeCementPumpBlowPopOffValve(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCementPumpBlowPopOffValve - !DEC$ ATTRIBUTES ALIAS: 'SubscribeCementPumpBlowPopOffValve' :: SubscribeCementPumpBlowPopOffValve - implicit none - procedure (ActionInteger) :: v - CementPumpBlowPopOffValvePtr => v - end subroutine - - - - - + end module CPumpProblemsVariables \ No newline at end of file diff --git a/CSharp/Problems/CRotaryProblems.f90 b/CSharp/Problems/CRotaryProblems.f90 index 1b83828..4f95aac 100644 --- a/CSharp/Problems/CRotaryProblems.f90 +++ b/CSharp/Problems/CRotaryProblems.f90 @@ -4,31 +4,31 @@ module CRotaryProblems public contains - ! Input routines - subroutine SetMotorFail2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetMotorFail2 - !DEC$ ATTRIBUTES ALIAS: 'SetMotorFail2' :: SetMotorFail2 - implicit none - type(CProblem), intent(in) :: v - MotorFail = SetDue(v, ChangeMotorFail) -#ifdef deb - print*, 'MotorFail%ProblemType=', V%ProblemType - print*, 'MotorFail%StatusType=', V%StatusType - print*, 'MotorFail%Value=', V%Value -#endif - end subroutine +! ! Input routines +! subroutine SetMotorFail2(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetMotorFail2 +! !DEC$ ATTRIBUTES ALIAS: 'SetMotorFail2' :: SetMotorFail2 +! implicit none +! type(CProblem), intent(in) :: v +! RotaryProblems%MotorFail = SetDue(v, ChangeMotorFail) +! #ifdef deb +! print*, 'MotorFail%ProblemType=', V%ProblemType +! print*, 'MotorFail%StatusType=', V%StatusType +! print*, 'MotorFail%Value=', V%Value +! #endif +! end subroutine - subroutine SetOverideTorqueLimit2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SetOverideTorqueLimit2 - !DEC$ ATTRIBUTES ALIAS: 'SetOverideTorqueLimit2' :: SetOverideTorqueLimit2 - implicit none - type(CProblem), intent(in) :: v - OverideTorqueLimit = SetDue(v, ChangeOverideTorqueLimit) -#ifdef deb - print*, 'OverideTorqueLimit%ProblemType=', V%ProblemType - print*, 'OverideTorqueLimit%StatusType=', V%StatusType - print*, 'OverideTorqueLimit%Value=', V%Value -#endif - end subroutine +! subroutine SetOverideTorqueLimit2(v) +! !DEC$ ATTRIBUTES DLLEXPORT :: SetOverideTorqueLimit2 +! !DEC$ ATTRIBUTES ALIAS: 'SetOverideTorqueLimit2' :: SetOverideTorqueLimit2 +! implicit none +! type(CProblem), intent(in) :: v +! RotaryProblems%OverideTorqueLimit = SetDue(v, ChangeOverideTorqueLimit) +! #ifdef deb +! print*, 'OverideTorqueLimit%ProblemType=', V%ProblemType +! print*, 'OverideTorqueLimit%StatusType=', V%StatusType +! print*, 'OverideTorqueLimit%Value=', V%Value +! #endif +! end subroutine end module CRotaryProblems \ No newline at end of file diff --git a/CSharp/Problems/CRotaryProblemsVariables.f90 b/CSharp/Problems/CRotaryProblemsVariables.f90 index 1564942..1772d6b 100644 --- a/CSharp/Problems/CRotaryProblemsVariables.f90 +++ b/CSharp/Problems/CRotaryProblemsVariables.f90 @@ -4,11 +4,13 @@ module CRotaryProblemsVariables public ! Input vars - type(CProblem) :: MotorFail - type(CProblem) :: OverideTorqueLimit - - procedure (ActionInteger), pointer :: MotorFailPtr - procedure (ActionInteger), pointer :: OverideTorqueLimitPtr + type::RotaryProblemsType + type(CProblem) :: MotorFail + type(CProblem) :: OverideTorqueLimit + end type RotaryProblemsType + type(RotaryProblemsType)::RotaryProblems + ! procedure (ActionInteger), pointer :: MotorFailPtr + ! procedure (ActionInteger), pointer :: OverideTorqueLimitPtr contains @@ -16,8 +18,8 @@ module CRotaryProblemsVariables implicit none integer :: time - if(MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(MotorFail, ChangeMotorFail, time) - if(OverideTorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(OverideTorqueLimit, ChangeOverideTorqueLimit, time) + if(RotaryProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryProblems%MotorFail, ChangeMotorFail, time) + if(RotaryProblems%OverideTorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, time) end subroutine @@ -25,8 +27,8 @@ module CRotaryProblemsVariables implicit none integer :: strokes - if(MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MotorFail, ChangeMotorFail, strokes) - if(OverideTorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(OverideTorqueLimit, ChangeOverideTorqueLimit, strokes) + if(RotaryProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryProblems%MotorFail, ChangeMotorFail, strokes) + if(RotaryProblems%OverideTorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, strokes) end subroutine @@ -34,8 +36,8 @@ module CRotaryProblemsVariables implicit none real(8) :: volume - if(MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MotorFail, ChangeMotorFail, volume) - if(OverideTorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(OverideTorqueLimit, ChangeOverideTorqueLimit, volume) + if(RotaryProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryProblems%MotorFail, ChangeMotorFail, volume) + if(RotaryProblems%OverideTorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, volume) end subroutine @@ -43,8 +45,8 @@ module CRotaryProblemsVariables implicit none real(8) :: distance - if(MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MotorFail, ChangeMotorFail, distance) - if(OverideTorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(OverideTorqueLimit, ChangeOverideTorqueLimit, distance) + if(RotaryProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryProblems%MotorFail, ChangeMotorFail, distance) + if(RotaryProblems%OverideTorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, distance) end subroutine @@ -58,7 +60,7 @@ module CRotaryProblemsVariables use RTable_VARIABLES implicit none integer, intent (in) :: status - if(associated(MotorFailPtr)) call MotorFailPtr(status) + !if(associated(MotorFailPtr)) call MotorFailPtr(status) if(status == Clear_StatusType) RTable%MotorFaileMalf=0 if(status == Executed_StatusType) RTable%MotorFaileMalf=1 endsubroutine @@ -67,7 +69,7 @@ module CRotaryProblemsVariables use RTable_VARIABLES implicit none integer, intent (in) :: status - if(associated(OverideTorqueLimitPtr)) call OverideTorqueLimitPtr(status) + !if(associated(OverideTorqueLimitPtr)) call OverideTorqueLimitPtr(status) if(status == Clear_StatusType) RTable%OverideTorqueLimitMalf=0 if(status == Executed_StatusType) RTable%OverideTorqueLimitMalf=1 endsubroutine @@ -85,21 +87,21 @@ module CRotaryProblemsVariables - subroutine SubscribeMotorFail2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail2' :: SubscribeMotorFail2 - implicit none - procedure (ActionInteger) :: v - MotorFailPtr => v - end subroutine + ! subroutine SubscribeMotorFail2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail2' :: SubscribeMotorFail2 + ! implicit none + ! procedure (ActionInteger) :: v + ! MotorFailPtr => v + ! end subroutine - subroutine SubscribeOverideTorqueLimit(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeOverideTorqueLimit - !DEC$ ATTRIBUTES ALIAS: 'SubscribeOverideTorqueLimit' :: SubscribeOverideTorqueLimit - implicit none - procedure (ActionInteger) :: v - OverideTorqueLimitPtr => v - end subroutine + ! subroutine SubscribeOverideTorqueLimit(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeOverideTorqueLimit + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeOverideTorqueLimit' :: SubscribeOverideTorqueLimit + ! implicit none + ! procedure (ActionInteger) :: v + ! OverideTorqueLimitPtr => v + ! end subroutine diff --git a/CSharp/Simulation/CSimulation.f90 b/CSharp/Simulation/CSimulation.f90 index af8230d..6cc1d41 100644 --- a/CSharp/Simulation/CSimulation.f90 +++ b/CSharp/Simulation/CSimulation.f90 @@ -1,5 +1,5 @@ module CSimulation - use CSimulationVariables + ! use CSimulationVariables use CSimulationThreads use ifcore use ifmt diff --git a/CSharp/Simulation/CSimulationVariables.f90 b/CSharp/Simulation/CSimulationVariables.f90 index 482b495..ddf3d68 100644 --- a/CSharp/Simulation/CSimulationVariables.f90 +++ b/CSharp/Simulation/CSimulationVariables.f90 @@ -279,29 +279,29 @@ module CSimulationVariables if(associated(SpeedChangePossibilityPtr)) call SpeedChangePossibilityPtr(SpeedChangePossibilityValue) end subroutine - subroutine SubscribeSpeedChangePossibility(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSpeedChangePossibility - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSpeedChangePossibility' :: SubscribeSpeedChangePossibility - implicit none - procedure (ActionBool) :: a - SpeedChangePossibilityPtr => a - end subroutine - - subroutine SubscribeForceRealTimeSpeed(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeForceRealTimeSpeed - !DEC$ ATTRIBUTES ALIAS: 'SubscribeForceRealTimeSpeed' :: SubscribeForceRealTimeSpeed - implicit none - procedure (ActionVoid) :: a - ForceRealTimeSpeedPtr => a - end subroutine - - subroutine SubscribeTotalStrokesChanged(a) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTotalStrokesChanged - !DEC$ ATTRIBUTES ALIAS: 'SubscribeTotalStrokesChanged' :: SubscribeTotalStrokesChanged - implicit none - procedure (ActionInteger) :: a - TotalStrokesChangedPtr => a - end subroutine + ! subroutine SubscribeSpeedChangePossibility(a) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSpeedChangePossibility + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSpeedChangePossibility' :: SubscribeSpeedChangePossibility + ! implicit none + ! procedure (ActionBool) :: a + ! SpeedChangePossibilityPtr => a + ! end subroutine + + ! subroutine SubscribeForceRealTimeSpeed(a) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeForceRealTimeSpeed + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeForceRealTimeSpeed' :: SubscribeForceRealTimeSpeed + ! implicit none + ! procedure (ActionVoid) :: a + ! ForceRealTimeSpeedPtr => a + ! end subroutine + + ! subroutine SubscribeTotalStrokesChanged(a) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTotalStrokesChanged + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeTotalStrokesChanged' :: SubscribeTotalStrokesChanged + ! implicit none + ! procedure (ActionInteger) :: a + ! TotalStrokesChangedPtr => a + ! end subroutine subroutine SetTotalStrokes(strokes) implicit none diff --git a/CSharp/Simulation/CSounds.f90 b/CSharp/Simulation/CSounds.f90 index 0bb7826..c911ed9 100644 --- a/CSharp/Simulation/CSounds.f90 +++ b/CSharp/Simulation/CSounds.f90 @@ -6,62 +6,64 @@ module CSounds ! Input vars ! Output vars - integer :: SoundMP1s - integer :: SoundMP2s - integer :: SoundMP3s - integer :: SoundRTs - integer :: SoundDwFws - integer :: SoundDwRevs - integer :: SoundDwBrakes - integer :: SoundChokePumps - integer :: SoundGasThroughChokes - integer :: SoundKoomeyAirPumps - integer :: SoundKoomeyElectricPumps - logical :: SoundRtGearCrashs - logical :: SoundDwGearCrashs - logical :: SoundFloorCollisions - logical :: SoundCrownCollisions - logical :: SoundDwClutchs - logical :: SoundBlowers - logical :: SoundBlowerMp1s - logical :: SoundBlowerMp2s - logical :: SoundBlowerMp3s - logical :: SoundBlowerRts - logical :: SoundBlowerDws - logical :: SoundBlowerStarts - logical :: SoundBlowerShutdowns - logical :: SoundElectricPumps - - - procedure (ActionInteger), pointer :: SoundMP1Ptr - procedure (ActionInteger), pointer :: SoundMP2Ptr - procedure (ActionInteger), pointer :: SoundMP3Ptr - procedure (ActionInteger), pointer :: SoundRTPtr - procedure (ActionInteger), pointer :: SoundDwFwPtr - procedure (ActionInteger), pointer :: SoundDwRevPtr - procedure (ActionInteger), pointer :: SoundDwBrakePtr - procedure (ActionInteger), pointer :: SoundChokePumpPtr - procedure (ActionInteger), pointer :: SoundGasThroughChokePtr - procedure (ActionInteger), pointer :: SoundKoomeyAirPumpPtr - procedure (ActionInteger), pointer :: SoundKoomeyElectricPumpPtr - procedure (ActionBool), pointer :: SoundRtGearCrashPtr - procedure (ActionBool), pointer :: SoundDwGearCrashPtr - procedure (ActionBool), pointer :: SoundFloorCollisionPtr - procedure (ActionBool), pointer :: SoundCrownCollisionPtr - procedure (ActionBool), pointer :: SoundDwClutchPtr - procedure (ActionBool), pointer :: SoundBlowerPtr - procedure (ActionBool), pointer :: SoundBlowerMp1Ptr - procedure (ActionBool), pointer :: SoundBlowerMp2Ptr - procedure (ActionBool), pointer :: SoundBlowerMp3Ptr - procedure (ActionBool), pointer :: SoundBlowerRtPtr - procedure (ActionBool), pointer :: SoundBlowerDwPtr - procedure (ActionBool), pointer :: SoundBlowerStartPtr - procedure (ActionBool), pointer :: SoundBlowerShutdownPtr - procedure (ActionBool), pointer :: SoundElectricPumpPtr - - private :: SoundMP1Ptr, SoundMP2Ptr, SoundMP3Ptr, SoundRTPtr, SoundDwFwPtr, SoundDwRevPtr,SoundDwBrakePtr,SoundChokePumpPtr,SoundGasThroughChokePtr,SoundKoomeyAirPumpPtr, & - SoundKoomeyElectricPumpPtr, SoundRtGearCrashPtr,SoundDwGearCrashPtr,SoundFloorCollisionPtr,SoundCrownCollisionPtr,SoundDwClutchPtr,SoundBlowerPtr, & - SoundBlowerMp1Ptr, SoundBlowerMp2Ptr,SoundBlowerMp3Ptr,SoundBlowerRtPtr,SoundBlowerDwPtr,SoundBlowerStartPtr,SoundBlowerShutdownPtr,SoundElectricPumpPtr + Type ::SoundsType + integer :: MP1s + integer :: MP2s + integer :: MP3s + integer :: RTs + integer :: DwFws + integer :: DwRevs + integer :: DwBrakes + integer :: ChokePumps + integer :: GasThroughChokes + integer :: KoomeyAirPumps + integer :: KoomeyElectricPumps + logical :: RtGearCrashs + logical :: DwGearCrashs + logical :: FloorCollisions + logical :: CrownCollisions + logical :: DwClutchs + logical :: Blowers + logical :: BlowerMp1s + logical :: BlowerMp2s + logical :: BlowerMp3s + logical :: BlowerRts + logical :: BlowerDws + logical :: BlowerStarts + logical :: BlowerShutdowns + logical :: ElectricPumps + end Type SoundsType + Type(SoundsType)::Sounds + + ! procedure (ActionInteger), pointer :: SoundMP1Ptr + ! procedure (ActionInteger), pointer :: SoundMP2Ptr + ! procedure (ActionInteger), pointer :: SoundMP3Ptr + ! procedure (ActionInteger), pointer :: SoundRTPtr + ! procedure (ActionInteger), pointer :: SoundDwFwPtr + ! procedure (ActionInteger), pointer :: SoundDwRevPtr + ! procedure (ActionInteger), pointer :: SoundDwBrakePtr + ! procedure (ActionInteger), pointer :: SoundChokePumpPtr + ! procedure (ActionInteger), pointer :: SoundGasThroughChokePtr + ! procedure (ActionInteger), pointer :: SoundKoomeyAirPumpPtr + ! procedure (ActionInteger), pointer :: SoundKoomeyElectricPumpPtr + ! procedure (ActionBool), pointer :: SoundRtGearCrashPtr + ! procedure (ActionBool), pointer :: SoundDwGearCrashPtr + ! procedure (ActionBool), pointer :: SoundFloorCollisionPtr + ! procedure (ActionBool), pointer :: SoundCrownCollisionPtr + ! procedure (ActionBool), pointer :: SoundDwClutchPtr + ! procedure (ActionBool), pointer :: SoundBlowerPtr + ! procedure (ActionBool), pointer :: SoundBlowerMp1Ptr + ! procedure (ActionBool), pointer :: SoundBlowerMp2Ptr + ! procedure (ActionBool), pointer :: SoundBlowerMp3Ptr + ! procedure (ActionBool), pointer :: SoundBlowerRtPtr + ! procedure (ActionBool), pointer :: SoundBlowerDwPtr + ! procedure (ActionBool), pointer :: SoundBlowerStartPtr + ! procedure (ActionBool), pointer :: SoundBlowerShutdownPtr + ! procedure (ActionBool), pointer :: SoundElectricPumpPtr + + ! private :: SoundMP1Ptr, SoundMP2Ptr, SoundMP3Ptr, SoundRTPtr, SoundDwFwPtr, SoundDwRevPtr,SoundDwBrakePtr,SoundChokePumpPtr,SoundGasThroughChokePtr,SoundKoomeyAirPumpPtr, & + ! SoundKoomeyElectricPumpPtr, SoundRtGearCrashPtr,SoundDwGearCrashPtr,SoundFloorCollisionPtr,SoundCrownCollisionPtr,SoundDwClutchPtr,SoundBlowerPtr, & + ! SoundBlowerMp1Ptr, SoundBlowerMp2Ptr,SoundBlowerMp3Ptr,SoundBlowerRtPtr,SoundBlowerDwPtr,SoundBlowerStartPtr,SoundBlowerShutdownPtr,SoundElectricPumpPtr contains @@ -73,154 +75,154 @@ module CSounds implicit none integer, intent(inout) :: v !if(associated(SoundMP1Ptr)) call SoundMP1Ptr(v) - SoundMP1s = v + Sounds%MP1s = v end subroutine subroutine SetSoundMP2(v) implicit none integer, intent(inout) :: v !if(associated(SoundMP2Ptr)) call SoundMP2Ptr(v) - SoundMP2s = v + Sounds%MP2s = v end subroutine subroutine SetSoundMP3(v) implicit none integer, intent(inout) :: v !if(associated(SoundMP3Ptr)) call SoundMP3Ptr(v) - SoundMP3s = v + Sounds%MP3s = v end subroutine subroutine SetSoundRT(v) implicit none integer, intent(inout) :: v !if(associated(SoundRTPtr)) call SoundRTPtr(v) - SoundRTs = v + Sounds%RTs = v end subroutine subroutine SetSoundDwFw(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwFwPtr)) call SoundDwFwPtr(v) - SoundDwFws = v + Sounds%DwFws = v end subroutine subroutine SetSoundDwRev(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwRevPtr)) call SoundDwRevPtr(v) - SoundDwRevs = v + Sounds%DwRevs = v end subroutine subroutine SetSoundDwBrake(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwBrakePtr)) call SoundDwBrakePtr(v) - SoundDwBrakes = v + Sounds%DwBrakes = v end subroutine subroutine SetSoundChokePump(v) implicit none integer, intent(inout) :: v !if(associated(SoundChokePumpPtr)) call SoundChokePumpPtr(v) - SoundChokePumps = v + Sounds%ChokePumps = v end subroutine subroutine SetSoundGasThroughChoke(v) implicit none integer, intent(inout) :: v !if(associated(SoundGasThroughChokePtr)) call SoundGasThroughChokePtr(v) - SoundGasThroughChokes = v + Sounds%GasThroughChokes = v end subroutine subroutine SetSoundKoomeyAirPump(v) implicit none integer, intent(inout) :: v !if(associated(SoundKoomeyAirPumpPtr)) call SoundKoomeyAirPumpPtr(v) - SoundKoomeyAirPumps = v + Sounds%KoomeyAirPumps = v end subroutine subroutine SetSoundKoomeyElectricPump(v) implicit none integer, intent(inout) :: v !if(associated(SoundKoomeyElectricPumpPtr)) call SoundKoomeyElectricPumpPtr(v) - SoundKoomeyElectricPumps = v + Sounds%KoomeyElectricPumps = v end subroutine subroutine SetSoundRtGearCrash(v) implicit none logical, intent(inout) :: v !if(associated(SoundRtGearCrashPtr)) call SoundRtGearCrashPtr(v) - SoundRtGearCrashs = v + Sounds%RtGearCrashs = v end subroutine subroutine SetSoundDwGearCrash(v) implicit none logical, intent(inout) :: v !if(associated(SoundDwGearCrashPtr)) call SoundDwGearCrashPtr(v) - SoundDwGearCrashs = v + Sounds%DwGearCrashs = v end subroutine subroutine SetSoundFloorCollision(v) implicit none logical, intent(inout) :: v !if(associated(SoundFloorCollisionPtr)) call SoundFloorCollisionPtr(v) - SoundFloorCollisions = v + Sounds%FloorCollisions = v end subroutine subroutine SetSoundCrownCollision(v) implicit none logical, intent(inout) :: v !if(associated(SoundCrownCollisionPtr)) call SoundCrownCollisionPtr(v) - SoundCrownCollisions = v + Sounds%CrownCollisions = v end subroutine subroutine SetSoundDwClutch(v) implicit none logical, intent(inout) :: v !if(associated(SoundDwClutchPtr)) call SoundDwClutchPtr(v) - SoundDwClutchs = v + Sounds%DwClutchs = v end subroutine subroutine SetSoundBlower(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerPtr)) call SoundBlowerPtr(v) - SoundBlowers = v + Sounds%Blowers = v end subroutine subroutine SetSoundBlowerMP1(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp1Ptr)) call SoundBlowerMp1Ptr(v) - SoundBlowerMp1s = v + Sounds%BlowerMp1s = v end subroutine subroutine SetSoundBlowerMP2(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp2Ptr)) call SoundBlowerMp2Ptr(v) - SoundBlowerMp2s = v + Sounds%BlowerMp2s = v end subroutine subroutine SetSoundBlowerMP3(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp3Ptr)) call SoundBlowerMp3Ptr(v) - SoundBlowerMp3s = v + Sounds%BlowerMp3s = v end subroutine subroutine SetSoundBlowerRT(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerRtPtr)) call SoundBlowerRtPtr(v) - SoundBlowerRts = v + Sounds%BlowerRts = v end subroutine subroutine SetSoundBlowerDW(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerDwPtr)) call SoundBlowerDwPtr(v) - SoundBlowerDws = v + Sounds%BlowerDws = v end subroutine @@ -228,14 +230,14 @@ module CSounds implicit none logical, intent(inout) :: v !if(associated(SoundBlowerStartPtr)) call SoundBlowerStartPtr(v) - SoundBlowerStarts = v + Sounds%BlowerStarts = v end subroutine subroutine SetSoundBlowerShutdown(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerShutdownPtr)) call SoundBlowerShutdownPtr(v) - SoundBlowerShutdowns = v + Sounds%BlowerShutdowns = v end subroutine @@ -243,7 +245,7 @@ module CSounds implicit none logical, intent(inout) :: v !if(associated(SoundElectricPumpPtr)) call SoundElectricPumpPtr(v) - SoundElectricPumps = v + Sounds%ElectricPumps = v end subroutine @@ -263,205 +265,205 @@ module CSounds - subroutine SubscribeSoundMP1(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP1 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP1' :: SubscribeSoundMP1 - implicit none - procedure (ActionInteger) :: v - SoundMP1Ptr => v - end subroutine - - subroutine SubscribeSoundMP2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP2' :: SubscribeSoundMP2 - implicit none - procedure (ActionInteger) :: v - SoundMP2Ptr => v - end subroutine - - subroutine SubscribeSoundMP3(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP3 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP3' :: SubscribeSoundMP3 - implicit none - procedure (ActionInteger) :: v - SoundMP3Ptr => v - end subroutine - - subroutine SubscribeSoundRT(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundRT - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundRT' :: SubscribeSoundRT - implicit none - procedure (ActionInteger) :: v - SoundRTPtr => v - end subroutine - - subroutine SubscribeSoundDwFw(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwFw - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwFw' :: SubscribeSoundDwFw - implicit none - procedure (ActionInteger) :: v - SoundDwFwPtr => v - end subroutine - - subroutine SubscribeSoundDwRev(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwRev - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwRev' :: SubscribeSoundDwRev - implicit none - procedure (ActionInteger) :: v - SoundDwRevPtr => v - end subroutine - - subroutine SubscribeSoundDwBrake(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwBrake - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwBrake' :: SubscribeSoundDwBrake - implicit none - procedure (ActionInteger) :: v - SoundDwBrakePtr => v - end subroutine - - subroutine SubscribeSoundChokePump(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundChokePump - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundChokePump' :: SubscribeSoundChokePump - implicit none - procedure (ActionInteger) :: v - SoundChokePumpPtr => v - end subroutine - - subroutine SubscribeSoundGasThroughChoke(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundGasThroughChoke - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundGasThroughChoke' :: SubscribeSoundGasThroughChoke - implicit none - procedure (ActionInteger) :: v - SoundGasThroughChokePtr => v - end subroutine + ! subroutine SubscribeSoundMP1(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP1 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP1' :: SubscribeSoundMP1 + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundMP1Ptr => v + ! end subroutine - subroutine SubscribeSoundKoomeyAirPump(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundKoomeyAirPump - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundKoomeyAirPump' :: SubscribeSoundKoomeyAirPump - implicit none - procedure (ActionInteger) :: v - SoundKoomeyAirPumpPtr => v - end subroutine - - subroutine SubscribeSoundKoomeyElectricPump(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundKoomeyElectricPump - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundKoomeyElectricPump' :: SubscribeSoundKoomeyElectricPump - implicit none - procedure (ActionInteger) :: v - SoundKoomeyElectricPumpPtr => v - end subroutine - - subroutine SubscribeSoundRtGearCrash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundRtGearCrash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundRtGearCrash' :: SubscribeSoundRtGearCrash - implicit none - procedure (ActionBool) :: v - SoundRtGearCrashPtr => v - end subroutine - - subroutine SubscribeSoundDwGearCrash(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwGearCrash - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwGearCrash' :: SubscribeSoundDwGearCrash - implicit none - procedure (ActionBool) :: v - SoundDwGearCrashPtr => v - end subroutine - - subroutine SubscribeSoundFloorCollision(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundFloorCollision - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundFloorCollision' :: SubscribeSoundFloorCollision - implicit none - procedure (ActionBool) :: v - SoundFloorCollisionPtr => v - end subroutine + ! subroutine SubscribeSoundMP2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP2' :: SubscribeSoundMP2 + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundMP2Ptr => v + ! end subroutine + + ! subroutine SubscribeSoundMP3(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundMP3 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundMP3' :: SubscribeSoundMP3 + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundMP3Ptr => v + ! end subroutine + + ! subroutine SubscribeSoundRT(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundRT + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundRT' :: SubscribeSoundRT + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundRTPtr => v + ! end subroutine + + ! subroutine SubscribeSoundDwFw(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwFw + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwFw' :: SubscribeSoundDwFw + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundDwFwPtr => v + ! end subroutine + + ! subroutine SubscribeSoundDwRev(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwRev + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwRev' :: SubscribeSoundDwRev + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundDwRevPtr => v + ! end subroutine + + ! subroutine SubscribeSoundDwBrake(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwBrake + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwBrake' :: SubscribeSoundDwBrake + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundDwBrakePtr => v + ! end subroutine + + ! subroutine SubscribeSoundChokePump(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundChokePump + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundChokePump' :: SubscribeSoundChokePump + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundChokePumpPtr => v + ! end subroutine + + ! subroutine SubscribeSoundGasThroughChoke(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundGasThroughChoke + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundGasThroughChoke' :: SubscribeSoundGasThroughChoke + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundGasThroughChokePtr => v + ! end subroutine + + ! subroutine SubscribeSoundKoomeyAirPump(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundKoomeyAirPump + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundKoomeyAirPump' :: SubscribeSoundKoomeyAirPump + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundKoomeyAirPumpPtr => v + ! end subroutine + + ! subroutine SubscribeSoundKoomeyElectricPump(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundKoomeyElectricPump + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundKoomeyElectricPump' :: SubscribeSoundKoomeyElectricPump + ! implicit none + ! procedure (ActionInteger) :: v + ! SoundKoomeyElectricPumpPtr => v + ! end subroutine + + ! subroutine SubscribeSoundRtGearCrash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundRtGearCrash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundRtGearCrash' :: SubscribeSoundRtGearCrash + ! implicit none + ! procedure (ActionBool) :: v + ! SoundRtGearCrashPtr => v + ! end subroutine + + ! subroutine SubscribeSoundDwGearCrash(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwGearCrash + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwGearCrash' :: SubscribeSoundDwGearCrash + ! implicit none + ! procedure (ActionBool) :: v + ! SoundDwGearCrashPtr => v + ! end subroutine + + ! subroutine SubscribeSoundFloorCollision(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundFloorCollision + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundFloorCollision' :: SubscribeSoundFloorCollision + ! implicit none + ! procedure (ActionBool) :: v + ! SoundFloorCollisionPtr => v + ! end subroutine + + ! subroutine SubscribeSoundCrownCollision(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundCrownCollision + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundCrownCollision' :: SubscribeSoundCrownCollision + ! implicit none + ! procedure (ActionBool) :: v + ! SoundCrownCollisionPtr => v + ! end subroutine + + ! subroutine SubscribeSoundDwClutch(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwClutch + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwClutch' :: SubscribeSoundDwClutch + ! implicit none + ! procedure (ActionBool) :: v + ! SoundDwClutchPtr => v + ! end subroutine - subroutine SubscribeSoundCrownCollision(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundCrownCollision - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundCrownCollision' :: SubscribeSoundCrownCollision - implicit none - procedure (ActionBool) :: v - SoundCrownCollisionPtr => v - end subroutine + ! subroutine SubscribeSoundBlower(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlower + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlower' :: SubscribeSoundBlower + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerPtr => v + ! end subroutine - subroutine SubscribeSoundDwClutch(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundDwClutch - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundDwClutch' :: SubscribeSoundDwClutch - implicit none - procedure (ActionBool) :: v - SoundDwClutchPtr => v - end subroutine + ! subroutine SubscribeSoundBlowerMp1(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp1 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp1' :: SubscribeSoundBlowerMp1 + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerMp1Ptr => v + ! end subroutine - subroutine SubscribeSoundBlower(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlower - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlower' :: SubscribeSoundBlower - implicit none - procedure (ActionBool) :: v - SoundBlowerPtr => v - end subroutine + ! subroutine SubscribeSoundBlowerMp2(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp2 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp2' :: SubscribeSoundBlowerMp2 + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerMp2Ptr => v + ! end subroutine - subroutine SubscribeSoundBlowerMp1(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp1 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp1' :: SubscribeSoundBlowerMp1 - implicit none - procedure (ActionBool) :: v - SoundBlowerMp1Ptr => v - end subroutine + ! subroutine SubscribeSoundBlowerMp3(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp3 + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp3' :: SubscribeSoundBlowerMp3 + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerMp3Ptr => v + ! end subroutine - subroutine SubscribeSoundBlowerMp2(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp2 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp2' :: SubscribeSoundBlowerMp2 - implicit none - procedure (ActionBool) :: v - SoundBlowerMp2Ptr => v - end subroutine + ! subroutine SubscribeSoundBlowerRt(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerRt + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerRt' :: SubscribeSoundBlowerRt + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerRtPtr => v + ! end subroutine - subroutine SubscribeSoundBlowerMp3(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerMp3 - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerMp3' :: SubscribeSoundBlowerMp3 - implicit none - procedure (ActionBool) :: v - SoundBlowerMp3Ptr => v - end subroutine - - subroutine SubscribeSoundBlowerRt(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerRt - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerRt' :: SubscribeSoundBlowerRt - implicit none - procedure (ActionBool) :: v - SoundBlowerRtPtr => v - end subroutine - - subroutine SubscribeSoundBlowerDw(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerDw - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerDw' :: SubscribeSoundBlowerDw - implicit none - procedure (ActionBool) :: v - SoundBlowerDwPtr => v - end subroutine + ! subroutine SubscribeSoundBlowerDw(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerDw + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerDw' :: SubscribeSoundBlowerDw + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerDwPtr => v + ! end subroutine - subroutine SubscribeSoundBlowerStart(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerStart - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerStart' :: SubscribeSoundBlowerStart - implicit none - procedure (ActionBool) :: v - SoundBlowerStartPtr => v - end subroutine + ! subroutine SubscribeSoundBlowerStart(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerStart + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerStart' :: SubscribeSoundBlowerStart + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerStartPtr => v + ! end subroutine - subroutine SubscribeSoundBlowerShutdown(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerShutdown - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerShutdown' :: SubscribeSoundBlowerShutdown - implicit none - procedure (ActionBool) :: v - SoundBlowerShutdownPtr => v - end subroutine + ! subroutine SubscribeSoundBlowerShutdown(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundBlowerShutdown + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundBlowerShutdown' :: SubscribeSoundBlowerShutdown + ! implicit none + ! procedure (ActionBool) :: v + ! SoundBlowerShutdownPtr => v + ! end subroutine - subroutine SubscribeSoundElectricPump(v) - !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundElectricPump - !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundElectricPump' :: SubscribeSoundElectricPump - implicit none - procedure (ActionBool) :: v - SoundElectricPumpPtr => v - end subroutine + ! subroutine SubscribeSoundElectricPump(v) + ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSoundElectricPump + ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeSoundElectricPump' :: SubscribeSoundElectricPump + ! implicit none + ! procedure (ActionBool) :: v + ! SoundElectricPumpPtr => v + ! end subroutine @@ -492,183 +494,183 @@ module CSounds - ! Input routines - - ! Output routines - integer function GetSoundMP1() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP1 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP1' :: GetSoundMP1 - implicit none - GetSoundMP1 = SoundMP1s - end function + ! ! Input routines - integer function GetSoundMP2() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP2 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP2' :: GetSoundMP2 - implicit none - GetSoundMP2 = SoundMP2s - end function + ! ! Output routines + ! integer function GetSoundMP1() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP1 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP1' :: GetSoundMP1 + ! implicit none + ! GetSoundMP1 = SoundMP1s + ! end function - integer function GetSoundMP3() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP3 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP3' :: GetSoundMP3 - implicit none - GetSoundMP3 = SoundMP3s - end function + ! integer function GetSoundMP2() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP2 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP2' :: GetSoundMP2 + ! implicit none + ! GetSoundMP2 = SoundMP2s + ! end function - integer function GetSoundRT() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRT - !DEC$ ATTRIBUTES ALIAS: 'GetSoundRT' :: GetSoundRT - implicit none - GetSoundRT = SoundRTs - end function + ! integer function GetSoundMP3() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP3 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP3' :: GetSoundMP3 + ! implicit none + ! GetSoundMP3 = SoundMP3s + ! end function - integer function GetSoundDwFw() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwFw - !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwFw' :: GetSoundDwFw - implicit none - GetSoundDwFw = SoundDwFws - end function + ! integer function GetSoundRT() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRT + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundRT' :: GetSoundRT + ! implicit none + ! GetSoundRT = SoundRTs + ! end function - integer function GetSoundDwRev() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwRev - !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwRev' :: GetSoundDwRev - implicit none - GetSoundDwRev = SoundDwRevs - end function + ! integer function GetSoundDwFw() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwFw + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwFw' :: GetSoundDwFw + ! implicit none + ! GetSoundDwFw = SoundDwFws + ! end function - integer function GetSoundDwBrake() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwBrake - !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwBrake' :: GetSoundDwBrake - implicit none - GetSoundDwBrake = SoundDwBrakes - end function + ! integer function GetSoundDwRev() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwRev + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwRev' :: GetSoundDwRev + ! implicit none + ! GetSoundDwRev = SoundDwRevs + ! end function - integer function GetSoundChokePump() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundChokePump - !DEC$ ATTRIBUTES ALIAS: 'GetSoundChokePump' :: GetSoundChokePump - implicit none - GetSoundChokePump = SoundChokePumps - end function - - integer function GetSoundGasThroughChoke() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundGasThroughChoke - !DEC$ ATTRIBUTES ALIAS: 'GetSoundGasThroughChoke' :: GetSoundGasThroughChoke - implicit none - GetSoundGasThroughChoke = SoundGasThroughChokes - end function + ! integer function GetSoundDwBrake() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwBrake + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwBrake' :: GetSoundDwBrake + ! implicit none + ! GetSoundDwBrake = SoundDwBrakes + ! end function - integer function GetSoundKoomeyAirPump() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyAirPump - !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyAirPump' :: GetSoundKoomeyAirPump - implicit none - GetSoundKoomeyAirPump = SoundKoomeyAirPumps - end function + ! integer function GetSoundChokePump() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundChokePump + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundChokePump' :: GetSoundChokePump + ! implicit none + ! GetSoundChokePump = SoundChokePumps + ! end function - integer function GetSoundKoomeyElectricPump() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyElectricPump - !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyElectricPump' :: GetSoundKoomeyElectricPump - implicit none - GetSoundKoomeyElectricPump = SoundKoomeyElectricPumps - end function + ! integer function GetSoundGasThroughChoke() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundGasThroughChoke + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundGasThroughChoke' :: GetSoundGasThroughChoke + ! implicit none + ! GetSoundGasThroughChoke = SoundGasThroughChokes + ! end function - logical function GetSoundRtGearCrash() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRtGearCrash - !DEC$ ATTRIBUTES ALIAS: 'GetSoundRtGearCrash' :: GetSoundRtGearCrash - implicit none - GetSoundRtGearCrash = SoundRtGearCrashs - end function + ! integer function GetSoundKoomeyAirPump() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyAirPump + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyAirPump' :: GetSoundKoomeyAirPump + ! implicit none + ! GetSoundKoomeyAirPump = SoundKoomeyAirPumps + ! end function - logical function GetSoundDwGearCrash() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwGearCrash - !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwGearCrash' :: GetSoundDwGearCrash - implicit none - GetSoundDwGearCrash = SoundDwGearCrashs - end function - - logical function GetSoundFloorCollision() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundFloorCollision - !DEC$ ATTRIBUTES ALIAS: 'GetSoundFloorCollision' :: GetSoundFloorCollision - implicit none - GetSoundFloorCollision = SoundFloorCollisions - end function - - logical function GetSoundCrownCollision() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundCrownCollision - !DEC$ ATTRIBUTES ALIAS: 'GetSoundCrownCollision' :: GetSoundCrownCollision - implicit none - GetSoundCrownCollision = SoundCrownCollisions - end function - - logical function GetSoundDwClutch() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwClutch - !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwClutch' :: GetSoundDwClutch - implicit none - GetSoundDwClutch = SoundDwClutchs - end function - - logical function GetSoundBlower() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlower - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlower' :: GetSoundBlower - implicit none - GetSoundBlower = SoundBlowers - end function - - logical function GetSoundBlowerMp1() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp1 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp1' :: GetSoundBlowerMp1 - implicit none - GetSoundBlowerMp1 = SoundBlowerMp1s - end function - - logical function GetSoundBlowerMp2() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp2 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp2' :: GetSoundBlowerMp2 - implicit none - GetSoundBlowerMp2 = SoundBlowerMp2s - end function - - logical function GetSoundBlowerMp3() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp3 - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp3' :: GetSoundBlowerMp3 - implicit none - GetSoundBlowerMp3 = SoundBlowerMp3s - end function - - logical function GetSoundBlowerRt() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerRt - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerRt' :: GetSoundBlowerRt - implicit none - GetSoundBlowerRt = SoundBlowerRts - end function - - logical function GetSoundBlowerDw() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerDw - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerDw' :: GetSoundBlowerDw - implicit none - GetSoundBlowerDw = SoundBlowerDws - end function - - logical function GetSoundBlowerStart() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerStart - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerStart' :: GetSoundBlowerStart - implicit none - GetSoundBlowerStart = SoundBlowerStarts - end function - - logical function GetSoundBlowerShutdown() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerShutdown - !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerShutdown' :: GetSoundBlowerShutdown - implicit none - GetSoundBlowerShutdown = SoundBlowerShutdowns - end function - - logical function GetSoundElectricPump() - !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundElectricPump - !DEC$ ATTRIBUTES ALIAS: 'GetSoundElectricPump' :: GetSoundElectricPump - implicit none - GetSoundElectricPump = SoundElectricPumps - end function + ! integer function GetSoundKoomeyElectricPump() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyElectricPump + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyElectricPump' :: GetSoundKoomeyElectricPump + ! implicit none + ! GetSoundKoomeyElectricPump = SoundKoomeyElectricPumps + ! end function + + ! logical function GetSoundRtGearCrash() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRtGearCrash + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundRtGearCrash' :: GetSoundRtGearCrash + ! implicit none + ! GetSoundRtGearCrash = SoundRtGearCrashs + ! end function + + ! logical function GetSoundDwGearCrash() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwGearCrash + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwGearCrash' :: GetSoundDwGearCrash + ! implicit none + ! GetSoundDwGearCrash = SoundDwGearCrashs + ! end function + + ! logical function GetSoundFloorCollision() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundFloorCollision + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundFloorCollision' :: GetSoundFloorCollision + ! implicit none + ! GetSoundFloorCollision = SoundFloorCollisions + ! end function + + ! logical function GetSoundCrownCollision() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundCrownCollision + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundCrownCollision' :: GetSoundCrownCollision + ! implicit none + ! GetSoundCrownCollision = SoundCrownCollisions + ! end function + + ! logical function GetSoundDwClutch() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwClutch + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwClutch' :: GetSoundDwClutch + ! implicit none + ! GetSoundDwClutch = SoundDwClutchs + ! end function + + ! logical function GetSoundBlower() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlower + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlower' :: GetSoundBlower + ! implicit none + ! GetSoundBlower = SoundBlowers + ! end function + + ! logical function GetSoundBlowerMp1() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp1 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp1' :: GetSoundBlowerMp1 + ! implicit none + ! GetSoundBlowerMp1 = SoundBlowerMp1s + ! end function + + ! logical function GetSoundBlowerMp2() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp2 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp2' :: GetSoundBlowerMp2 + ! implicit none + ! GetSoundBlowerMp2 = SoundBlowerMp2s + ! end function + + ! logical function GetSoundBlowerMp3() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp3 + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp3' :: GetSoundBlowerMp3 + ! implicit none + ! GetSoundBlowerMp3 = SoundBlowerMp3s + ! end function + + ! logical function GetSoundBlowerRt() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerRt + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerRt' :: GetSoundBlowerRt + ! implicit none + ! GetSoundBlowerRt = SoundBlowerRts + ! end function + + ! logical function GetSoundBlowerDw() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerDw + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerDw' :: GetSoundBlowerDw + ! implicit none + ! GetSoundBlowerDw = SoundBlowerDws + ! end function + + ! logical function GetSoundBlowerStart() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerStart + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerStart' :: GetSoundBlowerStart + ! implicit none + ! GetSoundBlowerStart = SoundBlowerStarts + ! end function + + ! logical function GetSoundBlowerShutdown() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerShutdown + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerShutdown' :: GetSoundBlowerShutdown + ! implicit none + ! GetSoundBlowerShutdown = SoundBlowerShutdowns + ! end function + + ! logical function GetSoundElectricPump() + ! !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundElectricPump + ! !DEC$ ATTRIBUTES ALIAS: 'GetSoundElectricPump' :: GetSoundElectricPump + ! implicit none + ! GetSoundElectricPump = SoundElectricPumps + ! end function diff --git a/CSounds.f90 b/CSounds.f90 index 0bb7826..f0ed6be 100644 --- a/CSounds.f90 +++ b/CSounds.f90 @@ -6,31 +6,31 @@ module CSounds ! Input vars ! Output vars - integer :: SoundMP1s - integer :: SoundMP2s - integer :: SoundMP3s - integer :: SoundRTs - integer :: SoundDwFws - integer :: SoundDwRevs - integer :: SoundDwBrakes - integer :: SoundChokePumps - integer :: SoundGasThroughChokes - integer :: SoundKoomeyAirPumps - integer :: SoundKoomeyElectricPumps - logical :: SoundRtGearCrashs - logical :: SoundDwGearCrashs - logical :: SoundFloorCollisions - logical :: SoundCrownCollisions - logical :: SoundDwClutchs - logical :: SoundBlowers - logical :: SoundBlowerMp1s - logical :: SoundBlowerMp2s - logical :: SoundBlowerMp3s - logical :: SoundBlowerRts - logical :: SoundBlowerDws - logical :: SoundBlowerStarts - logical :: SoundBlowerShutdowns - logical :: SoundElectricPumps + integer :: Sounds%MP1s + integer :: Sounds%MP2s + integer :: Sounds%MP3s + integer :: Sounds%RTs + integer :: Sounds%DwFws + integer :: Sounds%DwRevs + integer :: Sounds%DwBrakes + integer :: Sounds%ChokePumps + integer :: Sounds%GasThroughChokes + integer :: Sounds%KoomeyAirPumps + integer :: Sounds%KoomeyElectricPumps + logical :: Sounds%RtGearCrashs + logical :: Sounds%DwGearCrashs + logical :: Sounds%FloorCollisions + logical :: Sounds%CrownCollisions + logical :: Sounds%DwClutchs + logical :: Sounds%Blowers + logical :: Sounds%BlowerMp1s + logical :: Sounds%BlowerMp2s + logical :: Sounds%BlowerMp3s + logical :: Sounds%BlowerRts + logical :: Sounds%BlowerDws + logical :: Sounds%BlowerStarts + logical :: Sounds%BlowerShutdowns + logical :: Sounds%ElectricPumps procedure (ActionInteger), pointer :: SoundMP1Ptr @@ -73,154 +73,154 @@ module CSounds implicit none integer, intent(inout) :: v !if(associated(SoundMP1Ptr)) call SoundMP1Ptr(v) - SoundMP1s = v + Sounds%MP1s = v end subroutine subroutine SetSoundMP2(v) implicit none integer, intent(inout) :: v !if(associated(SoundMP2Ptr)) call SoundMP2Ptr(v) - SoundMP2s = v + Sounds%MP2s = v end subroutine subroutine SetSoundMP3(v) implicit none integer, intent(inout) :: v !if(associated(SoundMP3Ptr)) call SoundMP3Ptr(v) - SoundMP3s = v + Sounds%MP3s = v end subroutine subroutine SetSoundRT(v) implicit none integer, intent(inout) :: v !if(associated(SoundRTPtr)) call SoundRTPtr(v) - SoundRTs = v + Sounds%RTs = v end subroutine subroutine SetSoundDwFw(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwFwPtr)) call SoundDwFwPtr(v) - SoundDwFws = v + Sounds%DwFws = v end subroutine subroutine SetSoundDwRev(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwRevPtr)) call SoundDwRevPtr(v) - SoundDwRevs = v + Sounds%DwRevs = v end subroutine subroutine SetSoundDwBrake(v) implicit none integer, intent(inout) :: v !if(associated(SoundDwBrakePtr)) call SoundDwBrakePtr(v) - SoundDwBrakes = v + Sounds%DwBrakes = v end subroutine subroutine SetSoundChokePump(v) implicit none integer, intent(inout) :: v !if(associated(SoundChokePumpPtr)) call SoundChokePumpPtr(v) - SoundChokePumps = v + Sounds%ChokePumps = v end subroutine subroutine SetSoundGasThroughChoke(v) implicit none integer, intent(inout) :: v !if(associated(SoundGasThroughChokePtr)) call SoundGasThroughChokePtr(v) - SoundGasThroughChokes = v + Sounds%GasThroughChokes = v end subroutine subroutine SetSoundKoomeyAirPump(v) implicit none integer, intent(inout) :: v !if(associated(SoundKoomeyAirPumpPtr)) call SoundKoomeyAirPumpPtr(v) - SoundKoomeyAirPumps = v + Sounds%KoomeyAirPumps = v end subroutine subroutine SetSoundKoomeyElectricPump(v) implicit none integer, intent(inout) :: v !if(associated(SoundKoomeyElectricPumpPtr)) call SoundKoomeyElectricPumpPtr(v) - SoundKoomeyElectricPumps = v + Sounds%KoomeyElectricPumps = v end subroutine subroutine SetSoundRtGearCrash(v) implicit none logical, intent(inout) :: v !if(associated(SoundRtGearCrashPtr)) call SoundRtGearCrashPtr(v) - SoundRtGearCrashs = v + Sounds%RtGearCrashs = v end subroutine subroutine SetSoundDwGearCrash(v) implicit none logical, intent(inout) :: v !if(associated(SoundDwGearCrashPtr)) call SoundDwGearCrashPtr(v) - SoundDwGearCrashs = v + Sounds%DwGearCrashs = v end subroutine subroutine SetSoundFloorCollision(v) implicit none logical, intent(inout) :: v !if(associated(SoundFloorCollisionPtr)) call SoundFloorCollisionPtr(v) - SoundFloorCollisions = v + Sounds%FloorCollisions = v end subroutine subroutine SetSoundCrownCollision(v) implicit none logical, intent(inout) :: v !if(associated(SoundCrownCollisionPtr)) call SoundCrownCollisionPtr(v) - SoundCrownCollisions = v + Sounds%CrownCollisions = v end subroutine subroutine SetSoundDwClutch(v) implicit none logical, intent(inout) :: v !if(associated(SoundDwClutchPtr)) call SoundDwClutchPtr(v) - SoundDwClutchs = v + Sounds%DwClutchs = v end subroutine subroutine SetSoundBlower(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerPtr)) call SoundBlowerPtr(v) - SoundBlowers = v + Sounds%Blowers = v end subroutine subroutine SetSoundBlowerMP1(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp1Ptr)) call SoundBlowerMp1Ptr(v) - SoundBlowerMp1s = v + Sounds%BlowerMp1s = v end subroutine subroutine SetSoundBlowerMP2(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp2Ptr)) call SoundBlowerMp2Ptr(v) - SoundBlowerMp2s = v + Sounds%BlowerMp2s = v end subroutine subroutine SetSoundBlowerMP3(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerMp3Ptr)) call SoundBlowerMp3Ptr(v) - SoundBlowerMp3s = v + Sounds%BlowerMp3s = v end subroutine subroutine SetSoundBlowerRT(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerRtPtr)) call SoundBlowerRtPtr(v) - SoundBlowerRts = v + Sounds%BlowerRts = v end subroutine subroutine SetSoundBlowerDW(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerDwPtr)) call SoundBlowerDwPtr(v) - SoundBlowerDws = v + Sounds%BlowerDws = v end subroutine @@ -228,14 +228,14 @@ module CSounds implicit none logical, intent(inout) :: v !if(associated(SoundBlowerStartPtr)) call SoundBlowerStartPtr(v) - SoundBlowerStarts = v + Sounds%BlowerStarts = v end subroutine subroutine SetSoundBlowerShutdown(v) implicit none logical, intent(inout) :: v !if(associated(SoundBlowerShutdownPtr)) call SoundBlowerShutdownPtr(v) - SoundBlowerShutdowns = v + Sounds%BlowerShutdowns = v end subroutine @@ -243,7 +243,7 @@ module CSounds implicit none logical, intent(inout) :: v !if(associated(SoundElectricPumpPtr)) call SoundElectricPumpPtr(v) - SoundElectricPumps = v + Sounds%ElectricPumps = v end subroutine @@ -499,175 +499,175 @@ module CSounds !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP1 !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP1' :: GetSoundMP1 implicit none - GetSoundMP1 = SoundMP1s + GetSoundMP1 = Sounds%MP1s end function integer function GetSoundMP2() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP2 !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP2' :: GetSoundMP2 implicit none - GetSoundMP2 = SoundMP2s + GetSoundMP2 = Sounds%MP2s end function integer function GetSoundMP3() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundMP3 !DEC$ ATTRIBUTES ALIAS: 'GetSoundMP3' :: GetSoundMP3 implicit none - GetSoundMP3 = SoundMP3s + GetSoundMP3 = Sounds%MP3s end function integer function GetSoundRT() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRT !DEC$ ATTRIBUTES ALIAS: 'GetSoundRT' :: GetSoundRT implicit none - GetSoundRT = SoundRTs + GetSoundRT = Sounds%RTs end function integer function GetSoundDwFw() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwFw !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwFw' :: GetSoundDwFw implicit none - GetSoundDwFw = SoundDwFws + GetSoundDwFw = Sounds%DwFws end function integer function GetSoundDwRev() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwRev !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwRev' :: GetSoundDwRev implicit none - GetSoundDwRev = SoundDwRevs + GetSoundDwRev = Sounds%DwRevs end function integer function GetSoundDwBrake() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwBrake !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwBrake' :: GetSoundDwBrake implicit none - GetSoundDwBrake = SoundDwBrakes + GetSoundDwBrake = Sounds%DwBrakes end function integer function GetSoundChokePump() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundChokePump !DEC$ ATTRIBUTES ALIAS: 'GetSoundChokePump' :: GetSoundChokePump implicit none - GetSoundChokePump = SoundChokePumps + GetSoundChokePump = Sounds%ChokePumps end function integer function GetSoundGasThroughChoke() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundGasThroughChoke !DEC$ ATTRIBUTES ALIAS: 'GetSoundGasThroughChoke' :: GetSoundGasThroughChoke implicit none - GetSoundGasThroughChoke = SoundGasThroughChokes + GetSoundGasThroughChoke = Sounds%GasThroughChokes end function integer function GetSoundKoomeyAirPump() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyAirPump !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyAirPump' :: GetSoundKoomeyAirPump implicit none - GetSoundKoomeyAirPump = SoundKoomeyAirPumps + GetSoundKoomeyAirPump = Sounds%KoomeyAirPumps end function integer function GetSoundKoomeyElectricPump() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundKoomeyElectricPump !DEC$ ATTRIBUTES ALIAS: 'GetSoundKoomeyElectricPump' :: GetSoundKoomeyElectricPump implicit none - GetSoundKoomeyElectricPump = SoundKoomeyElectricPumps + GetSoundKoomeyElectricPump = Sounds%KoomeyElectricPumps end function logical function GetSoundRtGearCrash() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundRtGearCrash !DEC$ ATTRIBUTES ALIAS: 'GetSoundRtGearCrash' :: GetSoundRtGearCrash implicit none - GetSoundRtGearCrash = SoundRtGearCrashs + GetSoundRtGearCrash = Sounds%RtGearCrashs end function logical function GetSoundDwGearCrash() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwGearCrash !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwGearCrash' :: GetSoundDwGearCrash implicit none - GetSoundDwGearCrash = SoundDwGearCrashs + GetSoundDwGearCrash = Sounds%DwGearCrashs end function logical function GetSoundFloorCollision() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundFloorCollision !DEC$ ATTRIBUTES ALIAS: 'GetSoundFloorCollision' :: GetSoundFloorCollision implicit none - GetSoundFloorCollision = SoundFloorCollisions + GetSoundFloorCollision = Sounds%FloorCollisions end function logical function GetSoundCrownCollision() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundCrownCollision !DEC$ ATTRIBUTES ALIAS: 'GetSoundCrownCollision' :: GetSoundCrownCollision implicit none - GetSoundCrownCollision = SoundCrownCollisions + GetSoundCrownCollision = Sounds%CrownCollisions end function logical function GetSoundDwClutch() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundDwClutch !DEC$ ATTRIBUTES ALIAS: 'GetSoundDwClutch' :: GetSoundDwClutch implicit none - GetSoundDwClutch = SoundDwClutchs + GetSoundDwClutch = Sounds%DwClutchs end function logical function GetSoundBlower() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlower !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlower' :: GetSoundBlower implicit none - GetSoundBlower = SoundBlowers + GetSoundBlower = Sounds%Blowers end function logical function GetSoundBlowerMp1() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp1 !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp1' :: GetSoundBlowerMp1 implicit none - GetSoundBlowerMp1 = SoundBlowerMp1s + GetSoundBlowerMp1 = Sounds%BlowerMp1s end function logical function GetSoundBlowerMp2() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp2 !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp2' :: GetSoundBlowerMp2 implicit none - GetSoundBlowerMp2 = SoundBlowerMp2s + GetSoundBlowerMp2 = Sounds%BlowerMp2s end function logical function GetSoundBlowerMp3() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerMp3 !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerMp3' :: GetSoundBlowerMp3 implicit none - GetSoundBlowerMp3 = SoundBlowerMp3s + GetSoundBlowerMp3 = Sounds%BlowerMp3s end function logical function GetSoundBlowerRt() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerRt !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerRt' :: GetSoundBlowerRt implicit none - GetSoundBlowerRt = SoundBlowerRts + GetSoundBlowerRt = Sounds%BlowerRts end function logical function GetSoundBlowerDw() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerDw !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerDw' :: GetSoundBlowerDw implicit none - GetSoundBlowerDw = SoundBlowerDws + GetSoundBlowerDw = Sounds%BlowerDws end function logical function GetSoundBlowerStart() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerStart !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerStart' :: GetSoundBlowerStart implicit none - GetSoundBlowerStart = SoundBlowerStarts + GetSoundBlowerStart = Sounds%BlowerStarts end function logical function GetSoundBlowerShutdown() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundBlowerShutdown !DEC$ ATTRIBUTES ALIAS: 'GetSoundBlowerShutdown' :: GetSoundBlowerShutdown implicit none - GetSoundBlowerShutdown = SoundBlowerShutdowns + GetSoundBlowerShutdown = Sounds%BlowerShutdowns end function logical function GetSoundElectricPump() !DEC$ ATTRIBUTES DLLEXPORT :: GetSoundElectricPump !DEC$ ATTRIBUTES ALIAS: 'GetSoundElectricPump' :: GetSoundElectricPump implicit none - GetSoundElectricPump = SoundElectricPumps + GetSoundElectricPump = Sounds%ElectricPumps end function diff --git a/Data Structures.txt b/Data Structures.txt index 55d8a60..2ca59ab 100644 --- a/Data Structures.txt +++ b/Data Structures.txt @@ -40,4 +40,33 @@ CSharp: DownHole: DownHole OperationScenario: - OperationScenarioCommon: Constants? or Variables? + Common: + OperationScenario: Constants? or Variables? + Enums: + ElevatorConnectionEnum: merged into OperationScenario + KellyConnectionEnum + TdsConnectionModesEnum + Notifications: + Notifications + Permissions: + Permissions + SoftwareInputs + Unity: + UnityInputs + UnityOutputs + UnitySignals: + UnitySignals + Problems: + BitProblems + BopProblems + ChockProblems + DrillStemProblems + GaugesProblems + HoistingProblems + KickProblems + LostProblems + MudTreatmentProblems + OtherProblems + PumpProblems + RotaryProblems + \ No newline at end of file diff --git a/Equipments/BopStack/ANNULAR.f90 b/Equipments/BopStack/ANNULAR.f90 index 25eb2fe..c31ec93 100644 --- a/Equipments/BopStack/ANNULAR.f90 +++ b/Equipments/BopStack/ANNULAR.f90 @@ -200,7 +200,7 @@ SUBROUTINE ANNULAR_SUB USE CBopControlPanelVariables USE CEquipmentsConstants USE CBopStackVariables - USE CSimulationVariables + ! use CSimulationVariables implicit none @@ -209,7 +209,7 @@ SUBROUTINE ANNULAR_SUB RamsFirstSet= 0 - loop5: do while (finished_Annular==0) + ! loop5: do while (finished_Annular==0) !write(*,*) 'checkpoint 2' @@ -389,7 +389,7 @@ RAM(1)%timecounter_ram=RAM(1)%timecounter_ram+1 !60 FORMAT(11(f18.5)) - call sleepqq(100) + ! call sleepqq(100) !CALL CPU_TIME(Annular_EndTime) @@ -410,10 +410,10 @@ if (Annular_closed==1) then ! endif endif - if (IsStopped == .true.) return + ! if (IsStopped == .true.) return - end do loop5 !while finished_Annular==0 + ! end do loop5 !while finished_Annular==0 @@ -421,7 +421,7 @@ endif if ( finished_Annular==1 .and. RAM(1)%Bottles_Charged_MalfActive==.true.) then call bop_codeAnnular(1) !ramtype=4 1=RNUMBER - call sleepqq(100) + ! call sleepqq(100) endif END SUBROUTINE ANNULAR_SUB \ No newline at end of file diff --git a/Equipments/BopStack/AnnularMain.f90 b/Equipments/BopStack/AnnularMain.f90 index 892730f..1a585f9 100644 --- a/Equipments/BopStack/AnnularMain.f90 +++ b/Equipments/BopStack/AnnularMain.f90 @@ -3,63 +3,74 @@ module AnnularMain public contains - subroutine Annular_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(Annular_Init) - call OnSimulationStop%Add(Annular_Init) - call OnAnnularStep%Add(Annular_Step) - call OnAnnularOutput%Add(Annular_Output) - call OnAnnularMain%Add(AnnularMainBody) - end subroutine + ! subroutine Annular_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(Annular_Init) + ! call OnSimulationStop%Add(Annular_Init) + ! call OnAnnularStep%Add(Annular_Step) + ! call OnAnnularOutput%Add(Annular_Output) + ! call OnAnnularMain%Add(AnnularMainBody) + ! end subroutine - subroutine Annular_Init - implicit none - end subroutine Annular_Init + ! subroutine Annular_Init + ! implicit none + ! end subroutine Annular_Init subroutine Annular_Step - CALL ANNULAR + use VARIABLES + implicit none + if (finished_Annular/=0) then + call ANNULAR + if (AnnularIsOpening .or. AnnularIsClosing .or. RAM(1)%Bottles_Charged_MalfActive) then + if(finished_Annular==0) then + call ANNULAR_SUB !only body of loop2 + endif + endif + else + call ANNULAR_SUB + endif end subroutine Annular_Step - subroutine Annular_Output - implicit none - end subroutine Annular_Output + ! subroutine Annular_Output + ! implicit none + ! end subroutine Annular_Output - subroutine AnnularMainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP - implicit none + ! subroutine AnnularMainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP + ! implicit none - INTEGER :: AnnularDuration - integer,dimension(8) :: AnnularStartTime , AnnularEndTime + ! INTEGER :: AnnularDuration + ! integer,dimension(8) :: AnnularStartTime , AnnularEndTime - ! CALL BOP_StartUp() - loop1: DO - CALL DATE_AND_TIME(values=AnnularStartTime) + ! ! CALL BOP_StartUp() + ! loop1: DO + ! CALL DATE_AND_TIME(values=AnnularStartTime) - CALL ANNULAR + ! CALL ANNULAR - CALL DATE_AND_TIME(values=AnnularEndTime) + ! CALL DATE_AND_TIME(values=AnnularEndTime) - AnnularDuration = 3600000 * (AnnularEndTime(5) - AnnularStartTime(5)) + 60000 * (AnnularEndTime(6) - AnnularStartTime(6)) + 1000 * (AnnularEndTime(7) - AnnularStartTime(7)) + (AnnularEndTime(8) - AnnularStartTime(8)) + ! AnnularDuration = 3600000 * (AnnularEndTime(5) - AnnularStartTime(5)) + 60000 * (AnnularEndTime(6) - AnnularStartTime(6)) + 1000 * (AnnularEndTime(7) - AnnularStartTime(7)) + (AnnularEndTime(8) - AnnularStartTime(8)) - if (AnnularDuration < 100) then - call sleepqq(100 - AnnularDuration) - ELSE - WRITE (*,*) 'Annular BOP run duration exceeded 100 ms and =', AnnularDuration - end if + ! if (AnnularDuration < 100) then + ! call sleepqq(100 - AnnularDuration) + ! ELSE + ! WRITE (*,*) 'Annular BOP run duration exceeded 100 ms and =', AnnularDuration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - ! CALL DEALLOCATE_ARRAYS() - end subroutine AnnularMainBody + ! ! CALL DEALLOCATE_ARRAYS() + ! end subroutine AnnularMainBody end module AnnularMain \ No newline at end of file diff --git a/Equipments/BopStack/BlindRamsMain.f90 b/Equipments/BopStack/BlindRamsMain.f90 index a8fd144..7ef64aa 100644 --- a/Equipments/BopStack/BlindRamsMain.f90 +++ b/Equipments/BopStack/BlindRamsMain.f90 @@ -3,66 +3,86 @@ module BlindRamsMain public contains - subroutine BlindRams_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(BlindRams_Init) - call OnSimulationStop%Add(BlindRams_Init) - call OnBlindRamsStep%Add(BlindRams_Step) - call OnBlindRamsOutput%Add(BlindRams_Output) - call OnBlindRamsMain%Add(BlindRamsMainBody) - end subroutine + ! subroutine BlindRams_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(BlindRams_Init) + ! call OnSimulationStop%Add(BlindRams_Init) + ! call OnBlindRamsStep%Add(BlindRams_Step) + ! call OnBlindRamsOutput%Add(BlindRams_Output) + ! call OnBlindRamsMain%Add(BlindRamsMainBody) + ! end subroutine - subroutine BlindRams_Init - implicit none - end subroutine BlindRams_Init + ! subroutine BlindRams_Init + ! implicit none + ! end subroutine BlindRams_Init subroutine BlindRams_Step - CALL SHEAR_RAMS + use VARIABLES + implicit none + if (FINISHED_shear/=0) then + call SHEAR_RAMS + if (ShearRamIsOpening .or. ShearRamIsClosing .or. RAM(4)%Bottles_Charged_MalfActive) then + FirstSet= 0 + RamsFirstSet= 0 + if(FINISHED_shear==0) then + call SHEAR_RAMS_SUB !only body of loop2 + if (FINISHED_shear/=0 .and. finished_shear==1 .and. RAM(4)%Bottles_Charged_MalfActive==.true.) then + call bop_code(1,H_ShearRamBop,4) + endif + endif + endif + else + call SHEAR_RAMS_SUB + if (FINISHED_shear/=0 .and. finished_shear==1 .and. RAM(4)%Bottles_Charged_MalfActive==.true.) then + call bop_code(1,H_ShearRamBop,4) + endif + endif + end subroutine BlindRams_Step - subroutine BlindRams_Output - implicit none - end subroutine BlindRams_Output + ! subroutine BlindRams_Output + ! implicit none + ! end subroutine BlindRams_Output - subroutine BlindRamsMainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP + ! subroutine BlindRamsMainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP - implicit none + ! implicit none - INTEGER :: ShearRamDuration - integer,dimension(8) :: ShearRamStartTime , ShearRamEndTime + ! INTEGER :: ShearRamDuration + ! integer,dimension(8) :: ShearRamStartTime , ShearRamEndTime - ! CALL BOP_StartUp() - loop1: DO + ! ! CALL BOP_StartUp() + ! loop1: DO - CALL DATE_AND_TIME(values=ShearRamStartTime) + ! CALL DATE_AND_TIME(values=ShearRamStartTime) - CALL SHEAR_RAMS + ! CALL SHEAR_RAMS - CALL DATE_AND_TIME(values=ShearRamEndTime) + ! CALL DATE_AND_TIME(values=ShearRamEndTime) - ShearRamDuration = 3600000 * (ShearRamEndTime(5) - ShearRamStartTime(5)) + 60000 * (ShearRamEndTime(6) - ShearRamStartTime(6)) + 1000 * (ShearRamEndTime(7) - ShearRamStartTime(7)) + (ShearRamEndTime(8) - ShearRamStartTime(8)) + ! ShearRamDuration = 3600000 * (ShearRamEndTime(5) - ShearRamStartTime(5)) + 60000 * (ShearRamEndTime(6) - ShearRamStartTime(6)) + 1000 * (ShearRamEndTime(7) - ShearRamStartTime(7)) + (ShearRamEndTime(8) - ShearRamStartTime(8)) - if (ShearRamDuration < 100) then - call sleepqq(100 - ShearRamDuration) - ELSE - WRITE (*,*) 'ShearRam BOP run duration exceeded 100 ms and =', ShearRamDuration - end if + ! if (ShearRamDuration < 100) then + ! call sleepqq(100 - ShearRamDuration) + ! ELSE + ! WRITE (*,*) 'ShearRam BOP run duration exceeded 100 ms and =', ShearRamDuration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - end subroutine BlindRamsMainBody + ! end subroutine BlindRamsMainBody end module BlindRamsMain \ No newline at end of file diff --git a/Equipments/BopStack/BopStackMain.f90 b/Equipments/BopStack/BopStackMain.f90 index 07e1dc7..9932b5d 100644 --- a/Equipments/BopStack/BopStackMain.f90 +++ b/Equipments/BopStack/BopStackMain.f90 @@ -4,7 +4,6 @@ module BopStackMain public contains subroutine BopStack_Step - CALL BOP_MainBody end subroutine BopStack_Step END MODULE BopStackMain \ No newline at end of file diff --git a/Equipments/BopStack/CHOKE_LINE.f90 b/Equipments/BopStack/CHOKE_LINE.f90 index c027af9..ad47523 100644 --- a/Equipments/BopStack/CHOKE_LINE.f90 +++ b/Equipments/BopStack/CHOKE_LINE.f90 @@ -130,9 +130,9 @@ SUBROUTINE CHOKE_LINE !===================================================================== -if (ChokeLineIsOpening .or. ChokeLineIsClosing) then - CALL CHOKE_LINE_SUB -end if +! if (ChokeLineIsOpening .or. ChokeLineIsClosing) then +! CALL CHOKE_LINE_SUB +! end if END SUBROUTINE CHOKE_LINE @@ -155,14 +155,14 @@ SUBROUTINE CHOKE_LINE_SUB USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables implicit none - FirstSet= 0 - RamsFirstSet= 0 + ! FirstSet= 0 + ! RamsFirstSet= 0 - loop5: do while (finished_ChokeLine==0) + ! loop5: do while (finished_ChokeLine==0) RAM(5)%SuccessionCounter = RAM(5)%SuccessionCounter + 1 @@ -294,16 +294,15 @@ RAM(5)%timecounter_ram=RAM(5)%timecounter_ram+1 !60 FORMAT(11(f18.5)) - call sleepqq(100) - -if (ChokeLine_closed==1) then - ! if ((UpperRamsValve==1. .and. UpperRamsFailureMalf==0) .or. (UpperRamsValve==-1.0 .and. UpperRamsFailureMalf==0) .or. (MiddleRamsValve==1. .and. MiddleRamsFailureMalf==0) .or. (MiddleRamsValve==-1.0 .and. MiddleRamsFailureMalf==0) .or. (LowerRamsValve==1. .and. LowerRamsFailureMalf==0) .or. (LowerRamsValve==-1.0 .and. LowerRamsFailureMalf==0) .or. (AnnularValve==1. .and. AnnularFailureMalf==0) .or. (AnnularValve==-1.0 .and. AnnularFailureMalf==0) .or. KillLineValve==1. .or. KillLineValve==-1.0) then - finished_ChokeLine=1 - ! endif + ! call sleepqq(100) + if (ChokeLine_closed==1) then + ! if ((UpperRamsValve==1. .and. UpperRamsFailureMalf==0) .or. (UpperRamsValve==-1.0 .and. UpperRamsFailureMalf==0) .or. (MiddleRamsValve==1. .and. MiddleRamsFailureMalf==0) .or. (MiddleRamsValve==-1.0 .and. MiddleRamsFailureMalf==0) .or. (LowerRamsValve==1. .and. LowerRamsFailureMalf==0) .or. (LowerRamsValve==-1.0 .and. LowerRamsFailureMalf==0) .or. (AnnularValve==1. .and. AnnularFailureMalf==0) .or. (AnnularValve==-1.0 .and. AnnularFailureMalf==0) .or. KillLineValve==1. .or. KillLineValve==-1.0) then + finished_ChokeLine=1 + ! endif endif - if (IsStopped == .true.) return + ! if (IsStopped == .true.) return - end do loop5 !while finished_ChokeLine==0 + ! end do loop5 !while finished_ChokeLine==0 END SUBROUTINE CHOKE_LINE_SUB \ No newline at end of file diff --git a/Equipments/BopStack/ChokeLineMain.f90 b/Equipments/BopStack/ChokeLineMain.f90 index 3616ee3..f7e513f 100644 --- a/Equipments/BopStack/ChokeLineMain.f90 +++ b/Equipments/BopStack/ChokeLineMain.f90 @@ -3,67 +3,80 @@ module ChokeLineMain public contains - subroutine ChokeLine_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(ChokeLine_Init) - call OnSimulationStop%Add(ChokeLine_Init) - call OnChokeLineStep%Add(ChokeLine_Step) - call OnChokeLineOutput%Add(ChokeLine_Output) - call OnChokeLineMain%Add(ChokeLineMainBody) - end subroutine + ! subroutine ChokeLine_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(ChokeLine_Init) + ! call OnSimulationStop%Add(ChokeLine_Init) + ! call OnChokeLineStep%Add(ChokeLine_Step) + ! call OnChokeLineOutput%Add(ChokeLine_Output) + ! call OnChokeLineMain%Add(ChokeLineMainBody) + ! end subroutine - subroutine ChokeLine_Init - implicit none - end subroutine ChokeLine_Init + ! subroutine ChokeLine_Init + ! implicit none + ! end subroutine ChokeLine_Init subroutine ChokeLine_Step - CALL CHOKE_LINE + use VARIABLES + implicit none + if (finished_ChokeLine/=0) then + call CHOKE_LINE + if (ChokeLineIsOpening .or. ChokeLineIsClosing) then + FirstSet= 0 + RamsFirstSet= 0 + if(finished_ChokeLine==0) then + call CHOKE_LINE_SUB !only body of loop2 + endif + endif + else + call SHEAR_RAMS_SUB + endif end subroutine ChokeLine_Step - subroutine ChokeLine_Output - implicit none - end subroutine ChokeLine_Output + ! subroutine ChokeLine_Output + ! implicit none + ! end subroutine ChokeLine_Output - subroutine ChokeLineMainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP + ! subroutine ChokeLineMainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP - implicit none + ! implicit none - INTEGER :: ChokeLineDuration - integer,dimension(8) :: ChokeLineStartTime , ChokeLineEndTime + ! INTEGER :: ChokeLineDuration + ! integer,dimension(8) :: ChokeLineStartTime , ChokeLineEndTime - ! CALL BOP_StartUp() - loop1: DO + ! ! CALL BOP_StartUp() + ! loop1: DO - CALL DATE_AND_TIME(values=ChokeLineStartTime) + ! CALL DATE_AND_TIME(values=ChokeLineStartTime) - CALL CHOKE_LINE + ! CALL CHOKE_LINE - CALL DATE_AND_TIME(values=chokeLineEndTime) + ! CALL DATE_AND_TIME(values=chokeLineEndTime) - chokeLineDuration = 3600000 * (chokeLineEndTime(5) - chokeLineStartTime(5)) + 60000 * (chokeLineEndTime(6) - chokeLineStartTime(6)) + 1000 * (chokeLineEndTime(7) - chokeLineStartTime(7)) + (chokeLineEndTime(8) - chokeLineStartTime(8)) + ! chokeLineDuration = 3600000 * (chokeLineEndTime(5) - chokeLineStartTime(5)) + 60000 * (chokeLineEndTime(6) - chokeLineStartTime(6)) + 1000 * (chokeLineEndTime(7) - chokeLineStartTime(7)) + (chokeLineEndTime(8) - chokeLineStartTime(8)) - if (chokeLineDuration < 100) then - call sleepqq(100 - chokeLineDuration) - ELSE - WRITE (*,*) 'chokeLine BOP run duration exceeded 100 ms and =', chokeLineDuration - end if + ! if (chokeLineDuration < 100) then + ! call sleepqq(100 - chokeLineDuration) + ! ELSE + ! WRITE (*,*) 'chokeLine BOP run duration exceeded 100 ms and =', chokeLineDuration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - ! CALL DEALLOCATE_ARRAYS() + ! ! CALL DEALLOCATE_ARRAYS() - end subroutine ChokeLineMainBody + ! end subroutine ChokeLineMainBody end module ChokeLineMain \ No newline at end of file diff --git a/Equipments/BopStack/KILL_LINE.f90 b/Equipments/BopStack/KILL_LINE.f90 index c869a0a..a4dc844 100644 --- a/Equipments/BopStack/KILL_LINE.f90 +++ b/Equipments/BopStack/KILL_LINE.f90 @@ -6,7 +6,7 @@ SUBROUTINE KILL_LINE USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + use CSimulationVariables implicit none @@ -152,7 +152,7 @@ SUBROUTINE KILL_LINE_SUB USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + use CSimulationVariables implicit none @@ -160,7 +160,7 @@ SUBROUTINE KILL_LINE_SUB FirstSet= 0 RamsFirstSet= 0 - loop6: do while (finished_KillLine==0) + ! loop6: do while (finished_KillLine==0) RAM(6)%SuccessionCounter = RAM(6)%SuccessionCounter + 1 @@ -293,7 +293,7 @@ RAM(6)%timecounter_ram=RAM(6)%timecounter_ram+1 !60 FORMAT(11(f18.5)) - call sleepqq(100) + ! call sleepqq(100) if (KillLine_closed==1) then ! if ((UpperRamsValve==1. .and. UpperRamsFailureMalf==0) .or. (UpperRamsValve==-1.0 .and. UpperRamsFailureMalf==0) .or. (MiddleRamsValve==1. .and. MiddleRamsFailureMalf==0) .or. (MiddleRamsValve==-1.0 .and. MiddleRamsFailureMalf==0) .or. (LowerRamsValve==1. .and. LowerRamsFailureMalf==0) .or. (LowerRamsValve==-1.0 .and. LowerRamsFailureMalf==0) .or. (AnnularValve==1. .and. AnnularFailureMalf==0) .or. (AnnularValve==-1.0 .and. AnnularFailureMalf==0) .or. ChokeLineValve==1. .or. ChokeLineValve==-1.0) then @@ -301,8 +301,8 @@ if (KillLine_closed==1) then ! endif endif - if (IsStopped == .true.) return + ! if (IsStopped == .true.) return - end do loop6 !while finished_KillLine==0 + ! end do loop6 !while finished_KillLine==0 END SUBROUTINE KILL_LINE_SUB \ No newline at end of file diff --git a/Equipments/BopStack/KillLineMain.f90 b/Equipments/BopStack/KillLineMain.f90 index 60ba858..d451b30 100644 --- a/Equipments/BopStack/KillLineMain.f90 +++ b/Equipments/BopStack/KillLineMain.f90 @@ -3,66 +3,77 @@ module KillLineMain public contains - subroutine KillLine_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(KillLine_Init) - call OnSimulationStop%Add(KillLine_Init) - call OnKillLineStep%Add(KillLine_Step) - call OnKillLineOutput%Add(KillLine_Output) - call OnKillLineMain%Add(KillLineMainBody) - end subroutine + ! subroutine KillLine_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(KillLine_Init) + ! call OnSimulationStop%Add(KillLine_Init) + ! call OnKillLineStep%Add(KillLine_Step) + ! call OnKillLineOutput%Add(KillLine_Output) + ! call OnKillLineMain%Add(KillLineMainBody) + ! end subroutine - subroutine KillLine_Init - implicit none - end subroutine KillLine_Init + ! subroutine KillLine_Init + ! implicit none + ! end subroutine KillLine_Init subroutine KillLine_Step - CALL KILL_LINE + use VARIABLES + implicit none + if (finished_KillLine/=0) then + call KILL_LINE + if (KillLineIsOpening .or. KillLineIsClosing) then + if(finished_KillLine==0) then + call KILL_LINE_SUB !only body of loop2 + endif + endif + else + call KILL_LINE_SUB + endif end subroutine KillLine_Step - subroutine KillLine_Output - implicit none - end subroutine KillLine_Output + ! subroutine KillLine_Output + ! implicit none + ! end subroutine KillLine_Output - subroutine KillLineMainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP - implicit none + ! subroutine KillLineMainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP + ! implicit none - INTEGER :: KillLineDuration - integer,dimension(8) :: KillLineStartTime , KillLineEndTime + ! INTEGER :: KillLineDuration + ! integer,dimension(8) :: KillLineStartTime , KillLineEndTime - ! CALL BOP_StartUp() - loop1: DO + ! ! CALL BOP_StartUp() + ! loop1: DO - CALL DATE_AND_TIME(values=KillLineStartTime) + ! CALL DATE_AND_TIME(values=KillLineStartTime) - CALL KILL_LINE + ! CALL KILL_LINE - CALL DATE_AND_TIME(values=KillLineEndTime) + ! CALL DATE_AND_TIME(values=KillLineEndTime) - KillLineDuration = 3600000 * (KillLineEndTime(5) - KillLineStartTime(5)) + 60000 * (KillLineEndTime(6) - KillLineStartTime(6)) + 1000 * (KillLineEndTime(7) - KillLineStartTime(7)) + (KillLineEndTime(8) - KillLineStartTime(8)) + ! KillLineDuration = 3600000 * (KillLineEndTime(5) - KillLineStartTime(5)) + 60000 * (KillLineEndTime(6) - KillLineStartTime(6)) + 1000 * (KillLineEndTime(7) - KillLineStartTime(7)) + (KillLineEndTime(8) - KillLineStartTime(8)) - if (KillLineDuration < 100) then - call sleepqq(100 - KillLineDuration) - ELSE - WRITE (*,*) 'KillLine BOP run duration exceeded 100 ms and =', KillLineDuration - end if + ! if (KillLineDuration < 100) then + ! call sleepqq(100 - KillLineDuration) + ! ELSE + ! WRITE (*,*) 'KillLine BOP run duration exceeded 100 ms and =', KillLineDuration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - ! CALL DEALLOCATE_ARRAYS() + ! ! CALL DEALLOCATE_ARRAYS() - end subroutine KillLineMainBody + ! end subroutine KillLineMainBody end module KillLineMain \ No newline at end of file diff --git a/Equipments/BopStack/LOSS_INPUTS.f90 b/Equipments/BopStack/LOSS_INPUTS.f90 index 50a7ff3..d34fd2a 100644 --- a/Equipments/BopStack/LOSS_INPUTS.f90 +++ b/Equipments/BopStack/LOSS_INPUTS.f90 @@ -332,7 +332,7 @@ USE CAccumulatorVariables USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants -USE CSimulationVariables +! use CSimulationVariables implicit none !Pannular_regset=min(AnnularRegulatorSetControl,1700.) ! for changing its set conditions instantaneously @@ -549,7 +549,7 @@ deltav_air=QAIR_PUMP*DeltaT_BOP/60. !(galon) delta_t=1sec , Q(gpm) USE CAccumulatorVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables USE TD_GeneralData use CUnityOutputs implicit none diff --git a/Equipments/BopStack/PIPE_RAM1.f90 b/Equipments/BopStack/PIPE_RAM1.f90 index fcc97cc..6db5b80 100644 --- a/Equipments/BopStack/PIPE_RAM1.f90 +++ b/Equipments/BopStack/PIPE_RAM1.f90 @@ -5,7 +5,7 @@ SUBROUTINE PIPE_RAMS1 USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - ! USE CSimulationVariables + ! ! use CSimulationVariables implicit none !===================================================================== @@ -150,7 +150,11 @@ SUBROUTINE PIPE_RAMS1 !===================================================================== + FirstSet= 0 + RamsFirstSet= 0 if (PipeRam1IsOpening .or. PipeRam1IsClosing .or. RAM(2)%Bottles_Charged_MalfActive) then + FirstSet= 0 + RamsFirstSet= 0 CALL PIPE_RAMS1_SUB end if @@ -173,14 +177,14 @@ SUBROUTINE PIPE_RAMS1_SUB USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables implicit none - FirstSet= 0 - RamsFirstSet= 0 + ! FirstSet= 0 + ! RamsFirstSet= 0 - loop3: do while (finished_pipe1==0) + ! loop3: do while (finished_pipe1==0) RAM(2)%SuccessionCounter = RAM(2)%SuccessionCounter + 1 @@ -346,7 +350,7 @@ RAM(2)%timecounter_ram=RAM(2)%timecounter_ram+1 !60 FORMAT(11(f18.5)) - call sleepqq(100) + ! call sleepqq(100) if (PipeRam1_closed==1) then ! if ((MiddleRamsValve==1. .and. MiddleRamsFailureMalf==0) .or. (MiddleRamsValve==-1.0 .and. MiddleRamsFailureMalf==0) .or. (LowerRamsValve==1. .and. LowerRamsFailureMalf==0) .or. (LowerRamsValve==-1.0 .and. LowerRamsFailureMalf==0) .or. (AnnularValve==1. .and. AnnularFailureMalf==0) .or. (AnnularValve==-1.0 .and. AnnularFailureMalf==0) .or. ChokeLineValve==1. .or. ChokeLineValve==-1.0 .or. KillLineValve==1. .or. KillLineValve==-1.0) then @@ -354,9 +358,9 @@ if (PipeRam1_closed==1) then ! endif endif - if (IsStopped == .true.) return + ! if (IsStopped == .true.) return - end do loop3 !while finished_pipe1==0 + ! end do loop3 !while finished_pipe1==0 @@ -365,7 +369,7 @@ endif if ( finished_pipe1==1 .and. RAM(2)%Bottles_Charged_MalfActive==.true.) then call bop_code(2,H_PipeRam1Bop,2) !ramtype=2 2=RNUMBER - call sleepqq(100) + ! call sleepqq(100) endif diff --git a/Equipments/BopStack/PIPE_RAM2.f90 b/Equipments/BopStack/PIPE_RAM2.f90 index ad492eb..dfa26cc 100644 --- a/Equipments/BopStack/PIPE_RAM2.f90 +++ b/Equipments/BopStack/PIPE_RAM2.f90 @@ -5,7 +5,7 @@ SUBROUTINE PIPE_RAMS2 USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - ! USE CSimulationVariables + ! ! use CSimulationVariables implicit none @@ -165,15 +165,14 @@ SUBROUTINE PIPE_RAMS2 !===================================================================== - - -if (PipeRam2IsOpening .or. PipeRam2IsClosing .or. RAM(3)%Bottles_Charged_MalfActive) then - - CALL PIPE_RAMS2_SUB -end if - - - END SUBROUTINE PIPE_RAMS2 + + if (PipeRam2IsOpening .or. PipeRam2IsClosing .or. RAM(3)%Bottles_Charged_MalfActive) then + FirstSet= 0 + RamsFirstSet= 0 + CALL PIPE_RAMS2_SUB + end if + +END SUBROUTINE PIPE_RAMS2 @@ -192,14 +191,14 @@ SUBROUTINE PIPE_RAMS2_SUB USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables implicit none - FirstSet= 0 - RamsFirstSet= 0 + ! FirstSet= 0 + ! RamsFirstSet= 0 - loop4: do while (finished_pipe2==0) + ! loop4: do while (finished_pipe2==0) !write(*,*) 'checkpoint 2' @@ -372,7 +371,7 @@ RAM(3)%timecounter_ram=RAM(3)%timecounter_ram+1 !60 FORMAT(11(f18.5)) - call sleepqq(100) + ! call sleepqq(100) if (PipeRam2_closed==1) then @@ -381,14 +380,14 @@ if (PipeRam2_closed==1) then ! endif endif - if (IsStopped == .true.) return + ! if (IsStopped == .true.) return - end do loop4 !while finished_pipe2==0 + ! end do loop4 !while finished_pipe2==0 if ( finished_pipe2==1 .and. RAM(3)%Bottles_Charged_MalfActive==.true.) then call bop_code(3,H_PipeRam2Bop,3) !ramtype=3 3=RNUMBER - call sleepqq(100) + ! call sleepqq(100) endif diff --git a/Equipments/BopStack/PipeRams1Main.f90 b/Equipments/BopStack/PipeRams1Main.f90 index 474bfa4..e62fc72 100644 --- a/Equipments/BopStack/PipeRams1Main.f90 +++ b/Equipments/BopStack/PipeRams1Main.f90 @@ -3,66 +3,77 @@ module PipeRams1Main public contains - subroutine PipeRams1_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(PipeRams1_Init) - call OnSimulationStop%Add(PipeRams1_Init) - call OnPipeRams1Step%Add(PipeRams1_Step) - call OnPipeRams1Output%Add(PipeRams1_Output) - call OnPipeRams1Main%Add(PipeRams1MainBody) - end subroutine + ! subroutine PipeRams1_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(PipeRams1_Init) + ! call OnSimulationStop%Add(PipeRams1_Init) + ! call OnPipeRams1Step%Add(PipeRams1_Step) + ! call OnPipeRams1Output%Add(PipeRams1_Output) + ! call OnPipeRams1Main%Add(PipeRams1MainBody) + ! end subroutine - subroutine PipeRams1_Init - implicit none - end subroutine PipeRams1_Init + ! subroutine PipeRams1_Init + ! implicit none + ! end subroutine PipeRams1_Init subroutine PipeRams1_Step - CALL PIPE_RAMS1 + use VARIABLES + implicit none + if (finished_pipe1/=0) then + call PIPE_RAMS1 + if (PipeRam1IsOpening .or. PipeRam1IsClosing .or. RAM(2)%Bottles_Charged_MalfActive) then + if(finished_pipe1==0) then + call PIPE_RAMS1_SUB !only body of loop2 + endif + endif + else + call PIPE_RAMS1_SUB + endif end subroutine PipeRams1_Step - subroutine PipeRams1_Output + ! subroutine PipeRams1_Output - end subroutine PipeRams1_Output + ! end subroutine PipeRams1_Output - subroutine PipeRams1MainBody + ! subroutine PipeRams1MainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP - implicit none + ! implicit none - INTEGER :: PipeRam1Duration - integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime + ! INTEGER :: PipeRam1Duration + ! integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime - ! CALL BOP_StartUp() - loop1: DO + ! ! CALL BOP_StartUp() + ! loop1: DO - CALL DATE_AND_TIME(values=PipeRam1StartTime) - CALL PIPE_RAMS1 - CALL DATE_AND_TIME(values=PipeRam1EndTime) + ! CALL DATE_AND_TIME(values=PipeRam1StartTime) + ! CALL PIPE_RAMS1 + ! CALL DATE_AND_TIME(values=PipeRam1EndTime) - PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8)) + ! PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8)) - if (PipeRam1Duration < 100) then - call sleepqq(100 - PipeRam1Duration) - ELSE - WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration - end if + ! if (PipeRam1Duration < 100) then + ! call sleepqq(100 - PipeRam1Duration) + ! ELSE + ! WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - ! CALL DEALLOCATE_ARRAYS() + ! ! CALL DEALLOCATE_ARRAYS() - end subroutine PipeRams1MainBody + ! end subroutine PipeRams1MainBody end module PipeRams1Main \ No newline at end of file diff --git a/Equipments/BopStack/PipeRams2Main.f90 b/Equipments/BopStack/PipeRams2Main.f90 index 6056832..4bb9b3d 100644 --- a/Equipments/BopStack/PipeRams2Main.f90 +++ b/Equipments/BopStack/PipeRams2Main.f90 @@ -4,65 +4,76 @@ public contains - subroutine PipeRams2_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(PipeRams2_Init) - call OnSimulationStop%Add(PipeRams2_Init) - call OnPipeRams2Step%Add(PipeRams2_Step) - call OnPipeRams2Output%Add(PipeRams2_Output) - call OnPipeRams2Main%Add(PipeRams2MainBody) - end subroutine + ! subroutine PipeRams2_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(PipeRams2_Init) + ! call OnSimulationStop%Add(PipeRams2_Init) + ! call OnPipeRams2Step%Add(PipeRams2_Step) + ! call OnPipeRams2Output%Add(PipeRams2_Output) + ! call OnPipeRams2Main%Add(PipeRams2MainBody) + ! end subroutine - subroutine PipeRams2_Init - implicit none - end subroutine PipeRams2_Init + ! subroutine PipeRams2_Init + ! implicit none + ! end subroutine PipeRams2_Init subroutine PipeRams2_Step - CALL PIPE_RAMS2 + use VARIABLES + implicit none + if (finished_pipe2/=0) then + call PIPE_RAMS2 + if (PipeRam2IsOpening .or. PipeRam2IsClosing .or. RAM(3)%Bottles_Charged_MalfActive) then + if(finished_pipe2==0) then + call PIPE_RAMS2_SUB !only body of loop2 + endif + endif + else + call PIPE_RAMS2_SUB + endif end subroutine PipeRams2_Step - subroutine PipeRams2_Output - implicit none - end subroutine PipeRams2_Output + ! subroutine PipeRams2_Output + ! implicit none + ! end subroutine PipeRams2_Output - subroutine PipeRams2MainBody - USE ifport - USE ifmt - USE CSimulationVariables - ! USE BOP - implicit none + ! subroutine PipeRams2MainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! ! USE BOP + ! implicit none - INTEGER :: PipeRam2Duration - integer,dimension(8) :: PipeRam2StartTime , PipeRam2EndTime + ! INTEGER :: PipeRam2Duration + ! integer,dimension(8) :: PipeRam2StartTime , PipeRam2EndTime - ! CALL BOP_StartUp() - loop1: DO + ! ! CALL BOP_StartUp() + ! loop1: DO - CALL DATE_AND_TIME(values=PipeRam2StartTime) + ! CALL DATE_AND_TIME(values=PipeRam2StartTime) - CALL PIPE_RAMS2 + ! CALL PIPE_RAMS2 - CALL DATE_AND_TIME(values=PipeRam2EndTime) + ! CALL DATE_AND_TIME(values=PipeRam2EndTime) - PipeRam2Duration = 3600000 * (PipeRam2EndTime(5) - PipeRam2StartTime(5)) + 60000 * (PipeRam2EndTime(6) - PipeRam2StartTime(6)) + 1000 * (PipeRam2EndTime(7) - PipeRam2StartTime(7)) + (PipeRam2EndTime(8) - PipeRam2StartTime(8)) + ! PipeRam2Duration = 3600000 * (PipeRam2EndTime(5) - PipeRam2StartTime(5)) + 60000 * (PipeRam2EndTime(6) - PipeRam2StartTime(6)) + 1000 * (PipeRam2EndTime(7) - PipeRam2StartTime(7)) + (PipeRam2EndTime(8) - PipeRam2StartTime(8)) - if (PipeRam2Duration < 100) then - call sleepqq(100 - PipeRam2Duration) - ELSE - WRITE (*,*) 'PipeRam2 BOP run duration exceeded 100 ms and =', PipeRam2Duration - end if + ! if (PipeRam2Duration < 100) then + ! call sleepqq(100 - PipeRam2Duration) + ! ELSE + ! WRITE (*,*) 'PipeRam2 BOP run duration exceeded 100 ms and =', PipeRam2Duration + ! end if - IF (IsStopped==.true.) THEN - EXIT loop1 - ENDIF + ! IF (IsStopped==.true.) THEN + ! EXIT loop1 + ! ENDIF - ENDDO loop1 + ! ENDDO loop1 - ! CALL DEALLOCATE_ARRAYS() - end subroutine PipeRams2MainBody + ! ! CALL DEALLOCATE_ARRAYS() + ! end subroutine PipeRams2MainBody end module PipeRams2Main \ No newline at end of file diff --git a/Equipments/BopStack/SHEAR_RAM.f90 b/Equipments/BopStack/SHEAR_RAM.f90 index d59c3a2..742318a 100644 --- a/Equipments/BopStack/SHEAR_RAM.f90 +++ b/Equipments/BopStack/SHEAR_RAM.f90 @@ -4,7 +4,7 @@ SUBROUTINE SHEAR_RAMS USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables implicit none @@ -14,164 +14,149 @@ SUBROUTINE SHEAR_RAMS ! START CONDITIONS FOR SHEAR RAMS !===================================================================== - RAM(4)%SuccessionCounter = RAM(4)%SuccessionCounter + 1 + RAM(4)%SuccessionCounter = RAM(4)%SuccessionCounter + 1 - - if (BopControlPanel%MiddleRamsValve == 1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then - - if (MiddleRamsCloseLEDMine == LedOn) then - RETURN - end if - - - if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then - RAM(4)%SuccessionCounter = 0 ! also in starup - RAM(4)%SuccessionCounterOld = 0 ! also in starup - !return - else - RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter - endif + if (BopControlPanel%MiddleRamsValve == 1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then + + if (MiddleRamsCloseLEDMine == LedOn) then + RETURN + end if + + if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then + RAM(4)%SuccessionCounter = 0 ! also in starup + RAM(4)%SuccessionCounterOld = 0 ! also in starup + !return + else + RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter + endif + + + if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then + !return - if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then - !return + RAM(4)%First_CloseTimecheck= 1 - RAM(4)%First_CloseTimecheck= 1 - - BopControlPanel%MiddleRamsOpenLED = LedOff - MiddleRamsOpenLEDMine = LedOff - BopControlPanel%MiddleRamsCloseLED = LedOn !LedBlinking - - RAM(4)%FourwayValve = 1 - - endif + BopControlPanel%MiddleRamsOpenLED = LedOff + MiddleRamsOpenLEDMine = LedOff + BopControlPanel%MiddleRamsCloseLED = LedOn !LedBlinking - endif + RAM(4)%FourwayValve = 1 + + endif + + endif - if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then ! 1: Open , 0: Close - !write(*,*) 'close 2' - - RAM(4)%FourwayValve = 0 - - - ShearBop_closed=0 - !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) - RAM(4)%vdis_tot=0 - RAM(4)%vdis_bottles=0. - RAM(4)%fvr_air=0. - RAM(4)%vdis_elecp=0. - Qiter=7 - RAM(4)%Qzero=70 - RAM(4)%Q=RAM(4)%Qzero - RAM(4)%flow=70 - RAM(4)%tol=0.0037 + if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then ! 1: Open , 0: Close + !write(*,*) 'close 2' + RAM(4)%FourwayValve = 0 - - if (finished_shear==1) then - ShearRamsLeverOld=-1.0 - else - ShearRamsLeverOld=BopControlPanel%MiddleRamsValve - endif - finished_shear=0 - ShearRamIsClosing = .true. - ShearRamIsOpening = .false. - RAM(4)%bop_type = 2 - !NeededVolumeShearRams=5.8 !galon for each BOP - !AbopShearRam=196.67 !(in^2) - AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(IDshearBopBase/2.) - !NeededVolumeShearRams=BlindRamClose !galon for each BOP **changed - NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed - va=AbopShearRam*(IDshearBopBase-ODDrillpipe_inShearRam)/(2.*231) - vb=NeededVolumeShearRams + ShearBop_closed=0 + !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) + RAM(4)%vdis_tot=0 + RAM(4)%vdis_bottles=0. + RAM(4)%fvr_air=0. + RAM(4)%vdis_elecp=0. + Qiter=7 + RAM(4)%Qzero=70 + RAM(4)%Q=RAM(4)%Qzero + RAM(4)%flow=70 + RAM(4)%tol=0.0037 + + + if (finished_shear==1) then + ShearRamsLeverOld=-1.0 + else + ShearRamsLeverOld=BopControlPanel%MiddleRamsValve endif + finished_shear=0 + ShearRamIsClosing = .true. + ShearRamIsOpening = .false. + + RAM(4)%bop_type = 2 + !NeededVolumeShearRams=5.8 !galon for each BOP + !AbopShearRam=196.67 !(in^2) + AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(IDshearBopBase/2.) + !NeededVolumeShearRams=BlindRamClose !galon for each BOP **changed + NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed + va=AbopShearRam*(IDshearBopBase-ODDrillpipe_inShearRam)/(2.*231) + vb=NeededVolumeShearRams + endif - if (BopControlPanel%MiddleRamsValve == -1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then - - if (MiddleRamsOpenLEDMine == LedOn) then - RETURN - end if - - if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then - RAM(4)%SuccessionCounter = 0 ! also in starup - RAM(4)%SuccessionCounterOld = 0 ! also in starup - !return - else - RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter - endif + if (BopControlPanel%MiddleRamsValve == -1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then - - if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then - !return - - RAM(4)%First_OpenTimecheck= 1 - - BopControlPanel%MiddleRamsCloseLED = LedOff !new - MiddleRamsCloseLedMine = LedOff !new - BopControlPanel%MiddleRamsOpenLED = LedOn !LedBlinking - - endif + if (MiddleRamsOpenLEDMine == LedOn) then + RETURN + end if + if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then + RAM(4)%SuccessionCounter = 0 ! also in starup + RAM(4)%SuccessionCounterOld = 0 ! also in starup + !return + else + RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter endif - - - if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then ! 1: Open , 0: Close - !write(*,*) 'open 2' + + + if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then + !return - RAM(4)%FourwayValve = 0 + RAM(4)%First_OpenTimecheck= 1 + BopControlPanel%MiddleRamsCloseLED = LedOff !new + MiddleRamsCloseLedMine = LedOff !new + BopControlPanel%MiddleRamsOpenLED = LedOn !LedBlinking - - ShearBop_closed=0 - !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) - RAM(4)%vdis_tot=0 - RAM(4)%vdis_bottles=0. - RAM(4)%fvr_air=0. - RAM(4)%vdis_elecp=0. - Qiter=7 - RAM(4)%Qzero=70 - RAM(4)%Q=RAM(4)%Qzero - RAM(4)%flow=70 - RAM(4)%tol=0.0037 - - - if (finished_shear==1) then - ShearRamsLeverOld=1.0 - else - ShearRamsLeverOld=BopControlPanel%MiddleRamsValve - endif - finished_shear=0 - ShearRamIsOpening = .true. - ShearRamIsClosing = .false. - - - !if (MiddleRamsOpenLED == LedOn) then - ! RETURN - !end if + endif + + endif + + + if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then ! 1: Open , 0: Close + !write(*,*) 'open 2' + RAM(4)%FourwayValve = 0 + + - - RAM(4)%bop_type = 3 - !AbopShearRam=186.5 !(in^2) - AbopShearRam=(BopStackSpecification%BlindRamOpen*231)/(IDshearBopBase/2.) - !NeededVolumeShearRams=5.5 !galon for each BOP - !NeededVolumeShearRams=BlindRamOpen ! **changed - NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed - !va=AbopShearRam*(IDshearBopBase-ODDrillpipe_inShearRam)/(2.*231) - !vb=NeededVolumeShearRams + ShearBop_closed=0 + !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) + RAM(4)%vdis_tot=0 + RAM(4)%vdis_bottles=0. + RAM(4)%fvr_air=0. + RAM(4)%vdis_elecp=0. + Qiter=7 + RAM(4)%Qzero=70 + RAM(4)%Q=RAM(4)%Qzero + RAM(4)%flow=70 + RAM(4)%tol=0.0037 + + if (finished_shear==1) then + ShearRamsLeverOld=1.0 + else + ShearRamsLeverOld=BopControlPanel%MiddleRamsValve endif + finished_shear=0 + ShearRamIsOpening = .true. + ShearRamIsClosing = .false. - -!===================================================================== - - -if (ShearRamIsOpening .or. ShearRamIsClosing .or. RAM(4)%Bottles_Charged_MalfActive) then - CALL SHEAR_RAMS_SUB -end if + RAM(4)%bop_type = 3 + !AbopShearRam=186.5 !(in^2) + AbopShearRam=(BopStackSpecification%BlindRamOpen*231)/(IDshearBopBase/2.) + !NeededVolumeShearRams=5.5 !galon for each BOP + !NeededVolumeShearRams=BlindRamOpen ! **changed + NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed + !va=AbopShearRam*(IDshearBopBase-ODDrillpipe_inShearRam)/(2.*231) + !vb=NeededVolumeShearRams + endif +!===================================================================== + ! if (ShearRamIsOpening .or. ShearRamIsClosing .or. RAM(4)%Bottles_Charged_MalfActive) then + ! CALL SHEAR_RAMS_SUB + ! end if - - END SUBROUTINE SHEAR_RAMS +END SUBROUTINE SHEAR_RAMS @@ -182,215 +167,108 @@ SUBROUTINE SHEAR_RAMS_SUB USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants - USE CSimulationVariables + ! use CSimulationVariables implicit none - - FirstSet= 0 - RamsFirstSet= 0 - - loop2: do while (finished_shear==0) - - RAM(4)%SuccessionCounter = RAM(4)%SuccessionCounter + 1 - - - - if (BopControlPanel%MiddleRamsValve == 1.0 .and. ShearRamsLeverOld == -1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then - - - if ( RAM(4)%First_CloseTimecheck == 0 ) then - - - if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then - RAM(4)%SuccessionCounter = 0 ! also in starup - RAM(4)%SuccessionCounterOld = 0 ! also in starup - !return - else - RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter - endif - - - - if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then - !return - - BopControlPanel%MiddleRamsOpenLED = LedOff - MiddleRamsOpenLEDMine = LedOff - BopControlPanel%MiddleRamsCloseLED = LedOn !LedBlinking - - RAM(4)%FourwayValve = 1 - - endif - - endif - - endif - - - if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then - !write(*,*) 'close 4' - - RAM(4)%FourwayValve = 0 - - - - - ShearBop_closed=0 - !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) - RAM(4)%p_bop=pa - ShearRamsLeverOld = BopControlPanel%MiddleRamsValve - - CALL OpenMiddleRams ! for C code - ShearBop_Situation_forTD= 0 ! open - for TD code - - RAM(4)%bop_type = 2 - !AbopShearRam=196.67 - AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(IDshearBopBase/2.) - !NeededVolumeShearRams=AbopShearRam*IDshearBop/(2.*231) ! **changed - NeededVolumeShearRams=AbopShearRam*(IDshearBop-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) ! **changed + ! FirstSet= 0 + ! RamsFirstSet= 0 - - RAM(4)%vdis_bottles=0. - RAM(4)%fvr_air=0. - RAM(4)%vdis_elecp=0. - ShearRamIsClosing = .true. - ShearRamIsOpening = .false. + ! loop2: do while (finished_shear==0) + RAM(4)%SuccessionCounter = RAM(4)%SuccessionCounter + 1 + if (BopControlPanel%MiddleRamsValve == 1.0 .and. ShearRamsLeverOld == -1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1 .and. RAM(4)%First_CloseTimecheck == 0) then + if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then + RAM(4)%SuccessionCounter = 0 ! also in starup + RAM(4)%SuccessionCounterOld = 0 ! also in starup + else + RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter endif - - if (BopControlPanel%MiddleRamsValve == -1.0 .and. ShearRamsLeverOld == 1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1) then - - - if ( RAM(4)%First_OpenTimecheck == 0 ) then - - if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then - RAM(4)%SuccessionCounter = 0 ! also in starup - RAM(4)%SuccessionCounterOld = 0 ! also in starup - !return - else - RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter - endif - - if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then - !return - - BopControlPanel%MiddleRamsCloseLED = LedOff - MiddleRamsCloseLEDMine = LedOff - BopControlPanel%MiddleRamsOpenLED = LedOn !LedBlinking - - RAM(4)%FourwayValve = 1 - - endif - - endif - + if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then + BopControlPanel%MiddleRamsOpenLED = LedOff + MiddleRamsOpenLEDMine = LedOff + BopControlPanel%MiddleRamsCloseLED = LedOn !LedBlinking + RAM(4)%FourwayValve = 1 endif - - if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then - !write(*,*) 'open 4' - - RAM(4)%FourwayValve = 0 - - - ShearBop_closed=0 - !ShearBop_closed_withPossibility= ShearBop_closed * TD_BOPConnectionPossibility(3) - RAM(4)%p_bop=pa - ShearRamsLeverOld = BopControlPanel%MiddleRamsValve - - CALL OpenMiddleRams - ShearBop_Situation_forTD= 0 ! open - for TD code - RAM(4)%bop_type = 3 - !AbopShearRam=186.5 - NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-IDshearBop)/(2.*231) - RAM(4)%vdis_bottles=0. - RAM(4)%fvr_air=0. - RAM(4)%vdis_elecp=0. + endif + + if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then + RAM(4)%FourwayValve = 0 + ShearBop_closed=0 + RAM(4)%p_bop=pa + ShearRamsLeverOld = BopControlPanel%MiddleRamsValve + CALL OpenMiddleRams ! for C code + ShearBop_Situation_forTD= 0 ! open - for TD code + RAM(4)%bop_type = 2 + AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(IDshearBopBase/2.) + NeededVolumeShearRams=AbopShearRam*(IDshearBop-ShearIsNotAllowed*ODDrillpipe_inShearRam)/(2.*231) ! **changed + RAM(4)%vdis_bottles=0. + RAM(4)%fvr_air=0. + RAM(4)%vdis_elecp=0. + ShearRamIsClosing = .true. + ShearRamIsOpening = .false. + endif - ShearRamIsOpening = .true. - ShearRamIsClosing = .false. + if (BopControlPanel%MiddleRamsValve == -1.0 .and. ShearRamsLeverOld == 1.0 .and. MiddleRamsFailureMalf==0 .and. RigAirMalf==0 .and. BopControlPanel%AirMasterValve==1 .and. RAM(4)%First_OpenTimecheck == 0) then + if ( RAM(4)%SuccessionCounter /= RAM(4)%SuccessionCounterOld+1 ) then + RAM(4)%SuccessionCounter = 0 ! also in starup + RAM(4)%SuccessionCounterOld = 0 ! also in starup + !return + else + RAM(4)%SuccessionCounterOld= RAM(4)%SuccessionCounter endif - - RAM(4)%First_CloseTimecheck = 0 - RAM(4)%First_OpenTimecheck = 0 - - - RAM(4)%time=RAM(4)%time+DeltaT_BOP !overal time (s) - - - - -!=================================================== -! BOP -!=================================================== -if (ShearBop_closed==0) then !bop closing - call bop_code(1,H_ShearRamBop,4) !ramtype=1 4=RNUMBER -endif !bop is closing -!================================================================ -if (ShearBop_closed==1) then - RAM(4)%Q=0 - ! p_bop=pram_reg - RAM(4)%p_bop=pa - RAMS%minloss(4,17)=0. !RNUMBER=4 -endif - - - + if ( RAM(4)%SuccessionCounter >= int(2.5/DeltaT_BOP) ) then + BopControlPanel%MiddleRamsCloseLED = LedOff + MiddleRamsCloseLEDMine = LedOff + BopControlPanel%MiddleRamsOpenLED = LedOn !LedBlinking + RAM(4)%FourwayValve = 1 + endif + endif -RAM(4)%timecounter_ram=RAM(4)%timecounter_ram+1 + if (RAM(4)%FourwayValve == 1 .and. p_acc>acc_MinPressure) then + RAM(4)%FourwayValve = 0 + ShearBop_closed=0 + RAM(4)%p_bop=pa + ShearRamsLeverOld = BopControlPanel%MiddleRamsValve + CALL OpenMiddleRams + ShearBop_Situation_forTD= 0 ! open - for TD code + RAM(4)%bop_type = 3 + NeededVolumeShearRams=AbopShearRam*(IDshearBopBase-IDshearBop)/(2.*231) + RAM(4)%vdis_bottles=0. + RAM(4)%fvr_air=0. + RAM(4)%vdis_elecp=0. + ShearRamIsOpening = .true. + ShearRamIsClosing = .false. + endif + RAM(4)%First_CloseTimecheck = 0 + RAM(4)%First_OpenTimecheck = 0 + RAM(4)%time=RAM(4)%time+DeltaT_BOP !overal time (s) + !=================================================== + ! BOP + !=================================================== + if (ShearBop_closed==0) then !bop closing + call bop_code(1,H_ShearRamBop,4) !ramtype=1 4=RNUMBER + endif !bop is closing + !================================================================ + if (ShearBop_closed==1) then + RAM(4)%Q=0 + RAM(4)%p_bop=pa + RAMS%minloss(4,17)=0. !RNUMBER=4 + endif + RAM(4)%timecounter_ram=RAM(4)%timecounter_ram+1 + call sleepqq(100) -! MiddleRamsStatus = IDshearBop -! UpperRamsStatus = IDPipeRam1 -! LowerRamsStatus = IDPipeRam2 -! AnnularStatus = IDAnnular -! AccumulatorPressureGauge = p_acc -! ManifoldPressureGauge= pram_reg -! AnnularPressureGauge=Pannular_reg -! -! -! -! WRITE(60,60) RAM(4)%time,RAM(4)%Q,RAM(4)%vdis_tot,p_acc & -! ,pram_reg,Pannular_reg,RAM(4)%p_bop,IDshearBop, & -! IDPipeRam1,IDPipeRam2,IDAnnular -!60 FORMAT(11(f18.5)) - -! - - call sleepqq(100) - -if (ShearBop_closed==1) then -! if ((UpperRamsValve==1. .and. UpperRamsFailureMalf==0) .or. (UpperRamsValve==-1.0 .and. UpperRamsFailureMalf==0) .or. (LowerRamsValve==1. .and. LowerRamsFailureMalf==0) .or. (LowerRamsValve==-1.0 .and. LowerRamsFailureMalf==0) .or. (AnnularValve==1. .and. AnnularFailureMalf==0) .or. (AnnularValve==-1.0 .and. AnnularFailureMalf==0) .or. ChokeLineValve==1. .or. ChokeLineValve==-1.0 .or. KillLineValve==1. .or. KillLineValve==-1.0) then + if (ShearBop_closed==1) then finished_shear=1 -! endif -endif - - if (IsStopped == .true.) return - - - end do loop2 !while finished_shear==0 - - - if ( finished_shear==1 .and. RAM(4)%Bottles_Charged_MalfActive==.true.) then - call bop_code(1,H_ShearRamBop,4) !ramtype=1 4=RNUMBER - call sleepqq(100) - endif - - - -END SUBROUTINE SHEAR_RAMS_SUB - - - - - - - - - - - + endif + ! if (IsStopped == .true.) return + ! end do loop2 !while finished_shear==0 + ! if ( finished_shear==1 .and. RAM(4)%Bottles_Charged_MalfActive==.true.) then + ! call bop_code(1,H_ShearRamBop,4) !ramtype=1 4=RNUMBER + ! call sleepqq(100) + ! endif - \ No newline at end of file +END SUBROUTINE SHEAR_RAMS_SUB \ No newline at end of file diff --git a/Equipments/BopStack/VARIABLES.f90 b/Equipments/BopStack/VARIABLES.f90 index bf10456..4713347 100644 --- a/Equipments/BopStack/VARIABLES.f90 +++ b/Equipments/BopStack/VARIABLES.f90 @@ -146,63 +146,27 @@ logical SoundKoomeyElectricPump !================================================================================= TYPE, PUBLIC :: BOP_TypeVars - - - - - REAL vdis_tot,vdis_bottles,deltav_bottles,fvr_air,vdis_elecp,Qzero,Q,flow,tol,TIME,timecounter_ram,clock - integer bop_type, SuccessionCounter, SuccessionCounterOld,First_CloseTimecheck,First_OpenTimecheck,FourwayValve ! FourwayValve 1: Open , 0: Close - REAL loss_before,pipe_loss2,minor_loss2,deltah,static_loss2,kinetic_loss2,loss_after,TOLZERO,diffp_ram - REAL checkp,p_acccheck,P_BOP,minor_loss1,static_loss1,kinetic_loss1,pipe_loss1 - Logical Bottles_Charged_MalfActive - - - + REAL vdis_tot,vdis_bottles,deltav_bottles,fvr_air,vdis_elecp,Qzero,Q,flow,tol,TIME,timecounter_ram,clock + integer bop_type, SuccessionCounter, SuccessionCounterOld,First_CloseTimecheck,First_OpenTimecheck,FourwayValve ! FourwayValve 1: Open , 0: Close + REAL loss_before,pipe_loss2,minor_loss2,deltah,static_loss2,kinetic_loss2,loss_after,TOLZERO,diffp_ram + REAL checkp,p_acccheck,P_BOP,minor_loss1,static_loss1,kinetic_loss1,pipe_loss1 + Logical Bottles_Charged_MalfActive END TYPE BOP_TypeVars TYPE(BOP_TypeVars), DIMENSION(1:6) :: RAM - - - - - - - TYPE, PUBLIC :: BOP_TypeVars2D - - - REAL, ALLOCATABLE:: minlosspa(:,:),minloss(:,:) - REAL,ALLOCATABLE:: Re_ramline(:,:),fric(:,:),fricloss(:,:) - - - END TYPE BOP_TypeVars2D - - TYPE(BOP_TypeVars2D) :: RAMS - - - - - ! 1 : Annular (RNUMBER) ! 2 : PipeRam1 (RNUMBER) ! 3 : PipeRam2 (RNUMBER) ! 4 : ShearRam (RNUMBER) ! 5 : ChokeLine (RNUMBER) ! 6 : KillLine (RNUMBER) + + TYPE, PUBLIC :: BOP_TypeVars2D + REAL, ALLOCATABLE:: minlosspa(:,:),minloss(:,:) + REAL,ALLOCATABLE:: Re_ramline(:,:),fric(:,:),fricloss(:,:) + END TYPE BOP_TypeVars2D - - - - - - - - - - - - - - + TYPE(BOP_TypeVars2D) :: RAMS END MODULE diff --git a/Equipments/BopStack/bopstackmain.mod b/Equipments/BopStack/bopstackmain.mod deleted file mode 100644 index 0d49faf7fb81c99d58050fb9752377662c603d01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 289 zcmV++0p9)}iwFP!000001FeuvYlA=#hVT0;=B6G}OhOOs&FHj9<0`A$5)j0i4cJE4 z`qBRVt`VDHgXj>g8@ 0.0d0) then - CALL sleepqq(DW_SolDuration) - end if + ! CALL DATE_AND_TIME(values=DW_END_TIME) + ! DW_SolDuration = 100-(DW_END_TIME(5)*3600000+DW_END_TIME(6)*60000+DW_END_TIME(7)*1000+DW_END_TIME(8)-DW_START_TIME(5)*3600000-DW_START_TIME(6)*60000-DW_START_TIME(7)*1000-DW_START_TIME(8)) + ! if(DW_SolDuration > 0.0d0) then + ! CALL sleepqq(DW_SolDuration) + ! end if - end do loopDrawworks1 + ! end do loopDrawworks1 - else + ! else - if (IsPortable) then - Drawworks%AssignmentSwitch = 1 - else - Drawworks%AssignmentSwitch = DrillingConsole%AssignmentSwitch - end if - if((any(Drawworks%AssignmentSwitch==(/1,2,3,4,5,7,8,9,10,11/))) .and. (DrillingConsole%DWSwitch==-1)) then - Drawworks%SoundBlower = .true. - Call SetSoundBlowerDW(Drawworks%SoundBlower) - DrillingConsole%DWBLWR = 1 - else - Drawworks%SoundBlower = .false. - Call SetSoundBlowerDW(Drawworks%SoundBlower) - DrillingConsole%DWBLWR = 0 - end if + ! if (IsPortable) then + ! Drawworks%AssignmentSwitch = 1 + ! else + ! Drawworks%AssignmentSwitch = DrillingConsole%AssignmentSwitch + ! end if + ! if((any(Drawworks%AssignmentSwitch==(/1,2,3,4,5,7,8,9,10,11/))) .and. (DrillingConsole%DWSwitch==-1)) then + ! Drawworks%SoundBlower = .true. + ! Call SetSoundBlowerDW(Drawworks%SoundBlower) + ! DrillingConsole%DWBLWR = 1 + ! else + ! Drawworks%SoundBlower = .false. + ! Call SetSoundBlowerDW(Drawworks%SoundBlower) + ! DrillingConsole%DWBLWR = 0 + ! end if - Call Drawworks_Solver_FreeTractionMotor - DW_TDHookHeight = Drawworks%Hook_Height_final - if ( Drawworks%motion==+1 ) then - Drawworks%SoundRev = 0 ![rpm] , Integer - Call SetSoundDwRev( Drawworks%SoundRev ) - Drawworks%SoundFw = INT(Drawworks%w_drum) ![rpm] , Integer - Call SetSoundDwFw(Drawworks%SoundFw) - Call DWBrakeSound - else - Drawworks%SoundFw = 0 ![rpm] , Integer - Call SetSoundDwFw(Drawworks%SoundFw) - Drawworks%SoundRev = INT(Drawworks%w_drum) ![rpm] , Integer - Call SetSoundDwRev( Drawworks%SoundRev ) - Call DWBrakeSound - end if - DW_OldTransMode = DrillingConsole%DWTransmisionLever + ! Call Drawworks_Solver_FreeTractionMotor + ! DW_TDHookHeight = Drawworks%Hook_Height_final + ! if ( Drawworks%motion==+1 ) then + ! Drawworks%SoundRev = 0 ![rpm] , Integer + ! Call SetSoundDwRev( Drawworks%SoundRev ) + ! Drawworks%SoundFw = INT(Drawworks%w_drum) ![rpm] , Integer + ! Call SetSoundDwFw(Drawworks%SoundFw) + ! Call DWBrakeSound + ! else + ! Drawworks%SoundFw = 0 ![rpm] , Integer + ! Call SetSoundDwFw(Drawworks%SoundFw) + ! Drawworks%SoundRev = INT(Drawworks%w_drum) ![rpm] , Integer + ! Call SetSoundDwRev( Drawworks%SoundRev ) + ! Call DWBrakeSound + ! end if + ! DW_OldTransMode = DrillingConsole%DWTransmisionLever - end if + ! end if - if (IsStopped == .true.) then - exit loopdrawsim - end if + ! if (IsStopped == .true.) then + ! exit loopdrawsim + ! end if - CALL DATE_AND_TIME(values=DW_END_TIME) - DW_SolDuration = 100-(DW_END_TIME(5)*3600000+DW_END_TIME(6)*60000+DW_END_TIME(7)*1000+DW_END_TIME(8)-DW_START_TIME(5)*3600000-DW_START_TIME(6)*60000-DW_START_TIME(7)*1000-DW_START_TIME(8)) - !print*, 'time=', DW_SolDuration - if(DW_SolDuration > 0.0d0) then - CALL sleepqq(DW_SolDuration) - end if + ! CALL DATE_AND_TIME(values=DW_END_TIME) + ! DW_SolDuration = 100-(DW_END_TIME(5)*3600000+DW_END_TIME(6)*60000+DW_END_TIME(7)*1000+DW_END_TIME(8)-DW_START_TIME(5)*3600000-DW_START_TIME(6)*60000-DW_START_TIME(7)*1000-DW_START_TIME(8)) + ! !print*, 'time=', DW_SolDuration + ! if(DW_SolDuration > 0.0d0) then + ! CALL sleepqq(DW_SolDuration) + ! end if - end do loopdrawsim + ! end do loopdrawsim - end subroutine DrawworksMainBody + ! end subroutine DrawworksMainBody end module DrawworksMain \ No newline at end of file diff --git a/Equipments/Drawworks/Drawworks_INPUTS.f90 b/Equipments/Drawworks/Drawworks_INPUTS.f90 index 14dac66..65d90c4 100644 --- a/Equipments/Drawworks/Drawworks_INPUTS.f90 +++ b/Equipments/Drawworks/Drawworks_INPUTS.f90 @@ -3,17 +3,18 @@ subroutine Drawworks_INPUTS Use CDrillingConsoleVariables Use CDataDisplayConsoleVariables Use CHoistingVariables - Use CSimulationVariables - Use CSlipsEnumVariables + ! use CSimulationVariables + ! Use CSlipsEnumVariables Use CKellyConnectionEnumVariables Use CElevatorConnectionEnumVariables - Use COperationConditionEnumVariables + ! Use COperationConditionEnumVariables Use COperationScenariosVariables - Use CSwingEnumVariables + ! Use CSwingEnumVariables Use CUnityInputs Use CTdsConnectionModesEnumVariables Use CTdsElevatorModesEnumVariables - Use CTdsSwingEnumVariables + ! Use CTdsSwingEnumVariables + use UnitySignalVariables Use VARIABLES Use Drawworks_VARIABLES Use TD_StringConnectionData @@ -31,21 +32,21 @@ subroutine Drawworks_INPUTS Drawworks%Direction_Var = DrillingConsole%DWSwitch - if (IsPortable) then - if (Drawworks%Direction_Var==-1 .and. DataDisplayConsole%Clutch==1) then !in FWD mode - Drawworks%Conv_Ratio = Drawworks%FWD_Conv_Ratio(Drawworks%ClutchMode,Drawworks%TransMode) - else - Drawworks%Conv_Ratio = 1.d0 - end if - else - if (Drawworks%Direction_Var==-1) then !in FWD mode - Drawworks%Conv_Ratio = Drawworks%FWD_Conv_Ratio(Drawworks%ClutchMode,Drawworks%TransMode) - else if (Drawworks%Direction_Var==+1) then !in REV mode - Drawworks%Conv_Ratio = 1.d0 - else if (Drawworks%Direction_Var==0) then !in OFF mode - Drawworks%Conv_Ratio = 1.d0 - end if + ! if (IsPortable) then + ! if (Drawworks%Direction_Var==-1 .and. DataDisplayConsole%Clutch==1) then !in FWD mode + ! Drawworks%Conv_Ratio = Drawworks%FWD_Conv_Ratio(Drawworks%ClutchMode,Drawworks%TransMode) + ! else + ! Drawworks%Conv_Ratio = 1.d0 + ! end if + ! else + if (Drawworks%Direction_Var==-1) then !in FWD mode + Drawworks%Conv_Ratio = Drawworks%FWD_Conv_Ratio(Drawworks%ClutchMode,Drawworks%TransMode) + else if (Drawworks%Direction_Var==+1) then !in REV mode + Drawworks%Conv_Ratio = 1.d0 + else if (Drawworks%Direction_Var==0) then !in OFF mode + Drawworks%Conv_Ratio = 1.d0 end if + ! end if @@ -59,12 +60,12 @@ subroutine Drawworks_INPUTS if ( Drawworks%ManualBreak<0.d0 ) then Drawworks%ManualBreak = 0.d0 end if - if ( IsPortable .and. DrillingConsole%ParkingBrakeBtn==1 ) then - Drawworks%ManualBreak = 100.d0 - DrillingConsole%ParkingBrakeLed = 1 - else - DrillingConsole%ParkingBrakeLed = 0 - end if + ! if ( IsPortable .and. DrillingConsole%ParkingBrakeBtn==1 ) then + ! Drawworks%ManualBreak = 100.d0 + ! DrillingConsole%ParkingBrakeLed = 1 + ! else + DrillingConsole%ParkingBrakeLed = 0 + ! end if @@ -223,17 +224,7 @@ subroutine Drawworks_INPUTS if ( Hoisting%DriveType==0 .and. Get_Slips() == SLIPS_SET_END .and. (Get_TdsConnectionModes()==TDS_CONNECTION_SPINE .or. Get_TdsConnectionModes()==TDS_CONNECTION_STRING) ) then Drawworks%ManualBreak = 100.d0 Drawworks%N_ref = 0.d0 - end if - - !if ( Get_Slips() == SLIPS_SET_END .and. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and. Drawworks%motion==+1 ) then - ! Drawworks%ManualBreak = 100.d0 - ! Drawworks%N_ref = 0.d0 - !!else if ( Get_Slips() == SLIPS_SET_END .and. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and. Drawworks%motion/=+1 ) then - !! Drawworks%N_ref = 0.d0 - !! !Call DWFixModeMotion - !! !print*, 'ELEVATOR_CONNECTION_STRING' - !end if - + end if !===> Closed BOP Rams , No Motion diff --git a/Equipments/Drawworks/Drawworks_Solver.f90 b/Equipments/Drawworks/Drawworks_Solver.f90 index c749874..de5c125 100644 --- a/Equipments/Drawworks/Drawworks_Solver.f90 +++ b/Equipments/Drawworks/Drawworks_Solver.f90 @@ -7,8 +7,9 @@ subroutine Drawworks_Solver Use Drawworks_VARIABLES Use CHookVariables Use CWarningsVariables - Use COperationConditionEnumVariables - Use CSlipsEnumVariables + use UnitySignalVariables + ! Use COperationConditionEnumVariables + ! Use CSlipsEnumVariables Use COperationScenariosVariables, only: Get_ElevatorConnection Use CElevatorConnectionEnumVariables Use CTdsConnectionModesEnumVariables diff --git a/Equipments/Drawworks/Drawworks_Solver_FreeTractionMotor.f90 b/Equipments/Drawworks/Drawworks_Solver_FreeTractionMotor.f90 index 475d660..9a9aaba 100644 --- a/Equipments/Drawworks/Drawworks_Solver_FreeTractionMotor.f90 +++ b/Equipments/Drawworks/Drawworks_Solver_FreeTractionMotor.f90 @@ -5,8 +5,9 @@ subroutine Drawworks_Solver_FreeTractionMotor Use CHoistingVariables Use CUnityInputs Use CHookVariables - Use COperationConditionEnumVariables - Use CSlipsEnumVariables + use UnitySignalVariables + ! Use COperationConditionEnumVariables + ! Use CSlipsEnumVariables Use CElevatorConnectionEnumVariables use COperationScenariosVariables, only: Get_ElevatorConnection Use CTdsConnectionModesEnumVariables diff --git a/Equipments/MudSystem/Elements_Creation.f90 b/Equipments/MudSystem/Elements_Creation.f90 index 000de73..4047c9d 100644 --- a/Equipments/MudSystem/Elements_Creation.f90 +++ b/Equipments/MudSystem/Elements_Creation.f90 @@ -14,7 +14,7 @@ subroutine ElementsCreation ! is called in subroutine Fluid_Flow_Solver USE sROP_Other_Variables USE sROP_Variables Use KickVariables - + use CError implicit none diff --git a/Equipments/MudSystem/MudSystem.f90 b/Equipments/MudSystem/MudSystem.f90 index 39a7700..a1b4d1a 100644 --- a/Equipments/MudSystem/MudSystem.f90 +++ b/Equipments/MudSystem/MudSystem.f90 @@ -633,56 +633,22 @@ module MudSystem use CTanksVariables Use KickVariables Use CHoistingVariables + use CSimulationVariables - implicit none - + implicit none Integer I - - MudSys_timeCounter = MudSys_timeCounter + 1 + MudSys_timeCounter = MudSys_timeCounter + 1 + if (ChokeControlPanel%ChokePanelStrokeResetSwitch == 1) then + MudSys_timeCounter= 0 + endif - if (ChokeControlPanel%ChokePanelStrokeResetSwitch == 1) then - MudSys_timeCounter= 0 - endif - - !WRITE (*,*) 'MudSys_timeCounter', MudSys_timeCounter - - - - - - - - - - - if (PumpsSpecification%MudPump1ReliefValveIsSet==.false.) PumpsSpecification%MudPump1ReliefValvePressure=6000. - if (PumpsSpecification%MudPump2ReliefValveIsSet==.false.) PumpsSpecification%MudPump2ReliefValvePressure=6000. - if (PumpsSpecification%CementPumpReliefValveIsSet==.false.) PumpsSpecification%CementPumpReliefValvePressure=6000. - - - - - - - - - - - - - - - - - - - - + !WRITE (*,*) 'MudSys_timeCounter', MudSys_timeCounter + if (PumpsSpecification%MudPump1ReliefValveIsSet==.false.) PumpsSpecification%MudPump1ReliefValvePressure=6000. + if (PumpsSpecification%MudPump2ReliefValveIsSet==.false.) PumpsSpecification%MudPump2ReliefValvePressure=6000. + if (PumpsSpecification%CementPumpReliefValveIsSet==.false.) PumpsSpecification%CementPumpReliefValvePressure=6000. !=========================================================================================================================== !=========================================================================================================================== - - ! >>> Should Be on Top of Other Codes <<< @@ -690,167 +656,152 @@ module MudSystem !ActiveTankDensity= ActiveDensity ! update from student input !ReserveTankVolume= ReserveMudVolumeGal ! update from student input !ReserveTankDensity= ReserveDensity ! update from student input - - - - if (j7 > 0) then !ActiveTankToDump - ActiveTankDensity= 0. - ActiveTankVolume= 0. - endif - - - if (j8 > 0) then !TripTankToDump - TripTankDensityCalc= 0. - TripTankVolumeCalc= 0. - endif - - - + if (j7 > 0) then !ActiveTankToDump + ActiveTankDensity= 0. + ActiveTankVolume= 0. + endif + + + if (j8 > 0) then !TripTankToDump + TripTankDensityCalc= 0. + TripTankVolumeCalc= 0. + endif !=========================================================================================================================== !=========================================================================================================================== - if (j15 > 0) then !MudPumps1&2ToActiveTank_Through65&66 - !write(*,*) 'j15 is open' - ! << if H82 or H83 or H4 are open, no flow goes to other parts of system >> - - - if (j2>0) Mp1Coef= 1.0 - if (j12>0) Mp2Coef= 1.0 - - - if (j2 /= 0 .or. j12/= 0) then - + if (j15 > 0) then !MudPumps1&2ToActiveTank_Through65&66 + !write(*,*) 'j15 is open' + ! << if H82 or H83 or H4 are open, no flow goes to other parts of system >> + + + if (j2>0) Mp1Coef= 1.0 + if (j12>0) Mp2Coef= 1.0 + + + if (j2 /= 0 .or. j12/= 0) then + - ActiveTankDensity = (ActiveTankDensity*ActiveTankVolume+ Mp1Coef*Mp1Density*(PUMP(1)%Flow_Rate*DeltaT_Mudline/60.) + Mp2Coef*Mp2Density*(PUMP(2)%Flow_Rate*DeltaT_Mudline/60.))/ & - (ActiveTankVolume+ Mp1Coef*(PUMP(1)%Flow_Rate*DeltaT_Mudline/60.) + Mp2Coef*(PUMP(2)%Flow_Rate*DeltaT_Mudline/60.)) - - ActiveTankVolume= ActiveTankVolume+ Mp1Coef*PUMP(1)%Flow_Rate*DeltaT_Mudline/60. + Mp2Coef*PUMP(2)%Flow_Rate*DeltaT_Mudline/60. - !write(*,*) 'active by j15' - endif - - - ActiveTankVolume=min(ActiveTankVolume , MudProperties%ActiveTotalTankCapacityGal-MudProperties%ActiveSettledContentsGal) - !if ActiveTankVolume is higher, excess amount is dumped - + ActiveTankDensity = (ActiveTankDensity*ActiveTankVolume+ Mp1Coef*Mp1Density*(PUMP(1)%Flow_Rate*DeltaT_Mudline/60.) + Mp2Coef*Mp2Density*(PUMP(2)%Flow_Rate*DeltaT_Mudline/60.))/ & + (ActiveTankVolume+ Mp1Coef*(PUMP(1)%Flow_Rate*DeltaT_Mudline/60.) + Mp2Coef*(PUMP(2)%Flow_Rate*DeltaT_Mudline/60.)) + + ActiveTankVolume= ActiveTankVolume+ Mp1Coef*PUMP(1)%Flow_Rate*DeltaT_Mudline/60. + Mp2Coef*PUMP(2)%Flow_Rate*DeltaT_Mudline/60. + !write(*,*) 'active by j15' endif - if (H84 > 0.0) then !CementPumpToCementTank_Through67 - - if (j13>0) CpCoef= 1.0 - - - CementTankDensityCalc= (CementTankDensityCalc*CementTankVolumeCalc+ CpCoef*Mp3Density*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.) ) / & - (CementTankVolumeCalc+CpCoef*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.)) + ActiveTankVolume=min(ActiveTankVolume , MudProperties%ActiveTotalTankCapacityGal-MudProperties%ActiveSettledContentsGal) + !if ActiveTankVolume is higher, excess amount is dumped + + endif + + + if (H84 > 0.0) then !CementPumpToCementTank_Through67 + + if (j13>0) CpCoef= 1.0 + + + CementTankDensityCalc= (CementTankDensityCalc*CementTankVolumeCalc+ CpCoef*Mp3Density*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.) ) / & + (CementTankVolumeCalc+CpCoef*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.)) + + CementTankVolumeCalc= CementTankVolumeCalc+ CpCoef*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.) - CementTankVolumeCalc= CementTankVolumeCalc+ CpCoef*(PUMP(3)%Flow_Rate*DeltaT_Mudline/60.) - - endif + endif !=========================================================================================================================== -!=========================================================================================================================== - - +!=========================================================================================================================== ! DUMP Path - - PumpsDumpVolume= PumpsDumpVolume+ (jj2*(1-H82)*DumpPump1*PUMP(1)%Flow_Rate + jj12*(1-H83)*DumpPump2*PUMP(2)%Flow_Rate + jj13*(1-H84)*DumpCementPump*PUMP(3)%Flow_Rate) *DeltaT_Mudline/60. - PumpsDumpFlowRate= jj2*(1-H82)*DumpPump1*PUMP(1)%Flow_Rate + jj12*(1-H83)*DumpPump2*PUMP(2)%Flow_Rate + jj13*(1-H84)*DumpCementPump*PUMP(3)%Flow_Rate - !write(*,*) 'PumpsDumpFlowRate=' , PumpsDumpFlowRate + PumpsDumpVolume= PumpsDumpVolume+ (jj2*(1-H82)*DumpPump1*PUMP(1)%Flow_Rate + jj12*(1-H83)*DumpPump2*PUMP(2)%Flow_Rate + jj13*(1-H84)*DumpCementPump*PUMP(3)%Flow_Rate) *DeltaT_Mudline/60. + PumpsDumpFlowRate= jj2*(1-H82)*DumpPump1*PUMP(1)%Flow_Rate + jj12*(1-H83)*DumpPump2*PUMP(2)%Flow_Rate + jj13*(1-H84)*DumpCementPump*PUMP(3)%Flow_Rate + !write(*,*) 'PumpsDumpFlowRate=' , PumpsDumpFlowRate + + if (Hoisting%DriveType==1 .and. PumpsDumpFlowRate > 0.0 .and. (DumpFromKelly_Pump1 .or. DumpFromKelly_Pump2 .or. DumpFromKelly_Pump3)) then + !write(*,*) 'Set_FlowFromKelly(.TRUE.)' + call Activate_PumpWithKellyDisconnected() + !write(*,*) 'PumpsDumpFlowRate=' , PumpsDumpFlowRate + CALL Set_FlowFromKelly(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before + elseif (Hoisting%DriveType==1) then + call Deactivate_PumpWithKellyDisconnected() + CALL Set_FlowFromKelly(0.0) ! .FALSE. before + !write(*,*) 'Set_FlowFromKelly(.FALSE.)' - if (Hoisting%DriveType==1 .and. PumpsDumpFlowRate > 0.0 .and. (DumpFromKelly_Pump1 .or. DumpFromKelly_Pump2 .or. DumpFromKelly_Pump3)) then - !write(*,*) 'Set_FlowFromKelly(.TRUE.)' - call Activate_PumpWithKellyDisconnected() - !write(*,*) 'PumpsDumpFlowRate=' , PumpsDumpFlowRate - CALL Set_FlowFromKelly(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before - elseif (Hoisting%DriveType==1) then - call Deactivate_PumpWithKellyDisconnected() - CALL Set_FlowFromKelly(0.0) ! .FALSE. before - !write(*,*) 'Set_FlowFromKelly(.FALSE.)' + endif + !write(*,*) 'DumpFromFillupHead_Pump1=' , DumpFromFillupHead_Pump1 + - endif - !write(*,*) 'DumpFromFillupHead_Pump1=' , DumpFromFillupHead_Pump1 - + if (Hoisting%DriveType==0 .and. PumpsDumpFlowRate > 0.0 .and. (DumpFromTopDrive_Pump1 .or. DumpFromTopDrive_Pump2 .or. DumpFromTopDrive_Pump3)) then + !write(*,*) 'Set_FlowFromKelly(.TRUE.)' + call Activate_PumpWithTopdriveDisconnected() + CALL Set_FlowFromKelly(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before + elseif (Hoisting%DriveType==0) then + call Deactivate_PumpWithTopdriveDisconnected() + CALL Set_FlowFromKelly(0.0) ! .FALSE. before + !write(*,*) 'Set_FlowFromKelly(.FALSE.)' - if (Hoisting%DriveType==0 .and. PumpsDumpFlowRate > 0.0 .and. (DumpFromTopDrive_Pump1 .or. DumpFromTopDrive_Pump2 .or. DumpFromTopDrive_Pump3)) then - !write(*,*) 'Set_FlowFromKelly(.TRUE.)' - call Activate_PumpWithTopdriveDisconnected() - CALL Set_FlowFromKelly(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before - elseif (Hoisting%DriveType==0) then - call Deactivate_PumpWithTopdriveDisconnected() - CALL Set_FlowFromKelly(0.0) ! .FALSE. before - !write(*,*) 'Set_FlowFromKelly(.FALSE.)' + endif + - endif - - - - if (PumpsDumpFlowRate > 0.0 .and. (DumpFromFillupHead_Pump1 .or. DumpFromFillupHead_Pump2 .or. DumpFromFillupHead_Pump3)) then - - !call Activate_PumpWithKellyDisconnected() - CALL Set_FlowFromFillupHead(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before - else - !call Deactivate_PumpWithKellyDisconnected() - CALL Set_FlowFromFillupHead(0.0) ! .FALSE. before + + if (PumpsDumpFlowRate > 0.0 .and. (DumpFromFillupHead_Pump1 .or. DumpFromFillupHead_Pump2 .or. DumpFromFillupHead_Pump3)) then + + !call Activate_PumpWithKellyDisconnected() + CALL Set_FlowFromFillupHead(min(PumpsDumpFlowRate/6.,100.)) ! .TRUE. before + else + !call Deactivate_PumpWithKellyDisconnected() + CALL Set_FlowFromFillupHead(0.0) ! .FALSE. before - endif - - - - + endif !####C_Program -----> DriveType = ! = 0 TopDrive_DriveType ! = 1 Kelly_DriveType !=========================================================================================================================== !=========================================================================================================================== - ! ****** Calculating Maximum Working Pressure - - - if (PumpsSpecification%MudPump1ReliefValveIsSet) then - MaxWorkingPressure1= PumpsSpecification%MudPump1ReliefValvePressure - else - MaxWorkingPressure1= 6000. !psi - endif - - - if (PumpsSpecification%MudPump2ReliefValveIsSet) then - MaxWorkingPressure2= PumpsSpecification%MudPump2ReliefValvePressure - else - MaxWorkingPressure2= 6000. !psi - endif - - if (PumpsSpecification%CementPumpReliefValveIsSet) then - MaxWorkingPressure3= PumpsSpecification%CementPumpReliefValveIsSet - else - MaxWorkingPressure3= 6000. !psi - endif - + ! ****** Calculating Maximum Working Pressure + if (PumpsSpecification%MudPump1ReliefValveIsSet) then + MaxWorkingPressure1= PumpsSpecification%MudPump1ReliefValvePressure + else + MaxWorkingPressure1= 6000. !psi + endif + + + if (PumpsSpecification%MudPump2ReliefValveIsSet) then + MaxWorkingPressure2= PumpsSpecification%MudPump2ReliefValvePressure + else + MaxWorkingPressure2= 6000. !psi + endif + + if (PumpsSpecification%CementPumpReliefValveIsSet) then + MaxWorkingPressure3= PumpsSpecification%CementPumpReliefValveIsSet + else + MaxWorkingPressure3= 6000. !psi + endif + - if (State1) then - MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure2 , MaxWorkingPressure3) - MaxWorkingPressure1= MaxWorkingPressure - MaxWorkingPressure2= MaxWorkingPressure - MaxWorkingPressure3= MaxWorkingPressure - endif - - - if (State2) then - MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure2) - MaxWorkingPressure1= MaxWorkingPressure - MaxWorkingPressure2= MaxWorkingPressure - endif - - if (State3) then - MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure3) - MaxWorkingPressure1= MaxWorkingPressure - MaxWorkingPressure3= MaxWorkingPressure - endif + if (State1) then + MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure2 , MaxWorkingPressure3) + MaxWorkingPressure1= MaxWorkingPressure + MaxWorkingPressure2= MaxWorkingPressure + MaxWorkingPressure3= MaxWorkingPressure + endif + + if (State2) then + MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure2) + MaxWorkingPressure1= MaxWorkingPressure + MaxWorkingPressure2= MaxWorkingPressure + endif - if (State4) then - MaxWorkingPressure= min(MaxWorkingPressure2 , MaxWorkingPressure3) - MaxWorkingPressure2= MaxWorkingPressure - MaxWorkingPressure3= MaxWorkingPressure - endif + if (State3) then + MaxWorkingPressure= min(MaxWorkingPressure1 , MaxWorkingPressure3) + MaxWorkingPressure1= MaxWorkingPressure + MaxWorkingPressure3= MaxWorkingPressure + endif + + + if (State4) then + MaxWorkingPressure= min(MaxWorkingPressure2 , MaxWorkingPressure3) + MaxWorkingPressure2= MaxWorkingPressure + MaxWorkingPressure3= MaxWorkingPressure + endif ! Calculating Maximum Working Pressure ****** !=========================================================================================================================== @@ -867,66 +818,62 @@ module MudSystem !write(*,*) 'H83=' , H83 !write(*,*) 'DumpPump2=' , DumpPump2 !write(*,*) 'G83=' , G83 - - - - - PumpPressure1= jj2*(1-H82)*(1-DumpPump1)*G82* PressureGauges(1) - PumpPressure2= jj12*(1-H83)*(1-DumpPump2)*G83* PressureGauges(1) - PumpPressure3= jj13*(1-H84)*(1-DumpCementPump)*G84* PressureGauges(1) - ! - !write(*,*) 'jj2 , H82 , DumpPump1 , G82,PresCsureGauges(1)=' , jj2 , H82 , DumpPump1 , G82,PressureGauges(1) - !write(*,*) '1)PumpPressure1=' , PumpPressure1 - - !write(*,*) 'PumpPressure2=' , PumpPressure2 - - PumpToManifoldMudVol = 3.0 * 42.0 - !PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP1_Q / ConvMinToSec * dt - !PumpToManifoldDeltaPDueToCompressibility = PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) - - IF(Mp1_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_82 .and. MP1_Q > 0.0) then - PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP1_Q / ConvMinToSec * dt - PumpPressure1= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) - write(*,*) '21)PumpPressure1=' , PumpPressure1 - - WRITE (*,*) ' valve 1 ', Manifold%Valve(1)%Status - WRITE (*,*) ' valve 4 ', Manifold%Valve(4)%Status - WRITE (*,*) ' valve 6 ', Manifold%Valve(6)%Status - WRITE (*,*) ' valve 7 ', Manifold%Valve(7)%Status - WRITE (*,*) ' valve 8 ', Manifold%Valve(8)%Status - WRITE (*,*) ' valve 9 ', Manifold%Valve(9)%Status - WRITE (*,*) ' valve 13 ', Manifold%Valve(13)%Status - WRITE (*,*) ' valve 68 ', Manifold%Valve(68)%Status - WRITE (*,*) ' valve 69 ', Manifold%Valve(69)%Status - WRITE (*,*) ' valve 48 ', Manifold%Valve(48)%Status - - !call DisplayOpenPathsWrite() - - ENDIF - - IF(Mp2_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_83 .and. MP2_Q > 0.0 ) then - PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP2_Q / ConvMinToSec * dt - PumpPressure2= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) - write(*,*) '22)PumpPressure1=' , PumpPressure2 - - WRITE (*,*) ' -valve 1 ', Manifold%Valve(1)%Status - WRITE (*,*) ' -valve 4 ', Manifold%Valve(4)%Status - WRITE (*,*) ' -valve 6 ', Manifold%Valve(6)%Status - WRITE (*,*) ' -valve 7 ', Manifold%Valve(7)%Status - WRITE (*,*) ' -valve 8 ', Manifold%Valve(8)%Status - WRITE (*,*) ' -valve 9 ', Manifold%Valve(9)%Status - WRITE (*,*) ' -valve 13 ', Manifold%Valve(13)%Status - WRITE (*,*) ' -valve 68 ', Manifold%Valve(68)%Status - WRITE (*,*) ' -valve 69 ', Manifold%Valve(69)%Status - WRITE (*,*) ' -valve 48 ', Manifold%Valve(48)%Status - - !call DisplayOpenPathsWrites() - ENDIF - - IF(Cp_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_84 .AND. MP3_Q > 0.0 ) then - PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP3_Q / ConvMinToSec * dt - PumpPressure3= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) - ENDIF + PumpPressure1= jj2*(1-H82)*(1-DumpPump1)*G82* PressureGauges(1) + PumpPressure2= jj12*(1-H83)*(1-DumpPump2)*G83* PressureGauges(1) + PumpPressure3= jj13*(1-H84)*(1-DumpCementPump)*G84* PressureGauges(1) + ! + !write(*,*) 'jj2 , H82 , DumpPump1 , G82,PresCsureGauges(1)=' , jj2 , H82 , DumpPump1 , G82,PressureGauges(1) + !write(*,*) '1)PumpPressure1=' , PumpPressure1 + + !write(*,*) 'PumpPressure2=' , PumpPressure2 + + PumpToManifoldMudVol = 3.0 * 42.0 + !PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP1_Q / ConvMinToSec * dt + !PumpToManifoldDeltaPDueToCompressibility = PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) + + IF(Mp1_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_82 .and. MP1_Q > 0.0) then + PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP1_Q / ConvMinToSec * dt + PumpPressure1= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) + write(*,*) '21)PumpPressure1=' , PumpPressure1 + + WRITE (*,*) ' valve 1 ', Manifold%Valve(1)%Status + WRITE (*,*) ' valve 4 ', Manifold%Valve(4)%Status + WRITE (*,*) ' valve 6 ', Manifold%Valve(6)%Status + WRITE (*,*) ' valve 7 ', Manifold%Valve(7)%Status + WRITE (*,*) ' valve 8 ', Manifold%Valve(8)%Status + WRITE (*,*) ' valve 9 ', Manifold%Valve(9)%Status + WRITE (*,*) ' valve 13 ', Manifold%Valve(13)%Status + WRITE (*,*) ' valve 68 ', Manifold%Valve(68)%Status + WRITE (*,*) ' valve 69 ', Manifold%Valve(69)%Status + WRITE (*,*) ' valve 48 ', Manifold%Valve(48)%Status + + !call DisplayOpenPathsWrite() + + ENDIF + + IF(Mp2_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_83 .and. MP2_Q > 0.0 ) then + PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP2_Q / ConvMinToSec * dt + PumpPressure2= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) + write(*,*) '22)PumpPressure1=' , PumpPressure2 + + WRITE (*,*) ' -valve 1 ', Manifold%Valve(1)%Status + WRITE (*,*) ' -valve 4 ', Manifold%Valve(4)%Status + WRITE (*,*) ' -valve 6 ', Manifold%Valve(6)%Status + WRITE (*,*) ' -valve 7 ', Manifold%Valve(7)%Status + WRITE (*,*) ' -valve 8 ', Manifold%Valve(8)%Status + WRITE (*,*) ' -valve 9 ', Manifold%Valve(9)%Status + WRITE (*,*) ' -valve 13 ', Manifold%Valve(13)%Status + WRITE (*,*) ' -valve 68 ', Manifold%Valve(68)%Status + WRITE (*,*) ' -valve 69 ', Manifold%Valve(69)%Status + WRITE (*,*) ' -valve 48 ', Manifold%Valve(48)%Status + + !call DisplayOpenPathsWrites() + ENDIF + + IF(Cp_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_84 .AND. MP3_Q > 0.0 ) then + PumpToManifoldCompressedMudVol = PumpToManifoldCompressedMudVol + MP3_Q / ConvMinToSec * dt + PumpPressure3= PumpToManifoldCompressedMudVol / (MudCompressibility * PumpToManifoldMudVol) + ENDIF !***************************************************************************** @@ -935,364 +882,342 @@ module MudSystem !.or.(J14> 0 .and. j4==0 .and. j9==0 .and. NOT(ALLOCATED(GasPocketWeight%Array)))) .and. MP1_Q > 0.0 ) then !write(*,*) ' failurrrrre ' - if (PumpPressure1 >= MaxWorkingPressure1 .and. MP1_Q > 0.0) then - - - write(*,*) 'mp1,if=' , PumpPressure1 , MaxWorkingPressure1 , MP1_Q - Pump1BlownCount = Pump1BlownCount + 1 - !if (Pump1BlownStarted == .FALSE.) then - ! write(*,*) 'if (Pump1BlownStarted == .FALSE. ) then' - ! Pump1BlownInTimeStep = SimulationTime + BlownThresholdInSecond - ! Pump1BlownStarted = .TRUE. - !endif - !write(*,*) 'SimulationTime===', SimulationTime, Pump1BlownInTimeStep - if(PumpsSpecification%MudPump1ReliefValveIsSet .and. Pump1BlownCount >= BlownThreshold) then - write(*,*) 'valve 65 open, BLOWN' - call ChangeValve(65, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - Pump1BlownCount = 0 - !Pump1BlownStarted = .FALSE. - !else - ! write(*,*) 'PumpPressure1= 6000 psi' - ! PumpPressure1= 6000. !psi - endif - !else - !Pump1BlownInTimeStep = 0 - !Pump1BlownStarted = .FALSE. - !write(*,*) 'Pump1BlownStarted = .FALSE.' - endif - - !write(*,*) ' valve 65=' , Valve(65)%Status - - - - !if(((Mp2_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_83) .or. PumpPressure2 >= MaxWorkingPressure2 & - !.or.(J14> 0 .and. j4==0 .and. j9==0 .and. NOT(ALLOCATED(GasPocketWeight%Array))) ) .and. MP2_Q > 0.0 ) then - - if(PumpPressure2 >= MaxWorkingPressure2 .and. MP2_Q > 0.0 ) then - - write(*,*) 'mp2,if=' , PumpPressure2 , MaxWorkingPressure2 , MP2_Q - Pump2BlownCount = Pump2BlownCount + 1 - !if (Pump2BlownStarted == .FALSE. ) then - ! Pump2BlownInTimeStep = SimulationTime + BlownThresholdInSecond - ! Pump2BlownStarted = .TRUE. - !endif - !if (MudPump2ReliefValveIsSet .and. SimulationTime >= Pump2BlownInTimeStep .and. Pump2BlownStarted) then - if (PumpsSpecification%MudPump2ReliefValveIsSet .and. Pump2BlownCount >= BlownThreshold) then - write(*,*) 'valve 66 open, BLOWN' - call ChangeValve(66, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - Pump2BlownCount = 0 - !Pump2BlownInTimeStep = 0 - !Pump2BlownStarted = .FALSE. - !else - ! PumpPressure2= 6000. !psi - endif - !else - !Pump2BlownInTimeStep = 0 - !Pump2BlownStarted = .FALSE. - endif + if (PumpPressure1 >= MaxWorkingPressure1 .and. MP1_Q > 0.0) then + write(*,*) 'mp1,if=' , PumpPressure1 , MaxWorkingPressure1 , MP1_Q + Pump1BlownCount = Pump1BlownCount + 1 + !if (Pump1BlownStarted == .FALSE.) then + ! write(*,*) 'if (Pump1BlownStarted == .FALSE. ) then' + ! Pump1BlownInTimeStep = SimulationTime + BlownThresholdInSecond + ! Pump1BlownStarted = .TRUE. + !endif + !write(*,*) 'SimulationTime===', SimulationTime, Pump1BlownInTimeStep + if(PumpsSpecification%MudPump1ReliefValveIsSet .and. Pump1BlownCount >= BlownThreshold) then + write(*,*) 'valve 65 open, BLOWN' + call ChangeValve(65, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + Pump1BlownCount = 0 + !Pump1BlownStarted = .FALSE. + !else + ! write(*,*) 'PumpPressure1= 6000 psi' + ! PumpPressure1= 6000. !psi + endif + !else + !Pump1BlownInTimeStep = 0 + !Pump1BlownStarted = .FALSE. + !write(*,*) 'Pump1BlownStarted = .FALSE.' + endif + + !write(*,*) ' valve 65=' , Valve(65)%Status + + + + !if(((Mp2_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_83) .or. PumpPressure2 >= MaxWorkingPressure2 & + !.or.(J14> 0 .and. j4==0 .and. j9==0 .and. NOT(ALLOCATED(GasPocketWeight%Array))) ) .and. MP2_Q > 0.0 ) then + + if(PumpPressure2 >= MaxWorkingPressure2 .and. MP2_Q > 0.0 ) then + + write(*,*) 'mp2,if=' , PumpPressure2 , MaxWorkingPressure2 , MP2_Q + Pump2BlownCount = Pump2BlownCount + 1 + !if (Pump2BlownStarted == .FALSE. ) then + ! Pump2BlownInTimeStep = SimulationTime + BlownThresholdInSecond + ! Pump2BlownStarted = .TRUE. + !endif + !if (MudPump2ReliefValveIsSet .and. SimulationTime >= Pump2BlownInTimeStep .and. Pump2BlownStarted) then + if (PumpsSpecification%MudPump2ReliefValveIsSet .and. Pump2BlownCount >= BlownThreshold) then + write(*,*) 'valve 66 open, BLOWN' + call ChangeValve(66, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + Pump2BlownCount = 0 + !Pump2BlownInTimeStep = 0 + !Pump2BlownStarted = .FALSE. + !else + ! PumpPressure2= 6000. !psi + endif + !else + !Pump2BlownInTimeStep = 0 + !Pump2BlownStarted = .FALSE. + endif !if(((Cp_NoPath == 1 .and. ThereIsPathFrom_71_72_73_To_84) .or. PumpPressure3 >= MaxWorkingPressure3 & !.or.(J14> 0 .and. j4==0 .and. j9==0 .and. NOT(ALLOCATED(GasPocketWeight%Array)))) .and. MP3_Q > 0.0 ) then - if(PumpPressure3 >= MaxWorkingPressure3 .and. MP3_Q > 0.0 ) then - Pump3BlownCount = Pump3BlownCount + 1 - if (PumpsSpecification%CementPumpReliefValveIsSet .and. Pump3BlownCount >= BlownThreshold) then - !write(*,*) 'valve 67 open, BLOWN' - call ChangeValve(67, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - Pump3BlownCount = 0 - !else - ! PumpPressure3= 6000. !psi - endif - !else - !Pump3BlownInTimeStep = 0 - !Pump3BlownStarted = .FALSE. - endif + if(PumpPressure3 >= MaxWorkingPressure3 .and. MP3_Q > 0.0 ) then + Pump3BlownCount = Pump3BlownCount + 1 + if (PumpsSpecification%CementPumpReliefValveIsSet .and. Pump3BlownCount >= BlownThreshold) then + !write(*,*) 'valve 67 open, BLOWN' + call ChangeValve(67, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + Pump3BlownCount = 0 + !else + ! PumpPressure3= 6000. !psi + endif + !else + !Pump3BlownInTimeStep = 0 + !Pump3BlownStarted = .FALSE. + endif + + !write(*,*) '3)PumpPressure1=' , PumpPressure1 + + if (PumpPressure1>= 6000.) then + Pump1BlownCount = Pump1BlownCount + 1 + if(Pump1BlownCount >= BlownThreshold) then + call ChangeValve(65, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + call Activate_Pump1Failure() + Pump1OffFailure= .true. + Pump1BlownCount = 0 + endif + !else + !Pump1BlownInTimeStep = 0 + !Pump1BlownStarted = .FALSE. + endif + + if (PumpPressure2>= 6000.) then + Pump2BlownCount = Pump2BlownCount + 1 + if(Pump2BlownCount >= BlownThreshold) then + call ChangeValve(66, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + call Activate_Pump2Failure() + Pump2OffFailure= .true. + Pump2BlownCount = 0 + endif + !else + !Pump2BlownInTimeStep = 0 + !Pump2BlownStarted = .FALSE. + endif + + if (PumpPressure3>= 6000.) then + Pump3BlownCount = Pump3BlownCount + 1 + if(Pump3BlownCount >= BlownThreshold) then + call ChangeValve(67, .TRUE.) + PumpToManifoldCompressedMudVol= 0.0 + call Activate_Pump3Failure() + Pump3OffFailure= .true. + Pump3BlownCount = 0 + endif + !else + !Pump3BlownInTimeStep = 0 + !Pump3BlownStarted = .FALSE. + endif + ! Blown Conditions ******** +!=========================================================================================================================== +!=========================================================================================================================== + if (j9 > 0 ) then !.and. WellisNOTFull== .false.) then !WellToBellNipple + !write(*,*) 'j9 is open' + - !write(*,*) '3)PumpPressure1=' , PumpPressure1 + !MUD(7)%Q= ( Ann_Saved_MudDischarged_Volume_Final+Ann_Kick_Saved_Volume_Final - ((Qlost/60.0d0)*DeltaT_Mudline) )*60.d0/DeltaT_Mudline + MUD(7)%Q= ( MudVolume_InjectedFromAnn + Ann_Kick_Saved_Volume )*60.d0/DeltaT_Mudline !Injected is referred only to Mud - if (PumpPressure1>= 6000.) then - Pump1BlownCount = Pump1BlownCount + 1 - if(Pump1BlownCount >= BlownThreshold) then - call ChangeValve(65, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - call Activate_Pump1Failure() - Pump1OffFailure= .true. - Pump1BlownCount = 0 - endif - !else - !Pump1BlownInTimeStep = 0 - !Pump1BlownStarted = .FALSE. - endif - if (PumpPressure2>= 6000.) then - Pump2BlownCount = Pump2BlownCount + 1 - if(Pump2BlownCount >= BlownThreshold) then - call ChangeValve(66, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - call Activate_Pump2Failure() - Pump2OffFailure= .true. - Pump2BlownCount = 0 - endif - !else - !Pump2BlownInTimeStep = 0 - !Pump2BlownStarted = .FALSE. + if (j4 > 0) then + BellNipple_FlowCoef= 13.625/(13.625+BopStackSpecification%ChokeLineId) ! 13.625= BellNipple ID (inch) + MUD(7)%Q= BellNipple_FlowCoef * MUD(7)%Q + endif + + !total_annFlow= total_annFlow+(AnnulusFlowRateFinal/600.d0) + !total_DeltaVPipe= total_DeltaVPipe + DeltaVolumePipe + !write(*,*) 'total_annFlow,total_DeltaVPipe' , total_annFlow,total_DeltaVPipe + + + + if (MUD(7)%Q < 0.0 ) MUD(7)%Q= 0.0 !.or. WellisNOTFull== .true.) MUD(7)%Q= 0.0 + !!AnnulusFlowRateFinal: flow from string mud , DeltaVolumeOp: due to trip in + + !write(*,*) 'MUD(7)%Q=' , MUD(7)%Q + !write(*,*) 'MudVolume_InjectedFromAnn-WellToBellNipple=' , MudVolume_InjectedFromAnn + !write(*,*) 'Ann_Kick_Saved_Volume=' , Ann_Kick_Saved_Volume + + sys_total_injected= sys_total_injected+ MudVolume_InjectedFromAnn + + + if (ChokeControlPanel%ChokePanelStrokeResetSwitch == 1) then + sys_total_injected= 0. endif - if (PumpPressure3>= 6000.) then - Pump3BlownCount = Pump3BlownCount + 1 - if(Pump3BlownCount >= BlownThreshold) then - call ChangeValve(67, .TRUE.) - PumpToManifoldCompressedMudVol= 0.0 - call Activate_Pump3Failure() - Pump3OffFailure= .true. - Pump3BlownCount = 0 - endif - !else - !Pump3BlownInTimeStep = 0 - !Pump3BlownStarted = .FALSE. - endif - ! Blown Conditions ******** + !write(*,*) 'sys_total_injected=' , sys_total_injected + + - -!=========================================================================================================================== -!=========================================================================================================================== - if (j9 > 0 ) then !.and. WellisNOTFull== .false.) then !WellToBellNipple - !write(*,*) 'j9 is open' + + !WellOutletDensity= Ann_Density%Last() ! (ppg) <<< in CirculationCodeSelect Code - !MUD(7)%Q= ( Ann_Saved_MudDischarged_Volume_Final+Ann_Kick_Saved_Volume_Final - ((Qlost/60.0d0)*DeltaT_Mudline) )*60.d0/DeltaT_Mudline - MUD(7)%Q= ( MudVolume_InjectedFromAnn + Ann_Kick_Saved_Volume )*60.d0/DeltaT_Mudline !Injected is referred only to Mud - - - if (j4 > 0) then - BellNipple_FlowCoef= 13.625/(13.625+BopStackSpecification%ChokeLineId) ! 13.625= BellNipple ID (inch) - MUD(7)%Q= BellNipple_FlowCoef * MUD(7)%Q - endif - - !total_annFlow= total_annFlow+(AnnulusFlowRateFinal/600.d0) - !total_DeltaVPipe= total_DeltaVPipe + DeltaVolumePipe - !write(*,*) 'total_annFlow,total_DeltaVPipe' , total_annFlow,total_DeltaVPipe - - - - if (MUD(7)%Q < 0.0 ) MUD(7)%Q= 0.0 !.or. WellisNOTFull== .true.) MUD(7)%Q= 0.0 - !!AnnulusFlowRateFinal: flow from string mud , DeltaVolumeOp: due to trip in - - !write(*,*) 'MUD(7)%Q=' , MUD(7)%Q - !write(*,*) 'MudVolume_InjectedFromAnn-WellToBellNipple=' , MudVolume_InjectedFromAnn - !write(*,*) 'Ann_Kick_Saved_Volume=' , Ann_Kick_Saved_Volume - - sys_total_injected= sys_total_injected+ MudVolume_InjectedFromAnn - - - if (ChokeControlPanel%ChokePanelStrokeResetSwitch == 1) then - sys_total_injected= 0. - endif - - !write(*,*) 'sys_total_injected=' , sys_total_injected - - - - - !WellOutletDensity= Ann_Density%Last() ! (ppg) <<< in CirculationCodeSelect Code + if ((BellNippleVolume+((MUD(7)%Q/60.)*DeltaT_Mudline)) /= 0.0) then + BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(WellOutletDensity*(MUD(7)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((MUD(7)%Q/60.)*DeltaT_Mudline)) + else + BellNippleDensity= 0.0 + endif - if ((BellNippleVolume+((MUD(7)%Q/60.)*DeltaT_Mudline)) /= 0.0) then - - BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(WellOutletDensity*(MUD(7)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((MUD(7)%Q/60.)*DeltaT_Mudline)) - else - BellNippleDensity= 0.0 - endif + !IF (WellisNOTFull== .false.) THEN ! well must be full to do this order + BellNippleVolume= BellNippleVolume+ ((MUD(7)%Q/60.)*DeltaT_Mudline) + !ENDIF + - !IF (WellisNOTFull== .false.) THEN ! well must be full to do this order - BellNippleVolume= BellNippleVolume+ ((MUD(7)%Q/60.)*DeltaT_Mudline) - !ENDIF + VolumeToBellNipple= VolumeToBellNipple + BellNippleVolume + !write(*,*) 'VolumeToBellNipple*****=' , VolumeToBellNipple - - VolumeToBellNipple= VolumeToBellNipple + BellNippleVolume - !write(*,*) 'VolumeToBellNipple*****=' , VolumeToBellNipple - - !write(*,*) 'BellNippleVolume in j9=' , BellNippleVolume , MUD(7)%Q - - - - - endif - - - if (j9 == 0 ) then !.or. WellisNOTFull== .true.) then - !write(*,*) 'WellisNOTFull=' , WellisNOTFull - MUD(7)%Q=0.0 ! for normal circulation input - endif + !write(*,*) 'BellNippleVolume in j9=' , BellNippleVolume , MUD(7)%Q + endif - if (j9 > 0) then - WellToPitsOpen= .true. - else - WellToPitsOpen= .false. - endif + if (j9 == 0 ) then !.or. WellisNOTFull== .true.) then + !write(*,*) 'WellisNOTFull=' , WellisNOTFull + MUD(7)%Q=0.0 ! for normal circulation input + endif + + if (j9 > 0) then + WellToPitsOpen= .true. + else + WellToPitsOpen= .false. + endif !=========================================================================================================================== !=========================================================================================================================== - if (j10 > 0) then !MudBucketToBellNipple - !write(*,*) 'j10 is open' - - ! - !MudBucketVolume= 0. - !MudBucketDensity= 0. - - - ! MudBucketVolume gets value in DisconnectingPipe subroutine - BellNippleVolume= BellNippleVolume+ MudBucketVolume - BellNippleDensity= ActiveTankDensity - - MudBucketVolume= 0. - - - endif - - + if (j10 > 0) then !MudBucketToBellNipple + !write(*,*) 'j10 is open' + !MudBucketVolume= 0. + !MudBucketDensity= 0. + ! MudBucketVolume gets value in DisconnectingPipe subroutine + BellNippleVolume= BellNippleVolume+ MudBucketVolume + BellNippleDensity= ActiveTankDensity + MudBucketVolume= 0. + endif !=========================================================================================================================== !=========================================================================================================================== - if (j6 > 0) then !TripTankToActiveTank And BellNipple - !write(*,*) 'j6 is open' - !write(*,*) 'active by j6' - MUD(6)%Q= 300. ! constant flow rate(gpm) - + if (j6 > 0) then !TripTankToActiveTank And BellNipple + !write(*,*) 'j6 is open' + !write(*,*) 'active by j6' + MUD(6)%Q= 300. ! constant flow rate(gpm) + - TripTankVolumeCalc= TripTankVolumeCalc - ((MUD(6)%Q/60.)*DeltaT_Mudline) - + TripTankVolumeCalc= TripTankVolumeCalc - ((MUD(6)%Q/60.)*DeltaT_Mudline) + - !write(*,*) 'ActiveTankVolume before=', ActiveTankVolume - - - if (j6 == 1 .and. D71==1) then - !write(*,*) 'add to active' - ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(TripTankDensityCalc*(MUD(6)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((MUD(6)%Q/60.)*DeltaT_Mudline)) - ActiveTankVolume= ActiveTankVolume+ ((MUD(6)%Q/60.)*DeltaT_Mudline) - !write(*,*) 'ActiveTankVolume after=', ActiveTankVolume - - endif - - if (j6 == 1 .and. D80==1) then - BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(TripTankDensityCalc*(MUD(6)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((MUD(6)%Q/60.)*DeltaT_Mudline)) - BellNippleVolume= BellNippleVolume+ ((MUD(6)%Q/60.)*DeltaT_Mudline) - endif - - if (j6 == 2) then - ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(TripTankDensityCalc*(0.5*MUD(6)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((0.5*MUD(6)%Q/60.)*DeltaT_Mudline)) - BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(TripTankDensityCalc*(0.5*MUD(6)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((0.5*MUD(6)%Q/60.)*DeltaT_Mudline)) - - ActiveTankVolume= ActiveTankVolume+ ((0.5*MUD(6)%Q/60.)*DeltaT_Mudline) - BellNippleVolume= BellNippleVolume+ ((0.5*MUD(6)%Q/60.)*DeltaT_Mudline) - endif - + !write(*,*) 'ActiveTankVolume before=', ActiveTankVolume + + + if (j6 == 1 .and. D71==1) then + !write(*,*) 'add to active' + ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(TripTankDensityCalc*(MUD(6)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((MUD(6)%Q/60.)*DeltaT_Mudline)) + ActiveTankVolume= ActiveTankVolume+ ((MUD(6)%Q/60.)*DeltaT_Mudline) + !write(*,*) 'ActiveTankVolume after=', ActiveTankVolume + endif + + if (j6 == 1 .and. D80==1) then + BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(TripTankDensityCalc*(MUD(6)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((MUD(6)%Q/60.)*DeltaT_Mudline)) + BellNippleVolume= BellNippleVolume+ ((MUD(6)%Q/60.)*DeltaT_Mudline) + endif - ActiveTankVolume=min(ActiveTankVolume , MudProperties%ActiveTotalTankCapacityGal-MudProperties%ActiveSettledContentsGal) - !if ActiveTankVolume is higher, excess amount is dumped + if (j6 == 2) then + ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(TripTankDensityCalc*(0.5*MUD(6)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((0.5*MUD(6)%Q/60.)*DeltaT_Mudline)) + BellNippleDensity= ((BellNippleDensity*BellNippleVolume)+(TripTankDensityCalc*(0.5*MUD(6)%Q/60.)*DeltaT_Mudline))/(BellNippleVolume+((0.5*MUD(6)%Q/60.)*DeltaT_Mudline)) - endif - - if (j6 == 0) then - MUD(6)%Q=0.0 - endif + ActiveTankVolume= ActiveTankVolume+ ((0.5*MUD(6)%Q/60.)*DeltaT_Mudline) + BellNippleVolume= BellNippleVolume+ ((0.5*MUD(6)%Q/60.)*DeltaT_Mudline) + endif + + + + ActiveTankVolume=min(ActiveTankVolume , MudProperties%ActiveTotalTankCapacityGal-MudProperties%ActiveSettledContentsGal) + !if ActiveTankVolume is higher, excess amount is dumped + + endif + + if (j6 == 0) then + MUD(6)%Q=0.0 + endif !=========================================================================================================================== !=========================================================================================================================== - CALL Set_FlowFromReturnLine(.false.) - + CALL Set_FlowFromReturnLine(.false.) + + + if (j3 > 0) then !BellNippleToPits-FullWell - must be after **WellToBellNipple(j9)** + !write(*,*) 'j3 is open' - if (j3 > 0) then !BellNippleToPits-FullWell - must be after **WellToBellNipple(j9)** - !write(*,*) 'j3 is open' + !write(*,*) 'active by j3' + !BellNipple flow rate= sum flow rate (well+ mudbucket+ triptank) + + !Well to BellNipple: BellNippleVolume + !MudBucket to BellNipple: BellNippleVolume + !TripTnak to BellNipple: BellNippleVolume + MUD(3)%Q = (BellNippleVolume/DeltaT_Mudline)*60.d0 ! (gpm) + + + !write(*,*) 'BellNippleVolume in j3 =' , BellNippleVolume + + !write(*,*) 'MUD(3)%Q =' , MUD(3)%Q + + call Set_FlowRate(real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8)) ! for unity display + unityreturn = real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8) + + !write(*,*) 'unity return=' , real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8) + + + + + if (MUD(3)%Q > PedalMeter .and. B78==0) then + BellNippleDumpVolume= BellNippleDumpVolume + ((MUD(3)%Q/60.)*DeltaT_Mudline - (PedalMeter/60.)*DeltaT_Mudline) - !write(*,*) 'active by j3' - !BellNipple flow rate= sum flow rate (well+ mudbucket+ triptank) + !BellNippleDumpRate= MUD(3)%Q - PedalMeter + + CALL Set_FlowFromReturnLine(.TRUE.) ! for unity display - !Well to BellNipple: BellNippleVolume - !MudBucket to BellNipple: BellNippleVolume - !TripTnak to BellNipple: BellNippleVolume + endif + + !VolumeToActive = VolumeToActive + BellNippleVolume + !write(*,*) 'VolumeToActive*******=' , VolumeToActive - MUD(3)%Q = (BellNippleVolume/DeltaT_Mudline)*60.d0 ! (gpm) - - - !write(*,*) 'BellNippleVolume in j3 =' , BellNippleVolume + + active_before= ActiveTankVolume - !write(*,*) 'MUD(3)%Q =' , MUD(3)%Q + + BellNippleVolume= BellNippleVolume- ((MUD(3)%Q/60.)*DeltaT_Mudline) ! to be 0. + + if ( BellNippleDensity > 1.0) then + if (j3 == 1 .and. B71==1) then !(volumes in galon) - call Set_FlowRate(real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8)) ! for unity display - unityreturn = real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8) - !write(*,*) 'unity return=' , real(100.*min(MUD(3)%Q,PedalMeter)/PedalMeter, 8) + MUD(3)%Q = min(MUD(3)%Q , PedalMeter) + !write(*,*) 'MUD(3)%Q=' , MUD(3)%Q + IF (MudProperties%ActiveAutoDensity == .FALSE.) THEN - - - if (MUD(3)%Q > PedalMeter .and. B78==0) then - BellNippleDumpVolume= BellNippleDumpVolume + ((MUD(3)%Q/60.)*DeltaT_Mudline - (PedalMeter/60.)*DeltaT_Mudline) - - !BellNippleDumpRate= MUD(3)%Q - PedalMeter + ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(BellNippleDensity*(MUD(3)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((MUD(3)%Q/60.)*DeltaT_Mudline)) + ActiveTankVolume= ActiveTankVolume+ ((MUD(3)%Q/60.)*DeltaT_Mudline) - CALL Set_FlowFromReturnLine(.TRUE.) ! for unity display - - endif + !write(*,*) 'active increase bell 1=' , ((MUD(3)%Q/60.)*DeltaT_Mudline) - !VolumeToActive = VolumeToActive + BellNippleVolume - !write(*,*) 'VolumeToActive*******=' , VolumeToActive - - - active_before= ActiveTankVolume - - - BellNippleVolume= BellNippleVolume- ((MUD(3)%Q/60.)*DeltaT_Mudline) ! to be 0. + ELSEIF (MudProperties%ActiveAutoDensity .and. BellNippleDensity > ActiveTankDensity) THEN - - if ( BellNippleDensity > 1.0) then - - if (j3 == 1 .and. B71==1) then !(volumes in galon) - - - MUD(3)%Q = min(MUD(3)%Q , PedalMeter) - !write(*,*) 'MUD(3)%Q=' , MUD(3)%Q - - IF (MudProperties%ActiveAutoDensity == .FALSE.) THEN - - ActiveTankDensity= ((ActiveTankDensity*ActiveTankVolume)+(BellNippleDensity*(MUD(3)%Q/60.)*DeltaT_Mudline))/(ActiveTankVolume+((MUD(3)%Q/60.)*DeltaT_Mudline)) - ActiveTankVolume= ActiveTankVolume+ ((MUD(3)%Q/60.)*DeltaT_Mudline) - - !write(*,*) 'active increase bell 1=' , ((MUD(3)%Q/60.)*DeltaT_Mudline) - - - ELSEIF (MudProperties%ActiveAutoDensity .and. BellNippleDensity > ActiveTankDensity) THEN - - ActiveTankVolume= ActiveTankVolume+ ((20.8d0-BellNippleDensity)/(20.8d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) ! asumed cutting density = 20.8 ppg - !write(*,*) 'active increase bell 2=' , ((20.8d0-BellNippleDensity)/(20.8d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) - ELSEIF (MudProperties%ActiveAutoDensity .and. BellNippleDensity < 5.0) THEN - - ActiveTankVolume= ActiveTankVolume+ ((2.d0-BellNippleDensity)/(2.d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) ! asumed GAS density = 2.0 ppg - !write(*,*) 'active increase bell 3=' , ((2.d0-BellNippleDensity)/(2.d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) - - ELSEIF (MudProperties%ActiveAutoDensity .and. 5.0 < BellNippleDensity .and. BellNippleDensity <= ActiveTankDensity) THEN - !write(*,*) ' Auto true 3' + ActiveTankVolume= ActiveTankVolume+ ((20.8d0-BellNippleDensity)/(20.8d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) ! asumed cutting density = 20.8 ppg + !write(*,*) 'active increase bell 2=' , ((20.8d0-BellNippleDensity)/(20.8d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) + ELSEIF (MudProperties%ActiveAutoDensity .and. BellNippleDensity < 5.0) THEN + + ActiveTankVolume= ActiveTankVolume+ ((2.d0-BellNippleDensity)/(2.d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) ! asumed GAS density = 2.0 ppg + !write(*,*) 'active increase bell 3=' , ((2.d0-BellNippleDensity)/(2.d0-ActiveTankDensity))*((MUD(3)%Q/60.d0)*DeltaT_Mudline) + + ELSEIF (MudProperties%ActiveAutoDensity .and. 5.0 < BellNippleDensity .and. BellNippleDensity <= ActiveTankDensity) THEN + !write(*,*) ' Auto true 3' - - ActiveTankVolume= ActiveTankVolume+ ((MUD(3)%Q/60.d0)*DeltaT_Mudline) - !write(*,*) 'active increase bell 4=' , ((MUD(3)%Q/60.d0)*DeltaT_Mudline) - ENDIF - endif + ActiveTankVolume= ActiveTankVolume+ ((MUD(3)%Q/60.d0)*DeltaT_Mudline) + !write(*,*) 'active increase bell 4=' , ((MUD(3)%Q/60.d0)*DeltaT_Mudline) + + ENDIF + endif if (j3 == 1 .and. B77==1) then @@ -2345,63 +2270,63 @@ module MudSystem - IF (DataDisplayConsole%MVTPowerSwitch==1 .and. IsPortable==.false.) THEN + ! IF (DataDisplayConsole%MVTPowerSwitch==1 .and. IsPortable==.false.) THEN - IF (DataDisplayConsole%MVTSetAlarmSwitch==0) THEN + ! IF (DataDisplayConsole%MVTSetAlarmSwitch==0) THEN - DataDisplayConsole%PitGainLossGauge= ( ((ActiveTankVolume/42.) - RefrencePitVolume)) - PitGainLossGaugeMalf*(( ((ActiveTankVolume/42.) - RefrencePitVolume))+50) !(bbl) + ! DataDisplayConsole%PitGainLossGauge= ( ((ActiveTankVolume/42.) - RefrencePitVolume)) - PitGainLossGaugeMalf*(( ((ActiveTankVolume/42.) - RefrencePitVolume))+50) !(bbl) - ELSEIF (DataDisplayConsole%MVTSetAlarmSwitch==-1) THEN + ! ELSEIF (DataDisplayConsole%MVTSetAlarmSwitch==-1) THEN - MVT_MinVol_Allowded= PitGainLossZero+ MIN(0.,(DataDisplayConsole%MVTSetAlarmLowKnob-50))-0.1 - DataDisplayConsole%PitGainLossGauge= MVT_MinVol_Allowded - PitGainLossGaugeMalf*(MVT_MinVol_Allowded+50) - ! - PitGainLossGaugeMalf*(MVT_MinVol_Allowded+50) : Malf effect - !PitGainLose=(MVT_MinVol_Allowded) ! DrillWatch (incorrect) - !RefrencePitVolume= ActiveTankVolume/42. !(bbl) + ! MVT_MinVol_Allowded= PitGainLossZero+ MIN(0.,(DataDisplayConsole%MVTSetAlarmLowKnob-50))-0.1 + ! DataDisplayConsole%PitGainLossGauge= MVT_MinVol_Allowded - PitGainLossGaugeMalf*(MVT_MinVol_Allowded+50) + ! ! - PitGainLossGaugeMalf*(MVT_MinVol_Allowded+50) : Malf effect + ! !PitGainLose=(MVT_MinVol_Allowded) ! DrillWatch (incorrect) + ! !RefrencePitVolume= ActiveTankVolume/42. !(bbl) - ELSE !(MVTSetAlarmSwitch==1) + ! ELSE !(MVTSetAlarmSwitch==1) - MVT_MaxVol_Allowded= PitGainLossZero+ MAX(0., (DataDisplayConsole%MVTSetAlarmHighKnob-50.))+0.1 - DataDisplayConsole%PitGainLossGauge= MVT_MaxVol_Allowded - PitGainLossGaugeMalf*(MVT_MaxVol_Allowded+50) - ! - PitGainLossGaugeMalf*(MVT_MaxVol_Allowded+50) : Malf effect - !PitGainLose=(MVT_MaxVol_Allowded) ! DrillWatch (incorrect) - !RefrencePitVolume= ActiveTankVolume/42. !(bbl) - ENDIF + ! MVT_MaxVol_Allowded= PitGainLossZero+ MAX(0., (DataDisplayConsole%MVTSetAlarmHighKnob-50.))+0.1 + ! DataDisplayConsole%PitGainLossGauge= MVT_MaxVol_Allowded - PitGainLossGaugeMalf*(MVT_MaxVol_Allowded+50) + ! ! - PitGainLossGaugeMalf*(MVT_MaxVol_Allowded+50) : Malf effect + ! !PitGainLose=(MVT_MaxVol_Allowded) ! DrillWatch (incorrect) + ! !RefrencePitVolume= ActiveTankVolume/42. !(bbl) + ! ENDIF - !PitGainLossZero_Old= PitGainLossZero - !MVTCoarseKnob_Old= MVTCoarseKnob - !MVTFineKnob_Old= MVTFineKnob - !FirstSet_Time= .false. + ! !PitGainLossZero_Old= PitGainLossZero + ! !MVTCoarseKnob_Old= MVTCoarseKnob + ! !MVTFineKnob_Old= MVTFineKnob + ! !FirstSet_Time= .false. - IF ( ActiveTankVolume/42. < (RefrencePitVolume-ABS(MVT_MinVol_Allowded)) .OR. ActiveTankVolume/42. > (RefrencePitVolume+ABS(MVT_MaxVol_Allowded)) ) THEN + ! IF ( ActiveTankVolume/42. < (RefrencePitVolume-ABS(MVT_MinVol_Allowded)) .OR. ActiveTankVolume/42. > (RefrencePitVolume+ABS(MVT_MaxVol_Allowded)) ) THEN - DataDisplayConsole%MVTAlarmLED = 1 !(blinking) - IF (DataDisplayConsole%MVTHornSwitch) THEN - DataDisplayConsole%Buzzer2= .TRUE. - ELSE - DataDisplayConsole%Buzzer2= .FALSE. - ENDIF + ! DataDisplayConsole%MVTAlarmLED = 1 !(blinking) + ! IF (DataDisplayConsole%MVTHornSwitch) THEN + ! DataDisplayConsole%Buzzer2= .TRUE. + ! ELSE + ! DataDisplayConsole%Buzzer2= .FALSE. + ! ENDIF - ELSE - DataDisplayConsole%MVTAlarmLED = 0 !(OFF) - DataDisplayConsole%Buzzer2= .false. - ENDIF + ! ELSE + ! DataDisplayConsole%MVTAlarmLED = 0 !(OFF) + ! DataDisplayConsole%Buzzer2= .false. + ! ENDIF - ELSEIF (DataDisplayConsole%MVTPowerSwitch==0) THEN - !MudTanksVolumeGauge= 0. - DataDisplayConsole%PitGainLossGauge= -50 - DataDisplayConsole%MVTAlarmLED= 0 - DataDisplayConsole%Buzzer2= .false. + ! ELSEIF (DataDisplayConsole%MVTPowerSwitch==0) THEN + ! !MudTanksVolumeGauge= 0. + ! DataDisplayConsole%PitGainLossGauge= -50 + ! DataDisplayConsole%MVTAlarmLED= 0 + ! DataDisplayConsole%Buzzer2= .false. - ENDIF + ! ENDIF !!====================================================================== !! RETURN CALCULATIONS @@ -2432,26 +2357,26 @@ module MudSystem !write(*,*) 'PitGainLose galon' , PitGainLose*42. - if (IsPortable) then + ! if (IsPortable) then - MVT_MinVol_Allowded= DataDisplayConsole%PitAlarmLow - MVT_MaxVol_Allowded= DataDisplayConsole%PitAlarmHigh + ! MVT_MinVol_Allowded= DataDisplayConsole%PitAlarmLow + ! MVT_MaxVol_Allowded= DataDisplayConsole%PitAlarmHigh - IF ( ActiveTankVolume/42. < (RefrencePitVolume-ABS(MVT_MinVol_Allowded)) .OR. ActiveTankVolume/42. > (RefrencePitVolume+ABS(MVT_MaxVol_Allowded)) ) THEN + ! IF ( ActiveTankVolume/42. < (RefrencePitVolume-ABS(MVT_MinVol_Allowded)) .OR. ActiveTankVolume/42. > (RefrencePitVolume+ABS(MVT_MaxVol_Allowded)) ) THEN - DataDisplayConsole%MVTAlarmLED = 1 !(blinking) - IF (DataDisplayConsole%MVTHornSwitch) THEN - DataDisplayConsole%Buzzer2= .TRUE. - ELSE - DataDisplayConsole%Buzzer2= .FALSE. - ENDIF + ! DataDisplayConsole%MVTAlarmLED = 1 !(blinking) + ! IF (DataDisplayConsole%MVTHornSwitch) THEN + ! DataDisplayConsole%Buzzer2= .TRUE. + ! ELSE + ! DataDisplayConsole%Buzzer2= .FALSE. + ! ENDIF - ELSE - DataDisplayConsole%MVTAlarmLED = 0 !(OFF) - DataDisplayConsole%Buzzer2= .false. - ENDIF + ! ELSE + ! DataDisplayConsole%MVTAlarmLED = 0 !(OFF) + ! DataDisplayConsole%Buzzer2= .false. + ! ENDIF - endif + ! endif if (PitGainLossReset) then @@ -2474,8 +2399,8 @@ module MudSystem !!====================================================================== !! MUD FLOW-FILL INDICATOR !!====================================================================== - - IF (DataDisplayConsole%MFFIPowerSwitch==1 .and. IsPortable==.false.) THEN + + IF (DataDisplayConsole%MFFIPowerSwitch==1 ) THEN !.and. IsPortable==.false. !====================TotalStrokes Reset and Calculate====================== @@ -2614,26 +2539,26 @@ module MudSystem ENDIF - if ( IsPortable ) then + ! if ( IsPortable ) then - MFFI_MinPercent_Allowded=DataDisplayConsole%RetFlowAlarmLow - MFFI_MaxPercent_Allowded=DataDisplayConsole%RetFlowAlarmHigh + ! MFFI_MinPercent_Allowded=DataDisplayConsole%RetFlowAlarmLow + ! MFFI_MaxPercent_Allowded=DataDisplayConsole%RetFlowAlarmHigh - IF (ReturnFlowPercentMFFI_MaxPercent_Allowded) THEN + ! IF (ReturnFlowPercentMFFI_MaxPercent_Allowded) THEN - DataDisplayConsole%MFFIAlarmLED = 1 !(blinking) - IF (DataDisplayConsole%MFFIHornSwitch) THEN - DataDisplayConsole%Buzzer3= .true. - ELSE - DataDisplayConsole%Buzzer3= .FALSE. - ENDIF - ELSE - DataDisplayConsole%MFFIAlarmLED = 0 !(OFF) - DataDisplayConsole%Buzzer3= .false. - ENDIF + ! DataDisplayConsole%MFFIAlarmLED = 1 !(blinking) + ! IF (DataDisplayConsole%MFFIHornSwitch) THEN + ! DataDisplayConsole%Buzzer3= .true. + ! ELSE + ! DataDisplayConsole%Buzzer3= .FALSE. + ! ENDIF + ! ELSE + ! DataDisplayConsole%MFFIAlarmLED = 0 !(OFF) + ! DataDisplayConsole%Buzzer3= .false. + ! ENDIF - endif + ! endif !!====================================================================== @@ -2644,7 +2569,7 @@ module MudSystem Tank%TripTankDensity= TripTankDensityCalc !(display) - IF (DataDisplayConsole%TripTankPowerSwitch==1 .and. IsPortable==.false.) THEN + IF (DataDisplayConsole%TripTankPowerSwitch==1 ) THEN !.and. IsPortable==.false. IF (DataDisplayConsole%TripTankSetAlarmSwitch==0) THEN @@ -2684,25 +2609,25 @@ module MudSystem ENDIF - if ( IsPortable ) then + ! if ( IsPortable ) then - TripTank_MinVol_Allowded= DataDisplayConsole%TripAlarmLow - TripTank_MaxVol_Allowded= DataDisplayConsole%TripAlarmHigh + ! TripTank_MinVol_Allowded= DataDisplayConsole%TripAlarmLow + ! TripTank_MaxVol_Allowded= DataDisplayConsole%TripAlarmHigh - IF ((TripTankVolumeCalc < TripTank_MinVol_Allowded) .OR. (TripTankVolumeCalc > TripTank_MaxVol_Allowded)) THEN - DataDisplayConsole%TripTankAlarmLED = 1 !(blinking) - IF (DataDisplayConsole%TripTankHornSwitch) THEN - DataDisplayConsole%Buzzer1= .true. - ELSE - DataDisplayConsole%Buzzer1= .false. - ENDIF - ELSE - DataDisplayConsole%TripTankAlarmLED = 0 !(OFF) - DataDisplayConsole%Buzzer1= .false. - ENDIF + ! IF ((TripTankVolumeCalc < TripTank_MinVol_Allowded) .OR. (TripTankVolumeCalc > TripTank_MaxVol_Allowded)) THEN + ! DataDisplayConsole%TripTankAlarmLED = 1 !(blinking) + ! IF (DataDisplayConsole%TripTankHornSwitch) THEN + ! DataDisplayConsole%Buzzer1= .true. + ! ELSE + ! DataDisplayConsole%Buzzer1= .false. + ! ENDIF + ! ELSE + ! DataDisplayConsole%TripTankAlarmLED = 0 !(OFF) + ! DataDisplayConsole%Buzzer1= .false. + ! ENDIF - endif + ! endif @@ -2711,7 +2636,7 @@ module MudSystem - if (IsStopped) return + ! if (IsStopped) return end subroutine main diff --git a/Equipments/MudSystem/MudSystemMain.f90 b/Equipments/MudSystem/MudSystemMain.f90 index 861528f..b4853bf 100644 --- a/Equipments/MudSystem/MudSystemMain.f90 +++ b/Equipments/MudSystem/MudSystemMain.f90 @@ -3,16 +3,16 @@ module MudSystemMain public contains - subroutine MudSystem_Setup() - use CSimulationVariables - use MudSystem - implicit none - call SetupMudSystem() - call OnSimulationStop%Add(MudSystem_Stop) - call OnMudSystemStart%Add(MudSystem_Start) - call OnMudSystemStep%Add(MudSystem_Step) - call OnMudSystemMain%Add(MudSystemMainBody) - end subroutine + ! subroutine MudSystem_Setup() + ! ! use CSimulationVariables + ! use MudSystem + ! implicit none + ! call SetupMudSystem() + ! call OnSimulationStop%Add(MudSystem_Stop) + ! call OnMudSystemStart%Add(MudSystem_Start) + ! call OnMudSystemStep%Add(MudSystem_Step) + ! call OnMudSystemMain%Add(MudSystemMainBody) + ! end subroutine subroutine MudSystem_Stop implicit none @@ -39,10 +39,10 @@ module MudSystemMain call main() end subroutine MudSystem_Step - subroutine MudSystemMainBody - USE CSimulationVariables - use MudSystem - implicit none + ! subroutine MudSystemMainBody + ! ! use CSimulationVariables + ! use MudSystem + ! implicit none ! INTEGER :: MudDuration ! integer,dimension(8) :: MudStartTime , MudEndTime @@ -80,6 +80,6 @@ module MudSystemMain ! ! CALL DEALLOCATE_ARRAYS_MudSystem() - end subroutine MudSystemMainBody + ! end subroutine MudSystemMainBody end module MudSystemMain \ No newline at end of file diff --git a/Equipments/MudSystem/MudSystem_Variables.f90 b/Equipments/MudSystem/MudSystem_Variables.f90 index ac6e507..c8f3368 100644 --- a/Equipments/MudSystem/MudSystem_Variables.f90 +++ b/Equipments/MudSystem/MudSystem_Variables.f90 @@ -6,7 +6,7 @@ MODULE MudSystemVARIABLES use CBopControlPanelVariables use CEquipmentsConstants -use CSimulationVariables +! ! use CSimulationVariables use CAccumulatorVariables use CBopStackVariables use CChokeControlPanelVariables diff --git a/Equipments/MudSystem/Pump_and_Trip_In.f90 b/Equipments/MudSystem/Pump_and_Trip_In.f90 index bc90517..44c8159 100644 --- a/Equipments/MudSystem/Pump_and_Trip_In.f90 +++ b/Equipments/MudSystem/Pump_and_Trip_In.f90 @@ -15,6 +15,7 @@ subroutine Pump_and_TripIn ! is called in subroutine CirculationCodeSelect USE sROP_Variables Use KickVariables Use CShoeVariables + use CError implicit none diff --git a/Equipments/MudSystem/Trip_Out_andPump.f90 b/Equipments/MudSystem/Trip_Out_andPump.f90 index 5e94864..3ef034c 100644 --- a/Equipments/MudSystem/Trip_Out_andPump.f90 +++ b/Equipments/MudSystem/Trip_Out_andPump.f90 @@ -15,6 +15,7 @@ subroutine TripOut_and_Pump ! is called in subroutine CirculationCodeSelect USE sROP_Variables Use KickVariables Use CShoeVariables + use CError implicit none diff --git a/Equipments/Pumps/Pump1_MainSolver.f90 b/Equipments/Pumps/Pump1_MainSolver.f90 index 3ad7e9c..cc18a39 100644 --- a/Equipments/Pumps/Pump1_MainSolver.f90 +++ b/Equipments/Pumps/Pump1_MainSolver.f90 @@ -60,7 +60,7 @@ subroutine Pump1_MainSolver print*, 'Q , P , Hp , N=' print*, PUMP(1)%Flow_Rate , PUMP(1)%StandPipe_Pressure , PUMP(1)%Hydraulic_HorsePower , PUMP(1)%Speed - pause + ! pause end subroutine Pump1_MainSolver \ No newline at end of file diff --git a/Equipments/Pumps/Pump_OffMode_Solver.f90 b/Equipments/Pumps/Pump_OffMode_Solver.f90 index 43c9923..81691da 100644 --- a/Equipments/Pumps/Pump_OffMode_Solver.f90 +++ b/Equipments/Pumps/Pump_OffMode_Solver.f90 @@ -4,7 +4,7 @@ subroutine Pump_OffMode_Solver(Pump_No) !use CPumpsVariables !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables - !use CSimulationVariables + !! use CSimulationVariables !use CDrillWatchVariables !use CSounds diff --git a/Equipments/Pumps/Pump_OnMode_Solver.f90 b/Equipments/Pumps/Pump_OnMode_Solver.f90 index 28159a7..3e2e619 100644 --- a/Equipments/Pumps/Pump_OnMode_Solver.f90 +++ b/Equipments/Pumps/Pump_OnMode_Solver.f90 @@ -4,7 +4,7 @@ subroutine Pump_OnMode_Solver(Pump_No) !use CPumpsVariables !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables - !use CSimulationVariables + !! use CSimulationVariables !use CDrillWatchVariables !use equipments_PowerLimit !use CSounds diff --git a/Equipments/Pumps/PumpsMain.f90 b/Equipments/Pumps/PumpsMain.f90 index 8bd88a7..36fd9c4 100644 --- a/Equipments/Pumps/PumpsMain.f90 +++ b/Equipments/Pumps/PumpsMain.f90 @@ -3,7 +3,7 @@ module PumpsMain use CPumpsVariables use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use Pumps_VARIABLES use CSounds @@ -18,15 +18,15 @@ module PumpsMain ! ***** subroutine Pump1MainBody ***** ! **************************** - subroutine Pump1_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(Pump1_Init) - call OnSimulationStop%Add(Pump1_Init) - call OnPump1Step%Add(Pump1_Step) - call OnPump1Output%Add(Pump1_Output) - call OnPump1Main%Add(Pump1MainBody) - end subroutine + ! subroutine Pump1_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(Pump1_Init) + ! call OnSimulationStop%Add(Pump1_Init) + ! call OnPump1Step%Add(Pump1_Step) + ! call OnPump1Output%Add(Pump1_Output) + ! call OnPump1Main%Add(Pump1MainBody) + ! end subroutine subroutine Pump1_Init Call Pumps_StartUp @@ -36,41 +36,41 @@ module PumpsMain Call Pump1_MainSolver end subroutine Pump1_Step - subroutine Pump1_Output - implicit none - end subroutine Pump1_Output - - subroutine Pump1MainBody - use ifport - use ifmt - !use Pump1_MainSolver - use CWarningsVariables - !use equipments_PowerLimit - implicit none + ! subroutine Pump1_Output + ! implicit none + ! end subroutine Pump1_Output + + ! subroutine Pump1MainBody + ! use ifport + ! use ifmt + ! !use Pump1_MainSolver + ! use CWarningsVariables + ! !use equipments_PowerLimit + ! implicit none - integer,dimension(8) :: MP_START_TIME, MP_END_TIME - INTEGER :: MP_SolDuration + ! integer,dimension(8) :: MP_START_TIME, MP_END_TIME + ! INTEGER :: MP_SolDuration - Call Pumps_StartUp - loop1 : do - !!Call sleepqq(10) - !!Call DATE_AND_TIME(values=MP_START_TIME) + ! Call Pumps_StartUp + ! loop1 : do + ! !!Call sleepqq(10) + ! !!Call DATE_AND_TIME(values=MP_START_TIME) - Call Pump1_MainSolver + ! Call Pump1_MainSolver - if (Pumps_IsStopped == .true.) then - exit loop1 - end if + ! if (Pumps_IsStopped == .true.) then + ! exit loop1 + ! end if - !!Call DATE_AND_TIME(values=MP_END_TIME) - !!MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) - !!if(MP_SolDuration > 0.0) then - !! Call sleepqq(MP_SolDuration) - !!end if - end do loop1 + ! !!Call DATE_AND_TIME(values=MP_END_TIME) + ! !!MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) + ! !!if(MP_SolDuration > 0.0) then + ! !! Call sleepqq(MP_SolDuration) + ! !!end if + ! end do loop1 - end subroutine Pump1MainBody + ! end subroutine Pump1MainBody @@ -80,7 +80,7 @@ module PumpsMain ! ***** subroutine Pump2MainBody ***** ! **************************** ! subroutine Pump2_Setup() -! use CSimulationVariables +! ! use CSimulationVariables ! implicit none ! call OnSimulationInitialization%Add(Pump2_Init) ! call OnSimulationStop%Add(Pump2_Init) @@ -140,7 +140,7 @@ module PumpsMain !! ***** subroutine Pump3MainBody ***** !! **************************** ! subroutine Pump3_Setup() -! use CSimulationVariables +! ! use CSimulationVariables ! implicit none ! call OnSimulationInitialization%Add(Pump3_Init) ! call OnSimulationStop%Add(Pump3_Init) diff --git a/Equipments/Pumps/Pumps_Inputs.f90 b/Equipments/Pumps/Pumps_Inputs.f90 index 8f24405..f6d76a7 100644 --- a/Equipments/Pumps/Pumps_Inputs.f90 +++ b/Equipments/Pumps/Pumps_Inputs.f90 @@ -3,7 +3,7 @@ subroutine Pumps_Inputs !use CPumpsVariables !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables - !use CSimulationVariables + !! use CSimulationVariables use Pumps_VARIABLES !use MudSystem diff --git a/Equipments/Pumps/Pumps_Outputs.f90 b/Equipments/Pumps/Pumps_Outputs.f90 index 3894bf6..3720ed3 100644 --- a/Equipments/Pumps/Pumps_Outputs.f90 +++ b/Equipments/Pumps/Pumps_Outputs.f90 @@ -3,7 +3,7 @@ subroutine Pumps_Outputs use CPumpsVariables use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use Pumps_VARIABLES use MudSystem diff --git a/Equipments/Pumps/Pumps_StartUp.f90 b/Equipments/Pumps/Pumps_StartUp.f90 index 30cebc6..41e9a9a 100644 --- a/Equipments/Pumps/Pumps_StartUp.f90 +++ b/Equipments/Pumps/Pumps_StartUp.f90 @@ -3,7 +3,7 @@ subroutine Pumps_StartUp !use CPumpsVariables !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables - !use CSimulationVariables + !! use CSimulationVariables !use CPowerVariables use Pumps_VARIABLES diff --git a/Equipments/RotaryTable/RTMalfunction_MotorFailure.f90 b/Equipments/RotaryTable/RTMalfunction_MotorFailure.f90 index 7a163a0..38faf46 100644 --- a/Equipments/RotaryTable/RTMalfunction_MotorFailure.f90 +++ b/Equipments/RotaryTable/RTMalfunction_MotorFailure.f90 @@ -2,7 +2,7 @@ use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use RTable_VARIABLES IMPLICIT NONE diff --git a/Equipments/RotaryTable/RTable_INPUTS.f90 b/Equipments/RotaryTable/RTable_INPUTS.f90 index 51faa0b..2001edf 100644 --- a/Equipments/RotaryTable/RTable_INPUTS.f90 +++ b/Equipments/RotaryTable/RTable_INPUTS.f90 @@ -2,14 +2,15 @@ subroutine RTable_INPUTS use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CTdsConnectionModesEnumVariables use CTdsElevatorModesEnumVariables use CHoistingVariables use RTable_VARIABLES use TD_DrillStemComponents use CUnityInputs - use CSlipsEnumVariables + use UnitySignalVariables + ! use CSlipsEnumVariables IMPLICIT NONE integer :: i diff --git a/Equipments/RotaryTable/RTable_OffMode.f90 b/Equipments/RotaryTable/RTable_OffMode.f90 index f3ad1e8..1231ee7 100644 --- a/Equipments/RotaryTable/RTable_OffMode.f90 +++ b/Equipments/RotaryTable/RTable_OffMode.f90 @@ -3,7 +3,7 @@ subroutine RTable_OffMode use RTable_VARIABLES use CDataDisplayConsoleVariables use CDrillingConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CWarningsVariables use CSounds diff --git a/Equipments/RotaryTable/RTable_Solver.f90 b/Equipments/RotaryTable/RTable_Solver.f90 index 8f9f8e3..f426a1d 100644 --- a/Equipments/RotaryTable/RTable_Solver.f90 +++ b/Equipments/RotaryTable/RTable_Solver.f90 @@ -2,7 +2,7 @@ subroutine RTable_Solver use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CDrillWatchVariables use RTable_VARIABLES use CSounds diff --git a/Equipments/RotaryTable/RTable_Traction_Motor.f90 b/Equipments/RotaryTable/RTable_Traction_Motor.f90 index 7ea61ae..8ffca81 100644 --- a/Equipments/RotaryTable/RTable_Traction_Motor.f90 +++ b/Equipments/RotaryTable/RTable_Traction_Motor.f90 @@ -2,7 +2,7 @@ subroutine RTable_Traction_Motor use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use RTable_VARIABLES use equipments_PowerLimit diff --git a/Equipments/RotaryTable/RotaryTableMain.f90 b/Equipments/RotaryTable/RotaryTableMain.f90 index f7b49c8..3465c87 100644 --- a/Equipments/RotaryTable/RotaryTableMain.f90 +++ b/Equipments/RotaryTable/RotaryTableMain.f90 @@ -3,14 +3,14 @@ module RotaryTableMain public contains - subroutine RotaryTable_Setup() - !use CSimulationVariables - !call OnSimulationInitialization%Add(RotaryTable_Init) - !call OnSimulationStop%Add(RotaryTable_Init) - !call OnRotaryTableStep%Add(RotaryTable_Step) - !call OnRotaryTableOutput%Add(RotaryTable_Output) - !call OnRotaryTableMain%Add(RotaryTableMainBody) - end subroutine + ! subroutine RotaryTable_Setup() + ! !! use CSimulationVariables + ! !call OnSimulationInitialization%Add(RotaryTable_Init) + ! !call OnSimulationStop%Add(RotaryTable_Init) + ! !call OnRotaryTableStep%Add(RotaryTable_Step) + ! !call OnRotaryTableOutput%Add(RotaryTable_Output) + ! !call OnRotaryTableMain%Add(RotaryTableMainBody) + ! end subroutine subroutine RotaryTable_Init Call RTable_StartUp @@ -21,48 +21,48 @@ module RotaryTableMain Call Rtable_MainSolver end subroutine RotaryTable_Step - subroutine RotaryTable_Output - implicit none - end subroutine RotaryTable_Output + ! subroutine RotaryTable_Output + ! implicit none + ! end subroutine RotaryTable_Output - subroutine RotaryTableMainBody - use CDataDisplayConsoleVariables - use CDrillingConsoleVariables - use CSimulationVariables - use RTable_VARIABLES - use CDrillWatchVariables - use CWarningsVariables - use CSounds + ! subroutine RotaryTableMainBody + ! use CDataDisplayConsoleVariables + ! use CDrillingConsoleVariables + ! ! use CSimulationVariables + ! use RTable_VARIABLES + ! use CDrillWatchVariables + ! use CWarningsVariables + ! use CSounds - implicit none + ! implicit none - integer,dimension(8) :: RT_START_TIME, RT_END_TIME - INTEGER :: RT_SolDuration + ! integer,dimension(8) :: RT_START_TIME, RT_END_TIME + ! INTEGER :: RT_SolDuration - Call RTable_StartUp - loopRtablestart : do + ! Call RTable_StartUp + ! loopRtablestart : do - CALL DATE_AND_TIME(values=RT_START_TIME) + ! CALL DATE_AND_TIME(values=RT_START_TIME) - Call Rtable_MainSolver + ! Call Rtable_MainSolver - if (IsStopped == .true.) then - exit loopRtablestart - end if + ! if (IsStopped == .true.) then + ! exit loopRtablestart + ! end if - CALL DATE_AND_TIME(values=RT_END_TIME) - RT_SolDuration = 100-(RT_END_TIME(5)*3600000+RT_END_TIME(6)*60000+RT_END_TIME(7)*1000+RT_END_TIME(8)-RT_START_TIME(5)*3600000-RT_START_TIME(6)*60000-RT_START_TIME(7)*1000-RT_START_TIME(8)) - if(RT_SolDuration > 0.0) then - CALL sleepqq(RT_SolDuration) - end if + ! CALL DATE_AND_TIME(values=RT_END_TIME) + ! RT_SolDuration = 100-(RT_END_TIME(5)*3600000+RT_END_TIME(6)*60000+RT_END_TIME(7)*1000+RT_END_TIME(8)-RT_START_TIME(5)*3600000-RT_START_TIME(6)*60000-RT_START_TIME(7)*1000-RT_START_TIME(8)) + ! if(RT_SolDuration > 0.0) then + ! CALL sleepqq(RT_SolDuration) + ! end if - end do loopRtablestart + ! end do loopRtablestart - end subroutine RotaryTableMainBody + ! end subroutine RotaryTableMainBody diff --git a/Equipments/RotaryTable/Rtable_MainSolver.f90 b/Equipments/RotaryTable/Rtable_MainSolver.f90 index a679289..57afff9 100644 --- a/Equipments/RotaryTable/Rtable_MainSolver.f90 +++ b/Equipments/RotaryTable/Rtable_MainSolver.f90 @@ -2,7 +2,7 @@ subroutine Rtable_MainSolver use CDataDisplayConsoleVariables use CDrillingConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use RTable_VARIABLES use CDrillWatchVariables use CWarningsVariables @@ -11,17 +11,17 @@ subroutine Rtable_MainSolver IMPLICIT NONE - if (IsPortable) then - RTable%AssignmentSwitch = 1 - else - RTable%AssignmentSwitch = DrillingConsole%AssignmentSwitch - end if + ! if (IsPortable) then + ! RTable%AssignmentSwitch = 1 + ! else + RTable%AssignmentSwitch = DrillingConsole%AssignmentSwitch + ! end if if (DrillingConsole%RTThrottle<=0.e0) then RTable%K_throttle = 1 end if - if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch == -1) .and. (IsStopped == .false.) ) then + if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch == -1) ) then !.and. (IsStopped == .false.) ) then RTable%SoundBlower = .true. Call SetSoundBlowerRT(RTable%SoundBlower) @@ -52,7 +52,7 @@ subroutine Rtable_MainSolver RT_OldTransMode = DrillingConsole%RTTransmissionLever - else if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch == 1) .and. (RTable%K_throttle==1) .and. (IsStopped == .false.) ) then + else if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch == 1) .and. (RTable%K_throttle==1) ) then !.and. (IsStopped == .false.) ) then RTable%SoundBlower = .true. Call SetSoundBlowerRT(RTable%SoundBlower) @@ -86,7 +86,7 @@ subroutine Rtable_MainSolver else - if((any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch /= 0) .and. (IsStopped == .false.) ) then + if((any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (DrillingConsole%RTSwitch /= 0) ) then !.and. (IsStopped == .false.) ) then RTable%SoundBlower = .true. Call SetSoundBlowerRT(RTable%SoundBlower) DrillingConsole%RTBLWR = 1 diff --git a/Equipments/TopDrive/TopDriveMain.f90 b/Equipments/TopDrive/TopDriveMain.f90 index ebb9479..4ff8c2c 100644 --- a/Equipments/TopDrive/TopDriveMain.f90 +++ b/Equipments/TopDrive/TopDriveMain.f90 @@ -5,7 +5,7 @@ module TopDriveMain contains subroutine TopDrive_Init() - !use CSimulationVariables + !! use CSimulationVariables !implicit none !call OnSimulationStop%Add(TopDrive_Stop) !call OnTopDriveStart%Add(TopDrive_Start) @@ -29,48 +29,48 @@ module TopDriveMain subroutine TopDrive_Step implicit none call Log_4('TopDrive_Step') - Call Rtable_MainSolver + Call TopDrive_MainSolver end subroutine TopDrive_Step - subroutine TopDriveMainBody - use CSimulationVariables - use TopDrive_VARIABLES - use CDrillWatchVariables - use CWarningsVariables - use CSounds - use CTopDrivePanelVariables + ! subroutine TopDriveMainBody + ! ! use CSimulationVariables + ! use TopDrive_VARIABLES + ! use CDrillWatchVariables + ! use CWarningsVariables + ! use CSounds + ! use CTopDrivePanelVariables - implicit none + ! implicit none - integer,dimension(8) :: TDS_START_TIME, TDS_END_TIME - INTEGER :: TDS_SolDuration + ! integer,dimension(8) :: TDS_START_TIME, TDS_END_TIME + ! INTEGER :: TDS_SolDuration - call Log_4('TopDriveMainBody') + ! call Log_4('TopDriveMainBody') - Call TopDrive_StartUp + ! Call TopDrive_StartUp - loopTopDrivestart : do + ! loopTopDrivestart : do - CALL DATE_AND_TIME(values=TDS_START_TIME) + ! CALL DATE_AND_TIME(values=TDS_START_TIME) - Call TopDrive_MainSolver + ! Call TopDrive_MainSolver - if (IsStopped == .true.) then - exit loopTopDrivestart - end if + ! if (IsStopped == .true.) then + ! exit loopTopDrivestart + ! end if - CALL DATE_AND_TIME(values=TDS_END_TIME) - TDS_SolDuration = 100-(TDS_END_TIME(5)*3600000+TDS_END_TIME(6)*60000+TDS_END_TIME(7)*1000+TDS_END_TIME(8)-TDS_START_TIME(5)*3600000-TDS_START_TIME(6)*60000-TDS_START_TIME(7)*1000-TDS_START_TIME(8)) - !print*, 'TDStime=', TDS_SolDuration - if(TDS_SolDuration > 0.0) then - CALL sleepqq(TDS_SolDuration) - end if + ! CALL DATE_AND_TIME(values=TDS_END_TIME) + ! TDS_SolDuration = 100-(TDS_END_TIME(5)*3600000+TDS_END_TIME(6)*60000+TDS_END_TIME(7)*1000+TDS_END_TIME(8)-TDS_START_TIME(5)*3600000-TDS_START_TIME(6)*60000-TDS_START_TIME(7)*1000-TDS_START_TIME(8)) + ! !print*, 'TDStime=', TDS_SolDuration + ! if(TDS_SolDuration > 0.0) then + ! CALL sleepqq(TDS_SolDuration) + ! end if - end do loopTopDrivestart + ! end do loopTopDrivestart - end subroutine TopDriveMainBody + ! end subroutine TopDriveMainBody diff --git a/Equipments/TopDrive/TopDrive_INPUTS.f90 b/Equipments/TopDrive/TopDrive_INPUTS.f90 index 1e23aa9..3c6a15b 100644 --- a/Equipments/TopDrive/TopDrive_INPUTS.f90 +++ b/Equipments/TopDrive/TopDrive_INPUTS.f90 @@ -2,13 +2,14 @@ subroutine TopDrive_INPUTS use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CTopDrivePanelVariables use CTdsConnectionModesEnumVariables use TopDrive_VARIABLES use TD_DrillStemComponents use CUnityInputs - use CSlipsEnumVariables + USE UnitySignalVariables + ! use CSlipsEnumVariables IMPLICIT NONE integer :: i diff --git a/Equipments/TopDrive/TopDrive_MainSolver.f90 b/Equipments/TopDrive/TopDrive_MainSolver.f90 index d8c3d22..f883a05 100644 --- a/Equipments/TopDrive/TopDrive_MainSolver.f90 +++ b/Equipments/TopDrive/TopDrive_MainSolver.f90 @@ -2,7 +2,7 @@ subroutine TopDrive_MainSolver !use CDataDisplayConsoleVariables !use CDrillingConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use TopDrive_VARIABLES use CDrillWatchVariables use CWarningsVariables @@ -11,78 +11,57 @@ subroutine TopDrive_MainSolver IMPLICIT NONE - !if ( (TopDriveTdsPowerState==-1) .and. (RpmKnob==0.) ) then !FWD - if ( (TopDrivePanel%TopDriveTdsPowerState==-1) .and. (IsStopped == .false.) ) then !FWD - - - TDS%SoundBlower = .true. - !Call SetSoundBlowerRT(TDS%SoundBlower) - TopDrivePanel%TopDriveTdsPowerLed = 1 - - - !IF ( RTTransmissionLever /=0 .and. RotaryGearsAbuse==0 ) THEN !be in clutch mode ???? - TDS%N_new = (TopDrivePanel%RpmKnob/250.d0)*965.d0 ! 0 Top Drive Malfunction ----> Drive Motor Failure - call TopDrive_Malfunction_MotorFailure - - if (((TDS%N_new-TDS%N_old)/TDS%time_step)>193.) then - TDS%N_ref = (193.*TDS%time_step)+TDS%N_old - else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>193.) then - TDS%N_ref = (-193.*TDS%time_step)+TDS%N_old - else - TDS%N_ref = TDS%N_new - end if - CALL TopDrive_INPUTS - CALL TopDrive_Solver - TDS%N_old = TDS%N_ref - - - !else if ( (TopDriveTdsPowerState==1) .and. (RpmKnob==0.) ) then !REV - else if ( (TopDrivePanel%TopDriveTdsPowerState==1) .and. (IsStopped == .false.) ) then !REV - - - TDS%SoundBlower = .true. - !Call SetSoundBlowerRT(TDS%SoundBlower) - TopDrivePanel%TopDriveTdsPowerLed = 1 - - - TDS%N_new = (TopDrivePanel%RpmKnob/250.d0)*965.d0 - - !===> Top Drive Malfunction ----> Drive Motor Failure - call TopDrive_Malfunction_MotorFailure - - if (((TDS%N_new-TDS%N_old)/TDS%time_step)>193.) then - TDS%N_ref = (193.*TDS%time_step)+TDS%N_old - else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>193.) then - TDS%N_ref = (-193.*TDS%time_step)+TDS%N_old - else - TDS%N_ref = TDS%N_new - end if - CALL TopDrive_INPUTS - CALL TopDrive_Solver - TDS%N_old = TDS%N_ref - - - else + if ( TopDrivePanel%TopDriveTdsPowerState==-1 ) then !.and. (IsStopped == .false.) + TDS%SoundBlower = .true. + !Call SetSoundBlowerRT(TDS%SoundBlower) + TopDrivePanel%TopDriveTdsPowerLed = 1 + !IF ( RTTransmissionLever /=0 .and. RotaryGearsAbuse==0 ) THEN !be in clutch mode ???? + TDS%N_new = (TopDrivePanel%RpmKnob/250.d0)*965.d0 ! 0 Top Drive Malfunction ----> Drive Motor Failure + call TopDrive_Malfunction_MotorFailure - if( (TopDrivePanel%TopDriveTdsPowerState /= 0) .and. (IsStopped == .false.) ) then - TDS%SoundBlower = .true. - !Call SetSoundBlowerRT(TDS%SoundBlower) - TopDrivePanel%TopDriveTdsPowerLed = 1 - else - TDS%SoundBlower = .false. - !Call SetSoundBlowerRT(TDS%SoundBlower) - TopDrivePanel%TopDriveTdsPowerLed = 0 - end if - Call TopDrive_OffMode + if (((TDS%N_new-TDS%N_old)/TDS%time_step)>193.) then + TDS%N_ref = (193.*TDS%time_step)+TDS%N_old + else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>193.) then + TDS%N_ref = (-193.*TDS%time_step)+TDS%N_old + else + TDS%N_ref = TDS%N_new + end if + CALL TopDrive_INPUTS + CALL TopDrive_Solver + TDS%N_old = TDS%N_ref + !else if ( (TopDriveTdsPowerState==1) .and. (RpmKnob==0.) ) then !REV + else if ( (TopDrivePanel%TopDriveTdsPowerState==1) ) then !REV .and. (IsStopped == .false.) + TDS%SoundBlower = .true. + !Call SetSoundBlowerRT(TDS%SoundBlower) + TopDrivePanel%TopDriveTdsPowerLed = 1 + TDS%N_new = (TopDrivePanel%RpmKnob/250.d0)*965.d0 + !===> Top Drive Malfunction ----> Drive Motor Failure + call TopDrive_Malfunction_MotorFailure + if (((TDS%N_new-TDS%N_old)/TDS%time_step)>193.) then + TDS%N_ref = (193.*TDS%time_step)+TDS%N_old + else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>193.) then + TDS%N_ref = (-193.*TDS%time_step)+TDS%N_old + else + TDS%N_ref = TDS%N_new end if - - - - + CALL TopDrive_INPUTS + CALL TopDrive_Solver + TDS%N_old = TDS%N_ref + else + if( (TopDrivePanel%TopDriveTdsPowerState /= 0) ) then !.and. (IsStopped == .false.) + TDS%SoundBlower = .true. + !Call SetSoundBlowerRT(TDS%SoundBlower) + TopDrivePanel%TopDriveTdsPowerLed = 1 + else + TDS%SoundBlower = .false. + !Call SetSoundBlowerRT(TDS%SoundBlower) + TopDrivePanel%TopDriveTdsPowerLed = 0 + end if + Call TopDrive_OffMode + end if end subroutine TopDrive_MainSolver \ No newline at end of file diff --git a/Equipments/TopDrive/TopDrive_Malfunction_MotorFailure.f90 b/Equipments/TopDrive/TopDrive_Malfunction_MotorFailure.f90 index da72853..dc4fe4d 100644 --- a/Equipments/TopDrive/TopDrive_Malfunction_MotorFailure.f90 +++ b/Equipments/TopDrive/TopDrive_Malfunction_MotorFailure.f90 @@ -2,7 +2,7 @@ use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use TopDrive_VARIABLES IMPLICIT NONE diff --git a/Equipments/TopDrive/TopDrive_OffMode.f90 b/Equipments/TopDrive/TopDrive_OffMode.f90 index 4e8c5f1..151d739 100644 --- a/Equipments/TopDrive/TopDrive_OffMode.f90 +++ b/Equipments/TopDrive/TopDrive_OffMode.f90 @@ -3,7 +3,7 @@ subroutine TopDrive_OffMode use TopDrive_VARIABLES !use CDataDisplayConsoleVariables !use CDrillingConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CWarningsVariables use CSounds use CTopDrivePanelVariables diff --git a/Equipments/TopDrive/TopDrive_Solver.f90 b/Equipments/TopDrive/TopDrive_Solver.f90 index 2a7d6c2..a18c38e 100644 --- a/Equipments/TopDrive/TopDrive_Solver.f90 +++ b/Equipments/TopDrive/TopDrive_Solver.f90 @@ -2,7 +2,7 @@ subroutine TopDrive_Solver !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CDrillWatchVariables use TopDrive_VARIABLES use CSounds diff --git a/Equipments/TopDrive/TopDrive_Traction_Motor.f90 b/Equipments/TopDrive/TopDrive_Traction_Motor.f90 index 7245e5d..3e65fa4 100644 --- a/Equipments/TopDrive/TopDrive_Traction_Motor.f90 +++ b/Equipments/TopDrive/TopDrive_Traction_Motor.f90 @@ -2,7 +2,7 @@ subroutine TopDrive_Traction_Motor use CDrillingConsoleVariables use CDataDisplayConsoleVariables - use CSimulationVariables + ! use CSimulationVariables use CTopDrivePanelVariables use TopDrive_VARIABLES use equipments_PowerLimit diff --git a/FluidFlow/FluidFlowMain.f90 b/FluidFlow/FluidFlowMain.f90 index e400667..9c4df8b 100644 --- a/FluidFlow/FluidFlowMain.f90 +++ b/FluidFlow/FluidFlowMain.f90 @@ -3,16 +3,16 @@ module FluidFlowMain public contains ! - subroutine FluidFlow_Setup() - use CSimulationVariables - implicit none - !call OnSimulationInitialization%Add(FluidFlow_Init) - call OnSimulationStop%Add(FluidFlow_Stop) - call OnFluidFlowStart%Add(FluidFlow_Start) - call OnFluidFlowStep%Add(FluidFlow_Step) - !call OnFluidFlowOutput%Add(FluidFlow_Output) - call OnFluidFlowMain%Add(FluidFlowMainBody) - end subroutine + ! subroutine FluidFlow_Setup() + ! ! use CSimulationVariables + ! implicit none + ! !call OnSimulationInitialization%Add(FluidFlow_Init) + ! call OnSimulationStop%Add(FluidFlow_Stop) + ! call OnFluidFlowStart%Add(FluidFlow_Start) + ! call OnFluidFlowStep%Add(FluidFlow_Step) + ! !call OnFluidFlowOutput%Add(FluidFlow_Output) + ! call OnFluidFlowMain%Add(FluidFlowMainBody) + ! end subroutine subroutine FluidFlow_Stop implicit none @@ -63,18 +63,18 @@ module FluidFlowMain ! implicit none !end subroutine FluidFlow_Output - subroutine FluidFlowMainBody -! - use ifport - use ifmt - use CSimulationVariables - USE Fluid_Flow_Startup_Vars - !use general_info, only : reset_data - !use well_info - !use drilling_info - use CLog1 -! - implicit none +! subroutine FluidFlowMainBody +! ! +! use ifport +! use ifmt +! ! use CSimulationVariables +! USE Fluid_Flow_Startup_Vars +! !use general_info, only : reset_data +! !use well_info +! !use drilling_info +! use CLog1 +! ! +! implicit none !integer :: i, FlowDuration, SimulationStateOld !integer,dimension(8) :: FlowStartTime,FlowEndTime @@ -142,6 +142,6 @@ module FluidFlowMain !!CALL DeallocateFlowTypes ! ! - end subroutine FluidFlowMainBody + ! end subroutine FluidFlowMainBody end module FluidFlowMain \ No newline at end of file diff --git a/FluidFlow/Well_Pressure_Data_Transfer.f90 b/FluidFlow/Well_Pressure_Data_Transfer.f90 index 938f0c8..97d61c9 100644 --- a/FluidFlow/Well_Pressure_Data_Transfer.f90 +++ b/FluidFlow/Well_Pressure_Data_Transfer.f90 @@ -47,8 +47,8 @@ SUBROUTINE WellPressureDataTransfer BitCd = 0.98 BitNozzDia = 32.0 * StringConfiguration%BitDefinition%BitNozzleSize ! nozzle diameter in 1/32 in BitNozzleArea = 7.6699E-4 * BitNozzDia**2 - BitNozzleNum = StringConfiguration%BitDefinition%BitNozzleNo - BitJetsPlugged * PlugJetsCount - BitTotNozzArea = BitNozzleNum * BitNozzleArea + 0.5 * BitJetsWashedOut * JetWashoutCount * BitNozzleArea + BitNozzleNum = StringConfiguration%BitDefinition%BitNozzleNo - BitJetsPlugged * BitProblems%PlugJetsCount + BitTotNozzArea = BitNozzleNum * BitNozzleArea + 0.5 * BitJetsWashedOut * BitProblems%JetWashoutCount * BitNozzleArea IF (BitNozzleNum == 0) THEN BitTotallyPluged = .TRUE. ELSE @@ -341,10 +341,10 @@ SUBROUTINE WellPressureDataTransfer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - OpenArea32 = ((ChokeManifold%LeftManualChoke * (1.0 - ManChoke1Plug * REAL(ManualChoke1PluggedPercent)) / 100.0) + 0.5 * ManChoke1Washout) * ChokeAreaFullyOpen + OpenArea32 = ((ChokeManifold%LeftManualChoke * (1.0 - ManChoke1Plug * REAL(ChokeProblems%ManualChoke1PluggedPercent)) / 100.0) + 0.5 * ManChoke1Washout) * ChokeAreaFullyOpen OpenArea33 = CHOOKE(1)%AreaChokeFinal * Convfttoinch**2 ! (1.d0 - CHOOKE(1)%PercentClose) * ChokeAreaFullyOpen OpenArea34 = CHOOKE(2)%AreaChokeFinal * Convfttoinch**2 ! (1.d0 - CHOOKE(2)%PercentClose) * ChokeAreaFullyOpen - OpenArea35 = ((ChokeManifold%RightManualChoke * (1.0 - ManChoke2Plug * REAL(ManualChoke2PluggedPercent)) / 100.0) + 0.5 * ManChoke2Washout) * ChokeAreaFullyOpen + OpenArea35 = ((ChokeManifold%RightManualChoke * (1.0 - ManChoke2Plug * REAL(ChokeProblems%ManualChoke2PluggedPercent)) / 100.0) + 0.5 * ManChoke2Washout) * ChokeAreaFullyOpen !write(*,*) 'OpenArea32=' , OpenArea32, active32, ManChoke1Plug, ManualChoke1PluggedPercent, ManChoke1Washout !write(*,*) 'OpenArea33=' , OpenArea33, active33 !write(*,*) 'OpenArea34=' , OpenArea34, active34, !HydraulicChoke2PluggedPercent diff --git a/Geo/GeoMain.f90 b/Geo/GeoMain.f90 index 27e3e17..a72b5bb 100644 --- a/Geo/GeoMain.f90 +++ b/Geo/GeoMain.f90 @@ -7,291 +7,69 @@ module GeoMain integer :: SampleValue, TestValue contains - - !========================== START - SAMPLE MODULE =================== - subroutine Sample_Setup() - use CSimulationVariables - implicit none - !call OnSimulationInitialization%Add(Sample_Init) - call OnSimulationStop%Add(Sample_Stop) - call OnSampleStart%Add(Sample_Start) - call OnSampleStep%Add(Sample_Step) - !call OnSampleOutput%Add(Sample_Output) - call OnSampleMain%Add(Sample_Main) - end subroutine - - subroutine Sample_Stop - implicit none - !call Log_3('****************Sample-Init') - !print*, '****************Sample-Init' - SampleValue = 0 - end subroutine Sample_Stop - - subroutine Sample_Start - use CSimulationVariables - implicit none - !print*, '****************Sample_Start****************' - !call Log_3( '****************Sample_Start****************' ) - end subroutine Sample_Start - - subroutine Sample_Step - use CSimulationVariables - implicit none - !CALL DATE_AND_TIME(values=EndTime) - !call time%Finish() - - - SampleValue = SampleValue + 1 - !print*, '****************Sample_Step' , SampleValue - !call Log_3( '****************Sample_Step' , SampleValue) - - end subroutine Sample_Step - - subroutine Sample_Output - implicit none - - !call Log_4('****************Sample_Output:', SampleValue) - !print*, '****************Sample_Output:', SampleValue, ((EndTime(6)*60000+EndTime(7)*1000+EndTime(8)) - & - ! (StartTime(6)*60000+StartTime(7)*1000+StartTime(8))) - - !print*, 'timeElapsed=', ((EndTime(6)*60000+EndTime(7)*1000+EndTime(8)) - & - !(StartTime(6)*60000+StartTime(7)*1000+StartTime(8))) - !CALL DATE_AND_TIME(values=StartTime) - - !print*, 'timeElapsed=', time%ElapsedTimeMs(), SampleValue - - !call time%Start() - end subroutine Sample_Output - - subroutine Sample_Main - use CSimulationVariables - implicit none - !loop: do - ! !call Log_4('****************Sample-Mainnnnn:', SampleValue) - ! !print*, '****************Sample-Mainnnnn:', SampleValue - ! call sleepqq(300) - ! if(IsStopped) call Quit() - !end do loop - end subroutine Sample_Main - !========================== END - SAMPLE MODULE =================== - - - -!M_BopStack -!M_Pump1 -!M_Pump2 -!M_Pump3 -!M_ChokeControl -!M_Rop -!M_RotaryTable -!M_Drawworks -!M_FluidFlow -!M_TorqueDrag -!M_MudSystem -!M_PipeRams1 -!M_PipeRams2 -!M_KillLine -!M_ChokeLine -!M_BlindRams -!M_Annular -!M_Geo - - - - - - - - - !========================== END - TEST MODULE =================== - subroutine SetupTest() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(TestInit) - call OnSimulationStop%Add(TestOnStop) - call OnSimulationPause%Add(TestOnPaused) - end subroutine - - integer(4) function TestThread(arg) - !DEC$ ATTRIBUTES STDCALL, ALIAS:"_testthread" :: TestThread - use ifport - use ifmt - implicit none - integer(4), pointer :: arg - !call TestMain() - TestThread = 0; - call ExitThread(0) - end function TestThread - - subroutine TestInit - implicit none - - !print*, 'Test Module Init...' - !TestValue = 1 - - end subroutine TestInit - - subroutine TestMain - use CSimulationVariables - implicit none - - !loop: do - ! - ! print*, 'Test-Main:', TestValue - ! TestValue = TestValue + 1 - ! - ! call sleep(1) - ! if(IsStopped) call Quit() - !end do loop - - end subroutine TestMain - - subroutine TestOnStop - use CSimulationVariables - implicit none - - !print*, 'Test Module Stopped!' - !TestValue = 1 - - end subroutine TestOnStop - - subroutine TestOnPaused - use CSimulationVariables - implicit none - - !print*, 'Test Module Paused!' - - end subroutine TestOnPaused - !========================== END - TEST MODULE =================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - subroutine Setup() - use CPathChangeEvents - implicit none + ! subroutine Setup() + ! use CPathChangeEvents + ! implicit none - call BeforeTraverse%Add(InitialVarsBeforePathsChanges) - call OnPathOpen%Add(WhenPathOpen) - !call OnPathClose%Add(WhenPathClose) + ! call BeforeTraverse%Add(InitialVarsBeforePathsChanges) + ! call OnPathOpen%Add(WhenPathOpen) + ! !call OnPathClose%Add(WhenPathClose) - end subroutine + ! end subroutine - subroutine InitialVarsBeforePathsChanges() - implicit none +! subroutine InitialVarsBeforePathsChanges() +! implicit none -#ifdef deb - print*, "ValveOne: FALSE (init)" -#endif +! #ifdef deb +! print*, "ValveOne: FALSE (init)" +! #endif - end subroutine +! end subroutine - subroutine WhenPathOpen(valves) - implicit none - integer, allocatable, intent (in) :: valves(:) +! subroutine WhenPathOpen(valves) +! implicit none +! integer, allocatable, intent (in) :: valves(:) -! if ( any(valves == 1)) then -!#ifdef deb -! print*, "ValveOne: TRUE" -!#endif -! endif +! ! if ( any(valves == 1)) then +! !#ifdef deb +! ! print*, "ValveOne: TRUE" +! !#endif +! ! endif - end subroutine +! end subroutine - subroutine Geo_Setup() - use CSimulationVariables - implicit none - !call OnSimulationInitialization%Add(Geo_Init) - call OnSimulationStop%Add(Geo_Stop) - call OnGeoStart%Add(Geo_Start) - call OnGeoStep%Add(Geo_Step) - !call OnGeoOutput%Add(Geo_Output) - call OnGeoMain%Add(GeoMainBody) - end subroutine +! subroutine Geo_Setup() +! ! use CSimulationVariables +! implicit none +! !call OnSimulationInitialization%Add(Geo_Init) +! call OnSimulationStop%Add(Geo_Stop) +! call OnGeoStart%Add(Geo_Start) +! call OnGeoStep%Add(Geo_Step) +! !call OnGeoOutput%Add(Geo_Output) +! call OnGeoMain%Add(GeoMainBody) +! end subroutine subroutine Geo_Stop implicit none !print*, 'Geo_Stop' end subroutine Geo_Stop - subroutine Geo_Start - implicit none - !print*, '****************Geo_Start****************' - end subroutine Geo_Start + ! subroutine Geo_Start + ! implicit none + ! !print*, '****************Geo_Start****************' + ! end subroutine Geo_Start subroutine Geo_Step implicit none end subroutine Geo_Step - !subroutine Geo_Output - ! implicit none - ! !print*, 'Geo_Output' - !end subroutine Geo_Output + ! !subroutine Geo_Output + ! ! implicit none + ! ! !print*, 'Geo_Output' + ! !end subroutine Geo_Output - subroutine GeoMainBody - implicit none - end subroutine GeoMainBody + ! subroutine GeoMainBody + ! implicit none + ! end subroutine GeoMainBody end module GeoMain \ No newline at end of file diff --git a/Rop/JetImpactForce.f90 b/Rop/JetImpactForce.f90 index a1bc5e3..f61a161 100644 --- a/Rop/JetImpactForce.f90 +++ b/Rop/JetImpactForce.f90 @@ -4,7 +4,7 @@ subroutine JetImpactForce use sROP_Variables use CStringConfigurationVariables use CformationVariables - use CSimulationVariables + ! use CSimulationVariables use CmudPropertiesVariables use MudSystemVARIABLES diff --git a/Rop/ROP_MainCalculation.f90 b/Rop/ROP_MainCalculation.f90 index 4c8482c..ecea339 100644 --- a/Rop/ROP_MainCalculation.f90 +++ b/Rop/ROP_MainCalculation.f90 @@ -4,12 +4,12 @@ subroutine ROP_MainCalculation use sROP_Variables use CStringConfigurationVariables use CformationVariables - use CSimulationVariables + ! use CSimulationVariables use CDataDisplayConsoleVariables use CDrillingConsoleVariables use CmudPropertiesVariables use CHoistingVariables - use CDrillingConsole + ! use CDrillingConsole use CPathGenerationVariables use RTable_VARIABLES, only: RTable use TD_DrillStemComponents diff --git a/Rop/RopMain.f90 b/Rop/RopMain.f90 index 1c1ac7e..506b964 100644 --- a/Rop/RopMain.f90 +++ b/Rop/RopMain.f90 @@ -3,36 +3,36 @@ module RopMain public contains - subroutine Rop_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(Rop_Init) - call OnSimulationStop%Add(Rop_Init) - call OnRopStep%Add(Rop_Step) - call OnRopOutput%Add(Rop_Output) - call OnRopMain%Add(RopMainBody) - end subroutine + ! subroutine Rop_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(Rop_Init) + ! call OnSimulationStop%Add(Rop_Init) + ! call OnRopStep%Add(Rop_Step) + ! call OnRopOutput%Add(Rop_Output) + ! call OnRopMain%Add(RopMainBody) + ! end subroutine - subroutine Rop_Init - implicit none - end subroutine Rop_Init + ! subroutine Rop_Init + ! implicit none + ! end subroutine Rop_Init subroutine Rop_Step implicit none end subroutine Rop_Step - subroutine Rop_Output - implicit none - end subroutine Rop_Output + ! subroutine Rop_Output + ! implicit none + ! end subroutine Rop_Output - subroutine RopMainBody - implicit none - !loop1: do - !call sleep(1) - !call Calculate_ROP - !write(*,*) 'ROP main reached' - !end do loop1 - end subroutine RopMainBody + ! subroutine RopMainBody + ! implicit none + ! !loop1: do + ! !call sleep(1) + ! !call Calculate_ROP + ! !write(*,*) 'ROP main reached' + ! !end do loop1 + ! end subroutine RopMainBody end module RopMain \ No newline at end of file diff --git a/Rop/sROP_Module.f90 b/Rop/sROP_Module.f90 index bf29dc8..e0b3a50 100644 --- a/Rop/sROP_Module.f90 +++ b/Rop/sROP_Module.f90 @@ -10,7 +10,7 @@ subroutine Calculate_ROP use sROP_Variables use CStringConfigurationVariables use CformationVariables - Use CSimulationVariables + use CSimulationVariables use CmudPropertiesVariables Use RTable_VARIABLES, only: RTable use TD_DrillStemComponents diff --git a/SimulationCore2.vfproj b/SimulationCore2.vfproj index 451e9b9..832c976 100644 --- a/SimulationCore2.vfproj +++ b/SimulationCore2.vfproj @@ -117,23 +117,13 @@ - - - - - - - - - - @@ -146,7 +136,8 @@ - + + @@ -168,138 +159,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - diff --git a/Simulator.f90 b/Simulator.f90 index 5a235b9..dcfc7d3 100644 --- a/Simulator.f90 +++ b/Simulator.f90 @@ -108,7 +108,7 @@ contains call Geo_Step() !! Sheikh - call FluidFlow_Step() + !call FluidFlow_Step() !! Ahmadi call OperationScenarios_Step() diff --git a/TorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 b/TorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 index afcc142..37a6bb1 100644 --- a/TorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 +++ b/TorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 @@ -1,16 +1,17 @@ subroutine TD_AddComponents Use CStringConfigurationVariables - Use CStringUpdateVariables - Use CSafetyValveEnumVariables - Use CIbopEnumVariables - Use COperationConditionEnumVariables - Use CKellyConnectionEnumVariables - use COperationScenariosVariables, only: Get_ElevatorConnection - Use CElevatorConnectionEnumVariables + use UnitySignalVariables + ! Use CStringUpdateVariables + ! Use CSafetyValveEnumVariables + ! Use CIbopEnumVariables + ! Use COperationConditionEnumVariables + ! Use CKellyConnectionEnumVariables + use COperationScenariosVariables!, only: Get_ElevatorConnection + ! Use CElevatorConnectionEnumVariables Use CHoistingVariables - Use CTdsConnectionModesEnumVariables - Use CTdsElevatorModesEnumVariables + ! Use CTdsConnectionModesEnumVariables + ! Use CTdsElevatorModesEnumVariables Use TD_DrillStemComponents Use TD_WellGeometry Use TD_GeneralData diff --git a/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 b/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 index e3aadfe..1766d4a 100644 --- a/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 +++ b/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 @@ -1,10 +1,12 @@ subroutine TD_DrillStemConfiguration Use CStringConfigurationVariables - Use CNearFloorConnection + use SoftwareInputsVariables +! Use CNearFloorConnection Use CDataDisplayConsoleVariables Use CDrillWatchVariables - Use COperationConditionEnumVariables + use UnitySignalVariables +! Use COperationConditionEnumVariables Use CKellyConnectionEnumVariables Use TD_DrillStemComponents Use TD_WellElements diff --git a/TorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 b/TorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 index b356da4..e3d078b 100644 --- a/TorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 +++ b/TorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 @@ -1,15 +1,16 @@ subroutine TD_RemoveComponents Use CStringConfigurationVariables - Use CStringUpdateVariables - Use CSafetyValveEnumVariables - Use CIbopEnumVariables - Use COperationConditionEnumVariables - Use CKellyConnectionEnumVariables - Use CElevatorConnectionEnumVariables + use UnitySignalVariables + ! Use CStringUpdateVariables + ! Use CSafetyValveEnumVariables + ! Use CIbopEnumVariables + ! Use COperationConditionEnumVariables + ! Use CKellyConnectionEnumVariables + ! Use CElevatorConnectionEnumVariables Use COperationScenariosVariables - Use CTdsConnectionModesEnumVariables - Use CTdsElevatorModesEnumVariables + ! Use CTdsConnectionModesEnumVariables + ! Use CTdsElevatorModesEnumVariables Use CHoistingVariables Use TD_DrillStemComponents Use TD_WellGeometry diff --git a/TorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 b/TorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 index 2521437..4c77ecd 100644 --- a/TorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 +++ b/TorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 @@ -2,13 +2,15 @@ subroutine TD_StringConnectionModes Use CHoistingVariables Use CDrillingConsoleVariables - Use CKellyConnectionEnumVariables - Use CElevatorConnectionEnumVariables - Use CSlipsEnumVariables - Use COperationConditionEnumVariables - Use CZeroStringSpeed - Use CTdsConnectionModesEnumVariables - Use CTdsElevatorModesEnumVariables + use UnitySignalVariables +! Use CKellyConnectionEnumVariables +! Use CElevatorConnectionEnumVariables +! Use CSlipsEnumVariables +! Use COperationConditionEnumVariables + use SoftwareInputsVariables +! Use CZeroStringSpeed +! Use CTdsConnectionModesEnumVariables +! Use CTdsElevatorModesEnumVariables Use COperationScenariosVariables Use TD_DrillStemComponents Use TD_WellElements diff --git a/TorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 b/TorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 index 715ebed..3b57f79 100644 --- a/TorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 +++ b/TorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 @@ -8,7 +8,8 @@ subroutine TD_HookLoadCalculation Use Drawworks_VARIABLES, only: Drawworks Use CDataDisplayConsoleVariables Use CHoistingVariables - Use CSlipsEnumVariables +! Use CSlipsEnumVariables + use UnitySignalVariables Use CBopStackVariables Use VARIABLES Use CUnityInputs diff --git a/TorqueDrag/TD_MainCalculations.f90 b/TorqueDrag/TD_MainCalculations.f90 index 2a42f95..8dea11b 100644 --- a/TorqueDrag/TD_MainCalculations.f90 +++ b/TorqueDrag/TD_MainCalculations.f90 @@ -2,7 +2,7 @@ subroutine TD_MainCalculations Use CCasingLinerChokeVariables Use CStringConfigurationVariables - Use CSimulationVariables + ! use CSimulationVariables Use TD_DrillStemComponents Use TD_WellElements Use TD_WellGeometry diff --git a/TorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 b/TorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 index c7b71b6..ee93600 100644 --- a/TorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 +++ b/TorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 @@ -2,7 +2,7 @@ subroutine TD_DrillStemStartUp Use CCasingLinerChokeVariables Use CStringConfigurationVariables - Use CSimulationVariables + ! use CSimulationVariables Use TD_DrillStemComponents Use TD_WellElements Use TD_WellGeometry diff --git a/TorqueDrag/TD_StartUp/TD_StartUp.f90 b/TorqueDrag/TD_StartUp/TD_StartUp.f90 index 29300ae..5f75752 100644 --- a/TorqueDrag/TD_StartUp/TD_StartUp.f90 +++ b/TorqueDrag/TD_StartUp/TD_StartUp.f90 @@ -2,8 +2,9 @@ subroutine TD_StartUp Use CCasingLinerChokeVariables Use CStringConfigurationVariables - Use CSimulationVariables - Use COperationConditionEnumVariables + ! use CSimulationVariables + use UnitySignalVariables + ! Use COperationConditionEnumVariables Use CHoistingVariables Use CPathGenerationVariables Use TD_DrillStemComponents diff --git a/TorqueDrag/TorqueDragMain.f90 b/TorqueDrag/TorqueDragMain.f90 index e19161a..5310510 100644 --- a/TorqueDrag/TorqueDragMain.f90 +++ b/TorqueDrag/TorqueDragMain.f90 @@ -2,45 +2,45 @@ MODULE TorqueDragMain USE CPumpsVariables USE CDrillingConsoleVariables USE CDataDisplayConsoleVariables - USE CSimulationVariables + ! use CSimulationVariables USE Pumps_VARIABLES IMPLICIT NONE PUBLIC CONTAINS - subroutine TorqueDrag_Setup() - use CSimulationVariables - implicit none - call OnSimulationInitialization%Add(TorqueDrag_Init) - call OnSimulationStop%Add(TorqueDrag_Init) - call OnTorqueDragStep%Add(TorqueDrag_Step) - call OnTorqueDragOutput%Add(TorqueDrag_Output) - call OnTorqueDragMain%Add(TorqueDragMainBody) - end subroutine + ! subroutine TorqueDrag_Setup() + ! ! use CSimulationVariables + ! implicit none + ! call OnSimulationInitialization%Add(TorqueDrag_Init) + ! call OnSimulationStop%Add(TorqueDrag_Init) + ! call OnTorqueDragStep%Add(TorqueDrag_Step) + ! call OnTorqueDragOutput%Add(TorqueDrag_Output) + ! call OnTorqueDragMain%Add(TorqueDragMainBody) + ! end subroutine - subroutine TorqueDrag_Init - implicit none - end subroutine TorqueDrag_Init + ! subroutine TorqueDrag_Init + ! implicit none + ! end subroutine TorqueDrag_Init subroutine TorqueDrag_Step implicit none end subroutine TorqueDrag_Step - subroutine TorqueDrag_Output - implicit none - end subroutine TorqueDrag_Output + ! subroutine TorqueDrag_Output + ! implicit none + ! end subroutine TorqueDrag_Output - SUBROUTINE TorqueDragMainBody - USE ifport - USE ifmt - USE CSimulationVariables - !USE TDSUP - IMPLICIT NONE + ! SUBROUTINE TorqueDragMainBody + ! USE ifport + ! USE ifmt + ! ! use CSimulationVariables + ! !USE TDSUP + ! IMPLICIT NONE - !CALL TD_MainCalculations + ! !CALL TD_MainCalculations - END SUBROUTINE TorqueDragMainBody + ! END SUBROUTINE TorqueDragMainBody END MODULE TorqueDragMain \ No newline at end of file