From c344709c3b208854fc4ea991748c8eac4c95a653 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Thu, 9 Jul 2015 15:51:53 +0200 Subject: [PATCH] merge attempt 2 --- Declaration/SegmentTable.csv | 52 +- Declaration/VCDV/paramerters.csv | 6 + Declaration/WHTC-Weighting-Factors.csv | 4 + Declaration/Wheels.csv | 82 +- VECTO.sln | 3 - VECTO.sln.DotSettings | 60 +- VectoCore/Models/Connector/Ports/IFvPort.cs | 48 +- VectoCore/Models/Connector/Ports/ITnPort.cs | 48 +- .../Models/Connector/Ports/Impl/Response.cs | 46 +- VectoCore/Models/Declaration/Axle.cs | 2 +- .../Models/Declaration/DeclarationWheels.cs | 36 - VectoCore/Models/Declaration/Fan.cs | 41 + VectoCore/Models/Declaration/HVAC.cs | 36 + VectoCore/Models/Declaration/Mission.cs | 2 +- VectoCore/Models/Declaration/MissionType.cs | 6 +- .../Declaration/{DeclarationPT1.cs => PT1.cs} | 8 +- .../Models/Declaration/PneumaticSystem.cs | 36 + VectoCore/Models/Declaration/Rims.cs | 37 + .../{DeclarationSegments.cs => Segments.cs} | 45 +- VectoCore/Models/Declaration/SteeringPump.cs | 72 + .../Models/Declaration/WHTCCorrection.cs | 41 + VectoCore/Models/Declaration/Wheels.cs | 33 + .../Simulation/Cockpit/IEngineCockpit.cs | 2 +- .../Simulation/Data/IModalDataWriter.cs | 4 +- .../Models/Simulation/Data/ModalDataWriter.cs | 4 +- .../Data/AuxiliaryCycleDataAdapter.cs | 4 +- .../Data/Engine/FuelConsumptionMap.cs | 322 +-- .../Data/Gearbox/GearData.cs | 2 +- .../Data/Gearbox/TransmissionLossMap.cs | 8 +- .../Data/RetarderLossMap.cs | 1 - .../Models/SimulationComponent/IClutch.cs | 4 +- .../SimulationComponent/ICombustionEngine.cs | 8 +- .../IDriverDemandDrivingCycle.cs | 8 +- .../IEngineOnlyDrivingCycle.cs | 8 +- .../Models/SimulationComponent/IWheels.cs | 8 +- .../Impl/DirectAuxiliary.cs | 7 +- .../Impl/EngineOnlyGearbox.cs | 89 +- .../Impl/MappingAuxiliary.cs | 2 +- .../Impl/TimeBasedDrivingCycle.cs | 2 +- .../VectoSimulationComponent.cs | 50 +- .../Resources/Declaration/DefaultTC.vtcc | 12 + VectoCore/Resources/Declaration/Rims.csv | 2 +- .../Resources/Declaration/SegmentTable.csv | 52 +- .../Resources/Declaration/VAUX/PS-Table.csv | 24 +- .../Resources/Declaration/VCDV/parameters.csv | 6 + .../Declaration/WHTC-Weighting-Factors.csv | 4 + VectoCore/Resources/Declaration/WHTC.csv | 1802 +++++++++++++++++ VectoCore/Resources/Declaration/Wheels.csv | 82 +- ...ethods.cs => DataTableExtensionMethods.cs} | 7 +- VectoCore/Utils/DoubleExtensionMethods.cs | 9 +- VectoCore/Utils/IntExtensionMethods.cs | 14 +- VectoCore/Utils/RessourceHelper.cs | 9 +- VectoCore/Utils/StringExtensionMethods.cs | 10 + VectoCore/Utils/VectoCSVFile.cs | 7 +- .../{ => Declaration}/DeclarationDataTest.cs | 280 ++- .../Models/SimulationComponent/WheelsTest.cs | 4 + .../FuelConsumptionMapTest.cs | 68 +- .../FullLoadCurveTest.cs | 21 +- .../GearboxDataTest.cs | 19 +- VectoCoreTest/Utils/AssertHelper.cs | 24 + VectoCoreTest/Utils/DummyGearbox.cs | 1 - VectoCoreTest/Utils/ResultFileHelper.cs | 4 +- VectoCoreTest/VectoCoreTest.csproj | 7 +- 63 files changed, 3049 insertions(+), 696 deletions(-) create mode 100644 Declaration/VCDV/paramerters.csv create mode 100644 Declaration/WHTC-Weighting-Factors.csv delete mode 100644 VectoCore/Models/Declaration/DeclarationWheels.cs create mode 100644 VectoCore/Models/Declaration/Fan.cs create mode 100644 VectoCore/Models/Declaration/HVAC.cs rename VectoCore/Models/Declaration/{DeclarationPT1.cs => PT1.cs} (85%) create mode 100644 VectoCore/Models/Declaration/PneumaticSystem.cs create mode 100644 VectoCore/Models/Declaration/Rims.cs rename VectoCore/Models/Declaration/{DeclarationSegments.cs => Segments.cs} (72%) create mode 100644 VectoCore/Models/Declaration/SteeringPump.cs create mode 100644 VectoCore/Models/Declaration/WHTCCorrection.cs create mode 100644 VectoCore/Models/Declaration/Wheels.cs create mode 100644 VectoCore/Resources/Declaration/DefaultTC.vtcc create mode 100644 VectoCore/Resources/Declaration/VCDV/parameters.csv create mode 100644 VectoCore/Resources/Declaration/WHTC-Weighting-Factors.csv create mode 100644 VectoCore/Resources/Declaration/WHTC.csv rename VectoCore/Utils/{DataRowExtensionMethods.cs => DataTableExtensionMethods.cs} (91%) rename VectoCoreTest/Models/{ => Declaration}/DeclarationDataTest.cs (51%) create mode 100644 VectoCoreTest/Utils/AssertHelper.cs diff --git a/Declaration/SegmentTable.csv b/Declaration/SegmentTable.csv index 14f6a58f61..b7cdfef977 100644 --- a/Declaration/SegmentTable.csv +++ b/Declaration/SegmentTable.csv @@ -1,26 +1,26 @@ -Valid,tVehCat,tAxleConf,GVW_Min,GVW_Max,HDV_Class,VACC,VCDV - Long Haul,VCDV - Other,Rigid/Truck Axles - Long haul,Rigid/Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,LongHaul,RegionalDelivery,UrbanDelivery,MunicipalUtility,Construction,HeavyUrban,Urban,Suburban,Interurban,Coach,MassExtra - LongHaul,MassExtra - RegionalDelivery,MassExtra - UrbanDelivery,MassExtra - MunicipalUtility,MassExtra - Construction,MassExtra - HeavyUrban,MassExtra - Urban,MassExtra - Suburban,MassExtra - Interurban,MassExtra - Coach,RefLoad - LongHaul,RefLoad - RegionalDelivery,RefLoad - UrbanDelivery,RefLoad - MunicipalUtility,RefLoad - Construction,RefLoad - HeavyUrban,RefLoad - Urban,RefLoad - Suburban,RefLoad - Interurban,RefLoad - Coach,WHTCWF - LongHaul,WHTCWF - RegionalDelivery,WHTCWF - UrbanDelivery,WHTCWF - MunicipalUtility,WHTCWF - Construction,WHTCWF - HeavyUrban,WHTCWF - Urban,WHTCWF - Suburban,WHTCWF - Interurban,WHTCWF - Coach -0,RigidTruck,4x2,0,7.5,0,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,7.5,10,1,Truck.vacc,-,RigidSolo.vcdv,-,45/55,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,1600,1600,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,10,12,2,Truck.vacc,RigidSolo.vcdv,RigidSolo.vcdv,40/60,45/55,0/0,0/0,1,1,1,0,0,0,0,0,0,0,1900,1900,1900,-,-,-,-,-,-,-,f,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,12,16,3,Truck.vacc,-,RigidSolo.vcdv,-,40/60,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,2000,2000,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,16,99,4,Truck.vacc,RigidTrailer.vcdv,RigidSolo.vcdv,20/30,45/55,50/2,0/0,1,1,0,1,0,0,0,0,0,0,7500,2100,-,2100,-,-,-,-,-,-,14000,4400,-,4400,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,Tractor,4x2,16,99,5,Truck.vacc,TractorSemitrailer.vcdv,TractorSemitrailer.vcdv,20/25,25/25,55/3,50/3,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,4x4,7.5,16,6,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,1,1,0,0,0,0,0,-,-,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,4x4,16,99,7,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B5,-,-,-,-,-,-,-,-,-,4300,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,4x4,16,99,8,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,6x2,0,99,9,Truck.vacc,RigidTrailer.vcdv,RigidSolo.vcdv,20/30/15,35/40/25,35/2,0/0,1,1,0,1,0,0,0,0,0,0,7600,2200,-,2200,-,-,-,-,-,-,17900,7100,-,7100,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,Tractor,6x2,0,99,10,Truck.vacc,TractorSemitrailer.vcdv,TractorSemitrailer.vcdv,15/10/20,20/10/20,55/2,50/2,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19000,12700,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,6x4,0,99,11,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B7,-,-,-,-,-,-,-,-,-,7600,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,6x4,0,99,12,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,ST2,-,-,-,-,-,-,-,-,-,12100,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,6x6,0,99,13,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,0,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,6x6,0,99,14,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,0,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x2,0,99,15,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,1,0,0,0,0,0,0,0,0,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x4,0,99,16,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B9,-,-,-,-,-,-,-,-,-,11600,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x6,0,99,17,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x8,0,99,17,Truck.vacc,-,-,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,CityBus,4x2,0,18,B1,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,InterurbanBus,4x2,0,18,B2,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Coach,4x2,0,18,B3,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,CityBus,6x2,18,99,B4,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,InterurbanBus,6x2,18,99,B5,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Coach,6x2,18,99,B6,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 +Valid,Vehicle Category ,Axle Conf.,GVW_Min,GVW_Max,HDV class,.vacc file ,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach,Mass Extra - Long haul,Mass Extra - Regional delivery,Mass Extra - Urban delivery,Mass Extra - Municipal utility,Mass Extra - Construction,Mass Extra - Heavy Urban,Mass Extra - Urban,Mass Extra - Suburban,Mass Extra - Interurban,Mass Extra - Coach,Payload - Long haul,Payload - Regional delivery,Payload - Urban delivery,Payload - Municipal utility,Payload - Construction,Payload - Heavy Urban,Payload - Urban,Payload - Suburban,Payload - Interurban,Payload - Coach +0,RigidTruck,4x2,0,7.5,0,Truck.vacc,-,RigidSolo,-,-,-,-,0,1,1,0,0,0,0,0,0,0,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,-,- +1,RigidTruck,4x2,7.5,10,1,Truck.vacc,-,RigidSolo,-,45/55,-,-,0,1,1,0,0,0,0,0,0,0,-,1600,1600,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,10,12,2,Truck.vacc,RigidSolo,RigidSolo,40/60,45/55,-,-,1,1,1,0,0,0,0,0,0,0,1900,1900,1900,-,-,-,-,-,-,-,f,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,12,16,3,Truck.vacc,-,RigidSolo,-,40/60,-,-,0,1,1,0,0,0,0,0,0,0,-,2000,2000,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,16,99,4,Truck.vacc,RigidTrailer,RigidSolo,20/30,45/55,50/2,-,1,1,0,1,0,0,0,0,0,0,7500,2100,-,2100,-,-,-,-,-,-,14000,4400,-,4400,-,-,-,-,-,- +1,Tractor,4x2,16,99,5,Truck.vacc,TractorSemitrailer,TractorSemitrailer,20/25,25/25,55/3,50/3,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,- +0,RigidTruck,4x4,7.5,16,6,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,1,1,0,0,0,0,0,-,-,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,- +0,RigidTruck,4x4,16,99,7,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,Tractor,4x4,16,99,8,Truck.vacc,-,TractorSemitrailer,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +1,RigidTruck,6x2,0,99,9,Truck.vacc,RigidTrailer,RigidSolo,20/30/15,35/40/25,35/2,-,1,1,0,1,0,0,0,0,0,0,7600,2200,-,2200,-,-,-,-,-,-,19300,7100,-,7100,-,-,-,-,-,- +1,Tractor,6x2,0,99,10,Truck.vacc,TractorSemitrailer,TractorSemitrailer,15/10/20,20/10/20,55/2,50/2,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,- +0,RigidTruck,6x4,0,99,11,Truck.vacc,-,RigidSolo,-,35/35/30,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,7100,-,-,-,-,- +0,Tractor,6x4,0,99,12,Truck.vacc,-,TractorSemitrailer,-,20/15/15,-,50/2,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,12900,-,-,-,-,- +0,RigidTruck,6x6,0,99,13,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,Tractor,6x6,0,99,14,Truck.vacc,-,TractorSemitrailer,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,RigidTruck,8x2,0,99,15,Truck.vacc,-,RigidSolo,-,-,-,-,0,1,0,0,0,0,0,0,0,0,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,- +0,RigidTruck,8x4,0,99,16,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,12900,-,-,-,-,- +0,RigidTruck,8x6,0,99,17,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,RigidTruck,8x8,0,99,17,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,CityBus,4x2,0,18,B1,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,- +0,InterurbanBus,4x2,0,18,B2,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,- +0,Coach,4x2,0,18,B3,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,??? +0,CityBus,6x2,18,99,B4,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,- +0,InterurbanBus,6x2,18,99,B5,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,- +0,Coach,6x2,18,99,B6,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,??? diff --git a/Declaration/VCDV/paramerters.csv b/Declaration/VCDV/paramerters.csv new file mode 100644 index 0000000000..7a6e9b270e --- /dev/null +++ b/Declaration/VCDV/paramerters.csv @@ -0,0 +1,6 @@ +Parameters,a1,a2,a3 +RigidSolo,0.013526,0.017746,-0.000666 +RigidTrailer,0.017125,0.072275,-0.004148 +TractorSemitrailer,0.034767,0.039367,-0.001897 +CoachBus,-0.000794,0.02109,-0.00109 + diff --git a/Declaration/WHTC-Weighting-Factors.csv b/Declaration/WHTC-Weighting-Factors.csv new file mode 100644 index 0000000000..4d00f736a8 --- /dev/null +++ b/Declaration/WHTC-Weighting-Factors.csv @@ -0,0 +1,4 @@ +Part,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach +Urban,11,17,69,98,62,100,100,100,45,0 +Rural,0,30,27,0,32,0,0,0,36,22 +Motorway,89,53,4,2,6,0,0,0,19,78 diff --git a/Declaration/Wheels.csv b/Declaration/Wheels.csv index 3c01c43e64..f49a335209 100644 --- a/Declaration/Wheels.csv +++ b/Declaration/Wheels.csv @@ -1,41 +1,41 @@ -Wheel,Inertia,d,Size-Class(0/1) -9 R 22.5,8.9,970,0 -9.00 R 20,10.5,1018,0 -9.5 R 17.5,4.9,842,0 -10 R 17.5,5,858,0 -10 R 22.5,11,1020,0 -10.00 R 20,13.1,1025,0 -11 R 22.5,14.4,1050,0 -11.00 R 20,14.6,1082,0 -12 R 22.5,16.8,1084,0 -12.00 R 20,19.5,1122,0 -12.00 R 24,27.7,1226,0 -12.5 R 20,12.7,1120,0 -13 R 22.5,20,1124,0 -14.00 R 20,30.8,1238,0 -14.5 R 20,14.8,1092,0 -16.00 R 20,47.5,1343,0 -215/75 R 17.5,3.9,767,0 -225/70 R 17.5,4,759.5,0 -225/75 R 17.5,4,782,0 -235/75 R 17.5,4.5,797,0 -245/70 R 17.5,5.2,787.5,0 -245/70 R 19.5,6,838.3,0 -255/70 R 22.5,9.5,928.5,0 -265/70 R 19.5,6.5,866.3,0 -275/70 R 22.5,11.9,956.5,0 -275/80 R 22.5,12.8,1011.5,0 -285/70 R 19.5,7.9,894.3,0 -295/55 R 22.5,10.2,896,1 -295/60 R 22.5,10.8,925.5,1 -295/80 R 22.5,15.5,1043.5,0 -305/70 R 19.5,9.2,922.3,0 -305/70 R 22.5,13.9,998.5,0 -315/45 R22.5,9.9,347,1 -315/60 R 22.5,12.8,949.5,1 -315/70 R 22.5,14.9,1012.5,0 -315/80 R 22.5,17.6,1075.5,0 -365/80 R 20,17.2,1092,0 -365/85 R 20,22.5,1128.5,0 -385/55 R 22.5,15.9,995,1 -385/65 R 22.5,19.2,1072,1 +Wheel,Inertia,d,Size-Class (0/1) +9 R22.5,8.9,970,b +9.00 R20,10.5,1018,b +9.5 R17.5,4.9,842,b +10 R17.5,5,858,b +10 R22.5,11,1020,b +10.00 R20,13.1,1025,b +11 R22.5,14.4,1050,b +11.00 R20,14.6,1082,b +12 R22.5,16.8,1084,b +12.00 R20,19.5,1122,b +12.00 R24,27.7,1226,b +12.5 R20,12.7,1120,b +13 R22.5,20,1124,b +14.00 R20,30.8,1238,b +14.5 R20,14.8,1092,b +16.00 R20,47.5,1343,b +215/75 R17.5,3.9,767,b +225/70 R17.5,4,759.5,b +225/75 R17.5,4,782,b +235/75 R17.5,4.5,797,b +245/70 R17.5,5.2,787.5,b +245/70 R19.5,6,838.3,b +255/70 R22.5,9.5,928.5,b +265/70 R19.5,6.5,866.3,b +275/70 R22.5,11.9,956.5,b +275/80 R22.5,12.8,1011.5,b +285/70 R19.5,7.9,894.3,b +295/55 R22.5,10.2,896,a +295/60 R22.5,10.8,925.5,a +295/80 R22.5,15.5,1043.5,b +305/70 R19.5,9.2,922.3,b +305/70 R22.5,13.9,998.5,b +315/45 R22.5,9.9,855,a +315/60 R22.5,12.8,949.5,a +315/70 R22.5,14.9,1012.5,b +315/80 R22.5,17.6,1075.5,b +365/80 R20,17.2,1092,b +365/85 R20,22.5,1128.5,b +385/55 R22.5,15.9,995,a +385/65 R22.5,19.2,1072,a diff --git a/VECTO.sln b/VECTO.sln index 1ba7acc436..3e14e7442e 100644 --- a/VECTO.sln +++ b/VECTO.sln @@ -59,7 +59,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal diff --git a/VECTO.sln.DotSettings b/VECTO.sln.DotSettings index 20c32e9f89..519ebe2c3f 100644 --- a/VECTO.sln.DotSettings +++ b/VECTO.sln.DotSettings @@ -1,4 +1,6 @@ <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> + <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Default: Reformat Code</s:String> + <s:String x:Key="/Default/CodeStyle/CodeFormatting/CommonFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">END_OF_LINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">END_OF_LINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String> @@ -14,15 +16,65 @@ <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ELSE_ON_NEW_LINE/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FINALLY_ON_NEW_LINE/@EntryValue">False</s:Boolean> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String> + <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_TYPEOF_PARENTHESES/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CSV/@EntryIndexedValue">CSV</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PT/@EntryIndexedValue">PT</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RP/@EntryIndexedValue">RP</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SI/@EntryIndexedValue">SI</s:String> - <s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=2BF7A1E51991F2458D2D1F0B29CF888B/@KeyIndexDefined">True</s:Boolean> - <s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=2BF7A1E51991F2458D2D1F0B29CF888B/AbsolutePath/@EntryValue">C:\Workspaces\VisualStudio\VECTO_quam\VECTO.sln.DotSettings</s:String> - <s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File2BF7A1E51991F2458D2D1F0B29CF888B/@KeyIndexDefined">True</s:Boolean> - <s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File2BF7A1E51991F2458D2D1F0B29CF888B/RelativePriority/@EntryValue">1</s:Double> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCONSTRUCTOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FFUNCTION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FGLOBAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FLABEL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FLOCAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FOBJECT_005FPROPERTY_005FOF_005FFUNCTION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FPARAMETER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FCLASS/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FENUM/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FENUM_005FMEMBER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FINTERFACE/@EntryIndexedValue"><Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FINTERFACE_005FFOR_005FJS_005FGLOBAL_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE_005FEXPORTED/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FMODULE_005FLOCAL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPRIVATE_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPROTECTED_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FMEMBER_005FACCESSOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FSTATIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FMETHOD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FTYPE_005FPARAMETER/@EntryIndexedValue"><Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FHTML_005FCONTROL/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FNAME/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FPREFIX/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + <s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> + + + + <s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=9B8C70A674F95241B1558475C07A6344/@KeyIndexDefined">True</s:Boolean> + <s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=9B8C70A674F95241B1558475C07A6344/AbsolutePath/@EntryValue">E:\vecto-sim\VECTO.sln.DotSettings</s:String> + <s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=9B8C70A674F95241B1558475C07A6344/RelativePath/@EntryValue"></s:String> + + + <s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File9B8C70A674F95241B1558475C07A6344/@KeyIndexDefined">True</s:Boolean> + <s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File9B8C70A674F95241B1558475C07A6344/RelativePriority/@EntryValue">2</s:Double> + + + + + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> diff --git a/VectoCore/Models/Connector/Ports/IFvPort.cs b/VectoCore/Models/Connector/Ports/IFvPort.cs index 1155a32776..ac85d7d342 100644 --- a/VectoCore/Models/Connector/Ports/IFvPort.cs +++ b/VectoCore/Models/Connector/Ports/IFvPort.cs @@ -3,29 +3,29 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Connector.Ports { - /// <summary> - /// Defines a connect method to connect the inport to an outport. - /// </summary> - public interface IFvInPort - { - /// <summary> - /// Connects the inport to another outport. - /// </summary> - void Connect(IFvOutPort other); - } + /// <summary> + /// Defines a connect method to connect the inport to an outport. + /// </summary> + public interface IFvInPort + { + /// <summary> + /// Connects the inport to another outport. + /// </summary> + void Connect(IFvOutPort other); + } - /// <summary> - /// Defines a request method for a Fv-Out-Port. - /// </summary> - public interface IFvOutPort - { - /// <summary> - /// Requests the Outport with the given force [N] and vehicle velocity [m/s]. - /// </summary> - /// <param name="absTime">[s]</param> - /// <param name="dt">[s]</param> - /// <param name="force">[N]</param> - /// <param name="velocity">[m/s]</param> - IResponse Request(TimeSpan absTime, TimeSpan dt, Newton force, MeterPerSecond velocity); - } + /// <summary> + /// Defines a request method for a Fv-Out-Port. + /// </summary> + public interface IFvOutPort + { + /// <summary> + /// Requests the Outport with the given force [N] and vehicle velocity [m/s]. + /// </summary> + /// <param name="absTime">[s]</param> + /// <param name="dt">[s]</param> + /// <param name="force">[N]</param> + /// <param name="velocity">[m/s]</param> + IResponse Request(TimeSpan absTime, TimeSpan dt, Newton force, MeterPerSecond velocity); + } } \ No newline at end of file diff --git a/VectoCore/Models/Connector/Ports/ITnPort.cs b/VectoCore/Models/Connector/Ports/ITnPort.cs index 0d6ddba5b8..9c8d4d8e1a 100644 --- a/VectoCore/Models/Connector/Ports/ITnPort.cs +++ b/VectoCore/Models/Connector/Ports/ITnPort.cs @@ -3,29 +3,29 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Connector.Ports { - /// <summary> - /// Defines a connect method to connect the inport to an outport. - /// </summary> - public interface ITnInPort - { - /// <summary> - /// Connects the inport to another outport. - /// </summary> - void Connect(ITnOutPort other); - } + /// <summary> + /// Defines a connect method to connect the inport to an outport. + /// </summary> + public interface ITnInPort + { + /// <summary> + /// Connects the inport to another outport. + /// </summary> + void Connect(ITnOutPort other); + } - /// <summary> - /// Defines a request method for a Tn-Out-Port. - /// </summary> - public interface ITnOutPort - { - /// <summary> - /// Requests the Outport with the given torque [Nm] and angularVelocity [rad/s]. - /// </summary> - /// <param name="absTime">[s]</param> - /// <param name="dt">[s]</param> - /// <param name="torque">[Nm]</param> - /// <param name="angularVelocity">[rad/s]</param> - IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond angularVelocity); - } + /// <summary> + /// Defines a request method for a Tn-Out-Port. + /// </summary> + public interface ITnOutPort + { + /// <summary> + /// Requests the Outport with the given torque [Nm] and angularVelocity [rad/s]. + /// </summary> + /// <param name="absTime">[s]</param> + /// <param name="dt">[s]</param> + /// <param name="torque">[Nm]</param> + /// <param name="angularVelocity">[rad/s]</param> + IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond angularVelocity); + } } \ No newline at end of file diff --git a/VectoCore/Models/Connector/Ports/Impl/Response.cs b/VectoCore/Models/Connector/Ports/Impl/Response.cs index 1e6c0cc929..4931c543c7 100644 --- a/VectoCore/Models/Connector/Ports/Impl/Response.cs +++ b/VectoCore/Models/Connector/Ports/Impl/Response.cs @@ -2,30 +2,30 @@ using System; namespace TUGraz.VectoCore.Models.Connector.Ports.Impl { - /// <summary> - /// Response when the Cycle is finished. - /// </summary> - public class ResponseCycleFinished : IResponse {} + /// <summary> + /// Response when the Cycle is finished. + /// </summary> + public class ResponseCycleFinished : IResponse {} - /// <summary> - /// Response when a request was successful. - /// </summary> - public class ResponseSuccess : IResponse {} + /// <summary> + /// Response when a request was successful. + /// </summary> + public class ResponseSuccess : IResponse {} - /// <summary> - /// Response when the request resulted in an engine overload. - /// </summary> - public class ResponseFailOverload : IResponse - { - public double Delta { get; set; } - public double Gradient { get; set; } - } + /// <summary> + /// Response when the request resulted in an engine overload. + /// </summary> + public class ResponseFailOverload : IResponse + { + public double Delta { get; set; } + public double Gradient { get; set; } + } - /// <summary> - /// Response when the request should have another time interval. - /// </summary> - public class ResponseFailTimeInterval : IResponse - { - public TimeSpan DeltaT { get; set; } - } + /// <summary> + /// Response when the request should have another time interval. + /// </summary> + public class ResponseFailTimeInterval : IResponse + { + public TimeSpan DeltaT { get; set; } + } } \ No newline at end of file diff --git a/VectoCore/Models/Declaration/Axle.cs b/VectoCore/Models/Declaration/Axle.cs index 2a9706ade6..6e06fdb374 100644 --- a/VectoCore/Models/Declaration/Axle.cs +++ b/VectoCore/Models/Declaration/Axle.cs @@ -1,6 +1,6 @@ using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.Models.SimulationComponent.Data +namespace TUGraz.VectoCore.Models.Declaration { public class Axle { diff --git a/VectoCore/Models/Declaration/DeclarationWheels.cs b/VectoCore/Models/Declaration/DeclarationWheels.cs deleted file mode 100644 index 220fc12234..0000000000 --- a/VectoCore/Models/Declaration/DeclarationWheels.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Data; -using System.Linq; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.Declaration -{ - public class DeclarationWheels : LookupData<string, DeclarationWheels.WheelsEntry> - { - protected const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.Wheels.csv"; - - public DeclarationWheels() - { - ParseData(ReadCsvResource(ResourceId)); - } - - protected override sealed void ParseData(DataTable table) - { - Data = (from DataRow row in table.Rows - select new WheelsEntry { - WheelType = row[0].ToString(), - Inertia = row.ParseDouble(1).SI<KilogramSquareMeter>(), - TyreRadius = row.ParseDouble(2).SI().Milli.Meter.Cast<Meter>(), - SizeClass = Int32.Parse(row[3].ToString()) - }).ToDictionary(e => e.WheelType); - } - - public class WheelsEntry - { - public string WheelType; - public KilogramSquareMeter Inertia; - public Meter TyreRadius; - public int SizeClass; - } - } -} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/Fan.cs b/VectoCore/Models/Declaration/Fan.cs new file mode 100644 index 0000000000..9bc356c81f --- /dev/null +++ b/VectoCore/Models/Declaration/Fan.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Data; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class Fan : LookupData<MissionType, string, Watt> + { + private readonly Dictionary<Tuple<MissionType, string>, Watt> _data = + new Dictionary<Tuple<MissionType, string>, Watt>(); + + private const string DefaultTechnology = "Crankshaft mounted - Electronically controlled visco clutch (Default)"; + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.VAUX.Fan-Tech.csv"; } + } + + protected override void ParseData(DataTable table) + { + NormalizeTable(table); + + _data.Clear(); + foreach (DataRow row in table.Rows) { + foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) { + _data[Tuple.Create(mission, row.Field<string>("Technology"))] = + row.ParseDouble(mission.ToString().ToLower()).SI<Watt>(); + } + } + } + + public override Watt Lookup(MissionType mission, string technology) + { + if (string.IsNullOrWhiteSpace(technology.Trim())) { + technology = DefaultTechnology; + } + return _data[Tuple.Create(mission, technology)]; + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/HVAC.cs b/VectoCore/Models/Declaration/HVAC.cs new file mode 100644 index 0000000000..16859b6635 --- /dev/null +++ b/VectoCore/Models/Declaration/HVAC.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Data; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class HeatingVentilationAirConditioning : LookupData<MissionType, string, Watt> + { + private readonly Dictionary<Tuple<MissionType, string>, Watt> _data = + new Dictionary<Tuple<MissionType, string>, Watt>(); + + public override Watt Lookup(MissionType mission, string hdvClass) + { + return _data[Tuple.Create(mission, hdvClass)]; + } + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.VAUX.HVAC-Table.csv"; } + } + + protected override void ParseData(DataTable table) + { + _data.Clear(); + NormalizeTable(table); + + foreach (DataRow row in table.Rows) { + var hdvClass = row.Field<string>("hdvclass/power"); + foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) { + _data[Tuple.Create(mission, hdvClass)] = row.ParseDouble(mission.ToString().ToLower()).SI<Watt>(); + } + } + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/Mission.cs b/VectoCore/Models/Declaration/Mission.cs index 148934e551..a335fb0c57 100644 --- a/VectoCore/Models/Declaration/Mission.cs +++ b/VectoCore/Models/Declaration/Mission.cs @@ -7,7 +7,7 @@ namespace TUGraz.VectoCore.Models.Declaration public class Mission { public MissionType MissionType { get; set; } - public Stream CrossWindCorrectionFile { get; set; } + public string CrossWindCorrection { get; set; } public double[] AxleWeightDistribution { get; set; } public double[] TrailerAxleWeightDistribution { get; set; } diff --git a/VectoCore/Models/Declaration/MissionType.cs b/VectoCore/Models/Declaration/MissionType.cs index 3c53bfa23d..eb1604b9ca 100644 --- a/VectoCore/Models/Declaration/MissionType.cs +++ b/VectoCore/Models/Declaration/MissionType.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace TUGraz.VectoCore.Models +namespace TUGraz.VectoCore.Models.Declaration { public enum MissionType { diff --git a/VectoCore/Models/Declaration/DeclarationPT1.cs b/VectoCore/Models/Declaration/PT1.cs similarity index 85% rename from VectoCore/Models/Declaration/DeclarationPT1.cs rename to VectoCore/Models/Declaration/PT1.cs index e3f78c50ad..202f1ebf14 100644 --- a/VectoCore/Models/Declaration/DeclarationPT1.cs +++ b/VectoCore/Models/Declaration/PT1.cs @@ -6,15 +6,13 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Declaration { - public class DeclarationPT1 : LookupData<PerSecond, Second> + public class PT1 : LookupData<PerSecond, Second> { private List<KeyValuePair<PerSecond, Second>> _entries; - protected const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.PT1.csv"; - - public DeclarationPT1() + protected override string ResourceId { - ParseData(ReadCsvResource(ResourceId)); + get { return "TUGraz.VectoCore.Resources.Declaration.PT1.csv"; } } protected override void ParseData(DataTable table) diff --git a/VectoCore/Models/Declaration/PneumaticSystem.cs b/VectoCore/Models/Declaration/PneumaticSystem.cs new file mode 100644 index 0000000000..0743f18ef1 --- /dev/null +++ b/VectoCore/Models/Declaration/PneumaticSystem.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Data; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class PneumaticSystem : LookupData<MissionType, string, Watt> + { + private readonly Dictionary<Tuple<MissionType, string>, Watt> _data = + new Dictionary<Tuple<MissionType, string>, Watt>(); + + public override Watt Lookup(MissionType mission, string hdvClass) + { + return _data[Tuple.Create(mission, hdvClass)]; + } + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.VAUX.PS-Table.csv"; } + } + + protected override void ParseData(DataTable table) + { + _data.Clear(); + NormalizeTable(table); + + foreach (DataRow row in table.Rows) { + var hdvClass = row.Field<string>("hdvclass/power"); + foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) { + _data[Tuple.Create(mission, hdvClass)] = row.ParseDouble(mission.ToString().ToLower()).SI<Watt>(); + } + } + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/Rims.cs b/VectoCore/Models/Declaration/Rims.cs new file mode 100644 index 0000000000..c544d5366b --- /dev/null +++ b/VectoCore/Models/Declaration/Rims.cs @@ -0,0 +1,37 @@ +using System.Data; +using System.Linq; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class Rims : LookupData<string, Rims.RimsEntry> + { + internal Rims() + { + var csvFile = ReadCsvFile(ResourceId); + ParseData(csvFile); + } + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.Rims.csv"; } + } + + protected override sealed void ParseData(DataTable table) + { + Data = (from DataRow row in table.Rows + select new RimsEntry { + RimsType = row[0].ToString(), + F_a = row.ParseDouble(1), + F_b = row.ParseDouble(2) + }).ToDictionary(e => e.RimsType); + } + + public class RimsEntry + { + public string RimsType; + public double F_a; + public double F_b; + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/DeclarationSegments.cs b/VectoCore/Models/Declaration/Segments.cs similarity index 72% rename from VectoCore/Models/Declaration/DeclarationSegments.cs rename to VectoCore/Models/Declaration/Segments.cs index 9defe2489f..566ca94541 100644 --- a/VectoCore/Models/Declaration/DeclarationSegments.cs +++ b/VectoCore/Models/Declaration/Segments.cs @@ -6,15 +6,13 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Declaration { - public class DeclarationSegments : LookupData<VehicleCategory, AxleConfiguration, Kilogram, Kilogram, Segment> + public class Segments : LookupData<VehicleCategory, AxleConfiguration, Kilogram, Kilogram, Segment> { private const string ResourceNamespace = "TUGraz.VectoCore.Resources.Declaration."; - protected const string ResourceId = ResourceNamespace + "SegmentTable.csv"; - - public DeclarationSegments() + protected override string ResourceId { - ParseData(ReadCsvResource(ResourceId)); + get { return ResourceNamespace + "SegmentTable.csv"; } } protected override void ParseData(DataTable table) @@ -32,18 +30,18 @@ namespace TUGraz.VectoCore.Models.Declaration Kilogram grossVehicleMassRating, Kilogram curbWeight) { var row = - SegmentTable.Rows.Cast<DataRow>() - .First(r => r.Field<string>("valid") == "1" && r.Field<string>("tvehcat") == vehicleCategory.ToString() - && r.Field<string>("taxleconf") == axleConfiguration.GetName() - && r.ParseDouble("gvw_min").SI<Ton>() <= grossVehicleMassRating - && r.ParseDouble("gvw_max").SI<Ton>() > grossVehicleMassRating); + SegmentTable.Rows.Cast<DataRow>().First(r => r.Field<string>("valid") == "1" + && r.Field<string>("vehiclecategory") == vehicleCategory.ToString() + && r.Field<string>("axleconf.") == axleConfiguration.GetName() + && r.ParseDouble("gvw_min").SI<Ton>() <= grossVehicleMassRating + && r.ParseDouble("gvw_max").SI<Ton>() > grossVehicleMassRating); var segment = new Segment { GrossVehicleWeightMin = row.ParseDouble("gvw_min").SI().Ton.Cast<Kilogram>(), GrossVehicleWeightMax = row.ParseDouble("gvw_max").SI().Ton.Cast<Kilogram>(), VehicleCategory = vehicleCategory, AxleConfiguration = axleConfiguration, - HDVClass = row.Field<string>("hdv_class"), - AccelerationFile = RessourceHelper.ReadStream(ResourceNamespace + "VACC." + row.Field<string>("vacc")), + VehicleClass = row.Field<string>("hdvclass"), + AccelerationFile = RessourceHelper.ReadStream(ResourceNamespace + "VACC." + row.Field<string>(".vaccfile")), Missions = CreateMissions(grossVehicleMassRating, curbWeight, row).ToArray() }; return segment; @@ -51,39 +49,44 @@ namespace TUGraz.VectoCore.Models.Declaration private static IEnumerable<Mission> CreateMissions(Kilogram grossVehicleMassRating, Kilogram curbWeight, DataRow row) { - var missionTypes = Enum.GetValues(typeof (MissionType)).Cast<MissionType>(); + var missionTypes = Enum.GetValues(typeof(MissionType)).Cast<MissionType>(); foreach (var missionType in missionTypes.Where(m => row.Field<string>(m.ToString()) == "1")) { string vcdvField; string axleField; string trailerField; if (missionType == MissionType.LongHaul) { - vcdvField = "vcdv-longhaul"; - axleField = "rigid/truckaxles-longhaul"; + vcdvField = "crosswindcorrection-longhaul"; + axleField = "truckaxles-longhaul"; trailerField = "traileraxles-longhaul"; } else { - vcdvField = "vcdv-other"; - axleField = "rigid/truckaxles-other"; + vcdvField = "crosswindcorrection-other"; + axleField = "truckaxles-other"; trailerField = "traileraxles-other"; } var mission = new Mission { MissionType = missionType, - CrossWindCorrectionFile = RessourceHelper.ReadStream(ResourceNamespace + "VCDV." + row.Field<string>(vcdvField)), + CrossWindCorrection = row.Field<string>(vcdvField), MassExtra = row.ParseDouble("massextra-" + missionType.ToString().ToLower()).SI<Kilogram>(), CycleFile = RessourceHelper.ReadStream(ResourceNamespace + "MissionCycles." + missionType + ".vdri"), AxleWeightDistribution = row.Field<string>(axleField).Split('/').ToDouble().Select(x => x / 100.0).ToArray() }; var trailerAxles = row.Field<string>(trailerField).Split('/'); - var count = int.Parse(trailerAxles[1]); - var weightPercent = trailerAxles[0].ToDouble(); + var count = 0; + var weightPercent = 0.0; + + if (trailerAxles[0] != "-") { + count = int.Parse(trailerAxles[1]); + weightPercent = trailerAxles[0].ToDouble(); + } mission.TrailerAxleWeightDistribution = Enumerable.Repeat(weightPercent / count / 100.0, count).ToArray(); mission.MinLoad = 0.SI<Kilogram>(); mission.MaxLoad = grossVehicleMassRating - mission.MassExtra - curbWeight; - var refLoadField = row.Field<string>("refload-" + missionType.ToString().ToLower()); + var refLoadField = row.Field<string>("payload-" + missionType.ToString().ToLower()); mission.RefLoad = CalculateRefLoad(grossVehicleMassRating, refLoadField, missionType); yield return mission; diff --git a/VectoCore/Models/Declaration/SteeringPump.cs b/VectoCore/Models/Declaration/SteeringPump.cs new file mode 100644 index 0000000000..50be63f3c8 --- /dev/null +++ b/VectoCore/Models/Declaration/SteeringPump.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class SteeringPump : LookupData<MissionType, string, string, Watt> + { + private readonly SteeringPumpTechnologies _technologies = new SteeringPumpTechnologies(); + + private readonly Dictionary<Tuple<MissionType, string>, Watt[]> _data = + new Dictionary<Tuple<MissionType, string>, Watt[]>(); + + public override Watt Lookup(MissionType mission, string hdvClass, string technology) + { + var shares = _data[Tuple.Create(mission, hdvClass)]; + var sum = 0.SI<Watt>(); + var factors = _technologies.Lookup(technology); + for (var i = 0; i < 4; i++) { + sum += shares[i] * factors[i]; + } + return sum; + } + + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Table.csv"; } + } + + protected override void ParseData(DataTable table) + { + _data.Clear(); + NormalizeTable(table); + + foreach (DataRow row in table.Rows) { + var hdvClass = row.Field<string>("hdvclass/powerdemandpershare"); + foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) { + var values = row.Field<string>(mission.ToString().ToLower()).Split('/').ToDouble(); + values = values.Concat(Enumerable.Repeat(0.0, 3)); + + _data[Tuple.Create(mission, hdvClass)] = values.Take(4).SI<Watt>().ToArray(); + } + } + } + + public class SteeringPumpTechnologies : LookupData<string, double[]> + { + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Tech.csv"; } + } + + protected override void ParseData(DataTable table) + { + Data.Clear(); + foreach (DataRow row in table.Rows) { + var tech = row.Field<string>("Scaling Factors"); + var factors = new[] { row.ParseDouble("U"), row.ParseDouble("F"), row.ParseDouble("B"), row.ParseDouble("S") }; + Data[tech] = factors; + } + } + + public override double[] Lookup(string tech) + { + return Data[tech]; + } + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/WHTCCorrection.cs b/VectoCore/Models/Declaration/WHTCCorrection.cs new file mode 100644 index 0000000000..ec7a5e9910 --- /dev/null +++ b/VectoCore/Models/Declaration/WHTCCorrection.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class WHTCCorrection : LookupData<MissionType, double, double, double, double> + { + private Dictionary<MissionType, WHTCCorrectionEntry> _data = new Dictionary<MissionType, WHTCCorrectionEntry>(); + + public override double Lookup(MissionType mission, double rural, double urban, double motorway) + { + var entry = _data[mission]; + return rural * entry.Rural + urban * entry.Urban + motorway * entry.Motorway; + } + + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.WHTC-Weighting-Factors.csv"; } + } + + protected override void ParseData(DataTable table) + { + _data.Clear(); + NormalizeTable(table); + foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) { + var values = table.Columns[mission.ToString().ToLower()].Values<string>().ToDouble().ToArray(); + _data[mission] = new WHTCCorrectionEntry { Rural = values[0], Urban = values[1], Motorway = values[2] }; + } + } + + private class WHTCCorrectionEntry + { + public double Rural { get; set; } + public double Urban { get; set; } + public double Motorway { get; set; } + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/Wheels.cs b/VectoCore/Models/Declaration/Wheels.cs new file mode 100644 index 0000000000..9ee12f5777 --- /dev/null +++ b/VectoCore/Models/Declaration/Wheels.cs @@ -0,0 +1,33 @@ +using System.Data; +using System.Linq; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.Declaration +{ + public class Wheels : LookupData<string, Wheels.WheelsEntry> + { + protected override string ResourceId + { + get { return "TUGraz.VectoCore.Resources.Declaration.Wheels.csv"; } + } + + protected override sealed void ParseData(DataTable table) + { + Data = (from DataRow row in table.Rows + select new WheelsEntry { + WheelType = row.Field<string>(0), + Inertia = row.ParseDouble(1).SI<KilogramSquareMeter>(), + DynamicTyreRadius = row.ParseDouble(2).SI().Milli.Meter.Cast<Meter>(), + SizeClass = row.Field<string>(3) + }).ToDictionary(e => e.WheelType); + } + + public class WheelsEntry + { + public string WheelType; + public KilogramSquareMeter Inertia; + public Meter DynamicTyreRadius; + public string SizeClass; + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs b/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs index 27c6a58672..cbe86bb426 100644 --- a/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs +++ b/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs @@ -10,6 +10,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Cockpit /// <summary> /// [rad/s] The current engine speed. /// </summary> - PerSecond EngineSpeed(); + PerSecond EngineSpeed(); } } \ No newline at end of file diff --git a/VectoCore/Models/Simulation/Data/IModalDataWriter.cs b/VectoCore/Models/Simulation/Data/IModalDataWriter.cs index fa3c9c3a9d..de07839879 100644 --- a/VectoCore/Models/Simulation/Data/IModalDataWriter.cs +++ b/VectoCore/Models/Simulation/Data/IModalDataWriter.cs @@ -1,6 +1,4 @@ -using System; using System.Collections.Generic; -using System.Data; namespace TUGraz.VectoCore.Models.Simulation.Data { @@ -22,7 +20,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Data void Finish(); - Object Compute(string expression, string filter); + object Compute(string expression, string filter); IEnumerable<T> GetValues<T>(ModalResultField key); } diff --git a/VectoCore/Models/Simulation/Data/ModalDataWriter.cs b/VectoCore/Models/Simulation/Data/ModalDataWriter.cs index 4e947fed36..7bffe3fe1f 100644 --- a/VectoCore/Models/Simulation/Data/ModalDataWriter.cs +++ b/VectoCore/Models/Simulation/Data/ModalDataWriter.cs @@ -1,6 +1,6 @@ -using System.Data; +using System.Collections.Generic; +using System.Data; using System.Linq; -using System.Collections.Generic; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Simulation.Data diff --git a/VectoCore/Models/SimulationComponent/Data/AuxiliaryCycleDataAdapter.cs b/VectoCore/Models/SimulationComponent/Data/AuxiliaryCycleDataAdapter.cs index e7d6d2be3d..3bcf89c03e 100644 --- a/VectoCore/Models/SimulationComponent/Data/AuxiliaryCycleDataAdapter.cs +++ b/VectoCore/Models/SimulationComponent/Data/AuxiliaryCycleDataAdapter.cs @@ -25,7 +25,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data _auxiliaryId = column; if (_auxiliaryId != null && !_drivingCycle.Entries.First().AuxiliarySupplyPower.ContainsKey(_auxiliaryId)) { Log.ErrorFormat("driving cycle data does not contain column {0}", column); - throw new VectoException(String.Format("driving cycle does not contain column {0}", column)); + throw new VectoException(string.Format("driving cycle does not contain column {0}", column)); } } @@ -37,7 +37,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data CurrentCycleEntry = _nextCycleEntry.Current; _nextCycleEntry.MoveNext(); } - return String.IsNullOrEmpty(_auxiliaryId) + return string.IsNullOrEmpty(_auxiliaryId) ? CurrentCycleEntry.AdditionalAuxPowerDemand : CurrentCycleEntry.AuxiliarySupplyPower[_auxiliaryId]; } diff --git a/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs b/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs index 2923e1e1a1..1bc5286a2f 100644 --- a/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs +++ b/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs @@ -9,165 +9,165 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine { - [JsonObject(MemberSerialization.Fields)] - public class FuelConsumptionMap : SimulationComponentData - { - private readonly IList<FuelConsumptionEntry> _entries = new List<FuelConsumptionEntry>(); - private readonly DelauneyMap _fuelMap = new DelauneyMap(); - private FuelConsumptionMap() {} - - public static FuelConsumptionMap ReadFromFile(string fileName) - { - var fuelConsumptionMap = new FuelConsumptionMap(); - var data = VectoCSVFile.Read(fileName); - - try { - foreach (DataRow row in data.Rows) { - try { - var entry = new FuelConsumptionEntry { - EngineSpeed = - row.ParseDouble(Fields.EngineSpeed).SI().Rounds.Per.Minute.Cast<PerSecond>(), - Torque = row.ParseDouble(Fields.Torque).SI<NewtonMeter>(), - FuelConsumption = - row.ParseDouble(Fields.FuelConsumption).SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second - }; - - // todo Contract.Assert - if (entry.FuelConsumption < 0) { - throw new ArgumentOutOfRangeException("FuelConsumption", "FuelConsumption < 0 not allowed."); - } - - fuelConsumptionMap._entries.Add(entry); - - // Delauney map works only as expected, when the engineSpeed is in rpm. - fuelConsumptionMap._fuelMap.AddPoint((double) entry.Torque, row.ParseDouble(Fields.EngineSpeed), - (double) entry.FuelConsumption); - } catch (Exception e) { - throw new VectoException(string.Format("Line {0}: {1}", data.Rows.IndexOf(row), e.Message), e); - } - } - } catch (Exception e) { - throw new VectoException(string.Format("File {0}: {1}", fileName, e.Message), e); - } - - fuelConsumptionMap._fuelMap.Triangulate(); - return fuelConsumptionMap; - } - - /// <summary> - /// [kg/s] Calculates the fuel consumption based on the given fuel map, - /// the engineSpeed [rad/s] and the torque [Nm]. - /// </summary> - /// <param name="engineSpeed">[rad/sec]</param> - /// <param name="torque">[Nm]</param> - /// <returns>[kg/s]</returns> - public SI GetFuelConsumption(NewtonMeter torque, PerSecond engineSpeed) - { - // delauney map needs is initialised with rpm, therefore the engineSpeed has to be converted. - return - _fuelMap.Interpolate(torque.Double(), engineSpeed.ConvertTo().Rounds.Per.Minute.Double()).SI().Kilo.Gramm.Per.Second; - } - - private static class Fields - { - /// <summary> - /// [rpm] - /// </summary> - public const string EngineSpeed = "engine speed"; - - /// <summary> - /// [Nm] - /// </summary> - public const string Torque = "torque"; - - /// <summary> - /// [g/h] - /// </summary> - public const string FuelConsumption = "fuel consumption"; - }; - - private class FuelConsumptionEntry - { - /// <summary> - /// engine speed [rad/s] - /// </summary> - public PerSecond EngineSpeed { get; set; } - - /// <summary> - /// Torque [Nm] - /// </summary> - public NewtonMeter Torque { get; set; } - - /// <summary> - /// Fuel consumption [kg/s] - /// </summary> - public SI FuelConsumption { get; set; } - - #region Equality members - - private bool Equals(FuelConsumptionEntry other) - { - Contract.Requires(other != null); - return EngineSpeed.Equals(other.EngineSpeed) && Torque.Equals(other.Torque) && - FuelConsumption.Equals(other.FuelConsumption); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) { - return false; - } - if (ReferenceEquals(this, obj)) { - return true; - } - if (obj.GetType() != GetType()) { - return false; - } - return Equals((FuelConsumptionEntry) obj); - } - - public override int GetHashCode() - { - unchecked { - var hashCode = EngineSpeed.GetHashCode(); - hashCode = (hashCode * 397) ^ Torque.GetHashCode(); - hashCode = (hashCode * 397) ^ FuelConsumption.GetHashCode(); - return hashCode; - } - } - - #endregion - } - - #region Equality members - - protected bool Equals(FuelConsumptionMap other) - { - return _entries.SequenceEqual(other._entries) && Equals(_fuelMap, other._fuelMap); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) { - return false; - } - if (ReferenceEquals(this, obj)) { - return true; - } - if (obj.GetType() != GetType()) { - return false; - } - return Equals((FuelConsumptionMap) obj); - } - - public override int GetHashCode() - { - unchecked { - return ((_entries != null ? _entries.GetHashCode() : 0) * 397) ^ - (_fuelMap != null ? _fuelMap.GetHashCode() : 0); - } - } - - #endregion - } + [JsonObject(MemberSerialization.Fields)] + public class FuelConsumptionMap : SimulationComponentData + { + private readonly IList<FuelConsumptionEntry> _entries = new List<FuelConsumptionEntry>(); + private readonly DelauneyMap _fuelMap = new DelauneyMap(); + private FuelConsumptionMap() {} + + public static FuelConsumptionMap ReadFromFile(string fileName) + { + var fuelConsumptionMap = new FuelConsumptionMap(); + var data = VectoCSVFile.Read(fileName); + + try { + foreach (DataRow row in data.Rows) { + try { + var entry = new FuelConsumptionEntry { + EngineSpeed = + row.ParseDouble(Fields.EngineSpeed).SI().Rounds.Per.Minute.Cast<PerSecond>(), + Torque = row.ParseDouble(Fields.Torque).SI<NewtonMeter>(), + FuelConsumption = + row.ParseDouble(Fields.FuelConsumption).SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second + }; + + // todo Contract.Assert + if (entry.FuelConsumption < 0) { + throw new ArgumentOutOfRangeException("FuelConsumption", "FuelConsumption < 0 not allowed."); + } + + fuelConsumptionMap._entries.Add(entry); + + // Delauney map works only as expected, when the engineSpeed is in rpm. + fuelConsumptionMap._fuelMap.AddPoint((double)entry.Torque, row.ParseDouble(Fields.EngineSpeed), + (double)entry.FuelConsumption); + } catch (Exception e) { + throw new VectoException(string.Format("Line {0}: {1}", data.Rows.IndexOf(row), e.Message), e); + } + } + } catch (Exception e) { + throw new VectoException(string.Format("File {0}: {1}", fileName, e.Message), e); + } + + fuelConsumptionMap._fuelMap.Triangulate(); + return fuelConsumptionMap; + } + + /// <summary> + /// [kg/s] Calculates the fuel consumption based on the given fuel map, + /// the engineSpeed [rad/s] and the torque [Nm]. + /// </summary> + /// <param name="engineSpeed">[rad/sec]</param> + /// <param name="torque">[Nm]</param> + /// <returns>[kg/s]</returns> + public SI GetFuelConsumption(NewtonMeter torque, PerSecond engineSpeed) + { + // delauney map needs is initialised with rpm, therefore the engineSpeed has to be converted. + return + _fuelMap.Interpolate(torque.Double(), engineSpeed.ConvertTo().Rounds.Per.Minute.Double()).SI().Kilo.Gramm.Per.Second; + } + + private static class Fields + { + /// <summary> + /// [rpm] + /// </summary> + public const string EngineSpeed = "engine speed"; + + /// <summary> + /// [Nm] + /// </summary> + public const string Torque = "torque"; + + /// <summary> + /// [g/h] + /// </summary> + public const string FuelConsumption = "fuel consumption"; + }; + + private class FuelConsumptionEntry + { + /// <summary> + /// engine speed [rad/s] + /// </summary> + public PerSecond EngineSpeed { get; set; } + + /// <summary> + /// Torque [Nm] + /// </summary> + public NewtonMeter Torque { get; set; } + + /// <summary> + /// Fuel consumption [kg/s] + /// </summary> + public SI FuelConsumption { get; set; } + + #region Equality members + + private bool Equals(FuelConsumptionEntry other) + { + Contract.Requires(other != null); + return EngineSpeed.Equals(other.EngineSpeed) && Torque.Equals(other.Torque) && + FuelConsumption.Equals(other.FuelConsumption); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) { + return false; + } + if (ReferenceEquals(this, obj)) { + return true; + } + if (obj.GetType() != GetType()) { + return false; + } + return Equals((FuelConsumptionEntry)obj); + } + + public override int GetHashCode() + { + unchecked { + var hashCode = EngineSpeed.GetHashCode(); + hashCode = (hashCode * 397) ^ Torque.GetHashCode(); + hashCode = (hashCode * 397) ^ FuelConsumption.GetHashCode(); + return hashCode; + } + } + + #endregion + } + + #region Equality members + + protected bool Equals(FuelConsumptionMap other) + { + return _entries.SequenceEqual(other._entries) && Equals(_fuelMap, other._fuelMap); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) { + return false; + } + if (ReferenceEquals(this, obj)) { + return true; + } + if (obj.GetType() != GetType()) { + return false; + } + return Equals((FuelConsumptionMap)obj); + } + + public override int GetHashCode() + { + unchecked { + return ((_entries != null ? _entries.GetHashCode() : 0) * 397) ^ + (_fuelMap != null ? _fuelMap.GetHashCode() : 0); + } + } + + #endregion + } } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs b/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs index 87ef6a9b30..8ed6c34922 100644 --- a/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs +++ b/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs @@ -12,7 +12,7 @@ public double AverageEfficiency { get; set; } - public GearData(TransmissionLossMap lossMap, Gearbox.ShiftPolygon shiftPolygon, double ratio, + public GearData(TransmissionLossMap lossMap, ShiftPolygon shiftPolygon, double ratio, bool torqueconverterActive) { LossMap = lossMap; diff --git a/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs b/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs index 8a5b759a3d..a3665d8444 100644 --- a/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs +++ b/VectoCore/Models/SimulationComponent/Data/Gearbox/TransmissionLossMap.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using System.Runtime.InteropServices; -using System.Runtime.Remoting.Messaging; using Common.Logging; using Newtonsoft.Json; using TUGraz.VectoCore.Exceptions; @@ -63,7 +61,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox TorqueLoss = row.ParseDouble(Fields.TorqeLoss).SI<NewtonMeter>(), Efficiency = (!hasEfficiency || row[Fields.Efficiency] == DBNull.Value || row[Fields.Efficiency] != null) - ? Double.NaN + ? double.NaN : row.ParseDouble(Fields.Efficiency) }).ToList(); } @@ -109,7 +107,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox 0.SI<NewtonMeter>()); } catch (Exception e) { throw new VectoSimulationException( - String.Format("Failed to interpolate in TransmissionLossMap. angularVelocity: {0}, torque: {1}", angularVelocity, + string.Format("Failed to interpolate in TransmissionLossMap. angularVelocity: {0}, torque: {1}", angularVelocity, gbxOutTorque), e); } } @@ -117,8 +115,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox /// <summary> /// Compute the available torque at the output of the gear(box) (towards wheels) /// </summary> - /// <param name="angularVelocity">[1/s] angular speed of the shaft</param> - /// <param name="gbxInTorque">[Nm] torque provided by the engine at the gearbox' input shaft</param> /// <returns>[Nm] torque provided to the next component (towards the wheels)</returns> //public NewtonMeter GearboxOutTorque(PerSecond angularVelocity, NewtonMeter gbxInTorque) //{ diff --git a/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs b/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs index d3feadd3cd..e610c1ca8a 100644 --- a/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs +++ b/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs @@ -3,7 +3,6 @@ using System.Data; using System.Linq; using Common.Logging; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Data diff --git a/VectoCore/Models/SimulationComponent/IClutch.cs b/VectoCore/Models/SimulationComponent/IClutch.cs index 953f3f613f..1ffff0489c 100644 --- a/VectoCore/Models/SimulationComponent/IClutch.cs +++ b/VectoCore/Models/SimulationComponent/IClutch.cs @@ -1,6 +1,4 @@ -using TUGraz.VectoCore.Models.Connector.Ports; - -namespace TUGraz.VectoCore.Models.SimulationComponent +namespace TUGraz.VectoCore.Models.SimulationComponent { public interface IClutch : IPowerTrainComponent {} } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/ICombustionEngine.cs b/VectoCore/Models/SimulationComponent/ICombustionEngine.cs index 92b3a6fdff..afb7be9d04 100644 --- a/VectoCore/Models/SimulationComponent/ICombustionEngine.cs +++ b/VectoCore/Models/SimulationComponent/ICombustionEngine.cs @@ -3,8 +3,8 @@ using TUGraz.VectoCore.Models.Simulation.Cockpit; namespace TUGraz.VectoCore.Models.SimulationComponent { - /// <summary> - /// Defines Interfaces for a combustion engine. - /// </summary> - public interface ICombustionEngine : IOutShaft, IEngineCockpit {} + /// <summary> + /// Defines Interfaces for a combustion engine. + /// </summary> + public interface ICombustionEngine : IOutShaft, IEngineCockpit {} } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/IDriverDemandDrivingCycle.cs b/VectoCore/Models/SimulationComponent/IDriverDemandDrivingCycle.cs index adc97eabc4..6d8656334e 100644 --- a/VectoCore/Models/SimulationComponent/IDriverDemandDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/IDriverDemandDrivingCycle.cs @@ -2,8 +2,8 @@ using TUGraz.VectoCore.Models.Connector.Ports; namespace TUGraz.VectoCore.Models.SimulationComponent { - /// <summary> - /// Defines interfaces for a driver demand driving cycle. - /// </summary> - public interface IDrivingCycleDemandDrivingCycle : IDrivingCycleOutProvider, IDrivingCycleDemandInProvider {} + /// <summary> + /// Defines interfaces for a driver demand driving cycle. + /// </summary> + public interface IDrivingCycleDemandDrivingCycle : IDrivingCycleOutProvider, IDrivingCycleDemandInProvider {} } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/IEngineOnlyDrivingCycle.cs b/VectoCore/Models/SimulationComponent/IEngineOnlyDrivingCycle.cs index 9d496e763d..ac196bd5fa 100644 --- a/VectoCore/Models/SimulationComponent/IEngineOnlyDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/IEngineOnlyDrivingCycle.cs @@ -2,8 +2,8 @@ using TUGraz.VectoCore.Models.Connector.Ports; namespace TUGraz.VectoCore.Models.SimulationComponent { - /// <summary> - /// Defines interfaces for a engine only driving cycle. - /// </summary> - public interface IEngineOnlyDrivingCycle : IDrivingCycleOutProvider, IInShaft {} + /// <summary> + /// Defines interfaces for a engine only driving cycle. + /// </summary> + public interface IEngineOnlyDrivingCycle : IDrivingCycleOutProvider, IInShaft {} } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/IWheels.cs b/VectoCore/Models/SimulationComponent/IWheels.cs index d5727dd0f1..354f551e2e 100644 --- a/VectoCore/Models/SimulationComponent/IWheels.cs +++ b/VectoCore/Models/SimulationComponent/IWheels.cs @@ -2,8 +2,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent { - /// <summary> - /// Defines interfaces for a wheels component. - /// </summary> - public interface IWheels : IRoadPortOutProvider, IInShaft {} + /// <summary> + /// Defines interfaces for a wheels component. + /// </summary> + public interface IWheels : IRoadPortOutProvider, IInShaft {} } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs b/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs index 368ecfb617..eb7a7deddf 100644 --- a/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs +++ b/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs @@ -1,11 +1,10 @@ using System; -using TUGraz.VectoCore.Utils; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Connector.Ports; +using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; - +using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { @@ -55,7 +54,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (_outPort == null) { Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime); throw new VectoSimulationException( - String.Format("{0} cannot handle incoming request - no outport available", + string.Format("{0} cannot handle incoming request - no outport available", absTime.TotalSeconds)); } diff --git a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs index 50b9421f52..d6b997ae04 100644 --- a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs +++ b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs @@ -8,67 +8,66 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - public class EngineOnlyGearbox : VectoSimulationComponent, IGearbox, ITnInPort, ITnOutPort - { - private ITnOutPort _outPort; - public EngineOnlyGearbox(IVehicleContainer cockpit) : base(cockpit) {} + public class EngineOnlyGearbox : VectoSimulationComponent, IGearbox, ITnInPort, ITnOutPort + { + private ITnOutPort _outPort; + public EngineOnlyGearbox(IVehicleContainer cockpit) : base(cockpit) {} - #region IInShaft + #region IInShaft - public ITnInPort InShaft() - { - return this; - } + public ITnInPort InShaft() + { + return this; + } - #endregion IOutShaft + #endregion IOutShaft - #region IOutShaft + #region IOutShaft - public ITnOutPort OutShaft() - { - return this; - } + public ITnOutPort OutShaft() + { + return this; + } - #endregion + #endregion - #region IGearboxCockpit + #region IGearboxCockpit - uint IGearboxCockpit.Gear() - { - return 0; - } + uint IGearboxCockpit.Gear() + { + return 0; + } - #endregion + #endregion - #region ITnInPort + #region ITnInPort - void ITnInPort.Connect(ITnOutPort other) - { - _outPort = other; - } + void ITnInPort.Connect(ITnOutPort other) + { + _outPort = other; + } - #endregion + #endregion + #region ITnOutPort - #region ITnOutPort + IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed) + { + if (_outPort == null) { + Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime); + throw new VectoSimulationException( + string.Format("{0} cannot handle incoming request - no outport available", + absTime.TotalSeconds)); + } + return _outPort.Request(absTime, dt, torque, engineSpeed); + } - IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed) - { - if (_outPort == null) { - Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime); - throw new VectoSimulationException( - String.Format("{0} cannot handle incoming request - no outport available", - absTime.TotalSeconds)); - } - return _outPort.Request(absTime, dt, torque, engineSpeed); - } + #endregion - #endregion + #region VectoSimulationComponent - #region VectoSimulationComponent + public override void CommitSimulationStep(IModalDataWriter writer) {} - public override void CommitSimulationStep(IModalDataWriter writer) {} - - #endregion - } + #endregion + } } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs b/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs index 1182205cb2..3642568920 100644 --- a/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs +++ b/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs @@ -73,7 +73,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (_outPort == null) { Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime); throw new VectoSimulationException( - String.Format("{0} cannot handle incoming request - no outport available", + string.Format("{0} cannot handle incoming request - no outport available", absTime.TotalSeconds)); } diff --git a/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs index 4237148953..52838a1cf5 100644 --- a/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs @@ -46,7 +46,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl IResponse IDrivingCycleOutPort.Request(TimeSpan absTime, TimeSpan dt) { //todo: change to variable time steps - var index = (int) Math.Floor(absTime.TotalSeconds); + var index = (int)Math.Floor(absTime.TotalSeconds); if (index >= Data.Entries.Count) { return new ResponseCycleFinished(); } diff --git a/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs b/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs index 65acf8428d..85ae6769dd 100644 --- a/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs +++ b/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs @@ -6,32 +6,32 @@ using TUGraz.VectoCore.Models.Simulation.Data; namespace TUGraz.VectoCore.Models.SimulationComponent { - /// <summary> - /// Base class for all vecto simulation components. - /// </summary> - public abstract class VectoSimulationComponent - { - [NonSerialized] protected ICockpit Cockpit; - [NonSerialized] protected ILog Log; + /// <summary> + /// Base class for all vecto simulation components. + /// </summary> + public abstract class VectoSimulationComponent + { + [NonSerialized] protected ICockpit Cockpit; + [NonSerialized] protected ILog Log; - /// <summary> - /// Constructor. Registers the component in the cockpit. - /// </summary> - /// <param name="cockpit">The vehicle container</param> - protected VectoSimulationComponent(IVehicleContainer cockpit) - { - Cockpit = cockpit; - Log = LogManager.GetLogger(GetType()); + /// <summary> + /// Constructor. Registers the component in the cockpit. + /// </summary> + /// <param name="cockpit">The vehicle container</param> + protected VectoSimulationComponent(IVehicleContainer cockpit) + { + Cockpit = cockpit; + Log = LogManager.GetLogger(GetType()); - cockpit.AddComponent(this); - } + cockpit.AddComponent(this); + } - /// <summary> - /// Commits the simulation step. - /// Writes the moddata into the data writer. - /// Commits the internal state of the object if needed. - /// </summary> - /// <param name="writer">a data writer to write the data into.</param> - public abstract void CommitSimulationStep(IModalDataWriter writer); - } + /// <summary> + /// Commits the simulation step. + /// Writes the moddata into the data writer. + /// Commits the internal state of the object if needed. + /// </summary> + /// <param name="writer">a data writer to write the data into.</param> + public abstract void CommitSimulationStep(IModalDataWriter writer); + } } \ No newline at end of file diff --git a/VectoCore/Resources/Declaration/DefaultTC.vtcc b/VectoCore/Resources/Declaration/DefaultTC.vtcc new file mode 100644 index 0000000000..3676a37ec2 --- /dev/null +++ b/VectoCore/Resources/Declaration/DefaultTC.vtcc @@ -0,0 +1,12 @@ +nue,mue,MP1000 (1000/rpm)^2*Nm +1.000,1.000,0.00 +1.005,1.000,0.00 +1.100,1.000,-40.34 +1.222,1.000,-80.34 +1.375,1.000,-136.11 +1.571,1.000,-216.52 +1.833,1.000,-335.19 +2.200,1.000,-528.77 +2.750,1.000,-883.40 +4.400,1.000,-2462.17 +11.000,1.000,-16540.98 diff --git a/VectoCore/Resources/Declaration/Rims.csv b/VectoCore/Resources/Declaration/Rims.csv index 5e73ce61cd..520fecd325 100644 --- a/VectoCore/Resources/Declaration/Rims.csv +++ b/VectoCore/Resources/Declaration/Rims.csv @@ -1,4 +1,4 @@ -rims,F_a,F_b +rims,F(a),F(b) 5° DC Rims,3.03,3.03 15° DC Rims,3.03,3.05 Multipurpose – Radial,3,3 diff --git a/VectoCore/Resources/Declaration/SegmentTable.csv b/VectoCore/Resources/Declaration/SegmentTable.csv index ed3ff4b8c2..4321d9be28 100644 --- a/VectoCore/Resources/Declaration/SegmentTable.csv +++ b/VectoCore/Resources/Declaration/SegmentTable.csv @@ -1,26 +1,26 @@ -Valid,tVehCat,tAxleConf,GVW_Min,GVW_Max,HDV_Class,VACC,VCDV - Long Haul,VCDV - Other,Rigid/Truck Axles - Long haul,Rigid/Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,LongHaul,RegionalDelivery,UrbanDelivery,MunicipalUtility,Construction,HeavyUrban,Urban,Suburban,Interurban,Coach,MassExtra - LongHaul,MassExtra - RegionalDelivery,MassExtra - UrbanDelivery,MassExtra - MunicipalUtility,MassExtra - Construction,MassExtra - HeavyUrban,MassExtra - Urban,MassExtra - Suburban,MassExtra - Interurban,MassExtra - Coach,RefLoad - LongHaul,RefLoad - RegionalDelivery,RefLoad - UrbanDelivery,RefLoad - MunicipalUtility,RefLoad - Construction,RefLoad - HeavyUrban,RefLoad - Urban,RefLoad - Suburban,RefLoad - Interurban,RefLoad - Coach,WHTCWF - LongHaul,WHTCWF - RegionalDelivery,WHTCWF - UrbanDelivery,WHTCWF - MunicipalUtility,WHTCWF - Construction,WHTCWF - HeavyUrban,WHTCWF - Urban,WHTCWF - Suburban,WHTCWF - Interurban,WHTCWF - Coach -0,RigidTruck,4x2,0,7.5,0,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,7.5,10,1,Truck.vacc,-,RigidSolo.vcdv,-,45/55,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,1600,1600,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,10,12,2,Truck.vacc,RigidSolo.vcdv,RigidSolo.vcdv,40/60,45/55,0/0,0/0,1,1,1,0,0,0,0,0,0,0,1900,1900,1900,-,-,-,-,-,-,-,f,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,12,16,3,Truck.vacc,-,RigidSolo.vcdv,-,40/60,0/0,0/0,0,1,1,0,0,0,0,0,0,0,-,2000,2000,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,4x2,16,99,4,Truck.vacc,RigidTrailer.vcdv,RigidSolo.vcdv,20/30,45/55,50/2,0/0,1,1,0,1,0,0,0,0,0,0,7500,2100,-,2100,-,-,-,-,-,-,14000,4400,-,4400,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,Tractor,4x2,16,99,5,Truck.vacc,TractorSemitrailer.vcdv,TractorSemitrailer.vcdv,20/25,25/25,55/3,50/3,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,4x4,7.5,16,6,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,1,1,0,0,0,0,0,-,-,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,4x4,16,99,7,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B5,-,-,-,-,-,-,-,-,-,4300,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,4x4,16,99,8,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,RigidTruck,6x2,0,99,9,Truck.vacc,RigidTrailer.vcdv,RigidSolo.vcdv,20/30/15,35/40/25,35/2,0/0,1,1,0,1,0,0,0,0,0,0,7600,2200,-,2200,-,-,-,-,-,-,17900,7100,-,7100,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -1,Tractor,6x2,0,99,10,Truck.vacc,TractorSemitrailer.vcdv,TractorSemitrailer.vcdv,15/10/20,20/10/20,55/2,50/2,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19000,12700,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,6x4,0,99,11,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B7,-,-,-,-,-,-,-,-,-,7600,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,6x4,0,99,12,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,ST2,-,-,-,-,-,-,-,-,-,12100,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,6x6,0,99,13,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,0,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Tractor,6x6,0,99,14,Truck.vacc,-,TractorSemitrailer.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,0,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x2,0,99,15,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,1,0,0,0,0,0,0,0,0,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x4,0,99,16,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,B9,-,-,-,-,-,-,-,-,-,11600,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x6,0,99,17,Truck.vacc,-,RigidSolo.vcdv,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,RigidTruck,8x8,0,99,17,Truck.vacc,-,-,???,???,0/0,0/0,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,CityBus,4x2,0,18,B1,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,InterurbanBus,4x2,0,18,B2,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Coach,4x2,0,18,B3,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,CityBus,6x2,18,99,B4,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,InterurbanBus,6x2,18,99,B5,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 -0,Coach,6x2,18,99,B6,N/A,-,CoachBus.vcdv,???,???,0/0,0/0,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,11/0/89,17/30/53,69/27/4,98/0/2,62/32/6,100/0/0,100/0/0,100/0/0,45/36/19,0/22/78 +Valid,Vehicle Category ,Axle Conf.,GVW_Min,GVW_Max,HDV class,.vacc file ,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach,Mass Extra - Long haul,Mass Extra - Regional delivery,Mass Extra - Urban delivery,Mass Extra - Municipal utility,Mass Extra - Construction,Mass Extra - Heavy Urban,Mass Extra - Urban,Mass Extra - Suburban,Mass Extra - Interurban,Mass Extra - Coach,Payload - Long haul,Payload - Regional delivery,Payload - Urban delivery,Payload - Municipal utility,Payload - Construction,Payload - Heavy Urban,Payload - Urban,Payload - Suburban,Payload - Interurban,Payload - Coach +0,RigidTruck,4x2,0,7.5,0,Truck.vacc,-,RigidSolo,-,-,-,-,0,1,1,0,0,0,0,0,0,0,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,-,-,- +1,RigidTruck,4x2,7.5,10,1,Truck.vacc,-,RigidSolo,-,45/55,-,-,0,1,1,0,0,0,0,0,0,0,-,1600,1600,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,10,12,2,Truck.vacc,RigidSolo,RigidSolo,40/60,45/55,-,-,1,1,1,0,0,0,0,0,0,0,1900,1900,1900,-,-,-,-,-,-,-,f,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,12,16,3,Truck.vacc,-,RigidSolo,-,40/60,-,-,0,1,1,0,0,0,0,0,0,0,-,2000,2000,-,-,-,-,-,-,-,-,f,f,-,-,-,-,-,-,- +1,RigidTruck,4x2,16,99,4,Truck.vacc,RigidTrailer,RigidSolo,20/30,45/55,50/2,-,1,1,0,1,0,0,0,0,0,0,7500,2100,-,2100,-,-,-,-,-,-,14000,4400,-,4400,-,-,-,-,-,- +1,Tractor,4x2,16,99,5,Truck.vacc,TractorSemitrailer,TractorSemitrailer,20/25,25/25,55/3,50/3,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,- +0,RigidTruck,4x4,7.5,16,6,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,1,1,0,0,0,0,0,-,-,-,???,???,-,-,-,-,-,-,-,-,???,???,-,-,-,-,- +0,RigidTruck,4x4,16,99,7,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,Tractor,4x4,16,99,8,Truck.vacc,-,TractorSemitrailer,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +1,RigidTruck,6x2,0,99,9,Truck.vacc,RigidTrailer,RigidSolo,20/30/15,35/40/25,35/2,-,1,1,0,1,0,0,0,0,0,0,7600,2200,-,2200,-,-,-,-,-,-,19300,7100,-,7100,-,-,-,-,-,- +1,Tractor,6x2,0,99,10,Truck.vacc,TractorSemitrailer,TractorSemitrailer,15/10/20,20/10/20,55/2,50/2,1,1,0,0,0,0,0,0,0,0,7500,7500,-,-,-,-,-,-,-,-,19300,12900,-,-,-,-,-,-,-,- +0,RigidTruck,6x4,0,99,11,Truck.vacc,-,RigidSolo,-,35/35/30,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,7100,-,-,-,-,- +0,Tractor,6x4,0,99,12,Truck.vacc,-,TractorSemitrailer,-,20/15/15,-,50/2,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,12900,-,-,-,-,- +0,RigidTruck,6x6,0,99,13,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,Tractor,6x6,0,99,14,Truck.vacc,-,TractorSemitrailer,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,RigidTruck,8x2,0,99,15,Truck.vacc,-,RigidSolo,-,-,-,-,0,1,0,0,0,0,0,0,0,0,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,- +0,RigidTruck,8x4,0,99,16,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,12900,-,-,-,-,- +0,RigidTruck,8x6,0,99,17,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,RigidTruck,8x8,0,99,17,Truck.vacc,-,RigidSolo,-,-,-,-,0,0,0,0,1,0,0,0,0,0,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,-,-,-,-,- +0,CityBus,4x2,0,18,B1,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,- +0,InterurbanBus,4x2,0,18,B2,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,- +0,Coach,4x2,0,18,B3,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,??? +0,CityBus,6x2,18,99,B4,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,1,1,1,0,0,-,-,-,-,-,???,???,???,-,-,-,-,-,-,-,???,???,???,-,- +0,InterurbanBus,6x2,18,99,B5,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,1,0,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,???,- +0,Coach,6x2,18,99,B6,N/A,-,CoachBus,-,-,-,-,0,0,0,0,0,0,0,0,0,1,-,-,-,-,-,-,-,-,-,???,-,-,-,-,-,-,-,-,-,??? diff --git a/VectoCore/Resources/Declaration/VAUX/PS-Table.csv b/VectoCore/Resources/Declaration/VAUX/PS-Table.csv index 312d745fc1..cfbb35d7d3 100644 --- a/VectoCore/Resources/Declaration/VAUX/PS-Table.csv +++ b/VectoCore/Resources/Declaration/VAUX/PS-Table.csv @@ -1,13 +1,13 @@ HDV Class / Power,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach -1,0,1.3,1.24,0,0,0,0,0,0,0 -2,1.18,1.28,1.32,0,0,0,0,0,0,0 -3,0,1.36,1.38,0,0,0,0,0,0,0 -4,1.3,1.34,0,0,0,0,0,0,0,0 -5,1.34,1.82,0,0,0,0,0,0,0,0 -6,0,0,0,0,0,0,0,0,0,0 -7,0,0,0,0,0,0,0,0,0,0 -8,0,0,0,0,0,0,0,0,0,0 -9,1.34,1.54,0,0,0,0,0,0,0,0 -10,1.34,1.82,0,0,0,0,0,0,0,0 -11,0,0,0,0,0,0,0,0,0,0 -12,0,0,0,0,0,0,0,0,0,0 +1,0.0,1300.0,1240.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2,1180.0,1280.0,1320.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +3,0.0,1360.0,1380.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +4,1300.0,1340.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +5,1340.0,1820.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +6,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +7,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +8,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +9,1340.0,1540.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +10,1340.0,1820.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +12,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/VectoCore/Resources/Declaration/VCDV/parameters.csv b/VectoCore/Resources/Declaration/VCDV/parameters.csv new file mode 100644 index 0000000000..7a6e9b270e --- /dev/null +++ b/VectoCore/Resources/Declaration/VCDV/parameters.csv @@ -0,0 +1,6 @@ +Parameters,a1,a2,a3 +RigidSolo,0.013526,0.017746,-0.000666 +RigidTrailer,0.017125,0.072275,-0.004148 +TractorSemitrailer,0.034767,0.039367,-0.001897 +CoachBus,-0.000794,0.02109,-0.00109 + diff --git a/VectoCore/Resources/Declaration/WHTC-Weighting-Factors.csv b/VectoCore/Resources/Declaration/WHTC-Weighting-Factors.csv new file mode 100644 index 0000000000..81c75304ee --- /dev/null +++ b/VectoCore/Resources/Declaration/WHTC-Weighting-Factors.csv @@ -0,0 +1,4 @@ +Part,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach +Urban,0.11,0.17,0.69,0.98,0.62,1.0,1.0,1.0,0.45,0.0 +Rural,0.0,0.3,0.27,0.0,0.32,0.0,0.0,0.0,0.36,0.22 +Motorway,0.89,0.53,0.04,0.02,0.06,0.0,0.0,0.0,0.19,0.78 diff --git a/VectoCore/Resources/Declaration/WHTC.csv b/VectoCore/Resources/Declaration/WHTC.csv new file mode 100644 index 0000000000..127fab777e --- /dev/null +++ b/VectoCore/Resources/Declaration/WHTC.csv @@ -0,0 +1,1802 @@ +# Normalized WHTC +time [s],n_norm,T_norm +1,0,0 +2,0,0 +3,0,0 +4,0,0 +5,0,0 +6,0,0 +7,1.5,8.9 +8,15.8,30.9 +9,27.4,1.3 +10,32.6,0.7 +11,34.8,1.2 +12,36.2,7.4 +13,37.1,6.2 +14,37.9,10.2 +15,39.6,12.3 +16,42.3,12.5 +17,45.3,12.6 +18,48.6,6 +19,40.8,0 +20,33,16.3 +21,42.5,27.4 +22,49.3,26.7 +23,54,18 +24,57.1,12.9 +25,58.9,8.6 +26,59.3,6 +27,59,4.9 +28,57.9,-1 +29,55.7,-1 +30,52.1,-1 +31,46.4,-1 +32,38.6,-1 +33,29,-1 +34,20.8,-1 +35,16.9,-1 +36,16.9,42.5 +37,18.8,38.4 +38,20.7,32.9 +39,21,0 +40,19.1,0 +41,13.7,0 +42,2.2,0 +43,0,0 +44,0,0 +45,0,0 +46,0,0 +47,0,0 +48,0,0 +49,0,0 +50,0,13.1 +51,13.1,30.1 +52,26.3,25.5 +53,35,32.2 +54,41.7,14.3 +55,42.2,0 +56,42.8,11.6 +57,51,20.9 +58,60,9.6 +59,49.4,0 +60,38.9,16.6 +61,43.4,30.8 +62,49.4,14.2 +63,40.5,0 +64,31.5,43.5 +65,36.6,78.2 +66,40.8,67.6 +67,44.7,59.1 +68,48.3,52 +69,51.9,63.8 +70,54.7,27.9 +71,55.3,18.3 +72,55.1,16.3 +73,54.8,11.1 +74,54.7,11.5 +75,54.8,17.5 +76,55.6,18 +77,57,14.1 +78,58.1,7 +79,43.3,0 +80,28.5,25 +81,30.4,47.8 +82,32.1,39.2 +83,32.7,39.3 +84,32.4,17.3 +85,31.6,11.4 +86,31.1,10.2 +87,31.1,19.5 +88,31.4,22.5 +89,31.6,22.9 +90,31.6,24.3 +91,31.9,26.9 +92,32.4,30.6 +93,32.8,32.7 +94,33.7,32.5 +95,34.4,29.5 +96,34.3,26.5 +97,34.4,24.7 +98,35,24.9 +99,35.6,25.2 +100,36.1,24.8 +101,36.3,24 +102,36.2,23.6 +103,36.2,23.5 +104,36.8,22.7 +105,37.2,20.9 +106,37,19.2 +107,36.3,18.4 +108,35.4,17.6 +109,35.2,14.9 +110,35.4,9.9 +111,35.5,4.3 +112,35.2,6.6 +113,34.9,10 +114,34.7,25.1 +115,34.4,29.3 +116,34.5,20.7 +117,35.2,16.6 +118,35.8,16.2 +119,35.6,20.3 +120,35.3,22.5 +121,35.3,23.4 +122,34.7,11.9 +123,45.5,0 +124,56.3,-1 +125,46.2,-1 +126,50.1,0 +127,54,-1 +128,40.5,-1 +129,27,-1 +130,13.5,-1 +131,0,0 +132,0,0 +133,0,0 +134,0,0 +135,0,0 +136,0,0 +137,0,0 +138,0,0 +139,0,0 +140,0,0 +141,0,0 +142,0,4.9 +143,0,7.3 +144,4.4,28.7 +145,11.1,26.4 +146,15,9.4 +147,15.9,0 +148,15.3,0 +149,14.2,0 +150,13.2,0 +151,11.6,0 +152,8.4,0 +153,5.4,0 +154,4.3,5.6 +155,5.8,24.4 +156,9.7,20.7 +157,13.6,21.1 +158,15.6,21.5 +159,16.5,21.9 +160,18,22.3 +161,21.1,46.9 +162,25.2,33.6 +163,28.1,16.6 +164,28.8,7 +165,27.5,5 +166,23.1,3 +167,16.9,1.9 +168,12.2,2.6 +169,9.9,3.2 +170,9.1,4 +171,8.8,3.8 +172,8.5,12.2 +173,8.2,29.4 +174,9.6,20.1 +175,14.7,16.3 +176,24.5,8.7 +177,39.4,3.3 +178,39,2.9 +179,38.5,5.9 +180,42.4,8 +181,38.2,6 +182,41.4,3.8 +183,44.6,5.4 +184,38.8,8.2 +185,37.5,8.9 +186,35.4,7.3 +187,28.4,7 +188,14.8,7 +189,0,5.9 +190,0,0 +191,0,0 +192,0,0 +193,0,0 +194,0,0 +195,0,0 +196,0,0 +197,0,0 +198,0,0 +199,0,0 +200,0,0 +201,0,0 +202,0,0 +203,0,0 +204,0,0 +205,0,0 +206,0,0 +207,0,0 +208,0,0 +209,0,0 +210,0,0 +211,0,0 +212,0,0 +213,0,0 +214,0,0 +215,0,0 +216,0,0 +217,0,0 +218,0,0 +219,0,0 +220,0,0 +221,0,0 +222,0,0 +223,0,0 +224,0,0 +225,0,0 +226,0,0 +227,0,0 +228,0,0 +229,0,0 +230,0,0 +231,0,0 +232,0,0 +233,0,0 +234,0,0 +235,0,0 +236,0,0 +237,0,0 +238,0,0 +239,0,0 +240,0,0 +241,0,0 +242,0,0 +243,0,0 +244,0,0 +245,0,0 +246,0,0 +247,0,0 +248,0,0 +249,0,0 +250,0,0 +251,0,0 +252,0,0 +253,0,31.6 +254,9.4,13.6 +255,22.2,16.9 +256,33,53.5 +257,43.7,22.1 +258,39.8,0 +259,36,45.7 +260,47.6,75.9 +261,61.2,70.4 +262,72.3,70.4 +263,76,-1 +264,74.3,-1 +265,68.5,-1 +266,61,-1 +267,56,-1 +268,54,-1 +269,53,-1 +270,50.8,-1 +271,46.8,-1 +272,41.7,-1 +273,35.9,-1 +274,29.2,-1 +275,20.7,-1 +276,10.1,-1 +277,0,-1 +278,0,0 +279,0,0 +280,0,0 +281,0,0 +282,0,0 +283,0,0 +284,0,0 +285,0,0 +286,0,0 +287,0,0 +288,0,0 +289,0,0 +290,0,0 +291,0,0 +292,0,0 +293,0,0 +294,0,0 +295,0,0 +296,0,0 +297,0,0 +298,0,0 +299,0,0 +300,0,0 +301,0,0 +302,0,0 +303,0,0 +304,0,0 +305,0,0 +306,0,0 +307,0,0 +308,0,0 +309,0,0 +310,0,0 +311,0,0 +312,0,0 +313,0,0 +314,0,0 +315,0,0 +316,0,0 +317,0,0 +318,0,0 +319,0,0 +320,0,0 +321,0,0 +322,0,0 +323,0,0 +324,4.5,41 +325,17.2,38.9 +326,30.1,36.8 +327,41,34.7 +328,50,32.6 +329,51.4,0.1 +330,47.8,-1 +331,40.2,-1 +332,32,-1 +333,24.4,-1 +334,16.8,-1 +335,8.1,-1 +336,0,-1 +337,0,0 +338,0,0 +339,0,0 +340,0,0 +341,0,0 +342,0,0 +343,0,0 +344,0,0 +345,0,0 +346,0,0 +347,0,0 +348,0,0 +349,0,0 +350,0,0 +351,0,0 +352,0,0 +353,0,0 +354,0,0.5 +355,0,4.9 +356,9.2,61.3 +357,22.4,40.4 +358,36.5,50.1 +359,47.7,21 +360,38.8,0 +361,30,37 +362,37,63.6 +363,45.5,90.8 +364,54.5,40.9 +365,45.9,0 +366,37.2,47.5 +367,44.5,84.4 +368,51.7,32.4 +369,58.1,15.2 +370,45.9,0 +371,33.6,35.8 +372,36.9,67 +373,40.2,84.7 +374,43.4,84.3 +375,45.7,84.3 +376,46.5,-1 +377,46.1,-1 +378,43.9,-1 +379,39.3,-1 +380,47,-1 +381,54.6,-1 +382,62,-1 +383,52,-1 +384,43,-1 +385,33.9,-1 +386,28.4,-1 +387,25.5,-1 +388,24.6,11 +389,25.2,14.7 +390,28.6,28.4 +391,35.5,65 +392,43.8,75.3 +393,51.2,34.2 +394,40.7,0 +395,30.3,45.4 +396,34.2,83.1 +397,37.6,85.3 +398,40.8,87.5 +399,44.8,89.7 +400,50.6,91.9 +401,57.6,94.1 +402,64.6,44.6 +403,51.6,0 +404,38.7,37.4 +405,42.4,70.3 +406,46.5,89.1 +407,50.6,93.9 +408,53.8,33 +409,55.5,20.3 +410,55.8,5.2 +411,55.4,-1 +412,54.4,-1 +413,53.1,-1 +414,51.8,-1 +415,50.3,-1 +416,48.4,-1 +417,45.9,-1 +418,43.1,-1 +419,40.1,-1 +420,37.4,-1 +421,35.1,-1 +422,32.8,-1 +423,45.3,0 +424,57.8,-1 +425,50.6,-1 +426,41.6,-1 +427,47.9,0 +428,54.2,-1 +429,48.1,-1 +430,47,31.3 +431,49,38.3 +432,52,40.1 +433,53.3,14.5 +434,52.6,0.8 +435,49.8,-1 +436,51,18.6 +437,56.9,38.9 +438,67.2,45 +439,78.6,21.5 +440,65.5,0 +441,52.4,31.3 +442,56.4,60.1 +443,59.7,29.2 +444,45.1,0 +445,30.6,4.2 +446,30.9,8.4 +447,30.5,4.3 +448,44.6,0 +449,58.8,-1 +450,55.1,-1 +451,50.6,-1 +452,45.3,-1 +453,39.3,-1 +454,49.1,0 +455,58.8,-1 +456,50.7,-1 +457,42.4,-1 +458,44.1,0 +459,45.7,-1 +460,32.5,-1 +461,20.7,-1 +462,10,-1 +463,0,0 +464,0,1.5 +465,0.9,41.1 +466,7,46.3 +467,12.8,48.5 +468,17,50.7 +469,20.9,52.9 +470,26.7,55 +471,35.5,57.2 +472,46.9,23.8 +473,44.5,0 +474,42.1,45.7 +475,55.6,77.4 +476,68.8,100 +477,81.7,47.9 +478,71.2,0 +479,60.7,38.3 +480,68.8,72.7 +481,75,-1 +482,61.3,-1 +483,53.5,-1 +484,45.9,58 +485,48.1,80 +486,49.4,97.9 +487,49.7,-1 +488,48.7,-1 +489,45.5,-1 +490,40.4,-1 +491,49.7,0 +492,59,-1 +493,48.9,-1 +494,40,-1 +495,33.5,-1 +496,30,-1 +497,29.1,12 +498,29.3,40.4 +499,30.4,29.3 +500,32.2,15.4 +501,33.9,15.8 +502,35.3,14.9 +503,36.4,15.1 +504,38,15.3 +505,40.3,50.9 +506,43,39.7 +507,45.5,20.6 +508,47.3,20.6 +509,48.8,22.1 +510,50.1,22.1 +511,51.4,42.4 +512,52.5,31.9 +513,53.7,21.6 +514,55.1,11.6 +515,56.8,5.7 +516,42.4,0 +517,27.9,8.2 +518,29,15.9 +519,30.4,25.1 +520,32.6,60.5 +521,35.4,72.7 +522,38.4,88.2 +523,41,65.1 +524,42.9,25.6 +525,44.2,15.8 +526,44.9,2.9 +527,45.1,-1 +528,44.8,-1 +529,43.9,-1 +530,42.4,-1 +531,40.2,-1 +532,37.1,-1 +533,47,0 +534,57,-1 +535,45.1,-1 +536,32.6,-1 +537,46.8,0 +538,61.5,-1 +539,56.7,-1 +540,46.9,-1 +541,37.5,-1 +542,30.3,-1 +543,27.3,32.3 +544,30.8,60.3 +545,41.2,62.3 +546,36,0 +547,30.8,32.3 +548,33.9,60.3 +549,34.6,38.4 +550,37,16.6 +551,42.7,62.3 +552,50.4,28.1 +553,40.1,0 +554,29.9,8 +555,32.5,15 +556,34.6,63.1 +557,36.7,58 +558,39.4,52.9 +559,42.8,47.8 +560,46.8,42.7 +561,50.7,27.5 +562,53.4,20.7 +563,54.2,13.1 +564,54.2,0.4 +565,53.4,0 +566,51.4,-1 +567,48.7,-1 +568,45.6,-1 +569,42.4,-1 +570,40.4,-1 +571,39.8,5.8 +572,40.7,39.7 +573,43.8,37.1 +574,48.1,39.1 +575,52,22 +576,54.7,13.2 +577,56.4,13.2 +578,57.5,6.6 +579,42.6,0 +580,27.7,10.9 +581,28.5,21.3 +582,29.2,23.9 +583,29.5,15.2 +584,29.7,8.8 +585,30.4,20.8 +586,31.9,22.9 +587,34.3,61.4 +588,37.2,76.6 +589,40.1,27.5 +590,42.3,25.4 +591,43.5,32 +592,43.8,6 +593,43.5,-1 +594,42.8,-1 +595,41.7,-1 +596,40.4,-1 +597,39.3,-1 +598,38.9,12.9 +599,39,18.4 +600,39.7,39.2 +601,41.4,60 +602,43.7,54.5 +603,46.2,64.2 +604,48.8,73.3 +605,51,82.3 +606,52.1,0 +607,52,-1 +608,50.9,-1 +609,49.4,-1 +610,47.8,-1 +611,46.6,-1 +612,47.3,35.3 +613,49.2,74.1 +614,51.1,95.2 +615,51.7,-1 +616,50.8,-1 +617,47.3,-1 +618,41.8,-1 +619,36.4,-1 +620,30.9,-1 +621,25.5,37.1 +622,33.8,38.4 +623,42.1,-1 +624,34.1,-1 +625,33,37.1 +626,36.4,38.4 +627,43.3,17.1 +628,35.7,0 +629,28.1,11.6 +630,36.5,19.2 +631,45.2,8.3 +632,36.5,0 +633,27.9,32.6 +634,31.5,59.6 +635,34.4,65.2 +636,37,59.6 +637,39,49 +638,40.2,-1 +639,39.8,-1 +640,36,-1 +641,29.7,-1 +642,21.5,-1 +643,14.1,-1 +644,0,0 +645,0,0 +646,0,0 +647,0,0 +648,0,0 +649,0,0 +650,0,0 +651,0,0 +652,0,0 +653,0,0 +654,0,0 +655,0,0 +656,0,3.4 +657,1.4,22 +658,10.1,45.3 +659,21.5,10 +660,32.2,0 +661,42.3,46 +662,57.1,74.1 +663,72.1,34.2 +664,66.9,0 +665,60.4,41.8 +666,69.1,79 +667,77.1,38.3 +668,63.1,0 +669,49.1,47.9 +670,53.4,91.3 +671,57.5,85.7 +672,61.5,89.2 +673,65.5,85.9 +674,69.5,89.5 +675,73.1,75.5 +676,76.2,73.6 +677,79.1,75.6 +678,81.8,78.2 +679,84.1,39 +680,69.6,0 +681,55,25.2 +682,55.8,49.9 +683,56.7,46.4 +684,57.6,76.3 +685,58.4,92.7 +686,59.3,99.9 +687,60.1,95 +688,61,46.7 +689,46.6,0 +690,32.3,34.6 +691,32.7,68.6 +692,32.6,67 +693,31.3,-1 +694,28.1,-1 +695,43,0 +696,58,-1 +697,58.9,-1 +698,49.4,-1 +699,41.5,-1 +700,48.4,0 +701,55.3,-1 +702,41.8,-1 +703,31.6,-1 +704,24.6,-1 +705,15.2,-1 +706,7,-1 +707,0,0 +708,0,0 +709,0,0 +710,0,0 +711,0,0 +712,0,0 +713,0,0 +714,0,0 +715,0,0 +716,0,0 +717,0,0 +718,0,0 +719,0,0 +720,0,0 +721,0,0 +722,0,0 +723,0,0 +724,0,0 +725,0,0 +726,0,0 +727,0,0 +728,0,0 +729,0,0 +730,0,0 +731,0,0 +732,0,0 +733,0,0 +734,0,0 +735,0,0 +736,0,0 +737,0,0 +738,0,0 +739,0,0 +740,0,0 +741,0,0 +742,0,0 +743,0,0 +744,0,0 +745,0,0 +746,0,0 +747,0,0 +748,0,0 +749,0,0 +750,0,0 +751,0,0 +752,0,0 +753,0,0 +754,0,0 +755,0,0 +756,0,0 +757,0,0 +758,0,0 +759,0,0 +760,0,0 +761,0,0 +762,0,0 +763,0,0 +764,0,0 +765,0,0 +766,0,0 +767,0,0 +768,0,0 +769,0,0 +770,0,0 +771,0,22 +772,4.5,25.8 +773,15.5,42.8 +774,30.5,46.8 +775,45.5,29.3 +776,49.2,13.6 +777,39.5,0 +778,29.7,15.1 +779,34.8,26.9 +780,40,13.6 +781,42.2,-1 +782,42.1,-1 +783,40.8,-1 +784,37.7,37.6 +785,47,35 +786,48.8,33.4 +787,41.7,-1 +788,27.7,-1 +789,17.2,-1 +790,14,37.6 +791,18.4,25 +792,27.6,17.7 +793,39.8,6.8 +794,34.3,0 +795,28.7,26.5 +796,41.5,40.9 +797,53.7,17.5 +798,42.4,0 +799,31.2,27.3 +800,32.3,53.2 +801,34.5,60.6 +802,37.6,68 +803,41.2,75.4 +804,45.8,82.8 +805,52.3,38.2 +806,42.5,0 +807,32.6,30.5 +808,35,57.9 +809,36,77.3 +810,37.1,96.8 +811,39.6,80.8 +812,43.4,78.3 +813,47.2,73.4 +814,49.6,66.9 +815,50.2,62 +816,50.2,57.7 +817,50.6,62.1 +818,52.3,62.9 +819,54.8,37.5 +820,57,18.3 +821,42.3,0 +822,27.6,29.1 +823,28.4,57 +824,29.1,51.8 +825,29.6,35.3 +826,29.7,33.3 +827,29.8,17.7 +828,29.5,-1 +829,28.9,-1 +830,43,0 +831,57.1,-1 +832,57.7,-1 +833,56,-1 +834,53.8,-1 +835,51.2,-1 +836,48.1,-1 +837,44.5,-1 +838,40.9,-1 +839,38.1,-1 +840,37.2,42.7 +841,37.5,70.8 +842,39.1,48.6 +843,41.3,0.1 +844,42.3,-1 +845,42,-1 +846,40.8,-1 +847,38.6,-1 +848,35.5,-1 +849,32.1,-1 +850,29.6,-1 +851,28.8,39.9 +852,29.2,52.9 +853,30.9,76.1 +854,34.3,76.5 +855,38.3,75.5 +856,42.5,74.8 +857,46.6,74.2 +858,50.7,76.2 +859,54.8,75.1 +860,58.7,36.3 +861,45.2,0 +862,31.8,37.2 +863,33.8,71.2 +864,35.5,46.4 +865,36.6,33.6 +866,37.2,20 +867,37.2,-1 +868,37,-1 +869,36.6,-1 +870,36,-1 +871,35.4,-1 +872,34.7,-1 +873,34.1,-1 +874,33.6,-1 +875,33.3,-1 +876,33.1,-1 +877,32.7,-1 +878,31.4,-1 +879,45,0 +880,58.5,-1 +881,53.7,-1 +882,47.5,-1 +883,40.6,-1 +884,34.1,-1 +885,45.3,0 +886,56.4,-1 +887,51,-1 +888,44.5,-1 +889,36.4,-1 +890,26.6,-1 +891,20,-1 +892,13.3,-1 +893,6.7,-1 +894,0,0 +895,0,0 +896,0,0 +897,0,0 +898,0,0 +899,0,0 +900,0,0 +901,0,5.8 +902,2.5,27.9 +903,12.4,29 +904,19.4,30.1 +905,29.3,31.2 +906,37.1,10.4 +907,40.6,4.9 +908,35.8,0 +909,30.9,7.6 +910,35.4,13.8 +911,36.5,11.1 +912,40.8,48.5 +913,49.8,3.7 +914,41.2,0 +915,32.7,29.7 +916,39.4,52.1 +917,48.8,22.7 +918,41.6,0 +919,34.5,46.6 +920,39.7,84.4 +921,44.7,83.2 +922,49.5,78.9 +923,52.3,83.8 +924,53.4,77.7 +925,52.1,69.6 +926,47.9,63.6 +927,46.4,55.2 +928,46.5,53.6 +929,46.4,62.3 +930,46.1,58.2 +931,46.2,61.8 +932,47.3,62.3 +933,49.3,57.1 +934,52.6,58.1 +935,56.3,56 +936,59.9,27.2 +937,45.8,0 +938,31.8,28.8 +939,32.7,56.5 +940,33.4,62.8 +941,34.6,68.2 +942,35.8,68.6 +943,38.6,65 +944,42.3,61.9 +945,44.1,65.3 +946,45.3,63.2 +947,46.5,30.6 +948,46.7,11.1 +949,45.9,16.1 +950,45.6,21.8 +951,45.9,24.2 +952,46.5,24.7 +953,46.7,24.7 +954,46.8,28.2 +955,47.2,31.2 +956,47.6,29.6 +957,48.2,31.2 +958,48.6,33.5 +959,48.8,-1 +960,47.6,-1 +961,46.3,-1 +962,45.2,-1 +963,43.5,-1 +964,41.4,-1 +965,40.3,-1 +966,39.4,-1 +967,38,-1 +968,36.3,-1 +969,35.3,5.8 +970,35.4,30.2 +971,36.6,55.6 +972,38.6,48.5 +973,39.9,41.8 +974,40.3,38.2 +975,40.8,35 +976,41.9,32.4 +977,43.2,26.4 +978,43.5,-1 +979,42.9,-1 +980,41.5,-1 +981,40.9,-1 +982,40.5,-1 +983,39.5,-1 +984,38.3,-1 +985,36.9,-1 +986,35.4,-1 +987,34.5,-1 +988,33.9,-1 +989,32.6,-1 +990,30.9,-1 +991,29.9,-1 +992,29.2,-1 +993,44.1,0 +994,59.1,-1 +995,56.8,-1 +996,53.5,-1 +997,47.8,-1 +998,41.9,-1 +999,35.9,-1 +1000,44.3,0 +1001,52.6,-1 +1002,43.4,-1 +1003,50.6,0 +1004,57.8,-1 +1005,51.6,-1 +1006,44.8,-1 +1007,48.6,0 +1008,52.4,-1 +1009,45.4,-1 +1010,37.2,-1 +1011,26.3,-1 +1012,17.9,-1 +1013,16.2,1.9 +1014,17.8,7.5 +1015,25.2,18 +1016,39.7,6.5 +1017,38.6,0 +1018,37.4,5.4 +1019,43.4,9.7 +1020,46.9,15.7 +1021,52.5,13.1 +1022,56.2,6.3 +1023,44,0 +1024,31.8,20.9 +1025,38.7,36.3 +1026,47.7,47.5 +1027,54.5,22 +1028,41.3,0 +1029,28.1,26.8 +1030,31.6,49.2 +1031,34.5,39.5 +1032,36.4,24 +1033,36.7,-1 +1034,35.5,-1 +1035,33.8,-1 +1036,33.7,19.8 +1037,35.3,35.1 +1038,38,33.9 +1039,40.1,34.5 +1040,42.2,40.4 +1041,45.2,44 +1042,48.3,35.9 +1043,50.1,29.6 +1044,52.3,38.5 +1045,55.3,57.7 +1046,57,50.7 +1047,57.7,25.2 +1048,42.9,0 +1049,28.2,15.7 +1050,29.2,30.5 +1051,31.1,52.6 +1052,33.4,60.7 +1053,35,61.4 +1054,35.3,18.2 +1055,35.2,14.9 +1056,34.9,11.7 +1057,34.5,12.9 +1058,34.1,15.5 +1059,33.5,-1 +1060,31.8,-1 +1061,30.1,-1 +1062,29.6,10.3 +1063,30,26.5 +1064,31,18.8 +1065,31.5,26.5 +1066,31.7,-1 +1067,31.5,-1 +1068,30.6,-1 +1069,30,-1 +1070,30,-1 +1071,29.4,-1 +1072,44.3,0 +1073,59.2,-1 +1074,58.3,-1 +1075,57.1,-1 +1076,55.4,-1 +1077,53.5,-1 +1078,51.5,-1 +1079,49.7,-1 +1080,47.9,-1 +1081,46.4,-1 +1082,45.5,-1 +1083,45.2,-1 +1084,44.3,-1 +1085,43.6,-1 +1086,43.1,-1 +1087,42.5,25.6 +1088,43.3,25.7 +1089,46.3,24 +1090,47.8,20.6 +1091,47.2,3.8 +1092,45.6,4.4 +1093,44.6,4.1 +1094,44.1,-1 +1095,42.9,-1 +1096,40.9,-1 +1097,39.2,-1 +1098,37,-1 +1099,35.1,2 +1100,35.6,43.3 +1101,38.7,47.6 +1102,41.3,40.4 +1103,42.6,45.7 +1104,43.9,43.3 +1105,46.9,41.2 +1106,52.4,40.1 +1107,56.3,39.3 +1108,57.4,25.5 +1109,57.2,25.4 +1110,57,25.4 +1111,56.8,25.3 +1112,56.3,25.3 +1113,55.6,25.2 +1114,56.2,25.2 +1115,58,12.4 +1116,43.4,0 +1117,28.8,26.2 +1118,30.9,49.9 +1119,32.3,40.5 +1120,32.5,12.4 +1121,32.4,12.2 +1122,32.1,6.4 +1123,31,12.4 +1124,30.1,18.5 +1125,30.4,35.6 +1126,31.2,30.1 +1127,31.5,30.8 +1128,31.5,26.9 +1129,31.7,33.9 +1130,32,29.9 +1131,32.1,-1 +1132,31.4,-1 +1133,30.3,-1 +1134,29.8,-1 +1135,44.3,0 +1136,58.9,-1 +1137,52.1,-1 +1138,44.1,-1 +1139,51.7,0 +1140,59.2,-1 +1141,47.2,-1 +1142,35.1,0 +1143,23.1,-1 +1144,13.1,-1 +1145,5,-1 +1146,0,0 +1147,0,0 +1148,0,0 +1149,0,0 +1150,0,0 +1151,0,0 +1152,0,0 +1153,0,0 +1154,0,0 +1155,0,0 +1156,0,0 +1157,0,0 +1158,0,0 +1159,0,0 +1160,0,0 +1161,0,0 +1162,0,0 +1163,0,0 +1164,0,0 +1165,0,0 +1166,0,0 +1167,0,0 +1168,0,0 +1169,0,0 +1170,0,0 +1171,0,0 +1172,0,0 +1173,0,0 +1174,0,0 +1175,0,0 +1176,0,0 +1177,0,0 +1178,0,0 +1179,0,0 +1180,0,0 +1181,0,0 +1182,0,0 +1183,0,0 +1184,0,0 +1185,0,0 +1186,0,0 +1187,0,0 +1188,0,0 +1189,0,0 +1190,0,0 +1191,0,0 +1192,0,0 +1193,0,0 +1194,0,0 +1195,0,0 +1196,0,20.4 +1197,12.6,41.2 +1198,27.3,20.4 +1199,40.4,7.6 +1200,46.1,-1 +1201,44.6,-1 +1202,42.7,14.7 +1203,42.9,7.3 +1204,36.1,0 +1205,29.3,15 +1206,43.8,22.6 +1207,54.9,9.9 +1208,44.9,0 +1209,34.9,47.4 +1210,42.7,82.7 +1211,52,81.2 +1212,61.8,82.7 +1213,71.3,39.1 +1214,58.1,0 +1215,44.9,42.5 +1216,46.3,83.3 +1217,46.8,74.1 +1218,48.1,75.7 +1219,50.5,75.8 +1220,53.6,76.7 +1221,56.9,77.1 +1222,60.2,78.7 +1223,63.7,78 +1224,67.2,79.6 +1225,70.7,80.9 +1226,74.1,81.1 +1227,77.5,83.6 +1228,80.8,85.6 +1229,84.1,81.6 +1230,87.4,88.3 +1231,90.5,91.9 +1232,93.5,94.1 +1233,96.8,96.6 +1234,100,-1 +1235,96,-1 +1236,81.9,-1 +1237,68.1,-1 +1238,58.1,84.7 +1239,58.5,85.4 +1240,59.5,85.6 +1241,61,86.6 +1242,62.6,86.8 +1243,64.1,87.6 +1244,65.4,87.5 +1245,66.7,87.8 +1246,68.1,43.5 +1247,55.2,0 +1248,42.3,37.2 +1249,43,73.6 +1250,43.5,65.1 +1251,43.8,53.1 +1252,43.9,54.6 +1253,43.9,41.2 +1254,43.8,34.8 +1255,43.6,30.3 +1256,43.3,21.9 +1257,42.8,19.9 +1258,42.3,-1 +1259,41.4,-1 +1260,40.2,-1 +1261,38.7,-1 +1262,37.1,-1 +1263,35.6,-1 +1264,34.2,-1 +1265,32.9,-1 +1266,31.8,-1 +1267,30.7,-1 +1268,29.6,-1 +1269,40.4,0 +1270,51.2,-1 +1271,49.6,-1 +1272,48,-1 +1273,46.4,-1 +1274,45,-1 +1275,43.6,-1 +1276,42.3,-1 +1277,41,-1 +1278,39.6,-1 +1279,38.3,-1 +1280,37.1,-1 +1281,35.9,-1 +1282,34.6,-1 +1283,33,-1 +1284,31.1,-1 +1285,29.2,-1 +1286,43.3,0 +1287,57.4,32.8 +1288,59.9,65.4 +1289,61.9,76.1 +1290,65.6,73.7 +1291,69.9,79.3 +1292,74.1,81.3 +1293,78.3,83.2 +1294,82.6,86 +1295,87,89.5 +1296,91.2,90.8 +1297,95.3,45.9 +1298,81,0 +1299,66.6,38.2 +1300,67.9,75.5 +1301,68.4,80.5 +1302,69,85.5 +1303,70,85.2 +1304,71.6,85.9 +1305,73.3,86.2 +1306,74.8,86.5 +1307,76.3,42.9 +1308,63.3,0 +1309,50.4,21.2 +1310,50.6,42.3 +1311,50.6,53.7 +1312,50.4,90.1 +1313,50.5,97.1 +1314,51,100 +1315,51.9,100 +1316,52.6,100 +1317,52.8,32.4 +1318,47.7,0 +1319,42.6,27.4 +1320,42.1,53.5 +1321,41.8,44.5 +1322,41.4,41.1 +1323,41,21 +1324,40.3,0 +1325,39.3,1 +1326,38.3,15.2 +1327,37.6,57.8 +1328,37.3,73.2 +1329,37.3,59.8 +1330,37.4,52.2 +1331,37.4,16.9 +1332,37.1,34.3 +1333,36.7,51.9 +1334,36.2,25.3 +1335,35.6,-1 +1336,34.6,-1 +1337,33.2,-1 +1338,31.6,-1 +1339,30.1,-1 +1340,28.8,-1 +1341,28,29.5 +1342,28.6,100 +1343,28.8,97.3 +1344,28.8,73.4 +1345,29.6,56.9 +1346,30.3,91.7 +1347,31,90.5 +1348,31.8,81.7 +1349,32.6,79.5 +1350,33.5,86.9 +1351,34.6,100 +1352,35.6,78.7 +1353,36.4,50.5 +1354,37,57 +1355,37.3,69.1 +1356,37.6,49.5 +1357,37.8,44.4 +1358,37.8,43.4 +1359,37.8,34.8 +1360,37.6,24 +1361,37.2,-1 +1362,36.3,-1 +1363,35.1,-1 +1364,33.7,-1 +1365,32.4,-1 +1366,31.1,-1 +1367,29.9,-1 +1368,28.7,-1 +1369,29,58.6 +1370,29.7,88.5 +1371,31,86.3 +1372,31.8,43.4 +1373,31.7,-1 +1374,29.9,-1 +1375,40.2,0 +1376,50.4,-1 +1377,47.9,-1 +1378,45,-1 +1379,43,-1 +1380,40.6,-1 +1381,55.5,0 +1382,70.4,41.7 +1383,73.4,83.2 +1384,74,83.7 +1385,74.9,41.7 +1386,60,0 +1387,45.1,41.6 +1388,47.7,84.2 +1389,50.4,50.2 +1390,53,26.1 +1391,59.5,0 +1392,66.2,38.4 +1393,66.4,76.7 +1394,67.6,100 +1395,68.4,76.6 +1396,68.2,47.2 +1397,69,81.4 +1398,69.7,40.6 +1399,54.7,0 +1400,39.8,19.9 +1401,36.3,40 +1402,36.7,59.4 +1403,36.6,77.5 +1404,36.8,94.3 +1405,36.8,100 +1406,36.4,100 +1407,36.3,79.7 +1408,36.7,49.5 +1409,36.6,39.3 +1410,37.3,62.8 +1411,38.1,73.4 +1412,39,72.9 +1413,40.2,72 +1414,41.5,71.2 +1415,42.9,77.3 +1416,44.4,76.6 +1417,45.4,43.1 +1418,45.3,53.9 +1419,45.1,64.8 +1420,46.5,74.2 +1421,47.7,75.2 +1422,48.1,75.5 +1423,48.6,75.8 +1424,48.9,76.3 +1425,49.9,75.5 +1426,50.4,75.2 +1427,51.1,74.6 +1428,51.9,75 +1429,52.7,37.2 +1430,41.6,0 +1431,30.4,36.6 +1432,30.5,73.2 +1433,30.3,81.6 +1434,30.4,89.3 +1435,31.5,90.4 +1436,32.7,88.5 +1437,33.7,97.2 +1438,35.2,99.7 +1439,36.3,98.8 +1440,37.7,100 +1441,39.2,100 +1442,40.9,100 +1443,42.4,99.5 +1444,43.8,98.7 +1445,45.4,97.3 +1446,47,96.6 +1447,47.8,96.2 +1448,48.8,96.3 +1449,50.5,95.1 +1450,51,95.9 +1451,52,94.3 +1452,52.6,94.6 +1453,53,65.5 +1454,53.2,0 +1455,53.2,-1 +1456,52.6,-1 +1457,52.1,-1 +1458,51.8,-1 +1459,51.3,-1 +1460,50.7,-1 +1461,50.7,-1 +1462,49.8,-1 +1463,49.4,-1 +1464,49.3,-1 +1465,49.1,-1 +1466,49.1,-1 +1467,49.1,8.3 +1468,48.9,16.8 +1469,48.8,21.3 +1470,49.1,22.1 +1471,49.4,26.3 +1472,49.8,39.2 +1473,50.4,83.4 +1474,51.4,90.6 +1475,52.3,93.8 +1476,53.3,94 +1477,54.2,94.1 +1478,54.9,94.3 +1479,55.7,94.6 +1480,56.1,94.9 +1481,56.3,86.2 +1482,56.2,64.1 +1483,56,46.1 +1484,56.2,33.4 +1485,56.5,23.6 +1486,56.3,18.6 +1487,55.7,16.2 +1488,56,15.9 +1489,55.9,21.8 +1490,55.8,20.9 +1491,55.4,18.4 +1492,55.7,25.1 +1493,56,27.7 +1494,55.8,22.4 +1495,56.1,20 +1496,55.7,17.4 +1497,55.9,20.9 +1498,56,22.9 +1499,56,21.1 +1500,55.1,19.2 +1501,55.6,24.2 +1502,55.4,25.6 +1503,55.7,24.7 +1504,55.9,24 +1505,55.4,23.5 +1506,55.7,30.9 +1507,55.4,42.5 +1508,55.3,25.8 +1509,55.4,1.3 +1510,55,-1 +1511,54.4,-1 +1512,54.2,-1 +1513,53.5,-1 +1514,52.4,-1 +1515,51.8,-1 +1516,50.7,-1 +1517,49.9,-1 +1518,49.1,-1 +1519,47.7,-1 +1520,47.3,-1 +1521,46.9,-1 +1522,46.9,-1 +1523,47.2,-1 +1524,47.8,-1 +1525,48.2,0 +1526,48.8,23 +1527,49.1,67.9 +1528,49.4,73.7 +1529,49.8,75 +1530,50.4,75.8 +1531,51.4,73.9 +1532,52.3,72.2 +1533,53.3,71.2 +1534,54.6,71.2 +1535,55.4,68.7 +1536,56.7,67 +1537,57.2,64.6 +1538,57.3,61.9 +1539,57,59.5 +1540,56.7,57 +1541,56.7,69.8 +1542,56.8,58.5 +1543,56.8,47.2 +1544,57,38.5 +1545,57,32.8 +1546,56.8,30.2 +1547,57,27 +1548,56.9,26.2 +1549,56.7,26.2 +1550,57,26.6 +1551,56.7,27.8 +1552,56.7,29.7 +1553,56.8,32.1 +1554,56.5,34.9 +1555,56.6,34.9 +1556,56.3,35.8 +1557,56.6,36.6 +1558,56.2,37.6 +1559,56.6,38.2 +1560,56.2,37.9 +1561,56.6,37.5 +1562,56.4,36.7 +1563,56.5,34.8 +1564,56.5,35.8 +1565,56.5,36.2 +1566,56.5,36.7 +1567,56.7,37.8 +1568,56.7,37.8 +1569,56.6,36.6 +1570,56.8,36.1 +1571,56.5,36.8 +1572,56.9,35.9 +1573,56.7,35 +1574,56.5,36 +1575,56.4,36.5 +1576,56.5,38 +1577,56.5,39.9 +1578,56.4,42.1 +1579,56.5,47 +1580,56.4,48 +1581,56.1,49.1 +1582,56.4,48.9 +1583,56.4,48.2 +1584,56.5,48.3 +1585,56.5,47.9 +1586,56.6,46.8 +1587,56.6,46.2 +1588,56.5,44.4 +1589,56.8,42.9 +1590,56.5,42.8 +1591,56.7,43.2 +1592,56.5,42.8 +1593,56.9,42.2 +1594,56.5,43.1 +1595,56.5,42.9 +1596,56.7,42.7 +1597,56.6,41.5 +1598,56.9,41.8 +1599,56.6,41.9 +1600,56.7,42.6 +1601,56.7,42.6 +1602,56.7,41.5 +1603,56.7,42.2 +1604,56.5,42.2 +1605,56.8,41.9 +1606,56.5,42 +1607,56.7,42.1 +1608,56.4,41.9 +1609,56.7,42.9 +1610,56.7,41.8 +1611,56.7,41.9 +1612,56.8,42 +1613,56.7,41.5 +1614,56.6,41.9 +1615,56.8,41.6 +1616,56.6,41.6 +1617,56.9,42 +1618,56.7,40.7 +1619,56.7,39.3 +1620,56.5,41.4 +1621,56.4,44.9 +1622,56.8,45.2 +1623,56.6,43.6 +1624,56.8,42.2 +1625,56.5,42.3 +1626,56.5,44.4 +1627,56.9,45.1 +1628,56.4,45 +1629,56.7,46.3 +1630,56.7,45.5 +1631,56.8,45 +1632,56.7,44.9 +1633,56.6,45.2 +1634,56.8,46 +1635,56.5,46.6 +1636,56.6,48.3 +1637,56.4,48.6 +1638,56.6,50.3 +1639,56.3,51.9 +1640,56.5,54.1 +1641,56.3,54.9 +1642,56.4,55 +1643,56.4,56.2 +1644,56.2,58.6 +1645,56.2,59.1 +1646,56.2,62.5 +1647,56.4,62.8 +1648,56,64.7 +1649,56.4,65.6 +1650,56.2,67.7 +1651,55.9,68.9 +1652,56.1,68.9 +1653,55.8,69.5 +1654,56,69.8 +1655,56.2,69.3 +1656,56.2,69.8 +1657,56.4,69.2 +1658,56.3,68.7 +1659,56.2,69.4 +1660,56.2,69.5 +1661,56.2,70 +1662,56.4,69.7 +1663,56.2,70.2 +1664,56.4,70.5 +1665,56.1,70.5 +1666,56.5,69.7 +1667,56.2,69.3 +1668,56.5,70.9 +1669,56.4,70.8 +1670,56.3,71.1 +1671,56.4,71 +1672,56.7,68.6 +1673,56.8,68.6 +1674,56.6,68 +1675,56.8,65.1 +1676,56.9,60.9 +1677,57.1,57.4 +1678,57.1,54.3 +1679,57,48.6 +1680,57.4,44.1 +1681,57.4,40.2 +1682,57.6,36.9 +1683,57.5,34.2 +1684,57.4,31.1 +1685,57.5,25.9 +1686,57.5,20.7 +1687,57.6,16.4 +1688,57.6,12.4 +1689,57.6,8.9 +1690,57.5,8 +1691,57.5,5.8 +1692,57.3,5.8 +1693,57.6,5.5 +1694,57.3,4.5 +1695,57.2,3.2 +1696,57.2,3.1 +1697,57.3,4.9 +1698,57.3,4.2 +1699,56.9,5.5 +1700,57.1,5.1 +1701,57,5.2 +1702,56.9,5.5 +1703,56.6,5.4 +1704,57.1,6.1 +1705,56.7,5.7 +1706,56.8,5.8 +1707,57,6.1 +1708,56.7,5.9 +1709,57,6.6 +1710,56.9,6.4 +1711,56.7,6.7 +1712,56.9,6.9 +1713,56.8,5.6 +1714,56.6,5.1 +1715,56.6,6.5 +1716,56.5,10 +1717,56.6,12.4 +1718,56.5,14.5 +1719,56.6,16.3 +1720,56.3,18.1 +1721,56.6,20.7 +1722,56.1,22.6 +1723,56.3,25.8 +1724,56.4,27.7 +1725,56,29.7 +1726,56.1,32.6 +1727,55.9,34.9 +1728,55.9,36.4 +1729,56,39.2 +1730,55.9,41.4 +1731,55.5,44.2 +1732,55.9,46.4 +1733,55.8,48.3 +1734,55.6,49.1 +1735,55.8,49.3 +1736,55.9,47.7 +1737,55.9,47.4 +1738,55.8,46.9 +1739,56.1,46.8 +1740,56.1,45.8 +1741,56.2,46 +1742,56.3,45.9 +1743,56.3,45.9 +1744,56.2,44.6 +1745,56.2,46 +1746,56.4,46.2 +1747,55.8,-1 +1748,55.5,-1 +1749,55,-1 +1750,54.1,-1 +1751,54,-1 +1752,53.3,-1 +1753,52.6,-1 +1754,51.8,-1 +1755,50.7,-1 +1756,49.9,-1 +1757,49.1,-1 +1758,47.7,-1 +1759,46.8,-1 +1760,45.7,-1 +1761,44.8,-1 +1762,43.9,-1 +1763,42.9,-1 +1764,41.5,-1 +1765,39.5,-1 +1766,36.7,-1 +1767,33.8,-1 +1768,31,-1 +1769,40,0 +1770,49.1,-1 +1771,46.2,-1 +1772,43.1,-1 +1773,39.9,-1 +1774,36.6,-1 +1775,33.6,-1 +1776,30.5,-1 +1777,42.8,0 +1778,55.2,-1 +1779,49.9,-1 +1780,44,-1 +1781,37.6,-1 +1782,47.2,0 +1783,56.8,-1 +1784,47.5,-1 +1785,42.9,-1 +1786,31.6,-1 +1787,25.8,-1 +1788,19.9,-1 +1789,14,-1 +1790,8.1,-1 +1791,2.2,-1 +1792,0,0 +1793,0,0 +1794,0,0 +1795,0,0 +1796,0,0 +1797,0,0 +1798,0,0 +1799,0,0 +1800,0,0 diff --git a/VectoCore/Resources/Declaration/Wheels.csv b/VectoCore/Resources/Declaration/Wheels.csv index bf914bd990..782e9ba693 100644 --- a/VectoCore/Resources/Declaration/Wheels.csv +++ b/VectoCore/Resources/Declaration/Wheels.csv @@ -1,41 +1,41 @@ -Wheel,Inertia,d,Size-Class(0/1) -9 R 22.5,8.9,970,0 -9.00 R 20,10.5,1018,0 -9.5 R 17.5,4.9,842,0 -10 R 17.5,5,858,0 -10 R 22.5,11,1020,0 -10.00 R 20,13.1,1025,0 -11 R 22.5,14.4,1050,0 -11.00 R 20,14.6,1082,0 -12 R 22.5,16.8,1084,0 -12.00 R 20,19.5,1122,0 -12.00 R 24,27.7,1226,0 -12.5 R 20,12.7,1120,0 -13 R 22.5,20,1124,0 -14.00 R 20,30.8,1238,0 -14.5 R 20,14.8,1092,0 -16.00 R 20,47.5,1343,0 -215/75 R 17.5,3.9,767,0 -225/70 R 17.5,4,759.5,0 -225/75 R 17.5,4,782,0 -235/75 R 17.5,4.5,797,0 -245/70 R 17.5,5.2,787.5,0 -245/70 R 19.5,6,838.3,0 -255/70 R 22.5,9.5,928.5,0 -265/70 R 19.5,6.5,866.3,0 -275/70 R 22.5,11.9,956.5,0 -275/80 R 22.5,12.8,1011.5,0 -285/70 R 19.5,7.9,894.3,0 -295/55 R 22.5,10.2,896,1 -295/60 R 22.5,10.8,925.5,1 -295/80 R 22.5,15.5,1043.5,0 -305/70 R 19.5,9.2,922.3,0 -305/70 R 22.5,13.9,998.5,0 -315/45 R22.5,9.9,347,1 -315/60 R 22.5,12.8,949.5,1 -315/70 R 22.5,14.9,1012.5,0 -315/80 R 22.5,17.6,1075.5,0 -365/80 R 20,17.2,1092,0 -365/85 R 20,22.5,1128.5,0 -385/55 R 22.5,15.9,995,1 -385/65 R 22.5,19.2,1072,1 +Wheel,Inertia,d,Size-Class (0/1) +9 R22.5,8.9,970,b +9.00 R20,10.5,1018,b +9.5 R17.5,4.9,842,b +10 R17.5,5,858,b +10 R22.5,11,1020,b +10.00 R20,13.1,1025,b +11 R22.5,14.4,1050,b +11.00 R20,14.6,1082,b +12 R22.5,16.8,1084,b +12.00 R20,19.5,1122,b +12.00 R24,27.7,1226,b +12.5 R20,12.7,1120,b +13 R22.5,20,1124,b +14.00 R20,30.8,1238,b +14.5 R20,14.8,1092,b +16.00 R20,47.5,1343,b +215/75 R17.5,3.9,767,b +225/70 R17.5,4,759.5,b +225/75 R17.5,4,782,b +235/75 R17.5,4.5,797,b +245/70 R17.5,5.2,787.5,b +245/70 R19.5,6,838.3,b +255/70 R22.5,9.5,928.5,b +265/70 R19.5,6.5,866.3,b +275/70 R22.5,11.9,956.5,b +275/80 R22.5,12.8,1011.5,b +285/70 R19.5,7.9,894.3,b +295/55 R22.5,10.2,896,a +295/60 R22.5,10.8,925.5,a +295/80 R22.5,15.5,1043.5,b +305/70 R19.5,9.2,922.3,b +305/70 R22.5,13.9,998.5,b +315/45 R22.5,9.9,855,a +315/60 R22.5,12.8,949.5,a +315/70 R22.5,14.9,1012.5,b +315/80 R22.5,17.6,1075.5,b +365/80 R20,17.2,1092,b +365/85 R20,22.5,1128.5,b +385/55 R22.5,15.9,995,a +385/65 R22.5,19.2,1072,a diff --git a/VectoCore/Utils/DataRowExtensionMethods.cs b/VectoCore/Utils/DataTableExtensionMethods.cs similarity index 91% rename from VectoCore/Utils/DataRowExtensionMethods.cs rename to VectoCore/Utils/DataTableExtensionMethods.cs index 5b91b0f7a8..e08d00b132 100644 --- a/VectoCore/Utils/DataRowExtensionMethods.cs +++ b/VectoCore/Utils/DataTableExtensionMethods.cs @@ -6,7 +6,7 @@ using TUGraz.VectoCore.Exceptions; namespace TUGraz.VectoCore.Utils { - public static class DataRowExtensionMethods + public static class DataTableExtensionMethods { public static double ParseDoubleOrGetDefault(this DataRow row, string columnName, double defaultValue = default(double)) @@ -53,5 +53,10 @@ namespace TUGraz.VectoCore.Utils throw new VectoException(string.Format("Field {0}: {1}", column, e.Message), e); } } + + public static IEnumerable<T> Values<T>(this DataColumn column) + { + return column.Table.AsEnumerable().Select(r => r.Field<T>(column)); + } } } \ No newline at end of file diff --git a/VectoCore/Utils/DoubleExtensionMethods.cs b/VectoCore/Utils/DoubleExtensionMethods.cs index c616f65a30..813c467d95 100644 --- a/VectoCore/Utils/DoubleExtensionMethods.cs +++ b/VectoCore/Utils/DoubleExtensionMethods.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Linq; namespace TUGraz.VectoCore.Utils { @@ -100,7 +102,7 @@ namespace TUGraz.VectoCore.Utils /// <returns></returns> public static SI SI(this double self) { - return (SI)self; + return (SI) self; } /// <summary> @@ -113,5 +115,10 @@ namespace TUGraz.VectoCore.Utils { return SIBase<T>.Create(self); } + + public static IEnumerable<T> SI<T>(this IEnumerable<double> self) where T : SIBase<T> + { + return self.Select(x => x.SI<T>()); + } } } \ No newline at end of file diff --git a/VectoCore/Utils/IntExtensionMethods.cs b/VectoCore/Utils/IntExtensionMethods.cs index 2381c3bdd3..265ed5e69e 100644 --- a/VectoCore/Utils/IntExtensionMethods.cs +++ b/VectoCore/Utils/IntExtensionMethods.cs @@ -1,6 +1,3 @@ -using System; -using System.Diagnostics.Contracts; - namespace TUGraz.VectoCore.Utils { public static class IntExtensionMethods @@ -34,5 +31,16 @@ namespace TUGraz.VectoCore.Utils { return SIBase<T>.Create(d); } + + /// <summary> + /// Modulo functions which also works on negative Numbers (not like the built-in %-operator which just returns the remainder). + /// </summary> + /// <param name="a"></param> + /// <param name="b"></param> + /// <returns></returns> + public static int Mod(this int a, int b) + { + return (a %= b) < 0 ? a + b : a; + } } } \ No newline at end of file diff --git a/VectoCore/Utils/RessourceHelper.cs b/VectoCore/Utils/RessourceHelper.cs index 5aa9a5e8bc..29ca9f6339 100644 --- a/VectoCore/Utils/RessourceHelper.cs +++ b/VectoCore/Utils/RessourceHelper.cs @@ -1,14 +1,19 @@ using System.IO; using System.Reflection; +using TUGraz.VectoCore.Exceptions; -namespace TUGraz.VectoCore.Models +namespace TUGraz.VectoCore.Utils { public static class RessourceHelper { public static Stream ReadStream(string resourceName) { var assembly = Assembly.GetExecutingAssembly(); - return assembly.GetManifestResourceStream(resourceName); + var resource = assembly.GetManifestResourceStream(resourceName); + if (resource == null) { + throw new VectoException("Resource file not found: " + resourceName); + } + return resource; } } } \ No newline at end of file diff --git a/VectoCore/Utils/StringExtensionMethods.cs b/VectoCore/Utils/StringExtensionMethods.cs index c72e97e05a..f120770506 100644 --- a/VectoCore/Utils/StringExtensionMethods.cs +++ b/VectoCore/Utils/StringExtensionMethods.cs @@ -1,3 +1,4 @@ +using System; using System.Globalization; namespace TUGraz.VectoCore.Utils @@ -8,5 +9,14 @@ namespace TUGraz.VectoCore.Utils { return double.Parse(self, CultureInfo.InvariantCulture); } + + public static string Slice(this string s, int from = 0, int to = int.MaxValue) + { + from = Math.Min(Math.Max(from, -s.Length), s.Length); + from = from < 0 ? from + s.Length : from; + to = Math.Min(Math.Max(to, -s.Length), s.Length); + to = to < 0 ? to + s.Length : to; + return s.Substring(from, Math.Max(to - from, 0)); + } } } \ No newline at end of file diff --git a/VectoCore/Utils/VectoCSVFile.cs b/VectoCore/Utils/VectoCSVFile.cs index 25de5f7453..412a00fd8b 100644 --- a/VectoCore/Utils/VectoCSVFile.cs +++ b/VectoCore/Utils/VectoCSVFile.cs @@ -78,7 +78,7 @@ namespace TUGraz.VectoCore.Utils // Valid Columns found => header was valid => skip header line lines = lines.Skip(1).ToArray(); } else { - var log = LogManager.GetLogger(typeof (VectoCSVFile)); + var log = LogManager.GetLogger(typeof(VectoCSVFile)); log.Warn("No valid Data Header found. Interpreting the first line as data line."); // set the validColumns to: {"0", "1", "2", "3", ...} for all columns in first line. validColumns = GetColumns(lines.First()).Select((_, index) => index.ToString()).ToArray(); @@ -92,13 +92,13 @@ namespace TUGraz.VectoCore.Utils for (var i = 0; i < lines.Length; i++) { var line = lines[i]; - var cells = line.Split(Delimiter); + var cells = line.Split(Delimiter); if (!ignoreEmptyColumns && cells.Length != table.Columns.Count) { throw new CSVReadException(string.Format("Line {0}: The number of values is not correct.", i)); } try { - table.Rows.Add(line.Split(Delimiter)); + table.Rows.Add(line.Split(Delimiter)); } catch (InvalidCastException e) { throw new CSVReadException( string.Format("Line {0}: The data format of a value is not correct. {1}", i, e.Message), e); @@ -122,7 +122,6 @@ namespace TUGraz.VectoCore.Utils Contract.Requires(line != null); line = Regex.Replace(line, @"\[.*?\]", ""); - line = Regex.Replace(line, @"\(.*?\)", ""); line = line.Replace("<", ""); line = line.Replace(">", ""); return line.Split(Delimiter).Select(col => col.Trim()); diff --git a/VectoCoreTest/Models/DeclarationDataTest.cs b/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs similarity index 51% rename from VectoCoreTest/Models/DeclarationDataTest.cs rename to VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index 40cec67ef8..9aee17b3e6 100644 --- a/VectoCoreTest/Models/DeclarationDataTest.cs +++ b/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -1,45 +1,32 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.Models; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.Tests.Models +namespace TUGraz.VectoCore.Tests.Models.Declaration { [TestClass] public class DeclarationDataTest { - public const double Tolerance = 0.0001; - - public static void AssertException<T>(Action func, string message = null) where T : Exception - { - try { - func(); - Assert.Fail("Expected an exception."); - } catch (T ex) { - if (!string.IsNullOrEmpty(message)) { - Assert.AreEqual(message, ex.Message); - } - } - } - + private const double Tolerance = 0.0001; + private MissionType[] missions = Enum.GetValues(typeof(MissionType)).Cast<MissionType>().ToArray(); [TestMethod] public void WheelDataTest() { var wheels = DeclarationData.Wheels; - var tmp = wheels.Lookup("285/70 R 19.5"); + var tmp = wheels.Lookup("285/70 R19.5"); Assert.AreEqual(7.9, tmp.Inertia.Double(), Tolerance); - Assert.AreEqual(0.8943, tmp.TyreRadius.Double(), Tolerance); - Assert.AreEqual(0, tmp.SizeClass); + Assert.AreEqual(0.8943, tmp.DynamicTyreRadius.Double(), Tolerance); + Assert.AreEqual("b", tmp.SizeClass); } [TestMethod] @@ -84,8 +71,8 @@ namespace TUGraz.VectoCore.Tests.Models // EXTRAPOLATE Assert.AreEqual(0.11, pt1.Lookup(3000.RPMtoRad()).Double(), Tolerance); - AssertException<VectoException>(() => pt1.Lookup(200.RPMtoRad())); - AssertException<VectoException>(() => pt1.Lookup(0.RPMtoRad())); + AssertHelper.Exception<VectoException>(() => pt1.Lookup(200.RPMtoRad())); + AssertHelper.Exception<VectoException>(() => pt1.Lookup(0.RPMtoRad())); } @@ -96,61 +83,237 @@ namespace TUGraz.VectoCore.Tests.Models } [TestMethod] - public void AuxESTechTest() + public void WHTCWeightingTest() + { + var whtc = DeclarationData.WHTCCorrection; + + var factors = new { + urban = new[] { 0.11, 0.17, 0.69, 0.98, 0.62, 1.0, 1.0, 1.0, 0.45, 0.0 }, + rural = new[] { 0.0, 0.3, 0.27, 0.0, 0.32, 0.0, 0.0, 0.0, 0.36, 0.22 }, + motorway = new[] { 0.89, 0.53, 0.04, 0.02, 0.06, 0.0, 0.0, 0.0, 0.19, 0.78 } + }; + + var r = new Random(); + for (var i = 0; i < missions.Length; i++) { + var urban = r.NextDouble() * 2; + var rural = r.NextDouble() * 2; + var motorway = r.NextDouble() * 2; + var whtcValue = whtc.Lookup(missions[i], urban, rural, motorway); + Assert.AreEqual(urban * factors.urban[i] + rural * factors.rural[i] + motorway * factors.motorway[i], whtcValue); + } + } + + [TestMethod] + public void VCDVTest() + { + Assert.Inconclusive(); + } + + [TestMethod] + public void DefaultTCTest() + { + Assert.Inconclusive(); + } + + + [TestMethod] + public void AuxElectricSystemTest() { var es = DeclarationData.ElectricSystem; var expected = new[] { - new { Mission = MissionType.LongHaul, Base = 1240, LED = 1290 }, - new { Mission = MissionType.RegionalDelivery, Base = 1055, LED = 1105 }, - new { Mission = MissionType.UrbanDelivery, Base = 974, LED = 1024 }, - new { Mission = MissionType.MunicipalUtility, Base = 974, LED = 1024 }, - new { Mission = MissionType.Construction, Base = 975, LED = 1025 }, + new { Mission = MissionType.LongHaul, Base = 1240, LED = 1190 }, + new { Mission = MissionType.RegionalDelivery, Base = 1055, LED = 1005 }, + new { Mission = MissionType.UrbanDelivery, Base = 974, LED = 924 }, + new { Mission = MissionType.MunicipalUtility, Base = 974, LED = 924 }, + new { Mission = MissionType.Construction, Base = 975, LED = 925 }, new { Mission = MissionType.HeavyUrban, Base = 0, LED = 0 }, new { Mission = MissionType.Urban, Base = 0, LED = 0 }, new { Mission = MissionType.Suburban, Base = 0, LED = 0 }, new { Mission = MissionType.Interurban, Base = 0, LED = 0 }, new { Mission = MissionType.Coach, Base = 0, LED = 0 } }; - Assert.AreEqual(expected.Length, Enum.GetValues(typeof (MissionType)).Length); + Assert.AreEqual(expected.Length, Enum.GetValues(typeof(MissionType)).Length); foreach (var expectation in expected) { var baseConsumption = es.Lookup(expectation.Mission, technologies: new string[] { }); - var withLEDs = es.Lookup(expectation.Mission, technologies: new[] { "LED lights" }); + var leds = es.Lookup(expectation.Mission, technologies: new[] { "LED lights" }); Assert.AreEqual(expectation.Base, baseConsumption.Double(), Tolerance); - Assert.AreEqual(expectation.LED, withLEDs.Double(), Tolerance); + Assert.AreEqual(expectation.LED, leds.Double(), Tolerance); } } [TestMethod] public void AuxFanTechTest() { - Assert.Inconclusive(); - } + var fan = DeclarationData.Fan; + + const string defaultFan = "Crankshaft mounted - Electronically controlled visco clutch (Default)"; + var expected = new Dictionary<string, int[]> { + { + "Crankshaft mounted - Electronically controlled visco clutch (Default)", + new[] { 618, 671, 516, 566, 1037, 0, 0, 0, 0, 0 } + }, { + "Crankshaft mounted - Bimetallic controlled visco clutch", + new[] { 818, 871, 676, 766, 1277, 0, 0, 0, 0, 0 } + }, { + "Crankshaft mounted - Discrete step clutch", + new[] { 668, 721, 616, 616, 1157, 0, 0, 0, 0, 0 } + }, { + "Crankshaft mounted - On/Off clutch", + new[] { 718, 771, 666, 666, 1237, 0, 0, 0, 0, 0 } + }, { + "Belt driven or driven via transm. - Electronically controlled visco clutch", + new[] { 889, 944, 733, 833, 1378, 0, 0, 0, 0, 0 } + }, { + "Belt driven or driven via transm. - Bimetallic controlled visco clutch", + new[] { 1089, 1144, 893, 1033, 1618, 0, 0, 0, 0, 0 } + }, { + "Belt driven or driven via transm. - Discrete step clutch", + new[] { 939, 994, 883, 883, 1498, 0, 0, 0, 0, 0 } + }, { + "Belt driven or driven via transm. - On/Off clutch", + new[] { 989, 1044, 933, 933, 1578, 0, 0, 0, 0, 0 } + }, { + "Hydraulic driven - Variable displacement pump", + new[] { 738, 955, 632, 717, 1672, 0, 0, 0, 0, 0 } + }, { + "Hydraulic driven - Constant displacement pump", + new[] { 1000, 1200, 800, 900, 2100, 0, 0, 0, 0, 0 } + }, { + "Hydraulic driven - Electronically controlled", + new[] { 700, 800, 600, 600, 1400, 0, 0, 0, 0, 0 } + } + }; - [TestMethod] - public void AuxHVACTest() - { - Assert.Inconclusive(); + for (var i = 0; i < missions.Length; i++) { + // default tech + Watt defaultValue = fan.Lookup(missions[i], ""); + Assert.AreEqual(expected[defaultFan][i], defaultValue.Double(), Tolerance); + + // all fan techs + foreach (var expect in expected) { + Watt value = fan.Lookup(missions[i], expect.Key); + Assert.AreEqual(expect.Value[i], value.Double(), Tolerance); + } + } } [TestMethod] - public void AuxPSTest() + public void AuxHeatingVentilationAirConditionTest() { - Assert.Inconclusive(); + var hvac = DeclarationData.HeatingVentilationAirConditioning; + + var expected = new Dictionary<string, int[]> { + { "1", new[] { 0, 150, 150, 0, 0, 0, 0, 0, 0, 0 } }, + { "2", new[] { 200, 200, 150, 0, 0, 0, 0, 0, 0, 0 } }, + { "3", new[] { 0, 200, 150, 0, 0, 0, 0, 0, 0, 0 } }, + { "4", new[] { 350, 200, 0, 300, 0, 0, 0, 0, 0, 0 } }, + { "5", new[] { 350, 200, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "6", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "7", new[] { 0, 0, 0, 0, 200, 0, 0, 0, 0, 0 } }, + { "8", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "9", new[] { 350, 200, 0, 300, 0, 0, 0, 0, 0, 0 } }, + { "10", new[] { 350, 200, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "11", new[] { 0, 0, 0, 0, 200, 0, 0, 0, 0, 0 } }, + { "12", new[] { 0, 0, 0, 0, 200, 0, 0, 0, 0, 0 } } + }; + + for (var i = 0; i < missions.Length; i++) { + foreach (var expect in expected) { + Watt value = hvac.Lookup(missions[i], expect.Key); + Assert.AreEqual(expect.Value[i], value.Double(), Tolerance); + } + } } [TestMethod] - public void AuxSPTableTest() + public void AuxPneumaticSystemTest() { - Assert.Inconclusive(); + var ps = DeclarationData.PneumaticSystem; + + var expected = new Dictionary<string, int[]> { + { "1", new[] { 0, 1300, 1240, 0, 0, 0, 0, 0, 0, 0 } }, + { "2", new[] { 1180, 1280, 1320, 0, 0, 0, 0, 0, 0, 0 } }, + { "3", new[] { 0, 1360, 1380, 0, 0, 0, 0, 0, 0, 0 } }, + { "4", new[] { 1300, 1340, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "5", new[] { 1340, 1820, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "6", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "7", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "8", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "9", new[] { 1340, 1540, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "10", new[] { 1340, 1820, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "11", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "12", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } + }; + + for (var i = 0; i < missions.Length; i++) { + foreach (var expect in expected) { + Watt value = ps.Lookup(missions[i], expect.Key); + Assert.AreEqual(expect.Value[i], value.Double(), Tolerance); + } + } } [TestMethod] - public void AuxSPTechTest() + public void AuxSteeringPumpTest() { - Assert.Inconclusive(); + var sp = DeclarationData.SteeringPump; + + var expected = new Dictionary<string, Dictionary<string, int[]>> { + { + "Fixed displacement", new Dictionary<string, int[]> { + { "1", new[] { 0, 260, 270, 0, 0, 0, 0, 0, 0, 0 } }, + { "2", new[] { 370, 320, 310, 0, 0, 0, 0, 0, 0, 0 } }, + { "3", new[] { 0, 340, 350, 0, 0, 0, 0, 0, 0, 0 } }, + { "4", new[] { 610, 530, 0, 530, 0, 0, 0, 0, 0, 0 } }, + { "5", new[] { 720, 630, 620, 0, 0, 0, 0, 0, 0, 0 } }, + { "6", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "7", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "8", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "9", new[] { 720, 550, 0, 550, 0, 0, 0, 0, 0, 0 } }, + { "10", new[] { 570, 530, 0, 0, 0, 0, 0, 0, 0, 0 } } + } + }, { + "Variable displacement", new Dictionary<string, int[]> { + { "1", new[] { 0, 156, 162, 0, 0, 0, 0, 0, 0, 0 } }, + { "2", new[] { 222, 192, 186, 0, 0, 0, 0, 0, 0, 0 } }, + { "3", new[] { 0, 204, 210, 0, 0, 0, 0, 0, 0, 0 } }, + { "4", new[] { 366, 318, 0, 318, 0, 0, 0, 0, 0, 0 } }, + { "5", new[] { 432, 378, 372, 0, 0, 0, 0, 0, 0, 0 } }, + { "6", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "7", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "8", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "9", new[] { 432, 330, 0, 330, 0, 0, 0, 0, 0, 0 } }, + { "10", new[] { 342, 318, 0, 0, 0, 0, 0, 0, 0, 0 } } + } + }, { + "Hydraulic supported by electric", new Dictionary<string, int[]> { + { "1", new[] { 0, 225, 235, 0, 0, 0, 0, 0, 0, 0 } }, + { "2", new[] { 322, 278, 269, 0, 0, 0, 0, 0, 0, 0 } }, + { "3", new[] { 0, 295, 304, 0, 0, 0, 0, 0, 0, 0 } }, + { "4", new[] { 531, 460, 0, 460, 0, 0, 0, 0, 0, 0 } }, + { "5", new[] { 627, 546, 540, 0, 0, 0, 0, 0, 0, 0 } }, + { "6", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "7", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "8", new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { "9", new[] { 627, 478, 0, 478, 0, 0, 0, 0, 0, 0 } }, + { "10", new[] { 498, 461, 0, 0, 0, 0, 0, 0, 0, 0 } } + } + } + }; + + foreach (var expect in expected) { + var technology = expect.Key; + foreach (var hdvClasses in expect.Value) { + var hdvClass = hdvClasses.Key; + for (var i = 0; i < missions.Length; i++) { + Watt value = sp.Lookup(missions[i], hdvClass, technology); + Assert.AreEqual(hdvClasses.Value[i], value.Double(), Tolerance); + } + } + } } [TestMethod] @@ -158,12 +321,12 @@ namespace TUGraz.VectoCore.Tests.Models { //var factory = DeclarationModeFactory.Instance(); //var job = factory.ReadJobFile("12t Delivery Truck.vecto"); - //var vehicleData = factory.ReadVehicleData(job.VehicleData); + //var vehicleData = factory.ReadVehicleData(job.VehicleFile); //mock vehicleData var vehicleData = new { VehicleCategory = VehicleCategory.RigidTruck, - AxleConfiguration = AxleConfiguration.AxleConfig_4x2, + AxleConfiguration = AxleConfiguration.AxleConfig4x2, GrossVehicleMassRating = 11900.SI<Kilogram>(), CurbWeight = 5850.SI<Kilogram>() }; @@ -172,7 +335,7 @@ namespace TUGraz.VectoCore.Tests.Models vehicleData.GrossVehicleMassRating, vehicleData.CurbWeight); - Assert.AreEqual("2", segment.HDVClass); + Assert.AreEqual("2", segment.VehicleClass); var data = AccelerationCurveData.ReadFromStream(segment.AccelerationFile); TestAcceleration(data); @@ -182,8 +345,7 @@ namespace TUGraz.VectoCore.Tests.Models var longHaulMission = segment.Missions[0]; Assert.AreEqual(MissionType.LongHaul, longHaulMission.MissionType); - Assert.IsNotNull(longHaulMission.CrossWindCorrectionFile); - Assert.IsTrue(!string.IsNullOrEmpty(new StreamReader(longHaulMission.CrossWindCorrectionFile).ReadLine())); + Assert.AreEqual("RigidSolo", longHaulMission.CrossWindCorrection); Assert.IsTrue(new[] { 0.4, 0.6 }.SequenceEqual(longHaulMission.AxleWeightDistribution)); Assert.IsTrue(new double[] { }.SequenceEqual(longHaulMission.TrailerAxleWeightDistribution)); @@ -200,8 +362,7 @@ namespace TUGraz.VectoCore.Tests.Models var regionalDeliveryMission = segment.Missions[1]; Assert.AreEqual(MissionType.RegionalDelivery, regionalDeliveryMission.MissionType); - Assert.IsNotNull(regionalDeliveryMission.CrossWindCorrectionFile); - Assert.IsTrue(!string.IsNullOrEmpty(new StreamReader(regionalDeliveryMission.CrossWindCorrectionFile).ReadLine())); + Assert.AreEqual("RigidSolo", regionalDeliveryMission.CrossWindCorrection); Assert.IsTrue(new[] { 0.45, 0.55 }.SequenceEqual(regionalDeliveryMission.AxleWeightDistribution)); Assert.IsTrue(new double[] { }.SequenceEqual(regionalDeliveryMission.TrailerAxleWeightDistribution)); @@ -218,8 +379,7 @@ namespace TUGraz.VectoCore.Tests.Models var urbanDeliveryMission = segment.Missions[2]; Assert.AreEqual(MissionType.UrbanDelivery, urbanDeliveryMission.MissionType); - Assert.IsNotNull(urbanDeliveryMission.CrossWindCorrectionFile); - Assert.IsTrue(!string.IsNullOrEmpty(new StreamReader(urbanDeliveryMission.CrossWindCorrectionFile).ReadLine())); + Assert.AreEqual("RigidSolo", urbanDeliveryMission.CrossWindCorrection); Assert.IsTrue(new[] { 0.45, 0.55 }.SequenceEqual(urbanDeliveryMission.AxleWeightDistribution)); Assert.IsTrue(new double[] { }.SequenceEqual(urbanDeliveryMission.TrailerAxleWeightDistribution)); @@ -243,20 +403,20 @@ namespace TUGraz.VectoCore.Tests.Models // // connect cycle --> driver --> vehicle --> wheels --> axleGear --> gearBox // // --> retarder --> clutch --> aux --> ... --> aux_XXX --> directAux --> engine - // var engineData = factory.ReadEngineData(job.EngineData); + // var engineData = factory.ReadEngineData(job.EngineFile); // var engine = new CombustionEngine(container, engineData); // // todo AUX // // todo clutch // // todo retarder - // var gearboxData = factory.ReadGearboxData(job.GearboxData); + // var gearboxData = factory.ReadGearboxData(job.GearboxFile); // var gearbox = new Gearbox(container, gearboxData); // gearbox.InShaft().Connect(engine.OutShaft()); // // todo axleGear - // var wheels = new DeclarationWheels(container, 0.SI<Meter>()); + // var wheels = new Wheels(container, 0.SI<Meter>()); // var missionVehicleData = new VehicleData(vehicleData, loading, mission.AxleWeightDistribution); // var vehicle = new Vehicle(container, missionVehicleData); @@ -303,15 +463,5 @@ namespace TUGraz.VectoCore.Tests.Models EqualAcceleration(data, -20, 1, -1); EqualAcceleration(data, 140, 0.5, -0.5); } - - [TestMethod] - public void TestEngineInertia() - { - Assert.AreEqual(3.33, DeclarationData.Engine.EngineInertia(6000.SI().Cubic.Centi.Meter).Double(), Tolerance); - Assert.AreEqual(3.60, DeclarationData.Engine.EngineInertia(7000.SI().Cubic.Centi.Meter).Double(), Tolerance); - Assert.AreEqual(3.87, DeclarationData.Engine.EngineInertia(8000.SI().Cubic.Centi.Meter).Double(), Tolerance); - Assert.AreEqual(4.14, DeclarationData.Engine.EngineInertia(9000.SI().Cubic.Centi.Meter).Double(), Tolerance); - Assert.AreEqual(6.03, DeclarationData.Engine.EngineInertia(16000.SI().Cubic.Centi.Meter).Double(), Tolerance); - } } } \ No newline at end of file diff --git a/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs b/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs index 27842ad945..ddaa121540 100644 --- a/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs @@ -3,7 +3,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent; +<<<<<<< HEAD using TUGraz.VectoCore.Models.SimulationComponent.Data; +======= +using TUGraz.VectoCore.Models.SimulationComponent.Factories; +>>>>>>> a5dcad0c91dc731752c42c6834479f598ecee201 using TUGraz.VectoCore.Models.SimulationComponent.Impl; using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; diff --git a/VectoCoreTest/Models/SimulationComponentData/FuelConsumptionMapTest.cs b/VectoCoreTest/Models/SimulationComponentData/FuelConsumptionMapTest.cs index 965f39a46c..2fbb805e92 100644 --- a/VectoCoreTest/Models/SimulationComponentData/FuelConsumptionMapTest.cs +++ b/VectoCoreTest/Models/SimulationComponentData/FuelConsumptionMapTest.cs @@ -8,41 +8,41 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData { - [TestClass] - public class FuelConsumptionMapTest - { - private const double Tolerance = 0.0001; + [TestClass] + public class FuelConsumptionMapTest + { + private const double Tolerance = 0.0001; - [TestMethod] - public void TestFuelConsumption_FixedPoints() - { - var map = FuelConsumptionMap.ReadFromFile(@"TestData\Components\24t Coach.vmap"); - var lines = File.ReadAllLines(@"TestData\Components\24t Coach.vmap").Skip(1).ToArray(); - AssertMapValuesEqual(lines, map); - } + [TestMethod] + public void TestFuelConsumption_FixedPoints() + { + var map = FuelConsumptionMap.ReadFromFile(@"TestData\Components\24t Coach.vmap"); + var lines = File.ReadAllLines(@"TestData\Components\24t Coach.vmap").Skip(1).ToArray(); + AssertMapValuesEqual(lines, map); + } - [TestMethod] - public void TestFuelConsumption_InterpolatedPoints() - { - var map = FuelConsumptionMap.ReadFromFile(@"TestData\Components\24t Coach.vmap"); - var lines = File.ReadAllLines(@"TestData\Components\24t CoachInterpolated.vmap").Skip(1).ToArray(); - AssertMapValuesEqual(lines, map); - } + [TestMethod] + public void TestFuelConsumption_InterpolatedPoints() + { + var map = FuelConsumptionMap.ReadFromFile(@"TestData\Components\24t Coach.vmap"); + var lines = File.ReadAllLines(@"TestData\Components\24t CoachInterpolated.vmap").Skip(1).ToArray(); + AssertMapValuesEqual(lines, map); + } - private static void AssertMapValuesEqual(string[] lines, FuelConsumptionMap map) - { - for (var i = 1; i < lines.Count(); i++) { - var entry = lines[i].Split(',').Select(x => double.Parse(x, CultureInfo.InvariantCulture)).ToArray(); - try { - Assert.AreEqual((double) entry[2].SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second, - (double) map.GetFuelConsumption(entry[1].SI<NewtonMeter>(), entry[0].RPMtoRad()), - Tolerance, - string.Format("Line: {0}, n={1}, T={2}", (i + 2), entry[0].SI().Rounds.Per.Minute, entry[1])); - } catch (VectoException ex) { - throw new VectoException(string.Format("Row {0}: Error in ConsumptionMap n={1}, T={2}: {3}", - i + 2, entry[0], entry[1], ex.Message)); - } - } - } - } + private static void AssertMapValuesEqual(string[] lines, FuelConsumptionMap map) + { + for (var i = 1; i < lines.Count(); i++) { + var entry = lines[i].Split(',').Select(x => double.Parse(x, CultureInfo.InvariantCulture)).ToArray(); + try { + Assert.AreEqual((double)entry[2].SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second, + (double)map.GetFuelConsumption(entry[1].SI<NewtonMeter>(), entry[0].RPMtoRad()), + Tolerance, + string.Format("Line: {0}, n={1}, T={2}", (i + 2), entry[0].SI().Rounds.Per.Minute, entry[1])); + } catch (VectoException ex) { + throw new VectoException(string.Format("Row {0}: Error in ConsumptionMap n={1}, T={2}: {3}", + i + 2, entry[0], entry[1], ex.Message)); + } + } + } + } } \ No newline at end of file diff --git a/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs b/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs index cd5feb3699..3785202fb0 100644 --- a/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs +++ b/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs @@ -1,8 +1,8 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; +using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData @@ -90,12 +90,18 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData [TestMethod] public void Test_FileRead_WrongFileFormat_InsufficientColumns() { +<<<<<<< HEAD try { var curve = FullLoadCurve.ReadFromFile(@"TestData\Components\FullLoadCurve insufficient columns.vfld"); Assert.Fail("this should not be reached."); } catch (VectoException ex) { Assert.AreEqual("FullLoadCurve Data File must consist of at least 3 columns.", ex.Message); } +======= + AssertHelper.Exception<VectoException>( + () => FullLoadCurve.ReadFromFile(@"TestData\Components\FullLoadCurve insufficient columns.vfld"), + "FullLoadCurve Data File must consist of 4 columns."); +>>>>>>> a5dcad0c91dc731752c42c6834479f598ecee201 } /// <summary> @@ -125,14 +131,9 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData [TestMethod] public void Test_FileRead_InsufficientEntries() { - try { - FullLoadCurve.ReadFromFile(@"TestData\Components\FullLoadCurve insufficient entries.vfld"); - Assert.Fail("this should not be reached."); - } catch (VectoException ex) { - Assert.AreEqual( - "FullLoadCurve must consist of at least two lines with numeric values (below file header)", - ex.Message); - } + AssertHelper.Exception<VectoException>( + () => FullLoadCurve.ReadFromFile(@"TestData\Components\FullLoadCurve insufficient entries.vfld"), + "FullLoadCurve must consist of at least two lines with numeric values (below file header)"); } } } \ No newline at end of file diff --git a/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs b/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs index 613b0e5196..09459d31da 100644 --- a/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs +++ b/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs @@ -4,6 +4,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData @@ -49,8 +50,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData var gbxData = EngineeringModeSimulationDataReader.CreateGearboxDataFromFile(TestContext.DataRow["GearboxDataFile"].ToString()); - - var PvD = Double.Parse(TestContext.DataRow["PowerGbxOut"].ToString(), CultureInfo.InvariantCulture).SI<Watt>(); + var PvD = double.Parse(TestContext.DataRow["PowerGbxOut"].ToString(), CultureInfo.InvariantCulture).SI<Watt>(); var torqueToWheels = Formulas.PowerToTorque(PvD, SpeedToAngularSpeed(speed, rdyn)); var torqueFromEngine = 0.SI<NewtonMeter>(); @@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData var powerEngine = Formulas.TorqueToPower(torqueFromEngine, angSpeed); var loss = powerEngine - PvD; - Assert.AreEqual(Double.Parse(TestContext.DataRow["GbxPowerLoss"].ToString(), CultureInfo.InvariantCulture), + Assert.AreEqual(double.Parse(TestContext.DataRow["GbxPowerLoss"].ToString(), CultureInfo.InvariantCulture), loss.Double(), 0.1, TestContext.DataRow["TestName"].ToString()); } @@ -73,7 +73,10 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData { var gbxData = EngineeringModeSimulationDataReader.CreateGearboxDataFromFile(GearboxFile); + AssertHelper.Exception<VectoSimulationException>( + () => gbxData.AxleGearData.LossMap.GearboxInTorque(2700.RPMtoRad(), 100.SI<NewtonMeter>())); +<<<<<<< HEAD var angSpeed = 2700.RPMtoRad(); var torqueToWheels = 100.SI<NewtonMeter>(); @@ -110,6 +113,16 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData } catch (Exception e) { Assert.IsInstanceOfType(e, typeof (VectoSimulationException), "negative angular speed"); } +======= + AssertHelper.Exception<VectoSimulationException>( + () => gbxData.AxleGearData.LossMap.GearboxInTorque(1000.RPMtoRad(), 50000.SI<NewtonMeter>())); + + AssertHelper.Exception<VectoSimulationException>( + () => gbxData.AxleGearData.LossMap.GearboxInTorque(1000.RPMtoRad(), -10000.SI<NewtonMeter>())); + + AssertHelper.Exception<VectoSimulationException>( + () => gbxData.AxleGearData.LossMap.GearboxInTorque(-1000.RPMtoRad(), 500.SI<NewtonMeter>())); +>>>>>>> a5dcad0c91dc731752c42c6834479f598ecee201 } protected PerSecond SpeedToAngularSpeed(double v, double r) diff --git a/VectoCoreTest/Utils/AssertHelper.cs b/VectoCoreTest/Utils/AssertHelper.cs new file mode 100644 index 0000000000..e126f32b52 --- /dev/null +++ b/VectoCoreTest/Utils/AssertHelper.cs @@ -0,0 +1,24 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace TUGraz.VectoCore.Tests.Utils +{ + public class AssertHelper + { + /// <summary> + /// Assert an expected Exception. + /// </summary> + public static void Exception<T>(Action func, string message = null) where T : Exception + { + try { + func(); + Assert.Fail("Expected Exception {0}, but no exception occured.", typeof(T)); + } catch (T ex) { + if (!string.IsNullOrEmpty(message)) { + Assert.AreEqual(message, ex.Message, + string.Format("Expected Exception message: {0}, but got message: {1}", message, ex.Message)); + } + } + } + } +} \ No newline at end of file diff --git a/VectoCoreTest/Utils/DummyGearbox.cs b/VectoCoreTest/Utils/DummyGearbox.cs index fd22e802a5..e1e3610186 100644 --- a/VectoCoreTest/Utils/DummyGearbox.cs +++ b/VectoCoreTest/Utils/DummyGearbox.cs @@ -1,5 +1,4 @@ using System; -using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; diff --git a/VectoCoreTest/Utils/ResultFileHelper.cs b/VectoCoreTest/Utils/ResultFileHelper.cs index 3658b316ca..6983a3a49b 100644 --- a/VectoCoreTest/Utils/ResultFileHelper.cs +++ b/VectoCoreTest/Utils/ResultFileHelper.cs @@ -1,8 +1,8 @@ using System; -using System.IO; +using System.Collections.Generic; using System.Data; +using System.IO; using System.Linq; -using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Models.Simulation.Data; diff --git a/VectoCoreTest/VectoCoreTest.csproj b/VectoCoreTest/VectoCoreTest.csproj index 81838a3cf0..b1cdb6c91f 100644 --- a/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCoreTest/VectoCoreTest.csproj @@ -71,7 +71,7 @@ <Compile Include="Dummy\FactoryTest.cs" /> <Compile Include="Exceptions\ExceptionTests.cs" /> <Compile Include="Integration\EngineOnlyCycle\EngineOnlyCycleTest.cs" /> - <Compile Include="Models\DeclarationDataTest.cs" /> + <Compile Include="Models\Declaration\DeclarationDataTest.cs" /> <Compile Include="Models\SimulationComponentData\AccelerationCurveTest.cs" /> <Compile Include="Models\SimulationComponentData\FuelConsumptionMapTest.cs" /> <Compile Include="Models\SimulationComponentData\FullLoadCurveTest.cs" /> @@ -84,6 +84,7 @@ <Compile Include="Models\SimulationComponent\WheelsTest.cs" /> <Compile Include="Models\SimulationComponent\VehicleTest.cs" /> <Compile Include="Models\Simulation\DrivingCycleTests.cs" /> + <Compile Include="Utils\AssertHelper.cs" /> <Compile Include="Utils\ResultFileHelper.cs" /> <Compile Include="Utils\MockPorts.cs" /> <Compile Include="Models\Simulation\SimulationTests.cs" /> @@ -291,9 +292,7 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> - <ItemGroup> - <Folder Include="Models\DeclarationData\" /> - </ItemGroup> + <ItemGroup /> <Choose> <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> <ItemGroup> -- GitLab