Simulation Core
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

169 строки
11 KiB

  1. module COtherProblems
  2. use COtherProblemsVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessOtherProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%OtherProblems%RigAlarm%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%RigAlarm, ChangeRigAlarm, time)
  10. if(data%problems%OtherProblems%RigWaterSupply%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%RigWaterSupply, ChangeRigWaterSupply, time)
  11. if(data%problems%OtherProblems%RigAir%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%RigAir, ChangeRigAir, time)
  12. if(data%problems%OtherProblems%Gen1%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Gen1, ChangeGen1, time)
  13. if(data%problems%OtherProblems%Gen2%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Gen2, ChangeGen2, time)
  14. if(data%problems%OtherProblems%Gen3%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Gen3, ChangeGen3, time)
  15. if(data%problems%OtherProblems%Gen4%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Gen4, ChangeGen4, time)
  16. if(data%problems%OtherProblems%Scr1%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Scr1, ChangeScr1, time)
  17. if(data%problems%OtherProblems%Scr2%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Scr2, ChangeScr2, time)
  18. if(data%problems%OtherProblems%Scr3%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Scr3, ChangeScr3, time)
  19. if(data%problems%OtherProblems%Scr4%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%OtherProblems%Scr4, ChangeScr4, time)
  20. end subroutine
  21. subroutine ProcessOtherProblemsDuePumpStrokes(strokes)
  22. implicit none
  23. integer :: strokes
  24. if(data%problems%OtherProblems%RigAlarm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%RigAlarm, ChangeRigAlarm, strokes)
  25. if(data%problems%OtherProblems%RigWaterSupply%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%RigWaterSupply, ChangeRigWaterSupply, strokes)
  26. if(data%problems%OtherProblems%RigAir%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%RigAir, ChangeRigAir, strokes)
  27. if(data%problems%OtherProblems%Gen1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Gen1, ChangeGen1, strokes)
  28. if(data%problems%OtherProblems%Gen2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Gen2, ChangeGen2, strokes)
  29. if(data%problems%OtherProblems%Gen3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Gen3, ChangeGen3, strokes)
  30. if(data%problems%OtherProblems%Gen4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Gen4, ChangeGen4, strokes)
  31. if(data%problems%OtherProblems%Scr1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Scr1, ChangeScr1, strokes)
  32. if(data%problems%OtherProblems%Scr2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Scr2, ChangeScr2, strokes)
  33. if(data%problems%OtherProblems%Scr3%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Scr3, ChangeScr3, strokes)
  34. if(data%problems%OtherProblems%Scr4%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%OtherProblems%Scr4, ChangeScr4, strokes)
  35. end subroutine
  36. subroutine ProcessOtherProblemsDueVolumePumped(volume)
  37. implicit none
  38. real(8) :: volume
  39. if(data%problems%OtherProblems%RigAlarm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%RigAlarm, ChangeRigAlarm, volume)
  40. if(data%problems%OtherProblems%RigWaterSupply%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%RigWaterSupply, ChangeRigWaterSupply, volume)
  41. if(data%problems%OtherProblems%RigAir%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%RigAir, ChangeRigAir, volume)
  42. if(data%problems%OtherProblems%Gen1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Gen1, ChangeGen1, volume)
  43. if(data%problems%OtherProblems%Gen2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Gen2, ChangeGen2, volume)
  44. if(data%problems%OtherProblems%Gen3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Gen3, ChangeGen3, volume)
  45. if(data%problems%OtherProblems%Gen4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Gen4, ChangeGen4, volume)
  46. if(data%problems%OtherProblems%Scr1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Scr1, ChangeScr1, volume)
  47. if(data%problems%OtherProblems%Scr2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Scr2, ChangeScr2, volume)
  48. if(data%problems%OtherProblems%Scr3%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Scr3, ChangeScr3, volume)
  49. if(data%problems%OtherProblems%Scr4%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%OtherProblems%Scr4, ChangeScr4, volume)
  50. end subroutine
  51. subroutine ProcessOtherProblemsDueDistanceDrilled(distance)
  52. implicit none
  53. real(8) :: distance
  54. if(data%problems%OtherProblems%RigAlarm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%RigAlarm, ChangeRigAlarm, distance)
  55. if(data%problems%OtherProblems%RigWaterSupply%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%RigWaterSupply, ChangeRigWaterSupply, distance)
  56. if(data%problems%OtherProblems%RigAir%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%RigAir, ChangeRigAir, distance)
  57. if(data%problems%OtherProblems%Gen1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Gen1, ChangeGen1, distance)
  58. if(data%problems%OtherProblems%Gen2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Gen2, ChangeGen2, distance)
  59. if(data%problems%OtherProblems%Gen3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Gen3, ChangeGen3, distance)
  60. if(data%problems%OtherProblems%Gen4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Gen4, ChangeGen4, distance)
  61. if(data%problems%OtherProblems%Scr1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Scr1, ChangeScr1, distance)
  62. if(data%problems%OtherProblems%Scr2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Scr2, ChangeScr2, distance)
  63. if(data%problems%OtherProblems%Scr3%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Scr3, ChangeScr3, distance)
  64. if(data%problems%OtherProblems%Scr4%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%OtherProblems%Scr4, ChangeScr4, distance)
  65. end subroutine
  66. subroutine ChangeRigAlarm(status)
  67. implicit none
  68. integer, intent (in) :: status
  69. !if(associated(RigAlarmPtr)) call RigAlarmPtr(status)
  70. !if(status == Clear_StatusType) print*,'On_RigAlarm_Clear'
  71. !if(status == Executed_StatusType) print*,'On_RigAlarm_Execute'
  72. endsubroutine
  73. subroutine ChangeRigWaterSupply(status)
  74. implicit none
  75. integer, intent (in) :: status
  76. !if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status)
  77. !if(status == Clear_StatusType) print*,'On_RigWaterSupply_Clear'
  78. !if(status == Executed_StatusType) print*,'On_RigWaterSupply_Execute'
  79. endsubroutine
  80. subroutine ChangeRigAir(status)
  81. use SimulationVariables
  82. implicit none
  83. integer, intent (in) :: status
  84. !if(associated(RigAirPtr)) call RigAirPtr(status)
  85. if(status == Clear_StatusType) data%State%BopStackAcc%RigAirMalf = 0
  86. if(status == Executed_StatusType) data%State%BopStackAcc%RigAirMalf = 1
  87. endsubroutine
  88. subroutine ChangeGen1(status)
  89. implicit none
  90. integer, intent (in) :: status
  91. !if(associated(Gen1Ptr)) call Gen1Ptr(status)
  92. !if(status == Clear_StatusType) print*,'On_Gen1_Clear'
  93. !if(status == Executed_StatusType) print*,'On_Gen1_Execute'
  94. endsubroutine
  95. subroutine ChangeGen2(status)
  96. implicit none
  97. integer, intent (in) :: status
  98. !if(associated(Gen2Ptr)) call Gen2Ptr(status)
  99. !if(status == Clear_StatusType) print*,'On_Gen2_Clear'
  100. !if(status == Executed_StatusType) print*,'On_Gen2_Execute'
  101. endsubroutine
  102. subroutine ChangeGen3(status)
  103. implicit none
  104. integer, intent (in) :: status
  105. !if(associated(Gen3Ptr)) call Gen3Ptr(status)
  106. !if(status == Clear_StatusType) print*,'On_Gen3_Clear'
  107. !if(status == Executed_StatusType) print*,'On_Gen3_Execute'
  108. endsubroutine
  109. subroutine ChangeGen4(status)
  110. implicit none
  111. integer, intent (in) :: status
  112. !if(associated(Gen4Ptr)) call Gen4Ptr(status)
  113. !if(status == Clear_StatusType) print*,'On_Gen4_Clear'
  114. !if(status == Executed_StatusType) print*,'On_Gen4_Execute'
  115. endsubroutine
  116. subroutine ChangeScr1(status)
  117. implicit none
  118. integer, intent (in) :: status
  119. !if(associated(Scr1Ptr)) call Scr1Ptr(status)
  120. !if(status == Clear_StatusType) print*,'On_Scr1_Clear'
  121. !if(status == Executed_StatusType) print*,'On_Scr1_Execute'
  122. endsubroutine
  123. subroutine ChangeScr2(status)
  124. implicit none
  125. integer, intent (in) :: status
  126. !if(associated(Scr2Ptr)) call Scr2Ptr(status)
  127. !if(status == Clear_StatusType) print*,'On_Scr2_Clear'
  128. !if(status == Executed_StatusType) print*,'On_Scr2_Execute'
  129. endsubroutine
  130. subroutine ChangeScr3(status)
  131. implicit none
  132. integer, intent (in) :: status
  133. !if(associated(Scr3Ptr)) call Scr3Ptr(status)
  134. !if(status == Clear_StatusType) print*,'On_Scr3_Clear'
  135. !if(status == Executed_StatusType) print*,'On_Scr3_Execute'
  136. endsubroutine
  137. subroutine ChangeScr4(status)
  138. implicit none
  139. integer, intent (in) :: status
  140. !if(associated(Scr4Ptr)) call Scr4Ptr(status)
  141. !if(status == Clear_StatusType) print*,'On_Scr4_Clear'
  142. !if(status == Executed_StatusType) print*,'On_Scr4_Execute'
  143. endsubroutine
  144. end module COtherProblems