|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- module CHoistingProblemsVariables
- use CProblemDifinition
- implicit none
- public
-
- ! Input vars
- type(CProblem) :: MotorFail
- type(CProblem) :: ClutchEngage
- type(CProblem) :: ClutchDisengage
-
- procedure (ActionInteger), pointer :: MotorFailPtr
- procedure (ActionInteger), pointer :: ClutchEngagePtr
- procedure (ActionInteger), pointer :: ClutchDisengagePtr
-
-
- contains
-
- 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)
- 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)
- 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)
- 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)
- end subroutine
-
-
-
-
-
-
- subroutine ChangeMotorFail(status)
- use Drawworks_VARIABLES
- implicit none
- integer, intent (in) :: status
- if(associated(MotorFailPtr)) call MotorFailPtr(status)
- if(status == Clear_StatusType) Drawworks%MotorFaileMalf=0
- if(status == Executed_StatusType) Drawworks%MotorFaileMalf=1
- endsubroutine
-
- subroutine ChangeClutchEngage(status)
- use Drawworks_VARIABLES
- implicit none
- integer, intent (in) :: status
- if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status)
- if(status == Clear_StatusType) Drawworks%ClutchEngageMalf=0
- if(status == Executed_StatusType) Drawworks%ClutchEngageMalf=1
- endsubroutine
-
- subroutine ChangeClutchDisengage(status)
- use Drawworks_VARIABLES
- implicit none
- integer, intent (in) :: status
- if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status)
- if(status == Clear_StatusType) Drawworks%ClutchDisengageMalf=0
- if(status == Executed_StatusType) Drawworks%ClutchDisengageMalf=1
- endsubroutine
-
-
-
-
-
-
-
-
-
-
- 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 SubscribeClutchDisengage(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchDisengage
- !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchDisengage' :: SubscribeClutchDisengage
- implicit none
- procedure (ActionInteger) :: v
- ClutchDisengagePtr => v
- end subroutine
-
-
- end module CHoistingProblemsVariables
|