Simulation Core
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. module CHoistingProblemsVariables
  2. use CProblemDifinition
  3. implicit none
  4. public
  5. ! Input vars
  6. type :: HoistingProblemsType
  7. type(CProblem) :: MotorFail
  8. type(CProblem) :: ClutchEngage
  9. type(CProblem) :: ClutchDisengage
  10. end type HoistingProblemsType
  11. type(HoistingProblemsType):: HoistingProblems
  12. ! procedure (ActionInteger), pointer :: MotorFailPtr
  13. ! procedure (ActionInteger), pointer :: ClutchEngagePtr
  14. ! procedure (ActionInteger), pointer :: ClutchDisengagePtr
  15. contains
  16. subroutine ProcessHoistingProblemsDueTime(time)
  17. implicit none
  18. integer :: time
  19. if(HoistingProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%MotorFail, ChangeMotorFail, time)
  20. if(HoistingProblems%ClutchEngage%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%ClutchEngage, ChangeClutchEngage, time)
  21. if(HoistingProblems%ClutchDisengage%ProblemType == Time_ProblemType) call ProcessDueTime(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, time)
  22. end subroutine
  23. subroutine ProcessHoistingProblemsDuePumpStrokes(strokes)
  24. implicit none
  25. integer :: strokes
  26. if(HoistingProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%MotorFail, ChangeMotorFail, strokes)
  27. if(HoistingProblems%ClutchEngage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%ClutchEngage, ChangeClutchEngage, strokes)
  28. if(HoistingProblems%ClutchDisengage%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, strokes)
  29. end subroutine
  30. subroutine ProcessHoistingProblemsDueVolumePumped(volume)
  31. implicit none
  32. real(8) :: volume
  33. if(HoistingProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%MotorFail, ChangeMotorFail, volume)
  34. if(HoistingProblems%ClutchEngage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%ClutchEngage, ChangeClutchEngage, volume)
  35. if(HoistingProblems%ClutchDisengage%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, volume)
  36. end subroutine
  37. subroutine ProcessHoistingProblemsDueDistanceDrilled(distance)
  38. implicit none
  39. real(8) :: distance
  40. if(HoistingProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%MotorFail, ChangeMotorFail, distance)
  41. if(HoistingProblems%ClutchEngage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%ClutchEngage, ChangeClutchEngage, distance)
  42. if(HoistingProblems%ClutchDisengage%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(HoistingProblems%ClutchDisengage, ChangeClutchDisengage, distance)
  43. end subroutine
  44. subroutine ChangeMotorFail(status)
  45. use Drawworks_VARIABLES
  46. implicit none
  47. integer, intent (in) :: status
  48. ! if(associated(MotorFailPtr)) call MotorFailPtr(status)
  49. if(status == Clear_StatusType) Drawworks%MotorFaileMalf=0
  50. if(status == Executed_StatusType) Drawworks%MotorFaileMalf=1
  51. endsubroutine
  52. subroutine ChangeClutchEngage(status)
  53. use Drawworks_VARIABLES
  54. implicit none
  55. integer, intent (in) :: status
  56. ! if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status)
  57. if(status == Clear_StatusType) Drawworks%ClutchEngageMalf=0
  58. if(status == Executed_StatusType) Drawworks%ClutchEngageMalf=1
  59. endsubroutine
  60. subroutine ChangeClutchDisengage(status)
  61. use Drawworks_VARIABLES
  62. implicit none
  63. integer, intent (in) :: status
  64. ! if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status)
  65. if(status == Clear_StatusType) Drawworks%ClutchDisengageMalf=0
  66. if(status == Executed_StatusType) Drawworks%ClutchDisengageMalf=1
  67. endsubroutine
  68. ! subroutine SubscribeMotorFail(v)
  69. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail
  70. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail' :: SubscribeMotorFail
  71. ! implicit none
  72. ! procedure (ActionInteger) :: v
  73. ! MotorFailPtr => v
  74. ! end subroutine
  75. ! subroutine SubscribeClutchEngage(v)
  76. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchEngage
  77. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchEngage' :: SubscribeClutchEngage
  78. ! implicit none
  79. ! procedure (ActionInteger) :: v
  80. ! ClutchEngagePtr => v
  81. ! end subroutine
  82. ! subroutine SubscribeClutchDisengage(v)
  83. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeClutchDisengage
  84. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeClutchDisengage' :: SubscribeClutchDisengage
  85. ! implicit none
  86. ! procedure (ActionInteger) :: v
  87. ! ClutchDisengagePtr => v
  88. ! end subroutine
  89. end module CHoistingProblemsVariables