diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index a3e9e58..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 14fa4d0..5f3fa62 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ Data PythonScript venv +.venv .idea/ build dist diff --git a/machinery-system-structure/03_ConvertFEEMSResultToProto.ipynb b/machinery-system-structure/03_ConvertFEEMSResultToProto.ipynb index dee147e..2674a4c 100644 --- a/machinery-system-structure/03_ConvertFEEMSResultToProto.ipynb +++ b/machinery-system-structure/03_ConvertFEEMSResultToProto.ipynb @@ -239,7 +239,7 @@ " TypeComponent.BATTERY_SYSTEM,\n", " ]:\n", " pass\n", - " elif power_source.type == [TypeComponent.PTI_PTO_SYSTEM]:\n", + " elif power_source.type == TypeComponent.PTI_PTO_SYSTEM:\n", " pass\n", " else:\n", " raise NotImplementedError(\n", diff --git a/machinery-system-structure/MachSysS/__init__.py b/machinery-system-structure/MachSysS/__init__.py index 4c513f3..f6104e0 100644 --- a/machinery-system-structure/MachSysS/__init__.py +++ b/machinery-system-structure/MachSysS/__init__.py @@ -1 +1 @@ -__version__ = "0.6.6" +__version__ = "0.6.7" diff --git a/machinery-system-structure/MachSysS/convert_feems_result_to_proto.py b/machinery-system-structure/MachSysS/convert_feems_result_to_proto.py index cefbb7b..6fd6e8d 100644 --- a/machinery-system-structure/MachSysS/convert_feems_result_to_proto.py +++ b/machinery-system-structure/MachSysS/convert_feems_result_to_proto.py @@ -73,7 +73,7 @@ class FEEMSResultConverter: def __init__( self, feems_result: Union[FEEMSResult, FEEMSResultForMachinerySystem], - system_feems: [ + system_feems: Union[ MechanicalPropulsionSystemWithElectricPowerSystem, ElectricPowerSystem, HybridPropulsionSystem, @@ -193,7 +193,7 @@ def _retrieve_time_series_data_from_components(self): TypeComponent.BATTERY_SYSTEM, ]: pass - elif power_source.type == [TypeComponent.PTI_PTO_SYSTEM]: + elif power_source.type == TypeComponent.PTI_PTO_SYSTEM: pass else: raise NotImplementedError( diff --git a/machinery-system-structure/settings.ini b/machinery-system-structure/settings.ini index 62563e1..c4e3b9c 100644 --- a/machinery-system-structure/settings.ini +++ b/machinery-system-structure/settings.ini @@ -12,7 +12,7 @@ user = keviny author = Kevin Koosup Yum author_email = kevinkoosup.yum@sintef.no copyright = SINTEF Ocean -version = 0.6.6 +version = 0.6.7 min_python = 3.10 audience = Developers language = English @@ -24,7 +24,7 @@ license = apache2 status = 1 # Optional. Same format as setuptools requirements -requirements = protobuf +requirements = protobuf~=4.21.12 # Optional. Same format as setuptools console_scripts # console_scripts = # Optional. Same format as setuptools dependency-links diff --git a/machinery-system-structure/tests/electric_propulsion_system.mss b/machinery-system-structure/tests/electric_propulsion_system.mss index e7b5c6b..d7ff283 100644 Binary files a/machinery-system-structure/tests/electric_propulsion_system.mss and b/machinery-system-structure/tests/electric_propulsion_system.mss differ diff --git a/machinery-system-structure/tests/electric_system_with_pto.mss b/machinery-system-structure/tests/electric_system_with_pto.mss index 6aa27c0..ca821ed 100644 Binary files a/machinery-system-structure/tests/electric_system_with_pto.mss and b/machinery-system-structure/tests/electric_system_with_pto.mss differ diff --git a/machinery-system-structure/tests/hybrid_propulsion_system.mss b/machinery-system-structure/tests/hybrid_propulsion_system.mss index b8565eb..dcdb45c 100644 Binary files a/machinery-system-structure/tests/hybrid_propulsion_system.mss and b/machinery-system-structure/tests/hybrid_propulsion_system.mss differ diff --git a/machinery-system-structure/tests/mechanical_propulsion_with_electric_system.mss b/machinery-system-structure/tests/mechanical_propulsion_with_electric_system.mss index 214027f..1d4b436 100644 Binary files a/machinery-system-structure/tests/mechanical_propulsion_with_electric_system.mss and b/machinery-system-structure/tests/mechanical_propulsion_with_electric_system.mss differ diff --git a/machinery-system-structure/tests/mechanical_system_with_pto.mss b/machinery-system-structure/tests/mechanical_system_with_pto.mss index b2cd6b6..2b83edd 100644 Binary files a/machinery-system-structure/tests/mechanical_system_with_pto.mss and b/machinery-system-structure/tests/mechanical_system_with_pto.mss differ diff --git a/machinery-system-structure/tests/system_proto.mss b/machinery-system-structure/tests/system_proto.mss index e7b5c6b..d7ff283 100644 Binary files a/machinery-system-structure/tests/system_proto.mss and b/machinery-system-structure/tests/system_proto.mss differ diff --git a/machinery-system-structure/tests/system_proto_with_coges.mss b/machinery-system-structure/tests/system_proto_with_coges.mss index 463f5c4..45524ec 100644 Binary files a/machinery-system-structure/tests/system_proto_with_coges.mss and b/machinery-system-structure/tests/system_proto_with_coges.mss differ diff --git a/machinery-system-structure/timeseries_test.csv b/machinery-system-structure/timeseries_test.csv index 989cf9d..adcecb7 100644 --- a/machinery-system-structure/timeseries_test.csv +++ b/machinery-system-structure/timeseries_test.csv @@ -15,7 +15,7 @@ 1604188800.0,speed through water,0.0 1604188800.0,sea current speed in meter pr sec,0.0 1604188800.0,sea current direction in degrees relative to geographic north,0.0 -1604188800.0,power,311.6036210421622 +1604188800.0,power,717.1476301461336 1604188800.0,torque,0.0 1604188800.0,thrust,0.0 1604188800.0,rtot,0.0 @@ -36,7 +36,7 @@ 1604189706.0,speed through water,0.0 1604189706.0,sea current speed in meter pr sec,0.0 1604189706.0,sea current direction in degrees relative to geographic north,0.0 -1604189706.0,power,112.98942864346961 +1604189706.0,power,162.46938726790404 1604189706.0,torque,0.0 1604189706.0,thrust,0.0 1604189706.0,rtot,0.0 @@ -57,7 +57,7 @@ 1604190517.0,speed through water,0.0 1604190517.0,sea current speed in meter pr sec,0.0 1604190517.0,sea current direction in degrees relative to geographic north,0.0 -1604190517.0,power,495.01570738457923 +1604190517.0,power,722.284852947919 1604190517.0,torque,0.0 1604190517.0,thrust,0.0 1604190517.0,rtot,0.0 @@ -78,7 +78,7 @@ 1604191186.0,speed through water,0.0 1604191186.0,sea current speed in meter pr sec,0.0 1604191186.0,sea current direction in degrees relative to geographic north,0.0 -1604191186.0,power,580.5793529320733 +1604191186.0,power,267.47993452384844 1604191186.0,torque,0.0 1604191186.0,thrust,0.0 1604191186.0,rtot,0.0 @@ -99,7 +99,7 @@ 1604192400.0,speed through water,0.0 1604192400.0,sea current speed in meter pr sec,0.0 1604192400.0,sea current direction in degrees relative to geographic north,0.0 -1604192400.0,power,277.2219163791282 +1604192400.0,power,662.7298790034673 1604192400.0,torque,0.0 1604192400.0,thrust,0.0 1604192400.0,rtot,0.0 @@ -120,7 +120,7 @@ 1604192423.0,speed through water,0.0 1604192423.0,sea current speed in meter pr sec,0.0 1604192423.0,sea current direction in degrees relative to geographic north,0.0 -1604192423.0,power,25.905163402709206 +1604192423.0,power,202.39072768222442 1604192423.0,torque,0.0 1604192423.0,thrust,0.0 1604192423.0,rtot,0.0 @@ -141,7 +141,7 @@ 1604193529.0,speed through water,0.0 1604193529.0,sea current speed in meter pr sec,0.0 1604193529.0,sea current direction in degrees relative to geographic north,0.0 -1604193529.0,power,493.91605516134297 +1604193529.0,power,160.51544456133814 1604193529.0,torque,0.0 1604193529.0,thrust,0.0 1604193529.0,rtot,0.0 @@ -162,7 +162,7 @@ 1604194874.0,speed through water,0.0 1604194874.0,sea current speed in meter pr sec,0.0 1604194874.0,sea current direction in degrees relative to geographic north,0.0 -1604194874.0,power,681.3837164029684 +1604194874.0,power,17.59906533610811 1604194874.0,torque,0.0 1604194874.0,thrust,0.0 1604194874.0,rtot,0.0 @@ -183,7 +183,7 @@ 1604196000.0,speed through water,0.0 1604196000.0,sea current speed in meter pr sec,0.0 1604196000.0,sea current direction in degrees relative to geographic north,0.0 -1604196000.0,power,844.1279292397296 +1604196000.0,power,945.3973205466585 1604196000.0,torque,0.0 1604196000.0,thrust,0.0 1604196000.0,rtot,0.0 @@ -204,7 +204,7 @@ 1604197749.0,speed through water,0.0 1604197749.0,sea current speed in meter pr sec,0.0 1604197749.0,sea current direction in degrees relative to geographic north,0.0 -1604197749.0,power,148.257820839521 +1604197749.0,power,331.9244617913355 1604197749.0,torque,0.0 1604197749.0,thrust,0.0 1604197749.0,rtot,0.0 @@ -225,7 +225,7 @@ 1604199600.0,speed through water,0.0 1604199600.0,sea current speed in meter pr sec,0.0 1604199600.0,sea current direction in degrees relative to geographic north,0.0 -1604199600.0,power,906.6903161480209 +1604199600.0,power,191.7547965503028 1604199600.0,torque,0.0 1604199600.0,thrust,0.0 1604199600.0,rtot,0.0 @@ -246,7 +246,7 @@ 1604199914.0,speed through water,0.0 1604199914.0,sea current speed in meter pr sec,0.0 1604199914.0,sea current direction in degrees relative to geographic north,0.0 -1604199914.0,power,563.1002964115078 +1604199914.0,power,134.81254918298714 1604199914.0,torque,0.0 1604199914.0,thrust,0.0 1604199914.0,rtot,0.0 @@ -267,7 +267,7 @@ 1604203037.0,speed through water,0.0 1604203037.0,sea current speed in meter pr sec,0.0 1604203037.0,sea current direction in degrees relative to geographic north,0.0 -1604203037.0,power,788.0065500622838 +1604203037.0,power,859.7682686278378 1604203037.0,torque,0.0 1604203037.0,thrust,0.0 1604203037.0,rtot,0.0 @@ -288,7 +288,7 @@ 1604203200.0,speed through water,0.0 1604203200.0,sea current speed in meter pr sec,0.0 1604203200.0,sea current direction in degrees relative to geographic north,0.0 -1604203200.0,power,423.3180725307778 +1604203200.0,power,686.392719607387 1604203200.0,torque,0.0 1604203200.0,thrust,0.0 1604203200.0,rtot,0.0 @@ -309,7 +309,7 @@ 1604204886.0,speed through water,0.0 1604204886.0,sea current speed in meter pr sec,0.0 1604204886.0,sea current direction in degrees relative to geographic north,0.0 -1604204886.0,power,945.3084160727689 +1604204886.0,power,530.6514197826817 1604204886.0,torque,0.0 1604204886.0,thrust,0.0 1604204886.0,rtot,0.0 @@ -330,7 +330,7 @@ 1604205991.0,speed through water,0.0 1604205991.0,sea current speed in meter pr sec,0.0 1604205991.0,sea current direction in degrees relative to geographic north,0.0 -1604205991.0,power,699.2054333685735 +1604205991.0,power,82.02053738617798 1604205991.0,torque,0.0 1604205991.0,thrust,0.0 1604205991.0,rtot,0.0 @@ -351,7 +351,7 @@ 1604206800.0,speed through water,0.0 1604206800.0,sea current speed in meter pr sec,0.0 1604206800.0,sea current direction in degrees relative to geographic north,0.0 -1604206800.0,power,152.91384664645767 +1604206800.0,power,942.9539935999537 1604206800.0,torque,0.0 1604206800.0,thrust,0.0 1604206800.0,rtot,0.0 @@ -372,7 +372,7 @@ 1604207782.0,speed through water,0.0 1604207782.0,sea current speed in meter pr sec,0.0 1604207782.0,sea current direction in degrees relative to geographic north,0.0 -1604207782.0,power,274.58177599789303 +1604207782.0,power,864.4027876293283 1604207782.0,torque,0.0 1604207782.0,thrust,0.0 1604207782.0,rtot,0.0 @@ -393,7 +393,7 @@ 1604208824.0,speed through water,0.0 1604208824.0,sea current speed in meter pr sec,0.0 1604208824.0,sea current direction in degrees relative to geographic north,0.0 -1604208824.0,power,593.0435028248605 +1604208824.0,power,668.0044438526122 1604208824.0,torque,0.0 1604208824.0,thrust,0.0 1604208824.0,rtot,0.0 @@ -414,7 +414,7 @@ 1604209673.0,speed through water,0.0 1604209673.0,sea current speed in meter pr sec,0.0 1604209673.0,sea current direction in degrees relative to geographic north,0.0 -1604209673.0,power,126.71827310428397 +1604209673.0,power,635.3339693658279 1604209673.0,torque,0.0 1604209673.0,thrust,0.0 1604209673.0,rtot,0.0 @@ -435,7 +435,7 @@ 1604210400.0,speed through water,0.0 1604210400.0,sea current speed in meter pr sec,0.0 1604210400.0,sea current direction in degrees relative to geographic north,0.0 -1604210400.0,power,4.692365611099425 +1604210400.0,power,572.9768087283618 1604210400.0,torque,0.0 1604210400.0,thrust,0.0 1604210400.0,rtot,0.0 @@ -456,7 +456,7 @@ 1604211652.0,speed through water,0.0 1604211652.0,sea current speed in meter pr sec,0.0 1604211652.0,sea current direction in degrees relative to geographic north,0.0 -1604211652.0,power,532.0021501000223 +1604211652.0,power,290.9076682165619 1604211652.0,torque,0.0 1604211652.0,thrust,0.0 1604211652.0,rtot,0.0 @@ -477,7 +477,7 @@ 1604212887.0,speed through water,0.0 1604212887.0,sea current speed in meter pr sec,0.0 1604212887.0,sea current direction in degrees relative to geographic north,0.0 -1604212887.0,power,863.9798013880974 +1604212887.0,power,814.2485514996213 1604212887.0,torque,0.0 1604212887.0,thrust,0.0 1604212887.0,rtot,0.0 @@ -498,7 +498,7 @@ 1604214000.0,speed through water,0.0 1604214000.0,sea current speed in meter pr sec,0.0 1604214000.0,sea current direction in degrees relative to geographic north,0.0 -1604214000.0,power,117.12681198092245 +1604214000.0,power,672.8158717665798 1604214000.0,torque,0.0 1604214000.0,thrust,0.0 1604214000.0,rtot,0.0 @@ -519,7 +519,7 @@ 1604214565.0,speed through water,0.0 1604214565.0,sea current speed in meter pr sec,0.0 1604214565.0,sea current direction in degrees relative to geographic north,0.0 -1604214565.0,power,172.50684009842354 +1604214565.0,power,41.415835338854066 1604214565.0,torque,0.0 1604214565.0,thrust,0.0 1604214565.0,rtot,0.0 @@ -540,7 +540,7 @@ 1604215950.0,speed through water,0.0 1604215950.0,sea current speed in meter pr sec,0.0 1604215950.0,sea current direction in degrees relative to geographic north,0.0 -1604215950.0,power,870.7189882146831 +1604215950.0,power,160.1465220216649 1604215950.0,torque,0.0 1604215950.0,thrust,0.0 1604215950.0,rtot,0.0 diff --git a/machinery-system-structure/timeseries_test.sim b/machinery-system-structure/timeseries_test.sim index 05e9281..63ff03e 100644 Binary files a/machinery-system-structure/timeseries_test.sim and b/machinery-system-structure/timeseries_test.sim differ diff --git a/machinery-system-structure/timeseries_test_.sim b/machinery-system-structure/timeseries_test_.sim index b30897e..266eeb0 100644 Binary files a/machinery-system-structure/timeseries_test_.sim and b/machinery-system-structure/timeseries_test_.sim differ diff --git a/requirements.txt b/requirements.txt index 5918958..e04b29b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pandas numpy scipy -protobuf +protobuf~=4.21.12 pandas