module COtherProblemsVariables use CProblemDifinition implicit none public ! Input vars 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 subroutine ProcessOtherProblemsDueTime(time) implicit none integer :: 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 subroutine ProcessOtherProblemsDuePumpStrokes(strokes) implicit none integer :: 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 subroutine ProcessOtherProblemsDueVolumePumped(volume) implicit none real(8) :: 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 subroutine ProcessOtherProblemsDueDistanceDrilled(distance) implicit none real(8) :: 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 subroutine ChangeRigAlarm(status) implicit none integer, intent (in) :: status !if(associated(RigAlarmPtr)) call RigAlarmPtr(status) !if(status == Clear_StatusType) print*,'On_RigAlarm_Clear' !if(status == Executed_StatusType) print*,'On_RigAlarm_Execute' endsubroutine subroutine ChangeRigWaterSupply(status) implicit none integer, intent (in) :: status !if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status) !if(status == Clear_StatusType) print*,'On_RigWaterSupply_Clear' !if(status == Executed_StatusType) print*,'On_RigWaterSupply_Execute' endsubroutine subroutine ChangeRigAir(status) use VARIABLES implicit none integer, intent (in) :: status !if(associated(RigAirPtr)) call RigAirPtr(status) if(status == Clear_StatusType) BopStackAcc%RigAirMalf = 0 if(status == Executed_StatusType) BopStackAcc%RigAirMalf = 1 endsubroutine subroutine ChangeGen1(status) implicit none integer, intent (in) :: status !if(associated(Gen1Ptr)) call Gen1Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen1_Clear' !if(status == Executed_StatusType) print*,'On_Gen1_Execute' endsubroutine subroutine ChangeGen2(status) implicit none integer, intent (in) :: status !if(associated(Gen2Ptr)) call Gen2Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen2_Clear' !if(status == Executed_StatusType) print*,'On_Gen2_Execute' endsubroutine subroutine ChangeGen3(status) implicit none integer, intent (in) :: status !if(associated(Gen3Ptr)) call Gen3Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen3_Clear' !if(status == Executed_StatusType) print*,'On_Gen3_Execute' endsubroutine subroutine ChangeGen4(status) implicit none integer, intent (in) :: status !if(associated(Gen4Ptr)) call Gen4Ptr(status) !if(status == Clear_StatusType) print*,'On_Gen4_Clear' !if(status == Executed_StatusType) print*,'On_Gen4_Execute' endsubroutine subroutine ChangeScr1(status) implicit none integer, intent (in) :: status !if(associated(Scr1Ptr)) call Scr1Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr1_Clear' !if(status == Executed_StatusType) print*,'On_Scr1_Execute' endsubroutine subroutine ChangeScr2(status) implicit none integer, intent (in) :: status !if(associated(Scr2Ptr)) call Scr2Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr2_Clear' !if(status == Executed_StatusType) print*,'On_Scr2_Execute' endsubroutine subroutine ChangeScr3(status) implicit none integer, intent (in) :: status !if(associated(Scr3Ptr)) call Scr3Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr3_Clear' !if(status == Executed_StatusType) print*,'On_Scr3_Execute' endsubroutine subroutine ChangeScr4(status) implicit none integer, intent (in) :: status !if(associated(Scr4Ptr)) call Scr4Ptr(status) !if(status == Clear_StatusType) print*,'On_Scr4_Clear' !if(status == Executed_StatusType) print*,'On_Scr4_Execute' endsubroutine ! 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 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 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 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 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 SubscribeScr4(v) ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeScr4 ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeScr4' :: SubscribeScr4 ! implicit none ! procedure (ActionInteger) :: v ! Scr4Ptr => v ! end subroutine end module COtherProblemsVariables