Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 regels
4.1 KiB

  1. module CHoistingProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessHoistingProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%HoistingProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%HoistingProblems%MotorFail, ChangeMotorFail, time)
  10. if(data%problems%HoistingProblems%ClutchEngage%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%HoistingProblems%ClutchEngage, ChangeClutchEngage, time)
  11. if(data%problems%HoistingProblems%ClutchDisengage%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%HoistingProblems%ClutchDisengage, ChangeClutchDisengage, time)
  12. end subroutine
  13. subroutine ProcessHoistingProblemsDuePumpStrokes(strokes)
  14. implicit none
  15. integer :: strokes
  16. if(data%problems%HoistingProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%HoistingProblems%MotorFail, ChangeMotorFail, strokes)
  17. if(data%problems%HoistingProblems%ClutchEngage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%HoistingProblems%ClutchEngage, ChangeClutchEngage, strokes)
  18. if(data%problems%HoistingProblems%ClutchDisengage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%HoistingProblems%ClutchDisengage, ChangeClutchDisengage, strokes)
  19. end subroutine
  20. subroutine ProcessHoistingProblemsDueVolumePumped(volume)
  21. implicit none
  22. real(8) :: volume
  23. if(data%problems%HoistingProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%HoistingProblems%MotorFail, ChangeMotorFail, volume)
  24. if(data%problems%HoistingProblems%ClutchEngage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%HoistingProblems%ClutchEngage, ChangeClutchEngage, volume)
  25. if(data%problems%HoistingProblems%ClutchDisengage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%HoistingProblems%ClutchDisengage, ChangeClutchDisengage, volume)
  26. end subroutine
  27. subroutine ProcessHoistingProblemsDueDistanceDrilled(distance)
  28. implicit none
  29. real(8) :: distance
  30. if(data%problems%HoistingProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%HoistingProblems%MotorFail, ChangeMotorFail, distance)
  31. if(data%problems%HoistingProblems%ClutchEngage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%HoistingProblems%ClutchEngage, ChangeClutchEngage, distance)
  32. if(data%problems%HoistingProblems%ClutchDisengage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%HoistingProblems%ClutchDisengage, ChangeClutchDisengage, distance)
  33. end subroutine
  34. subroutine ChangeMotorFail(status)
  35. use SimulationVariables !@
  36. implicit none
  37. integer, intent (in) :: status
  38. ! if(associated(MotorFailPtr)) call MotorFailPtr(status)
  39. if(status == Clear_StatusType) data%State%Drawworks%MotorFaileMalf=0
  40. if(status == Executed_StatusType) data%State%Drawworks%MotorFaileMalf=1
  41. endsubroutine
  42. subroutine ChangeClutchEngage(status)
  43. use SimulationVariables !@
  44. implicit none
  45. integer, intent (in) :: status
  46. ! if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status)
  47. if(status == Clear_StatusType) data%State%Drawworks%ClutchEngageMalf=0
  48. if(status == Executed_StatusType) data%State%Drawworks%ClutchEngageMalf=1
  49. endsubroutine
  50. subroutine ChangeClutchDisengage(status)
  51. use SimulationVariables !@
  52. implicit none
  53. integer, intent (in) :: status
  54. ! if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status)
  55. if(status == Clear_StatusType) data%State%Drawworks%ClutchDisengageMalf=0
  56. if(status == Executed_StatusType) data%State%Drawworks%ClutchDisengageMalf=1
  57. endsubroutine
  58. end module CHoistingProblems