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.
 
 
 
 
 
 

93 rivejä
3.1 KiB

  1. module CIrIbopPermission
  2. use OperationScenariosModule
  3. implicit none
  4. contains
  5. subroutine Evaluate_IrIbopPermission()
  6. use TD_DrillStemComponents
  7. use UnitySignalsModule !for CTdsConnectionModesEnum
  8. use CStudentStationVariables!, only: data%State%StudentStation%FillupHeadInstallation
  9. implicit none
  10. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  11. #ifdef OST
  12. print*, 'Evaluate_IrIbopPermission=TopDrive'
  13. #endif
  14. !TOPDRIVE-CODE=58
  15. if (GetRotaryRpm() == 0.0d0 .and.&
  16. Get_NearFloorConnection() >= 3 .and. Get_NearFloorConnection() <= 10 .and.&
  17. Get_JointConnectionPossible() == .false. .and.&
  18. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  19. data%State%StudentStation%FillupHeadInstallation == .false.) then
  20. call Set_IrIbopPermission(.true.)
  21. return
  22. end if
  23. call Set_IrIbopPermission(.false.)
  24. endif
  25. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  26. #ifdef OST
  27. print*, 'Evaluate_IrIbopPermission=Kelly'
  28. #endif
  29. !OPERATION-CODE=62
  30. if (GetRotaryRpm() == 0.0d0 .and.&
  31. Get_OperationCondition() == OPERATION_TRIP .and.&
  32. !(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  33. data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.&
  34. !Get_IbopHeight() >= 22.0 .and. Get_IbopHeight() <= 35.0 .and.&
  35. Get_JointConnectionPossible() == .false. .and.&
  36. Get_Swing() == SWING_WELL_END .and.&
  37. Get_FillupHead() == FILLUP_HEAD_REMOVE) then
  38. call Set_IrIbopPermission(.true.)
  39. return
  40. end if
  41. !if (Get_OperationCondition() == OPERATION_DRILL .and.&
  42. ! Get_IbopHeight() >= 1 .and. Get_IbopHeight() <= 8 .and.&
  43. ! Get_NearFloorConnection() >= 1 .and. Get_NearFloorConnection() <= 8 .and.&
  44. ! Get_JointConnectionPossible() == .false. .and.&
  45. ! Get_KellyConnection() /= KELLY_CONNECTION_STRING .and.&
  46. ! Get_Swing() == SWING_WELL_END .and.&
  47. ! Get_Slips() == SLIPS_SET_END) then
  48. ! call Set_IrIbopPermission(.true.)
  49. ! return
  50. !end if
  51. call Set_IrIbopPermission(.false.)
  52. endif
  53. end subroutine
  54. subroutine Subscribe_IrIbopPermission()
  55. implicit none
  56. end subroutine
  57. end module CIrIbopPermission