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.
 
 
 
 
 
 

87 lines
2.4 KiB

  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Permissions/CIrSafetyValvePermission.f90"
  2. module CIrSafetyValvePermission
  3. use OperationScenariosModule
  4. implicit none
  5. contains
  6. subroutine Evaluate_IrSafetyValvePermission()
  7. use TD_DrillStemComponents
  8. use CStudentStationVariables!!, only: data%State%StudentStation%FillupHeadInstallation
  9. implicit none
  10. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  11. # 17
  12. !TOPDRIVE-CODE=55
  13. if (GetRotaryRpm() == 0.0d0 .and.&
  14. (Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0) .and.&
  15. Get_JointConnectionPossible() == .false. .and.&
  16. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  17. data%State%StudentStation%FillupHeadInstallation == .false.) then
  18. call Set_IrSafetyValvePermission(.true.)
  19. return
  20. end if
  21. endif
  22. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  23. # 46
  24. !OPERATION-CODE=57
  25. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  26. GetRotaryRpm() == 0.0d0 .and.&
  27. !(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  28. !Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0 .and.&
  29. data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.&
  30. !Get_SafetyValveHeight() >= 22.0 .and. Get_SafetyValveHeight() <= 35.0 .and.&
  31. Get_JointConnectionPossible() == .false. .and.&
  32. Get_FillupHead() == FILLUP_HEAD_REMOVE .and.&
  33. Get_Swing() == SWING_WELL_END) then
  34. call Set_IrSafetyValvePermission(.true.)
  35. return
  36. end if
  37. call Set_IrSafetyValvePermission(.false.)
  38. endif
  39. end subroutine
  40. subroutine Subscribe_IrSafetyValvePermission()
  41. implicit none
  42. ! imp me...
  43. end subroutine
  44. end module CIrSafetyValvePermission