INTO-CPS-Association / DTaaS-examples

Examples to demonstrate the features of DTaaS software
https://into-cps-association.github.io/DTaaS/development/user/examples/index.html
3 stars 8 forks source link

Errors in OPC UA example #17

Closed prasadtalasila closed 7 months ago

prasadtalasila commented 10 months ago

The example throws up one warning and one error.

  1. Main.py:88: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '-0.5045798' has dtype incompatible with int64, please explicitly cast to a compatible dtype first.
  2. (at the end of co-simulation), ServiceFault from server received while waiting for publish response. Client disconnected

Error log

(venv)  prasad@office  ~/Downloads/git/prasadtalasila/DTaaS-examples/digital_twins/opc-ua-electroingenium   pr-16 ±  python3.11 Main.py
Client connected successfully

Model Info

  FMI Version        2.0
  FMI Type           Model Exchange, Co-Simulation
  Model Name         Test_DTCONEDAR
  Description        
  Platforms          c-code, linux64
  Continuous States  0
  Event Indicators   0
  Variables          120
  Generation Tool    OpenModelica Compiler OpenModelica 1.22.0~15-g4f4bc9c
  Generation Date    2023-11-22T14:09:44Z

Default Experiment

  Stop Time          1.0
  Tolerance          1e-06

Variables (input, output)

  Name               Causality              Start Value  Unit     Description
  abs_in             input                         30.0           [1/m]
  concOutA1_1        output                                       
  concOutA1_2        output                                       
  concOutA1_3        output                                       
  concOutA1_4        output                                       
  concOutA1_5        output                                       
  concOutA1_6        output                                       
  concOutA1_7        output                                       
  concOutA2_1        output                                       
  concOutA2_2        output                                       
  concOutA2_3        output                                       
  concOutA2_4        output                                       
  concOutA2_5        output                                       
  concOutA2_6        output                                       
  concOutA2_7        output                                       
  concOutA3_1        output                                       
  concOutA3_2        output                                       
  concOutA3_3        output                                       
  concOutA3_4        output                                       
  concOutA3_5        output                                       
  concOutA3_6        output                                       
  concOutA3_7        output                                       
  concOutC_1         output                                       
  concOutC_2         output                                       
  concOutC_3         output                                       
  concOutC_4         output                                       
  concOutC_5         output                                       
  concOutC_6         output                                       
  concOutC_7         output                                       
  power[1]           input                        100.0           [%]
  power[2]           input                        100.0           [%]
  power[3]           input                        100.0           [%]
  rho_a1_in          input                     100000.0           [UFC/100ml]
  rho_a2_in          input                      10000.0           [UFC/100ml]
  rho_a3_in          input                       1000.0           [UFC/100ml]
  rho_c_in           input                          0.1           [ml(H2O2)/L]
  vel_prof[1,1]      input                         10.0           
  vel_prof[1,2]      input                         10.0           
  vel_prof[1,3]      input                         10.0           
  vel_prof[1,4]      input                         10.0           
  vel_prof[1,5]      input                         10.0           
  vel_prof[1,6]      input                         10.0           
  vel_prof[1,7]      input                         10.0           
  vel_prof[1,8]      input                         10.0           
  vel_prof[2,1]      input                         10.0           
  vel_prof[2,2]      input                         10.0           
  vel_prof[2,3]      input                         10.0           
  vel_prof[2,4]      input                         10.0           
  vel_prof[2,5]      input                         10.0           
  vel_prof[2,6]      input                         10.0           
  vel_prof[2,7]      input                         10.0           
  vel_prof[2,8]      input                         10.0           
  vel_prof[3,1]      input                         10.0           
  vel_prof[3,2]      input                         10.0           
  vel_prof[3,3]      input                         10.0           
  vel_prof[3,4]      input                         10.0           
  vel_prof[3,5]      input                         10.0           
  vel_prof[3,6]      input                         10.0           
  vel_prof[3,7]      input                         10.0           
  vel_prof[3,8]      input                         10.0           
  vel_prof[4,1]      input                         10.0           
  vel_prof[4,2]      input                         10.0           
  vel_prof[4,3]      input                         10.0           
  vel_prof[4,4]      input                         10.0           
  vel_prof[4,5]      input                         10.0           
  vel_prof[4,6]      input                         10.0           
  vel_prof[4,7]      input                         10.0           
  vel_prof[4,8]      input                         10.0           
  vel_prof[5,1]      input                         10.0           
  vel_prof[5,2]      input                         10.0           
  vel_prof[5,3]      input                         10.0           
  vel_prof[5,4]      input                         10.0           
  vel_prof[5,5]      input                         10.0           
  vel_prof[5,6]      input                         10.0           
  vel_prof[5,7]      input                         10.0           
  vel_prof[5,8]      input                         10.0           
  vel_prof[6,1]      input                         10.0           
  vel_prof[6,2]      input                         10.0           
  vel_prof[6,3]      input                         10.0           
  vel_prof[6,4]      input                         10.0           
  vel_prof[6,5]      input                         10.0           
  vel_prof[6,6]      input                         10.0           
  vel_prof[6,7]      input                         10.0           
  vel_prof[6,8]      input                         10.0           
  vel_prof[7,1]      input                         10.0           
  vel_prof[7,2]      input                         10.0           
  vel_prof[7,3]      input                         10.0           
  vel_prof[7,4]      input                         10.0           
  vel_prof[7,5]      input                         10.0           
  vel_prof[7,6]      input                         10.0           
  vel_prof[7,7]      input                         10.0           
  vel_prof[7,8]      input                         10.0           
  vel_prof[8,1]      input                         10.0           
  vel_prof[8,2]      input                         10.0           
  vel_prof[8,3]      input                         10.0           
  vel_prof[8,4]      input                         10.0           
  vel_prof[8,5]      input                         10.0           
  vel_prof[8,6]      input                         10.0           
  vel_prof[8,7]      input                         10.0           
  vel_prof[8,8]      input                         10.0           
  vel_prof[9,1]      input                         10.0           
  vel_prof[9,2]      input                         10.0           
  vel_prof[9,3]      input                         10.0           
  vel_prof[9,4]      input                         10.0           
  vel_prof[9,5]      input                         10.0           
  vel_prof[9,6]      input                         10.0           
  vel_prof[9,7]      input                         10.0           
  vel_prof[9,8]      input                         10.0           
  vel_prof[10,1]     input                         10.0           
  vel_prof[10,2]     input                         10.0           
  vel_prof[10,3]     input                         10.0           
  vel_prof[10,4]     input                         10.0           
  vel_prof[10,5]     input                         10.0           
  vel_prof[10,6]     input                         10.0           
  vel_prof[10,7]     input                         10.0           
  vel_prof[10,8]     input                         10.0           
  vfr                input                      0.20833           [m3/s]
None
Simulating Test_DTCONEDAR_linux.fmu (FMI: Version = 2.0, Type = ['ModelExchange', 'CoSimulation'])...
/home/prasad/Downloads/git/prasadtalasila/DTaaS-examples/digital_twins/opc-ua-electroingenium/Main.py:88: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '-0.5045798' has dtype incompatible with int64, please explicitly cast to a compatible dtype first.
  self.df.loc[names, "value"] = val     # Update dataframe when an OPC node changes its value
Simulation time = 0.5 ---------- Real time = 0.500722
Simulation time = 1.0 ---------- Real time = 1.000648
Simulation time = 1.5 ---------- Real time = 1.500587
Simulation time = 2.0 ---------- Real time = 2.000599
Simulation time = 2.5 ---------- Real time = 2.500704
Simulation time = 3.0 ---------- Real time = 3.000559
Simulation time = 3.5 ---------- Real time = 3.500597
Simulation time = 4.0 ---------- Real time = 4.000678
Simulation time = 4.5 ---------- Real time = 4.500576
Simulation time = 5.0 ---------- Real time = 5.000606
Simulation time = 5.5 ---------- Real time = 5.500699
Simulation time = 6.0 ---------- Real time = 6.000617
Simulation time = 6.5 ---------- Real time = 6.500593
Simulation time = 7.0 ---------- Real time = 7.000641
Simulation time = 7.5 ---------- Real time = 7.500605
Simulation time = 8.0 ---------- Real time = 8.000582
Simulation time = 8.5 ---------- Real time = 8.500558999999999
Simulation time = 9.0 ---------- Real time = 9.00051
Simulation time = 9.5 ---------- Real time = 9.500562
Simulation time = 10.0 ---------- Real time = 10.000575
Simulation time = 10.5 ---------- Real time = 10.500831
Simulation time = 11.0 ---------- Real time = 11.000471
Simulation time = 11.5 ---------- Real time = 11.500563
Simulation time = 12.0 ---------- Real time = 12.000637
Simulation time = 12.5 ---------- Real time = 12.500592
Simulation time = 13.0 ---------- Real time = 13.000587
Simulation time = 13.5 ---------- Real time = 13.500488
Simulation time = 14.0 ---------- Real time = 14.000506
Simulation time = 14.5 ---------- Real time = 14.500583
Simulation time = 15.0 ---------- Real time = 15.000593
Simulation time = 15.5 ---------- Real time = 15.500731
Simulation time = 16.0 ---------- Real time = 16.000565
Simulation time = 16.5 ---------- Real time = 16.500611
Simulation time = 17.0 ---------- Real time = 17.000493
Simulation time = 17.5 ---------- Real time = 17.500563
Simulation time = 18.0 ---------- Real time = 18.000588
Simulation time = 18.5 ---------- Real time = 18.500571
Simulation time = 19.0 ---------- Real time = 19.000698
Simulation time = 19.5 ---------- Real time = 19.500569
Simulation time = 20.0 ---------- Real time = 20.001204
Simulation time = 20.5 ---------- Real time = 20.500672
Simulation time = 21.0 ---------- Real time = 21.000627
Simulation time = 21.5 ---------- Real time = 21.500558
Simulation time = 22.0 ---------- Real time = 22.000589
Simulation time = 22.5 ---------- Real time = 22.500713
Simulation time = 23.0 ---------- Real time = 23.00066
Simulation time = 23.5 ---------- Real time = 23.500582
Simulation time = 24.0 ---------- Real time = 24.000741
Simulation time = 24.5 ---------- Real time = 24.501645
Simulation time = 25.0 ---------- Real time = 25.000612
Simulation time = 25.5 ---------- Real time = 25.500653
Simulation time = 26.0 ---------- Real time = 26.000608
Simulation time = 26.5 ---------- Real time = 26.500586
Simulation time = 27.0 ---------- Real time = 27.000559
Simulation time = 27.5 ---------- Real time = 27.500491
Simulation time = 28.0 ---------- Real time = 28.000739
Simulation time = 28.5 ---------- Real time = 28.500578
Simulation time = 29.0 ---------- Real time = 29.000566
Simulation time = 29.5 ---------- Real time = 29.500653
Simulation time = 30.0 ---------- Real time = 30.000579
Simulation time = 30.5 ---------- Real time = 30.500581
Simulation time = 31.0 ---------- Real time = 31.000613
Simulation time = 31.5 ---------- Real time = 31.500575
Simulation time = 32.0 ---------- Real time = 32.000609
Simulation time = 32.5 ---------- Real time = 32.500592
Simulation time = 33.0 ---------- Real time = 33.000574
Simulation time = 33.5 ---------- Real time = 33.500781
Simulation time = 34.0 ---------- Real time = 34.000654
Simulation time = 34.5 ---------- Real time = 34.500681
Simulation time = 35.0 ---------- Real time = 35.000583
Simulation time = 35.5 ---------- Real time = 35.509975
Simulation time = 36.0 ---------- Real time = 36.000544
Simulation time = 36.5 ---------- Real time = 36.500733
Simulation time = 37.0 ---------- Real time = 37.000584
Simulation time = 37.5 ---------- Real time = 37.500888
Simulation time = 38.0 ---------- Real time = 38.001062
Simulation time = 38.5 ---------- Real time = 38.508665
Simulation time = 39.0 ---------- Real time = 39.000791
Simulation time = 39.5 ---------- Real time = 39.500576
Simulation time = 40.0 ---------- Real time = 40.000566
Simulation time = 40.5 ---------- Real time = 40.5006
Simulation time = 41.0 ---------- Real time = 41.000588
Simulation time = 41.5 ---------- Real time = 41.500668
Simulation time = 42.0 ---------- Real time = 42.000571
Simulation time = 42.5 ---------- Real time = 42.500602
Simulation time = 43.0 ---------- Real time = 43.000556
Simulation time = 43.5 ---------- Real time = 43.500716
Simulation time = 44.0 ---------- Real time = 44.000495
Simulation time = 44.5 ---------- Real time = 44.500689
Simulation time = 45.0 ---------- Real time = 45.000562
Simulation time = 45.5 ---------- Real time = 45.500617
Simulation time = 46.0 ---------- Real time = 46.00058
Simulation time = 46.5 ---------- Real time = 46.500673
Simulation time = 47.0 ---------- Real time = 47.000561
Simulation time = 47.5 ---------- Real time = 47.500591
Simulation time = 48.0 ---------- Real time = 48.000578
Simulation time = 48.5 ---------- Real time = 48.500952
Simulation time = 49.0 ---------- Real time = 49.000586
Simulation time = 49.5 ---------- Real time = 49.500582
Simulation time = 50.0 ---------- Real time = 50.000548
ServiceFault from server received while waiting for publish response
Client disconnected
prasadtalasila commented 10 months ago

@alq-eium can you please look into this?

alq-eium commented 10 months ago

Sure @prasadtalasila I will take care of it! Once I tried to fix that error at the end of the co-simulation, but I didn't succeed. It seems that the server or client tries to publish, but the client is already disconnected. However, I think that I can solve it using asyncua package, which is an updated version of opcua.

prasadtalasila commented 10 months ago

Sure @prasadtalasila I will take care of it! Once I tried to fix that error at the end of the co-simulation, but I didn't succeed. It seems that the server or client tries to publish, but the client is already disconnected. However, I think that I can solve it using asyncua package, which is an updated version of opcua.

Thanks

prasadtalasila commented 7 months ago

This problem has already been resolved in opc-ua-waterplant example.