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.
 
 
 
 
 
 

64 lines
2.2 KiB

  1. # 1 "/home/admin/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. !TOPDRIVE-CODE=55
  12. if (GetRotaryRpm() == 0.0d0 .and.&
  13. (Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0) .and.&
  14. Get_JointConnectionPossible() == .false. .and.&
  15. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  16. data%State%StudentStation%FillupHeadInstallation == .false.) then
  17. call Set_IrSafetyValvePermission(.true.)
  18. return
  19. end if
  20. endif
  21. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  22. !OPERATION-CODE=57
  23. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  24. GetRotaryRpm() == 0.0d0 .and.&
  25. !(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  26. !Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0 .and.&
  27. data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.&
  28. !Get_SafetyValveHeight() >= 22.0 .and. Get_SafetyValveHeight() <= 35.0 .and.&
  29. Get_JointConnectionPossible() == .false. .and.&
  30. Get_FillupHead() == FILLUP_HEAD_REMOVE .and.&
  31. Get_Swing() == SWING_WELL_END) then
  32. call Set_IrSafetyValvePermission(.true.)
  33. return
  34. end if
  35. call Set_IrSafetyValvePermission(.false.)
  36. endif
  37. end subroutine
  38. subroutine Subscribe_IrSafetyValvePermission()
  39. implicit none
  40. ! imp me...
  41. end subroutine
  42. end module CIrSafetyValvePermission