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.
 
 
 
 
 
 

92 lines
2.8 KiB

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