Sfoglia il codice sorgente

some fucking minor changes

master
mahmood19227 1 anno fa
parent
commit
dbb110d1b9
5 ha cambiato i file con 163 aggiunte e 33 eliminazioni
  1. +1
    -1
      Equipments/RotaryTable/RTable_Inputs.i90
  2. BIN
     
  3. +52
    -12
      Text1.txt
  4. +109
    -19
      helper.ipynb
  5. +1
    -1
      redisContent.json

+ 1
- 1
Equipments/RotaryTable/RTable_Inputs.i90 Vedi File

@@ -1,4 +1,4 @@
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_INPUTS.f90"
subroutine RTable_INPUTS
use CDrillingConsoleVariables


BIN
Vedi File


+ 52
- 12
Text1.txt Vedi File

@@ -1,12 +1,52 @@
real(8) :: KellyHoseVibrationRate
real(8) :: BlowoutFromStringPercent
real(8) :: Pedal
real(8) :: FlowRate
real(8) :: RotaryRpm
logical :: BlowoutFromString
logical :: BlowoutFromAnnular
logical :: FlowFromReturnLine
real :: FlowFromKelly
real :: FlowFromFillupHead
logical :: FlowKellyDisconnect
logical :: FlowPipeDisconnect
integer :: AssignmentSwitch
logical :: EmergencySwitch
real(8) :: RTTorqueLimitKnob
integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start
integer :: MP1CPSwitchT !for not turning on pump1 on simulation start
integer :: MP1CPSwitch
logical :: MP1ThrottleUpdate = .false.
real(8) :: MP1Throttle = -1.0
integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start
logical :: MP2SwitchT !for not turning on pump2 on simulation start
logical :: MP2Switch
logical :: MP2ThrottleUpdate = .false.
real(8) :: MP2Throttle = -1.0
integer :: DWSwitch
real(8) :: DWThrottle
integer :: RTSwitch
real(8) :: RTThrottle
real(8) :: DWBreak
real(8) :: PreviousDWBreak
logical :: ForceBreak = .false.
real(8) :: DWAcceleretor
real(8) :: DWTransmisionLever
real(8) :: DWPowerLever
real(8) :: TongLever
real(8) :: RTTransmissionLever
real(8) :: DWClutchLever
real(8) :: EddyBreakLever
logical :: AutoDW
logical :: GEN1
logical :: GEN2
logical :: GEN3
logical :: GEN4
logical :: Permission_OpenKellyCock = .false.
logical :: OpenKellyCock
logical :: Permission_CloseKellyCock = .false.
logical :: CloseKellyCock
logical :: Permission_OpenSafetyValve = .false.
logical :: OpenSafetyValve
logical :: Permission_CloseSafetyValve = .false.
logical :: CloseSafetyValve
logical :: Permission_IRSafetyValve = .false.
logical :: IRSafetyValve
logical :: Permission_IRIBop = .false.
logical :: IRIBop
logical :: LatchPipe
logical :: UnlatchPipe
logical :: Swing
logical :: FillMouseHole
logical :: Slips
real :: BrakeLeverCoefficient
logical :: HideDrillingBrake
logical :: ParkingBrakeBtn

+ 109
- 19
helper.ipynb Vedi File

@@ -900,39 +900,129 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\t\tcall json%get(p,'ElevatorConnectionPossible',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%ElevatorConnectionPossible)\n",
"\t\tcall json%get(p,'JointConnectionPossible',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%JointConnectionPossible)\n",
"\t\tcall json%get(p,'IsKellyBushingSetInTable',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%IsKellyBushingSetInTable)\n",
"\t\tcall json%get(p,'ElevatorPickup',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%ElevatorPickup)\n",
"\t\tcall json%get(p,'NearFloorPosition',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%NearFloorPosition)\n",
"\t\tcall json%get(p,'SingleSetInMouseHole',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%SingleSetInMouseHole)\n",
"\t\tcall json%get(p,'TdsConnectionPossible',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%TdsConnectionPossible)\n",
"\t\tcall json%get(p,'TdsStemIn',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%TdsStemIn)\n"
"\t\tcall json%get('Equipments.Drilling.AssignmentSwitch',data%Equipments%DrillingConsole%AssignmentSwitch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: AssignmentSwitch\" \n",
"\t\tcall json%get('Equipments.Drilling.EmergencySwitch',data%Equipments%DrillingConsole%EmergencySwitch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: EmergencySwitch\" \n",
"\t\tcall json%get('Equipments.Drilling.RTTorqueLimitKnob',data%Equipments%DrillingConsole%RTTorqueLimitKnob,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: RTTorqueLimitKnob\" \n",
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitchI',data%Equipments%DrillingConsole%MP1CPSwitchI,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitchI\" \n",
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitchT',data%Equipments%DrillingConsole%MP1CPSwitchT,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitchT\" \n",
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitch',data%Equipments%DrillingConsole%MP1CPSwitch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitch\" \n",
"\t\tcall json%get('Equipments.Drilling.MP1ThrottleUpdate',data%Equipments%DrillingConsole%MP1ThrottleUpdate,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP1ThrottleUpdate\" \n",
"\t\tcall json%get('Equipments.Drilling.MP1Throttle',data%Equipments%DrillingConsole%MP1Throttle,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP1Throttle\" \n",
"\t\tcall json%get('Equipments.Drilling.MP2SwitchI',data%Equipments%DrillingConsole%MP2SwitchI,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP2SwitchI\" \n",
"\t\tcall json%get('Equipments.Drilling.MP2SwitchT',data%Equipments%DrillingConsole%MP2SwitchT,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP2SwitchT\" \n",
"\t\tcall json%get('Equipments.Drilling.MP2Switch',data%Equipments%DrillingConsole%MP2Switch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP2Switch\" \n",
"\t\tcall json%get('Equipments.Drilling.MP2ThrottleUpdate',data%Equipments%DrillingConsole%MP2ThrottleUpdate,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP2ThrottleUpdate\" \n",
"\t\tcall json%get('Equipments.Drilling.MP2Throttle',data%Equipments%DrillingConsole%MP2Throttle,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: MP2Throttle\" \n",
"\t\tcall json%get('Equipments.Drilling.DWSwitch',data%Equipments%DrillingConsole%DWSwitch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWSwitch\" \n",
"\t\tcall json%get('Equipments.Drilling.DWThrottle',data%Equipments%DrillingConsole%DWThrottle,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWThrottle\" \n",
"\t\tcall json%get('Equipments.Drilling.RTSwitch',data%Equipments%DrillingConsole%RTSwitch,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: RTSwitch\" \n",
"\t\tcall json%get('Equipments.Drilling.RTThrottle',data%Equipments%DrillingConsole%RTThrottle,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: RTThrottle\" \n",
"\t\tcall json%get('Equipments.Drilling.DWBreak',data%Equipments%DrillingConsole%DWBreak,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWBreak\" \n",
"\t\tcall json%get('Equipments.Drilling.PreviousDWBreak',data%Equipments%DrillingConsole%PreviousDWBreak,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: PreviousDWBreak\" \n",
"\t\tcall json%get('Equipments.Drilling.ForceBreak',data%Equipments%DrillingConsole%ForceBreak,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: ForceBreak\" \n",
"\t\tcall json%get('Equipments.Drilling.DWAcceleretor',data%Equipments%DrillingConsole%DWAcceleretor,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWAcceleretor\" \n",
"\t\tcall json%get('Equipments.Drilling.DWTransmisionLever',data%Equipments%DrillingConsole%DWTransmisionLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWTransmisionLever\" \n",
"\t\tcall json%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWPowerLever\" \n",
"\t\tcall json%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: TongLever\" \n",
"\t\tcall json%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: RTTransmissionLever\" \n",
"\t\tcall json%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: DWClutchLever\" \n",
"\t\tcall json%get('Equipments.Drilling.EddyBreakLever',data%Equipments%DrillingConsole%EddyBreakLever,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: EddyBreakLever\" \n",
"\t\tcall json%get('Equipments.Drilling.AutoDW',data%Equipments%DrillingConsole%AutoDW,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: AutoDW\" \n",
"\t\tcall json%get('Equipments.Drilling.GEN1',data%Equipments%DrillingConsole%GEN1,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: GEN1\" \n",
"\t\tcall json%get('Equipments.Drilling.GEN2',data%Equipments%DrillingConsole%GEN2,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: GEN2\" \n",
"\t\tcall json%get('Equipments.Drilling.GEN3',data%Equipments%DrillingConsole%GEN3,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: GEN3\" \n",
"\t\tcall json%get('Equipments.Drilling.GEN4',data%Equipments%DrillingConsole%GEN4,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: GEN4\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_OpenKellyCock',data%Equipments%DrillingConsole%Permission_OpenKellyCock,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_OpenKellyCock\" \n",
"\t\tcall json%get('Equipments.Drilling.OpenKellyCock',data%Equipments%DrillingConsole%OpenKellyCock,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: OpenKellyCock\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_CloseKellyCock',data%Equipments%DrillingConsole%Permission_CloseKellyCock,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_CloseKellyCock\" \n",
"\t\tcall json%get('Equipments.Drilling.CloseKellyCock',data%Equipments%DrillingConsole%CloseKellyCock,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: CloseKellyCock\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_OpenSafetyValve',data%Equipments%DrillingConsole%Permission_OpenSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_OpenSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.OpenSafetyValve',data%Equipments%DrillingConsole%OpenSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: OpenSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_CloseSafetyValve',data%Equipments%DrillingConsole%Permission_CloseSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_CloseSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.CloseSafetyValve',data%Equipments%DrillingConsole%CloseSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: CloseSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_IRSafetyValve',data%Equipments%DrillingConsole%Permission_IRSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_IRSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.IRSafetyValve',data%Equipments%DrillingConsole%IRSafetyValve,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: IRSafetyValve\" \n",
"\t\tcall json%get('Equipments.Drilling.Permission_IRIBop',data%Equipments%DrillingConsole%Permission_IRIBop,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Permission_IRIBop\" \n",
"\t\tcall json%get('Equipments.Drilling.IRIBop',data%Equipments%DrillingConsole%IRIBop,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: IRIBop\" \n",
"\t\tcall json%get('Equipments.Drilling.LatchPipe',data%Equipments%DrillingConsole%LatchPipe,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: LatchPipe\" \n",
"\t\tcall json%get('Equipments.Drilling.UnlatchPipe',data%Equipments%DrillingConsole%UnlatchPipe,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: UnlatchPipe\" \n",
"\t\tcall json%get('Equipments.Drilling.Swing',data%Equipments%DrillingConsole%Swing,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Swing\" \n",
"\t\tcall json%get('Equipments.Drilling.FillMouseHole',data%Equipments%DrillingConsole%FillMouseHole,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: FillMouseHole\" \n",
"\t\tcall json%get('Equipments.Drilling.Slips',data%Equipments%DrillingConsole%Slips,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: Slips\" \n",
"\t\tcall json%get('Equipments.Drilling.BrakeLeverCoefficient',data%Equipments%DrillingConsole%BrakeLeverCoefficient,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: BrakeLeverCoefficient\" \n",
"\t\tcall json%get('Equipments.Drilling.HideDrillingBrake',data%Equipments%DrillingConsole%HideDrillingBrake,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: HideDrillingBrake\" \n",
"\t\tcall json%get('Equipments.Drilling.ParkingBrakeBtn',data%Equipments%DrillingConsole%ParkingBrakeBtn,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: ParkingBrakeBtn\" \n"
]
}
],
"source": [
"pattern=\"\"\"\t\tcall json%get(p,'@@@',pval)\n",
"\t\tcall json%get(pval,data%Equipments%UnityInputs%@@@)\"\"\"\n",
"pattern=\"\"\"\t\tcall json%get('Equipments.Drilling.@@@',data%Equipments%DrillingConsole%@@@,found)\n",
"\t\tif ( .not. found ) print *,\"Not found: @@@\" \"\"\"\n",
"\n",
"input = open(\"Text1.txt\")\n",
"lines = input.readlines()\n",
"for line in lines:\n",
"\tif '::' not in line:\n",
"\t\tcontinue\n",
"\tparts = line.split(\"::\")\n",
"\tif len(parts)!=2:\n",
"\t\tcontinue\n",


+ 1
- 1
redisContent.json
File diff soppresso perché troppo grande
Vedi File


Caricamento…
Annulla
Salva