module CPumpProblemsVariables use CProblemDifinition implicit none 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 contains subroutine ProcessPumpProblemsDueTime(time) 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) end subroutine subroutine ProcessPumpProblemsDuePumpStrokes(strokes) 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) end subroutine subroutine ProcessPumpProblemsDueVolumePumped(volume) 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) end subroutine subroutine ProcessPumpProblemsDueDistanceDrilled(distance) 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) end subroutine subroutine ChangePump1PowerFail(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(Pump1PowerFailPtr)) call Pump1PowerFailPtr(status) if(status == Clear_StatusType) PUMP(1)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(1)%PowerFailMalf=1 endsubroutine subroutine ChangePump1BlowPopOffValve(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(Pump1BlowPopOffValvePtr)) call Pump1BlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(1)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(1)%BlowPopOffMalf=1 endsubroutine subroutine ChangePump2PowerFail(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(Pump2PowerFailPtr)) call Pump2PowerFailPtr(status) if(status == Clear_StatusType) PUMP(2)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(2)%PowerFailMalf=1 endsubroutine subroutine ChangePump2BlowPopOffValve(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(Pump2BlowPopOffValvePtr)) call Pump2BlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(2)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(2)%BlowPopOffMalf=1 endsubroutine subroutine ChangeCementPumpPowerFail(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(CementPumpPowerFailPtr)) call CementPumpPowerFailPtr(status) if(status == Clear_StatusType) PUMP(3)%PowerFailMalf=0 if(status == Executed_StatusType) PUMP(3)%PowerFailMalf=1 endsubroutine subroutine ChangeCementPumpBlowPopOffValve(status) Use Pump_VARIABLES implicit none integer, intent (in) :: status if(associated(CementPumpBlowPopOffValvePtr)) call CementPumpBlowPopOffValvePtr(status) if(status == Clear_StatusType) PUMP(3)%BlowPopOffMalf=0 if(status == Executed_StatusType) PUMP(3)%BlowPopOffMalf=1 endsubroutine 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