From 8a6a082c7d5531bfdff8023e5c4486cd10970d04 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 15 Nov 2017 13:57:05 +0100 Subject: [PATCH] renaming ETPT to VTP, refactoring: new cycle format, aux handling (speed dependent), correction of engine fan equation --- Documentation/VectoHashingTool/convert.bat | 2 +- VECTO.sln | 47 +- VECTO.sln.DotSettings | 1 + VECTO/GUI/MainForm.Designer.vb | 2 +- VECTO/GUI/MainForm.vb | 6 +- ...esigner.vb => VectoVTPJobForm.Designer.vb} | 256 ++-- ...oEPTPJobForm.resx => VectoVTPJobForm.resx} | 258 ---- ...VectoEPTPJobForm.vb => VectoVTPJobForm.vb} | 14 +- VECTO/VECTO.vbproj | 2 - .../InputData/EngineeringInputData.cs | 2 +- .../InputData/IInputDataProvider.cs | 10 +- .../OutputData/IOutputFileWriter.cs | 2 +- VectoCommon/VectoHashing/IVectoHash.cs | 2 +- .../InputData/FileIO/JSON/JSONInputData.cs | 1245 +++++++++-------- .../FileIO/JSON/JSONInputDataFactory.cs | 2 +- .../Reader/DrivingCycleDataReader.cs | 64 +- ... EngineeringVTPModeVectoRunDataFactory.cs} | 34 +- .../Models/Simulation/Data/VectoRunData.cs | 11 +- .../Simulation/Impl/PowertrainBuilder.cs | 66 +- .../Simulation/Impl/SimulatorFactory.cs | 8 +- .../Simulation/Impl/VehicleContainer.cs | 2 +- .../SimulationComponent/Data/AuxiliaryData.cs | 174 +-- .../Data/DrivingCycleData.cs | 4 +- .../Impl/EPTPCombustionEngine.cs | 78 -- .../Impl/EngineFanAuxiliary.cs | 27 + .../Impl/VTPCombustionEngine.cs | 21 + .../Impl/{EPTPCycle.cs => VTPCycle.cs} | 20 +- .../Resources/Declaration/VAUX/HVAC-Table.csv | 8 +- .../Resources/Declaration/VAUX/SP-Table.csv | 6 +- .../SimulationComponent/EngineFanAuxTest.cs | 23 + VectoCore/VectoCoreTest/VectoCoreTest.csproj | 1 + 31 files changed, 1123 insertions(+), 1275 deletions(-) rename VECTO/GUI/{VectoEPTPJobForm.Designer.vb => VectoVTPJobForm.Designer.vb} (77%) rename VECTO/GUI/{VectoEPTPJobForm.resx => VectoVTPJobForm.resx} (55%) rename VECTO/GUI/{VectoEPTPJobForm.vb => VectoVTPJobForm.vb} (98%) rename VectoCore/VectoCore/InputData/Reader/Impl/{EngineeringEPTPModeVectoRunDataFactory.cs => EngineeringVTPModeVectoRunDataFactory.cs} (73%) delete mode 100644 VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCombustionEngine.cs create mode 100644 VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineFanAuxiliary.cs create mode 100644 VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs rename VectoCore/VectoCore/Models/SimulationComponent/Impl/{EPTPCycle.cs => VTPCycle.cs} (90%) create mode 100644 VectoCore/VectoCoreTest/Models/SimulationComponent/EngineFanAuxTest.cs diff --git a/Documentation/VectoHashingTool/convert.bat b/Documentation/VectoHashingTool/convert.bat index bcd246ff86..70a31cd5a9 100644 --- a/Documentation/VectoHashingTool/convert.bat +++ b/Documentation/VectoHashingTool/convert.bat @@ -8,7 +8,7 @@ set LIST= for /f %%f in (files.txt) do set LIST=!LIST! "%%f" -REM pandoc --verbose -f markdown+raw_html %LIST% -s -S --toc --toc-depth=2 --self-contained --email-obfuscation=none --section-divs --mathjax=includes/mathjax.js -c includes/style.css -c includes/print.css -B includes/header.html -A includes/footer.html -o help.html -H includes/jquery.js -H includes/jquery-ui.js -H includes/include.js +REM pandoc --verbose -f markdown+raw_html %LIST% -s --toc --toc-depth=2 --self-contained --email-obfuscation=none --section-divs --mathjax=includes/mathjax.js -c includes/style.css -c includes/print.css -B includes/header.html -A includes/footer.html -o help.html -H includes/jquery.js -H includes/jquery-ui.js -H includes/include.js %LOCALAPPDATA%\Pandoc\pandoc --verbose -f markdown+raw_html %LIST% -s -S --toc --toc-depth=2 --self-contained --email-obfuscation=none --section-divs --webtex -c includes/style.css -c includes/print.css -B includes/header.html -A includes/footer.html -o HashingToolHelp.html -H includes/jquery.js -H includes/jquery-ui.js -H includes/include.js REM pandoc %LIST% -s -S --toc --toc-depth=2 --self-contained --email-obfuscation=none --section-divs --webtex -c includes/style.css -B includes/header.html -A includes/footer.html -o help.html -H includes/jquery.js -H includes/jquery-ui.js -H includes/include.js diff --git a/VECTO.sln b/VECTO.sln index d3fe7288cf..9f48ecc4f6 100644 --- a/VECTO.sln +++ b/VECTO.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VECTO", "VECTO\VECTO.vbproj", "{AAC0F132-0A9F-45B3-B682-77AC9B24B352}" ProjectSection(ProjectDependencies) = postProject @@ -144,8 +144,8 @@ Global {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|Any CPU.Build.0 = Release|Any CPU {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|x64.ActiveCfg = Debug|Any CPU {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|x86.ActiveCfg = Debug|Any CPU {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -172,8 +172,8 @@ Global {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|Any CPU.Build.0 = Release|Any CPU {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|x64.ActiveCfg = Debug|Any CPU {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|x86.ActiveCfg = Debug|Any CPU {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -199,7 +199,6 @@ Global {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Deploy|Any CPU.Build.0 = Debug|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Deploy|x64.ActiveCfg = Debug|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Deploy|x86.ActiveCfg = Debug|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -227,7 +226,6 @@ Global {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Deploy|Any CPU.Build.0 = Debug|Any CPU {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Deploy|x64.ActiveCfg = Debug|Any CPU {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Deploy|x86.ActiveCfg = Debug|Any CPU {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -273,8 +271,8 @@ Global {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|Any CPU.Build.0 = Release|Any CPU {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|x64.ActiveCfg = Debug|Any CPU {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|x86.ActiveCfg = Debug|Any CPU {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -301,8 +299,8 @@ Global {60AD4DF0-6648-4374-83CB-C7A162EFB391}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {60AD4DF0-6648-4374-83CB-C7A162EFB391}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {60AD4DF0-6648-4374-83CB-C7A162EFB391}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.Build.0 = Release|Any CPU {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|x64.ActiveCfg = Debug|Any CPU {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|x86.ActiveCfg = Debug|Any CPU {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -330,7 +328,6 @@ Global {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.Deploy|Any CPU.Build.0 = Debug|Any CPU {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.Deploy|x64.ActiveCfg = Debug|Any CPU {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.Deploy|x86.ActiveCfg = Debug|Any CPU {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -358,7 +355,6 @@ Global {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.Deploy|Any CPU.Build.0 = Debug|Any CPU {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.Deploy|x64.ActiveCfg = Debug|Any CPU {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.Deploy|x86.ActiveCfg = Debug|Any CPU {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -386,7 +382,6 @@ Global {E8B0B447-1A54-4BEC-A160-AF0017000781}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {E8B0B447-1A54-4BEC-A160-AF0017000781}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {E8B0B447-1A54-4BEC-A160-AF0017000781}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {E8B0B447-1A54-4BEC-A160-AF0017000781}.Deploy|Any CPU.Build.0 = Debug|Any CPU {E8B0B447-1A54-4BEC-A160-AF0017000781}.Deploy|x64.ActiveCfg = Debug|Any CPU {E8B0B447-1A54-4BEC-A160-AF0017000781}.Deploy|x86.ActiveCfg = Debug|Any CPU {E8B0B447-1A54-4BEC-A160-AF0017000781}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -411,8 +406,8 @@ Global {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|Any CPU.Build.0 = Release|Any CPU {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|x64.ActiveCfg = Debug|Any CPU {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|x86.ActiveCfg = Debug|Any CPU {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -437,7 +432,6 @@ Global {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.Deploy|Any CPU.Build.0 = Debug|Any CPU {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.Deploy|x64.ActiveCfg = Debug|Any CPU {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.Deploy|x86.ActiveCfg = Debug|Any CPU {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -485,7 +479,6 @@ Global {D959CB7C-F514-4F5E-9C33-684D0012474B}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {D959CB7C-F514-4F5E-9C33-684D0012474B}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {D959CB7C-F514-4F5E-9C33-684D0012474B}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {D959CB7C-F514-4F5E-9C33-684D0012474B}.Deploy|Any CPU.Build.0 = Debug|Any CPU {D959CB7C-F514-4F5E-9C33-684D0012474B}.Deploy|x64.ActiveCfg = Debug|Any CPU {D959CB7C-F514-4F5E-9C33-684D0012474B}.Deploy|x86.ActiveCfg = Debug|Any CPU {D959CB7C-F514-4F5E-9C33-684D0012474B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -509,7 +502,6 @@ Global {41314A40-AB3E-4F43-B1A4-58443F4014F2}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {41314A40-AB3E-4F43-B1A4-58443F4014F2}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Deploy|Any CPU.Build.0 = Debug|Any CPU {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Deploy|x64.ActiveCfg = Debug|Any CPU {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Deploy|x86.ActiveCfg = Debug|Any CPU {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -556,7 +548,6 @@ Global {2C58BA97-2954-4D19-920F-A24B78FC80A4}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {2C58BA97-2954-4D19-920F-A24B78FC80A4}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Deploy|Any CPU.Build.0 = Debug|Any CPU {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Deploy|x64.ActiveCfg = Debug|Any CPU {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Deploy|x86.ActiveCfg = Debug|Any CPU {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -580,7 +571,6 @@ Global {7C364099-9B85-473A-8A42-BBEBE4798FF5}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {7C364099-9B85-473A-8A42-BBEBE4798FF5}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {7C364099-9B85-473A-8A42-BBEBE4798FF5}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {7C364099-9B85-473A-8A42-BBEBE4798FF5}.Deploy|Any CPU.Build.0 = Debug|Any CPU {7C364099-9B85-473A-8A42-BBEBE4798FF5}.Deploy|x64.ActiveCfg = Debug|Any CPU {7C364099-9B85-473A-8A42-BBEBE4798FF5}.Deploy|x86.ActiveCfg = Debug|Any CPU {7C364099-9B85-473A-8A42-BBEBE4798FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -604,8 +594,8 @@ Global {B673E12F-D323-4C4C-8805-9915B2C72D3D}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {B673E12F-D323-4C4C-8805-9915B2C72D3D}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {B673E12F-D323-4C4C-8805-9915B2C72D3D}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|Any CPU.Build.0 = Release|Any CPU {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|x64.ActiveCfg = Debug|Any CPU {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|x86.ActiveCfg = Debug|Any CPU {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -631,7 +621,6 @@ Global {760C1C5B-A767-463E-BA85-F0BCFC23A550}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {760C1C5B-A767-463E-BA85-F0BCFC23A550}.DebugTUG|x86.ActiveCfg = Debug|Any CPU {760C1C5B-A767-463E-BA85-F0BCFC23A550}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {760C1C5B-A767-463E-BA85-F0BCFC23A550}.Deploy|Any CPU.Build.0 = Debug|Any CPU {760C1C5B-A767-463E-BA85-F0BCFC23A550}.Deploy|x64.ActiveCfg = Debug|Any CPU {760C1C5B-A767-463E-BA85-F0BCFC23A550}.Deploy|x86.ActiveCfg = Debug|Any CPU {760C1C5B-A767-463E-BA85-F0BCFC23A550}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -656,8 +645,8 @@ Global {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU + {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|Any CPU.Build.0 = Deploy|Any CPU {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|x64.ActiveCfg = Debug|Any CPU {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|x86.ActiveCfg = Debug|Any CPU {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -682,8 +671,8 @@ Global {33F9848E-9257-4BE2-915F-68E748AEB204}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {33F9848E-9257-4BE2-915F-68E748AEB204}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {33F9848E-9257-4BE2-915F-68E748AEB204}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU - {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|Any CPU.Build.0 = Debug|Any CPU + {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|Any CPU.Build.0 = Release|Any CPU {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|x64.ActiveCfg = Debug|Any CPU {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|x86.ActiveCfg = Debug|Any CPU {33F9848E-9257-4BE2-915F-68E748AEB204}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/VECTO.sln.DotSettings b/VECTO.sln.DotSettings index 34ea44b952..a8f645b18f 100644 --- a/VECTO.sln.DotSettings +++ b/VECTO.sln.DotSettings @@ -35,6 +35,7 @@ <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PTO/@EntryIndexedValue">PTO</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:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VTP/@EntryIndexedValue">VTP</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WHTC/@EntryIndexedValue">WHTC</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XML/@EntryIndexedValue">XML</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XSD/@EntryIndexedValue">XSD</s:String> diff --git a/VECTO/GUI/MainForm.Designer.vb b/VECTO/GUI/MainForm.Designer.vb index f54f394102..dff52a9b7b 100644 --- a/VECTO/GUI/MainForm.Designer.vb +++ b/VECTO/GUI/MainForm.Designer.vb @@ -700,7 +700,7 @@ Partial Class MainForm Me.EPTPJobEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_VECTO Me.EPTPJobEditorToolStripMenuItem.Name = "EPTPJobEditorToolStripMenuItem" Me.EPTPJobEditorToolStripMenuItem.Size = New System.Drawing.Size(156, 22) - Me.EPTPJobEditorToolStripMenuItem.Text = "EPTP Job Editor" + Me.EPTPJobEditorToolStripMenuItem.Text = "VTP Job Editor" ' 'VEHEditorToolStripMenuItem ' diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index d8802473ae..6bf1563e05 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -1271,12 +1271,12 @@ lbFound: If x = "<New>" Then ShowVectoJobForm() VectoJobForm.VectoNew() - ElseIf x = "<EPTP>" Then + ElseIf x = "<VTP>" Then ShowVectoEPTPJobForm() VectoEPTPJobForm.VectoNew() Else Try - Dim job As IEPTPInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(x), IEPTPInputDataProvider) + Dim job As IVTPInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(x), IVTPInputDataProvider) If job Is Nothing Then ShowVectoJobForm() VectoJobForm.VECTOload2Form(x) @@ -2030,7 +2030,7 @@ Lb1: Private Sub EPTPJobEditorToolStripMenuItem_Click(sender As Object, e As EventArgs) _ Handles EPTPJobEditorToolStripMenuItem.Click - OpenVECTOeditor("<EPTP>") + OpenVECTOeditor("<VTP>") End Sub End Class diff --git a/VECTO/GUI/VectoEPTPJobForm.Designer.vb b/VECTO/GUI/VectoVTPJobForm.Designer.vb similarity index 77% rename from VECTO/GUI/VectoEPTPJobForm.Designer.vb rename to VECTO/GUI/VectoVTPJobForm.Designer.vb index 4aa60fd6d3..3f8c030922 100644 --- a/VECTO/GUI/VectoEPTPJobForm.Designer.vb +++ b/VECTO/GUI/VectoVTPJobForm.Designer.vb @@ -2,7 +2,7 @@ Imports Microsoft.VisualBasic.CompilerServices <DesignerGenerated()> _ -Partial Class VectoEPTPJobForm +Partial Class VectoVTPJobForm Inherits Form 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. @@ -26,18 +26,18 @@ Partial Class VectoEPTPJobForm <DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VectoEPTPJobForm)) + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VectoVTPJobForm)) Me.GrCycles = New System.Windows.Forms.GroupBox() Me.Label2 = New System.Windows.Forms.Label() Me.LvCycles = New System.Windows.Forms.ListView() - Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) Me.BtDRIrem = New System.Windows.Forms.Button() Me.BtDRIadd = New System.Windows.Forms.Button() Me.GrAux = New System.Windows.Forms.GroupBox() Me.LvAux = New System.Windows.Forms.ListView() - Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) + Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader) Me.TbVEH = New System.Windows.Forms.TextBox() Me.ButtonVEH = New System.Windows.Forms.Button() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() @@ -69,6 +69,8 @@ Partial Class VectoEPTPJobForm Me.lblEngineCharacteristics = New System.Windows.Forms.Label() Me.PictureBox2 = New System.Windows.Forms.PictureBox() Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.tbFanDiameter = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() Me.tbC3 = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.tbC2 = New System.Windows.Forms.TextBox() @@ -76,22 +78,23 @@ Partial Class VectoEPTPJobForm Me.tbC1 = New System.Windows.Forms.TextBox() Me.Label1 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() - Me.GrCycles.SuspendLayout() - Me.GrAux.SuspendLayout() - Me.StatusStrip1.SuspendLayout() - Me.ToolStrip1.SuspendLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.CmOpenFile.SuspendLayout() - CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() - Me.GroupBox1.SuspendLayout() - Me.SuspendLayout() + Me.Label7 = New System.Windows.Forms.Label() + Me.GrCycles.SuspendLayout + Me.GrAux.SuspendLayout + Me.StatusStrip1.SuspendLayout + Me.ToolStrip1.SuspendLayout + CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit + Me.CmOpenFile.SuspendLayout + CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.PicBox,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.PictureBox2,System.ComponentModel.ISupportInitialize).BeginInit + Me.GroupBox1.SuspendLayout + Me.SuspendLayout ' 'GrCycles ' - Me.GrCycles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.GrCycles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.GrCycles.Controls.Add(Me.Label2) Me.GrCycles.Controls.Add(Me.LvCycles) Me.GrCycles.Controls.Add(Me.BtDRIrem) @@ -100,14 +103,14 @@ Partial Class VectoEPTPJobForm Me.GrCycles.Name = "GrCycles" Me.GrCycles.Size = New System.Drawing.Size(515, 138) Me.GrCycles.TabIndex = 10 - Me.GrCycles.TabStop = False + Me.GrCycles.TabStop = false Me.GrCycles.Text = "Cycles" ' 'Label2 ' - Me.Label2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label2.AutoSize = True + Me.Label2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.Label2.AutoSize = true Me.Label2.Location = New System.Drawing.Point(391, 109) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(118, 13) @@ -116,22 +119,22 @@ Partial Class VectoEPTPJobForm ' 'LvCycles ' - Me.LvCycles.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvCycles.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.LvCycles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) - Me.LvCycles.FullRowSelect = True - Me.LvCycles.GridLines = True + Me.LvCycles.FullRowSelect = true + Me.LvCycles.GridLines = true Me.LvCycles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None - Me.LvCycles.HideSelection = False - Me.LvCycles.LabelEdit = True + Me.LvCycles.HideSelection = false + Me.LvCycles.LabelEdit = true Me.LvCycles.Location = New System.Drawing.Point(6, 19) - Me.LvCycles.MultiSelect = False + Me.LvCycles.MultiSelect = false Me.LvCycles.Name = "LvCycles" Me.LvCycles.Size = New System.Drawing.Size(503, 89) Me.LvCycles.TabIndex = 0 - Me.LvCycles.TabStop = False - Me.LvCycles.UseCompatibleStateImageBehavior = False + Me.LvCycles.TabStop = false + Me.LvCycles.UseCompatibleStateImageBehavior = false Me.LvCycles.View = System.Windows.Forms.View.Details ' 'ColumnHeader1 @@ -141,54 +144,54 @@ Partial Class VectoEPTPJobForm ' 'BtDRIrem ' - Me.BtDRIrem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtDRIrem.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.BtDRIrem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon Me.BtDRIrem.Location = New System.Drawing.Point(29, 109) Me.BtDRIrem.Name = "BtDRIrem" Me.BtDRIrem.Size = New System.Drawing.Size(24, 24) Me.BtDRIrem.TabIndex = 2 - Me.BtDRIrem.UseVisualStyleBackColor = True + Me.BtDRIrem.UseVisualStyleBackColor = true ' 'BtDRIadd ' - Me.BtDRIadd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.BtDRIadd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.BtDRIadd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon Me.BtDRIadd.Location = New System.Drawing.Point(5, 109) Me.BtDRIadd.Name = "BtDRIadd" Me.BtDRIadd.Size = New System.Drawing.Size(24, 24) Me.BtDRIadd.TabIndex = 1 - Me.BtDRIadd.UseVisualStyleBackColor = True + Me.BtDRIadd.UseVisualStyleBackColor = true ' 'GrAux ' - Me.GrAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.GrAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.GrAux.Controls.Add(Me.LvAux) Me.GrAux.Location = New System.Drawing.Point(12, 114) Me.GrAux.Name = "GrAux" Me.GrAux.Size = New System.Drawing.Size(515, 140) Me.GrAux.TabIndex = 9 - Me.GrAux.TabStop = False + Me.GrAux.TabStop = false Me.GrAux.Text = "Auxiliaries" ' 'LvAux ' - Me.LvAux.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LvAux.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.LvAux.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6}) - Me.LvAux.FullRowSelect = True - Me.LvAux.GridLines = True - Me.LvAux.HideSelection = False + Me.LvAux.FullRowSelect = true + Me.LvAux.GridLines = true + Me.LvAux.HideSelection = false Me.LvAux.Location = New System.Drawing.Point(4, 19) - Me.LvAux.MultiSelect = False + Me.LvAux.MultiSelect = false Me.LvAux.Name = "LvAux" Me.LvAux.Size = New System.Drawing.Size(503, 115) Me.LvAux.TabIndex = 0 - Me.LvAux.TabStop = False - Me.LvAux.UseCompatibleStateImageBehavior = False + Me.LvAux.TabStop = false + Me.LvAux.UseCompatibleStateImageBehavior = false Me.LvAux.View = System.Windows.Forms.View.Details ' 'ColumnHeader4 @@ -208,8 +211,8 @@ Partial Class VectoEPTPJobForm ' 'TbVEH ' - Me.TbVEH.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TbVEH.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.TbVEH.Location = New System.Drawing.Point(90, 86) Me.TbVEH.Name = "TbVEH" Me.TbVEH.Size = New System.Drawing.Size(411, 20) @@ -217,14 +220,14 @@ Partial Class VectoEPTPJobForm ' 'ButtonVEH ' - Me.ButtonVEH.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ButtonVEH.Image = CType(resources.GetObject("ButtonVEH.Image"), System.Drawing.Image) + Me.ButtonVEH.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) + Me.ButtonVEH.Image = CType(resources.GetObject("ButtonVEH.Image"),System.Drawing.Image) Me.ButtonVEH.Location = New System.Drawing.Point(502, 84) Me.ButtonVEH.Name = "ButtonVEH" Me.ButtonVEH.Size = New System.Drawing.Size(24, 24) Me.ButtonVEH.TabIndex = 2 - Me.ButtonVEH.TabStop = False - Me.ButtonVEH.UseVisualStyleBackColor = True + Me.ButtonVEH.TabStop = false + Me.ButtonVEH.UseVisualStyleBackColor = true ' 'StatusStrip1 ' @@ -232,7 +235,7 @@ Partial Class VectoEPTPJobForm Me.StatusStrip1.Location = New System.Drawing.Point(0, 568) Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.Size = New System.Drawing.Size(944, 22) - Me.StatusStrip1.SizingGrip = False + Me.StatusStrip1.SizingGrip = false Me.StatusStrip1.TabIndex = 6 Me.StatusStrip1.Text = "StatusStrip1" ' @@ -244,24 +247,24 @@ Partial Class VectoEPTPJobForm ' 'ButOK ' - Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.ButOK.Location = New System.Drawing.Point(778, 541) Me.ButOK.Name = "ButOK" Me.ButOK.Size = New System.Drawing.Size(75, 23) Me.ButOK.TabIndex = 0 Me.ButOK.Text = "Save" - Me.ButOK.UseVisualStyleBackColor = True + Me.ButOK.UseVisualStyleBackColor = true ' 'ButCancel ' - Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.ButCancel.Location = New System.Drawing.Point(859, 541) Me.ButCancel.Name = "ButCancel" Me.ButCancel.Size = New System.Drawing.Size(75, 23) Me.ButCancel.TabIndex = 1 Me.ButCancel.Text = "Cancel" - Me.ButCancel.UseVisualStyleBackColor = True + Me.ButCancel.UseVisualStyleBackColor = true ' 'ToolStrip1 ' @@ -344,21 +347,21 @@ Partial Class VectoEPTPJobForm ' 'PictureBox1 ' - Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.PictureBox1.BackColor = System.Drawing.Color.White Me.PictureBox1.Image = Global.TUGraz.VECTO.My.Resources.Resources.VECTO_VECTO Me.PictureBox1.Location = New System.Drawing.Point(0, 28) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(944, 40) Me.PictureBox1.TabIndex = 21 - Me.PictureBox1.TabStop = False + Me.PictureBox1.TabStop = false ' 'CmOpenFile ' Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) Me.CmOpenFile.Name = "CmOpenFile" - Me.CmOpenFile.ShowImageMargin = False + Me.CmOpenFile.ShowImageMargin = false Me.CmOpenFile.Size = New System.Drawing.Size(128, 48) ' 'OpenWithToolStripMenuItem @@ -382,7 +385,7 @@ Partial Class VectoEPTPJobForm Me.PicVehicle.Size = New System.Drawing.Size(300, 88) Me.PicVehicle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PicVehicle.TabIndex = 36 - Me.PicVehicle.TabStop = False + Me.PicVehicle.TabStop = false ' 'PicBox ' @@ -392,13 +395,13 @@ Partial Class VectoEPTPJobForm Me.PicBox.Name = "PicBox" Me.PicBox.Size = New System.Drawing.Size(390, 296) Me.PicBox.TabIndex = 36 - Me.PicBox.TabStop = False + Me.PicBox.TabStop = false ' 'TbEngTxt ' Me.TbEngTxt.Location = New System.Drawing.Point(542, 171) Me.TbEngTxt.Name = "TbEngTxt" - Me.TbEngTxt.ReadOnly = True + Me.TbEngTxt.ReadOnly = true Me.TbEngTxt.Size = New System.Drawing.Size(390, 20) Me.TbEngTxt.TabIndex = 6 ' @@ -406,7 +409,7 @@ Partial Class VectoEPTPJobForm ' Me.TbVehCat.Location = New System.Drawing.Point(848, 84) Me.TbVehCat.Name = "TbVehCat" - Me.TbVehCat.ReadOnly = True + Me.TbVehCat.ReadOnly = true Me.TbVehCat.Size = New System.Drawing.Size(87, 20) Me.TbVehCat.TabIndex = 2 ' @@ -414,7 +417,7 @@ Partial Class VectoEPTPJobForm ' Me.TbAxleConf.Location = New System.Drawing.Point(904, 113) Me.TbAxleConf.Name = "TbAxleConf" - Me.TbAxleConf.ReadOnly = True + Me.TbAxleConf.ReadOnly = true Me.TbAxleConf.Size = New System.Drawing.Size(31, 20) Me.TbAxleConf.TabIndex = 4 ' @@ -422,7 +425,7 @@ Partial Class VectoEPTPJobForm ' Me.TbHVCclass.Location = New System.Drawing.Point(848, 142) Me.TbHVCclass.Name = "TbHVCclass" - Me.TbHVCclass.ReadOnly = True + Me.TbHVCclass.ReadOnly = true Me.TbHVCclass.Size = New System.Drawing.Size(87, 20) Me.TbHVCclass.TabIndex = 5 ' @@ -430,7 +433,7 @@ Partial Class VectoEPTPJobForm ' Me.TbGbxTxt.Location = New System.Drawing.Point(542, 194) Me.TbGbxTxt.Name = "TbGbxTxt" - Me.TbGbxTxt.ReadOnly = True + Me.TbGbxTxt.ReadOnly = true Me.TbGbxTxt.Size = New System.Drawing.Size(390, 20) Me.TbGbxTxt.TabIndex = 7 ' @@ -438,13 +441,13 @@ Partial Class VectoEPTPJobForm ' Me.TbMass.Location = New System.Drawing.Point(848, 113) Me.TbMass.Name = "TbMass" - Me.TbMass.ReadOnly = True + Me.TbMass.ReadOnly = true Me.TbMass.Size = New System.Drawing.Size(50, 20) Me.TbMass.TabIndex = 3 ' 'lblEngineCharacteristics ' - Me.lblEngineCharacteristics.AutoSize = True + Me.lblEngineCharacteristics.AutoSize = true Me.lblEngineCharacteristics.Location = New System.Drawing.Point(542, 518) Me.lblEngineCharacteristics.Name = "lblEngineCharacteristics" Me.lblEngineCharacteristics.Size = New System.Drawing.Size(0, 13) @@ -452,17 +455,20 @@ Partial Class VectoEPTPJobForm ' 'PictureBox2 ' - Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image) - Me.PictureBox2.InitialImage = CType(resources.GetObject("PictureBox2.InitialImage"), System.Drawing.Image) + Me.PictureBox2.Image = Global.TUGraz.VECTO.My.Resources.Resources.P_fan_eqn + Me.PictureBox2.InitialImage = CType(resources.GetObject("PictureBox2.InitialImage"),System.Drawing.Image) Me.PictureBox2.Location = New System.Drawing.Point(7, 19) Me.PictureBox2.Name = "PictureBox2" Me.PictureBox2.Size = New System.Drawing.Size(277, 108) Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom Me.PictureBox2.TabIndex = 38 - Me.PictureBox2.TabStop = False + Me.PictureBox2.TabStop = false ' 'GroupBox1 ' + Me.GroupBox1.Controls.Add(Me.Label7) + Me.GroupBox1.Controls.Add(Me.tbFanDiameter) + Me.GroupBox1.Controls.Add(Me.Label6) Me.GroupBox1.Controls.Add(Me.tbC3) Me.GroupBox1.Controls.Add(Me.Label4) Me.GroupBox1.Controls.Add(Me.tbC2) @@ -474,20 +480,36 @@ Partial Class VectoEPTPJobForm Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(515, 135) Me.GroupBox1.TabIndex = 39 - Me.GroupBox1.TabStop = False + Me.GroupBox1.TabStop = false Me.GroupBox1.Text = "Fan Power" ' + 'tbFanDiameter + ' + Me.tbFanDiameter.Location = New System.Drawing.Point(371, 29) + Me.tbFanDiameter.Name = "tbFanDiameter" + Me.tbFanDiameter.Size = New System.Drawing.Size(100, 20) + Me.tbFanDiameter.TabIndex = 46 + ' + 'Label6 + ' + Me.Label6.AutoSize = true + Me.Label6.Location = New System.Drawing.Point(294, 32) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(71, 13) + Me.Label6.TabIndex = 45 + Me.Label6.Text = "Fan diameter:" + ' 'tbC3 ' - Me.tbC3.Location = New System.Drawing.Point(363, 77) + Me.tbC3.Location = New System.Drawing.Point(371, 107) Me.tbC3.Name = "tbC3" Me.tbC3.Size = New System.Drawing.Size(100, 20) Me.tbC3.TabIndex = 44 ' 'Label4 ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(316, 80) + Me.Label4.AutoSize = true + Me.Label4.Location = New System.Drawing.Point(342, 110) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(23, 13) Me.Label4.TabIndex = 43 @@ -495,15 +517,15 @@ Partial Class VectoEPTPJobForm ' 'tbC2 ' - Me.tbC2.Location = New System.Drawing.Point(363, 51) + Me.tbC2.Location = New System.Drawing.Point(371, 81) Me.tbC2.Name = "tbC2" Me.tbC2.Size = New System.Drawing.Size(100, 20) Me.tbC2.TabIndex = 42 ' 'Label3 ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(316, 54) + Me.Label3.AutoSize = true + Me.Label3.Location = New System.Drawing.Point(342, 84) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(23, 13) Me.Label3.TabIndex = 41 @@ -511,15 +533,15 @@ Partial Class VectoEPTPJobForm ' 'tbC1 ' - Me.tbC1.Location = New System.Drawing.Point(363, 25) + Me.tbC1.Location = New System.Drawing.Point(371, 55) Me.tbC1.Name = "tbC1" Me.tbC1.Size = New System.Drawing.Size(100, 20) Me.tbC1.TabIndex = 40 ' 'Label1 ' - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(316, 28) + Me.Label1.AutoSize = true + Me.Label1.Location = New System.Drawing.Point(342, 58) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(23, 13) Me.Label1.TabIndex = 39 @@ -527,17 +549,26 @@ Partial Class VectoEPTPJobForm ' 'Label5 ' - Me.Label5.AutoSize = True + Me.Label5.AutoSize = true Me.Label5.Location = New System.Drawing.Point(15, 89) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(70, 13) Me.Label5.TabIndex = 40 Me.Label5.Text = "Vehicle XML:" ' - 'VectoEPTPJobForm + 'Label7 + ' + Me.Label7.AutoSize = true + Me.Label7.Location = New System.Drawing.Point(477, 32) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(29, 13) + Me.Label7.TabIndex = 47 + Me.Label7.Text = "[mm]" + ' + 'VectoVTPJobForm ' Me.AcceptButton = Me.ButOK - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel Me.ClientSize = New System.Drawing.Size(944, 590) @@ -562,29 +593,29 @@ Partial Class VectoEPTPJobForm Me.Controls.Add(Me.ButOK) Me.Controls.Add(Me.StatusStrip1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle - Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) - Me.MaximizeBox = False - Me.Name = "VectoEPTPJobForm" + Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon) + Me.MaximizeBox = false + Me.Name = "VectoVTPJobForm" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Job Editor" - Me.GrCycles.ResumeLayout(False) - Me.GrCycles.PerformLayout() - Me.GrAux.ResumeLayout(False) - Me.StatusStrip1.ResumeLayout(False) - Me.StatusStrip1.PerformLayout() - Me.ToolStrip1.ResumeLayout(False) - Me.ToolStrip1.PerformLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() - Me.CmOpenFile.ResumeLayout(False) - CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit() - Me.GroupBox1.ResumeLayout(False) - Me.GroupBox1.PerformLayout() - Me.ResumeLayout(False) - Me.PerformLayout() + Me.GrCycles.ResumeLayout(false) + Me.GrCycles.PerformLayout + Me.GrAux.ResumeLayout(false) + Me.StatusStrip1.ResumeLayout(false) + Me.StatusStrip1.PerformLayout + Me.ToolStrip1.ResumeLayout(false) + Me.ToolStrip1.PerformLayout + CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit + Me.CmOpenFile.ResumeLayout(false) + CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.PicBox,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.PictureBox2,System.ComponentModel.ISupportInitialize).EndInit + Me.GroupBox1.ResumeLayout(false) + Me.GroupBox1.PerformLayout + Me.ResumeLayout(false) + Me.PerformLayout - End Sub +End Sub Friend WithEvents StatusStrip1 As StatusStrip Friend WithEvents ButtonVEH As Button Friend WithEvents ToolStripStatusLabelGEN As ToolStripStatusLabel @@ -634,4 +665,7 @@ Partial Class VectoEPTPJobForm Friend WithEvents tbC1 As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents tbFanDiameter As TextBox + Friend WithEvents Label6 As Label + Friend WithEvents Label7 As Label End Class diff --git a/VECTO/GUI/VectoEPTPJobForm.resx b/VECTO/GUI/VectoVTPJobForm.resx similarity index 55% rename from VECTO/GUI/VectoEPTPJobForm.resx rename to VECTO/GUI/VectoVTPJobForm.resx index 391e34605b..772cde37b8 100644 --- a/VECTO/GUI/VectoEPTPJobForm.resx +++ b/VECTO/GUI/VectoVTPJobForm.resx @@ -148,264 +148,6 @@ <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>468, 15</value> </metadata> - <data name="PictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAApQAAAEQCAYAAAAOBuRvAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAOw9JREFUeF7tnYu16zayRF8IE4NDmBgcgmNwCM5hQpgYHIJjcAiOwSHMq+Jlyy2o - SZEUv+KutfY5Egh+RBFEoQFQ//e///0PAADgUkj/Fv8Vf4q/xV/iD/FrlR8AtqVMBAAAOCvS78Im8lfx - rz7tJ2GD6Tde9nO7HgBsR5kIAABwRnrT6GhkZySL5Y5S+oX5d5UHANanTAQAADgbkqOQfjHYrS393Ocx - f1V5AGB9ykQAAICzIbmLO8zifwfy/CvlMWUkEwDWpUwEAAA4G9JvySj+UeUxKY/BUALsQJkIAABwNmwO - hcdPDk66kaJb3Pxd5QGA9SkTAQAAroj0SzKUZbc4AKxPmQgAAHBFpDzLm+5ugJ0oEwEA1kT6T1/BEzG6 - CFJMbnEX809VnrMh5RnePIcSYEfKRACAtZDyw6YvYUzgB1I0BPzdnfaZjpLHTcYMcBtgzCTAzpSJAABr - IPkXTfzC8JDpCyJFg+B036FkoxvHZviFHICDKBMBAD5Fwkx+CVf4Ln1cgp9eBDiIMhEA4BNSxW6o2L8A - KSa7nHrogpSfVflblQcA1qdMBABYSlOhD/5EHlwPyeMT/cKm8rQzqNNxGqLjADORYlzyYPnp8/g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otRkUa7xqXHrNom3esxnnJFpFMYSimPn1RSne8uSBhKAICbUyYe - gfTx+MlAiu7IJxMoxQxYvzFd17oUBuHJgEo52jk0fjIiq4/KVPKzA289UWMLpLMYyvxontubKAlDCQBw - c8rEvZBs5Fw554c32/DZOLiSWhSp9HrC27FJ7Uyi1HVpC+8rjElXAUpl97QUZnHQHEpRmXYzyiWv4/3c - uht0C6SzGMrVH5J+ZSQMJQDAzSkT90DKYybH+MRU2iiGsXx6HqBkgxnRSi972Y9ks+t1RyddSO22MJMb - IJ3FUMZ3bRY/Y/JbkDCUAAA3p0wEOCPSYYZScqPBk7ncYHBC4IeYO90NpNUe4n4lJAwlAMDNKRMBzoh0 - iKGUwjC949DI6VFIGEoAgJtTJgKcESkMpXG3c4Znfu6E5Khse/69AEMJAHBTykSAMyJlQ9ky+nOcsB7N - ec9gKAEAbsn//u//ASSYr/DVbkKRAAAAAElFTkSuQmCC -</value> - </data> <data name="PictureBox2.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAApMAAACBCAYAAACclzFEAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO diff --git a/VECTO/GUI/VectoEPTPJobForm.vb b/VECTO/GUI/VectoVTPJobForm.vb similarity index 98% rename from VECTO/GUI/VectoEPTPJobForm.vb rename to VECTO/GUI/VectoVTPJobForm.vb index 6f19957504..5831b3d04b 100644 --- a/VECTO/GUI/VectoEPTPJobForm.vb +++ b/VECTO/GUI/VectoVTPJobForm.vb @@ -34,7 +34,7 @@ Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ''' Job Editor. Create/Edit VECTO job files (.vecto) ''' </summary> ''' <remarks></remarks> -Public Class VectoEPTPJobForm +Public Class VectoVTPJobForm Public VectoFile As String Private _changed As Boolean = False @@ -167,11 +167,11 @@ Public Class VectoEPTPJobForm VectoNew() 'Read GEN - Dim vectoJob As IEPTPJobInputData = Nothing - Dim inputData As IEPTPInputDataProvider = Nothing + Dim vectoJob As IVTPJobInputData = Nothing + Dim inputData As IVTPInputDataProvider = Nothing Try inputData = TryCast(JSONInputDataFactory.ReadComponentData(file), - IEPTPInputDataProvider) + IVTPInputDataProvider) vectoJob = inputData.JobInputData() Catch ex As Exception MsgBox("Failed to read Job-File" + Environment.NewLine + ex.Message) @@ -212,6 +212,7 @@ Public Class VectoEPTPJobForm If (coefficients.Length >= 3) Then tbC3.Text = coefficients(2).ToGUIFormat() End If + tbFanDiameter.Text = (vectoJob.FanDiameter.Value() * 1000).ToGUIFormat() Try Dim sb As ICycleData For Each sb In vectoJob.Cycles @@ -266,7 +267,7 @@ Public Class VectoEPTPJobForm Dim message As String = String.Empty - Dim vectoJob As VectoEPTPJob = New VectoEPTPJob + Dim vectoJob As VectoVTPJob = New VectoVTPJob vectoJob.FilePath = file 'Files ------------------------------------------------- ----------------- @@ -284,6 +285,7 @@ Public Class VectoEPTPJobForm tbC2.Text.ToDouble(0), tbC3.Text.ToDouble(0) } + vectoJob.FanDiameter = (tbFanDiameter.Text.ToDouble(0) / 1000).SI(of Meter) 'SAVE If Not vectoJob.SaveFile Then @@ -704,6 +706,8 @@ Public Class VectoEPTPJobForm Private Sub LvAux_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvAux.SelectedIndexChanged End Sub + + End Class diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index c549ca0e9c..e89a3db5ce 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -540,8 +540,6 @@ <Content Include="Resources\F_VECTO.ico" /> <Content Include="Resources\F_VEH.ico" /> <Content Include="Resources\Graph.ico" /> - <None Include="Resources\P_fan_Equation.bmp" /> - <None Include="Resources\P_fan_units.png" /> <None Include="Resources\P_fan_eqn.png" /> <Content Include="Resources\Status-dialog-password-icon.ico" /> <EmbeddedResource Include="Resources\Undef.png" /> diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index 40e0a9ebda..c0c5c370a0 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -283,7 +283,7 @@ namespace TUGraz.VectoCommon.InputData { //new IStartStopEngineeringInputData StartStop { get; } - new IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll { get; } + IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll { get; } /// <summary> /// P009; P033, P034, P035 diff --git a/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs b/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs index 54c8817629..eff5db7421 100644 --- a/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs +++ b/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Xml.Linq; +using TUGraz.VectoCommon.Utils; namespace TUGraz.VectoCommon.InputData { @@ -50,12 +51,12 @@ namespace TUGraz.VectoCommon.InputData IDriverEngineeringInputData DriverInputData { get; } } - public interface IEPTPInputDataProvider : IInputDataProvider + public interface IVTPInputDataProvider : IInputDataProvider { - IEPTPJobInputData JobInputData { get; } + IVTPJobInputData JobInputData { get; } } - public interface IEPTPJobInputData + public interface IVTPJobInputData { IVehicleDeclarationInputData Vehicle { get; } @@ -63,5 +64,6 @@ namespace TUGraz.VectoCommon.InputData IEnumerable<double> FanPowerCoefficents { get; } bool SavedInDeclarationMode { get; } - } + Meter FanDiameter { get; } + } } diff --git a/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs b/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs index 3787810749..b98e453798 100644 --- a/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs +++ b/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs @@ -45,7 +45,7 @@ namespace TUGraz.VectoCommon.OutputData void SaveJob(IEngineeringInputDataProvider input, string filename); - void SaveJob(IEPTPInputDataProvider input, string filename); + void SaveJob(IVTPInputDataProvider input, string filename); void ExportJob(IEngineeringInputDataProvider input, string filename, bool separateFiles); } diff --git a/VectoCommon/VectoHashing/IVectoHash.cs b/VectoCommon/VectoHashing/IVectoHash.cs index 29bc90029b..e41eb4599a 100644 --- a/VectoCommon/VectoHashing/IVectoHash.cs +++ b/VectoCommon/VectoHashing/IVectoHash.cs @@ -106,7 +106,7 @@ namespace TUGraz.VectoHashing /// <summary> - // Computes the hash-value of the top-level Data element (or vehicle) + /// Computes the hash-value of the top-level Data element (or vehicle) /// If the canoonicalizationMethods is null the canonicalizationMethods from /// the signature element are read if available or the default canonicalization is applied /// If the digestMethod is null the digestMethod from the signature element is read if diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index cbe40440f2..349a5fc15f 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -50,625 +50,628 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.JSON { - public abstract class JSONFile : LoggingObject - { - public const string MissingFileSuffix = " -- (MISSING!)"; - - private readonly string _sourceFile; - - protected readonly JObject Body; - - protected JSONFile(JObject data, string filename, bool tolerateMissing = false) - { - //var header = (JObject)data.GetEx(JsonKeys.JsonHeader); - Body = (JObject)data.GetEx(JsonKeys.JsonBody); - _sourceFile = Path.GetFullPath(filename); - TolerateMissing = tolerateMissing; - } - - protected bool TolerateMissing { get; set; } - - public DataSourceType SourceType - { - get { return DataSourceType.JSONFile; } - } - - public string Source - { - get { return _sourceFile; } - } - - public bool SavedInDeclarationMode - { - get { return Body.GetEx(JsonKeys.SavedInDeclMode).Value<bool>(); } - } - - internal string BasePath - { - get { return Path.GetDirectoryName(_sourceFile); } - } - - protected TableData ReadTableData(string filename, string tableType, bool required = true) - { - if (!EmptyOrInvalidFileName(filename) && File.Exists(Path.Combine(BasePath, filename))) { - try { - return VectoCSVFile.Read(Path.Combine(BasePath, filename), true); - } catch (Exception e) { - Log.Warn("Failed to read file {0} {1}", Path.Combine(BasePath, filename), tableType); - throw new VectoException("Failed to read file for {0}: {1}", e, tableType, filename); - } - } - if (required) { - throw new VectoException("Invalid filename for {0}: {1}", tableType, filename); - } - return null; - } - - internal static bool EmptyOrInvalidFileName(string filename) - { - return filename == null || !filename.Any() || - filename.Equals("<NOFILE>", StringComparison.InvariantCultureIgnoreCase) - || filename.Equals("-"); - } - - public static JObject GetDummyJSONStructure() - { - return JObject.FromObject(new Dictionary<string, object>() { - { JsonKeys.JsonHeader, new object() }, - { JsonKeys.JsonBody, new object() } - }); - } - } - - /// <summary> - /// Class for reading json data of vecto-job-file. - /// Fileformat: .vecto - /// </summary> - public class JSONInputDataV2 : JSONFile, IEngineeringInputDataProvider, IDeclarationInputDataProvider, - IEngineeringJobInputData, IDriverEngineeringInputData, IAuxiliariesEngineeringInputData, - IAuxiliariesDeclarationInputData, IJSONVehicleComponents - { - public JSONInputDataV2(JObject data, string filename, bool tolerateMissing = false) - : base(data, filename, tolerateMissing) - { - _jobname = Path.GetFileNameWithoutExtension(filename); - - Engine = ReadEngine(); - - if (Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>()) { - return; - } - - Gearbox = ReadGearbox(); - AxleGear = Gearbox as IAxleGearInputData; - TorqueConverter = Gearbox as ITorqueConverterEngineeringInputData; - - VehicleData = ReadVehicle(); - } - - public IGearboxEngineeringInputData Gearbox { get; internal set; } - public IAxleGearInputData AxleGear { get; internal set; } - public ITorqueConverterEngineeringInputData TorqueConverter { get; internal set; } - public IEngineEngineeringInputData Engine { get; internal set; } - - - protected readonly IVehicleEngineeringInputData VehicleData; - - private readonly string _jobname; - - - public IAuxiliariesEngineeringInputData EngineeringAuxiliaries - { - get { return this; } - } - - public IAuxiliariesDeclarationInputData DeclarationAuxiliaries - { - get { return this; } - } - - private IVehicleEngineeringInputData ReadVehicle() - { - try { - var vehicleFile = Body.GetEx(JsonKeys.Vehicle_VehicleFile).Value<string>(); - return JSONInputDataFactory.ReadJsonVehicle( - Path.Combine(BasePath, vehicleFile), this); - } catch (Exception e) { - if (!TolerateMissing) { - throw new VectoException("JobFile: Failed to read Vehicle file '{0}': {1}", e, - Body[JsonKeys.Vehicle_VehicleFile], - e.Message); - } - return new JSONVehicleDataV7(GetDummyJSONStructure(), - Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_VehicleFile).Value<string>()) + - MissingFileSuffix, this); - } - } - - private IGearboxEngineeringInputData ReadGearbox() - { - try { - var gearboxFile = Body.GetEx(JsonKeys.Vehicle_GearboxFile).Value<string>(); - - return JSONInputDataFactory.ReadGearbox(Path.Combine(BasePath, gearboxFile)); - } catch (Exception e) { - if (!TolerateMissing) { - throw new VectoException("JobFile: Failed to read Gearbox file '{0}': {1}", e, - Body[JsonKeys.Vehicle_GearboxFile], - e.Message); - } - return new JSONGearboxDataV6(GetDummyJSONStructure(), - Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_GearboxFile).Value<string>()) + - MissingFileSuffix); - } - } - - private IEngineEngineeringInputData ReadEngine() - { - try { - return JSONInputDataFactory.ReadEngine( - Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>())); - } catch (Exception e) { - if (!TolerateMissing) { - throw new VectoException("JobFile: Failed to read Engine file '{0}': {1}", e, - Body[JsonKeys.Vehicle_EngineFile], - e.Message); - } - - return - new JSONEngineDataV3(GetDummyJSONStructure(), - Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>()) + - MissingFileSuffix); - } - } - - #region IInputDataProvider - - IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle - { - get { return VehicleInputData; } - } - - public virtual IEngineeringJobInputData JobInputData - { - get { return this; } - } - - public XElement XMLHash - { - get { return new XElement(XMLNames.DI_Signature); } - } - - IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData - { - get { return this; } - } - - public virtual IVehicleEngineeringInputData VehicleInputData - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (VehicleData == null) { - throw new InvalidFileFormatException("VehicleData not found "); - } - return VehicleData; - } - } - - public virtual IEngineEngineeringInputData EngineOnly - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (Engine == null) { - throw new InvalidFileFormatException("EngineData not found"); - } - return Engine; - } - } - - IDriverEngineeringInputData IEngineeringInputDataProvider.DriverInputData - { - get { return this; } - } - - #endregion - - #region IJobInputData - - public virtual IVehicleEngineeringInputData Vehicle - { - get { return VehicleData; } - } - - public virtual IList<ICycleData> Cycles - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - var retVal = new List<ICycleData>(); - if (Body[JsonKeys.Job_Cycles] == null) { - return retVal; - } - foreach (var cycle in Body.GetEx(JsonKeys.Job_Cycles)) { - //.Select(cycle => - var cycleFile = Path.Combine(BasePath, cycle.Value<string>()); - TableData cycleData; - if (File.Exists(cycleFile)) { - cycleData = VectoCSVFile.Read(cycleFile); - } else { - try { - var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + - cycle.Value<string>() + Constants.FileExtensions.CycleFile; - cycleData = VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), - source: resourceName); - } catch (Exception e) { - Log.Debug("Driving Cycle could not be read: " + cycleFile); - if (!TolerateMissing) { - throw new VectoException("Driving Cycle could not be read: " + cycleFile, e); - } - cycleData = new TableData(cycleFile + MissingFileSuffix, DataSourceType.Missing); - } - } - retVal.Add(new CycleInputData() { - Name = Path.GetFileNameWithoutExtension(cycle.Value<string>()), - CycleData = cycleData - }); - } - return retVal; - } - } - - public virtual bool EngineOnlyMode - { - get { return Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>(); } - } - - public virtual string JobName - { - get { return _jobname; } - } - - #endregion - - #region DriverInputData - - public virtual ILookaheadCoastingInputData Lookahead - { - get - { - if (Body[JsonKeys.DriverData_LookaheadCoasting] == null) { - return null; - } - - var lac = Body.GetEx(JsonKeys.DriverData_LookaheadCoasting); - var distanceScalingFactor = lac["PreviewDistanceFactor"] != null - ? lac.GetEx<double>("PreviewDistanceFactor") - : DeclarationData.Driver.LookAhead.LookAheadDistanceFactor; - var lacDfOffset = lac["DF_offset"] != null - ? lac.GetEx<double>("DF_offset") - : DeclarationData.Driver.LookAhead.DecisionFactorCoastingOffset; - var lacDfScaling = lac["DF_scaling"] != null - ? lac.GetEx<double>("DF_scaling") - : DeclarationData.Driver.LookAhead.DecisionFactorCoastingScaling; - var speedDependentLookup = GetSpeedDependentLookupTable(lac); - var velocityDropLookup = GetVelocityDropLookupTable(lac); - var minSpeed = lac["MinSpeed"] != null - ? lac.GetEx<double>(JsonKeys.DriverData_Lookahead_MinSpeed).KMPHtoMeterPerSecond() - : DeclarationData.Driver.LookAhead.MinimumSpeed; - return new LookAheadCoastingInputData() { - Enabled = lac.GetEx<bool>(JsonKeys.DriverData_Lookahead_Enabled), - //Deceleration = lac.GetEx<double>(JsonKeys.DriverData_Lookahead_Deceleration).SI<MeterPerSquareSecond>(), - MinSpeed = minSpeed, - LookaheadDistanceFactor = distanceScalingFactor, - CoastingDecisionFactorOffset = lacDfOffset, - CoastingDecisionFactorScaling = lacDfScaling, - CoastingDecisionFactorTargetSpeedLookup = speedDependentLookup, - CoastingDecisionFactorVelocityDropLookup = velocityDropLookup - }; - } - } - - private TableData GetVelocityDropLookupTable(JToken lac) - { - if (lac["Df_velocityDropLookup"] == null || - string.IsNullOrWhiteSpace(lac["Df_velocityDropLookup"].Value<string>())) { - return null; - } - try { - return ReadTableData(lac.GetEx<string>("Df_velocityDropLookup"), - "Lookahead Coasting Decisionfactor - Velocity drop"); - } catch (Exception) { - if (TolerateMissing) { - return - new TableData( - Path.Combine(BasePath, lac["Df_velocityDropLookup"].Value<string>()) + MissingFileSuffix, - DataSourceType.Missing); - } - } - return null; - } - - private TableData GetSpeedDependentLookupTable(JToken lac) - { - if (lac["DF_targetSpeedLookup"] == null || - string.IsNullOrWhiteSpace(lac["DF_targetSpeedLookup"].Value<string>())) { - return null; - } - try { - return ReadTableData(lac.GetEx<string>("DF_targetSpeedLookup"), - "Lookahead Coasting Decisionfactor - Target speed"); - } catch (Exception) { - if (TolerateMissing) { - return - new TableData( - Path.Combine(BasePath, lac["DF_targetSpeedLookup"].Value<string>()) + MissingFileSuffix, - DataSourceType.Missing); - } - } - return null; - } - - public virtual IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll - { - get - { - var overspeed = Body.GetEx(JsonKeys.DriverData_OverspeedEcoRoll); - return new OverSpeedEcoRollInputData() { - Mode = DriverData.ParseDriverMode( - overspeed.GetEx<string>(JsonKeys.DriverData_OverspeedEcoRoll_Mode)), - MinSpeed = overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_MinSpeed) - .KMPHtoMeterPerSecond(), - OverSpeed = overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_OverSpeed) - .KMPHtoMeterPerSecond(), - UnderSpeed = - overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_UnderSpeed).KMPHtoMeterPerSecond() - }; - } - } - - public virtual TableData AccelerationCurve - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - var acceleration = Body[JsonKeys.DriverData_AccelerationCurve]; - if (acceleration == null || EmptyOrInvalidFileName(acceleration.Value<string>())) { - return null; - // throw new VectoException("AccelerationCurve (VACC) required"); - } - try { - return ReadTableData(acceleration.Value<string>(), "DriverAccelerationCurve"); - } catch (VectoException e) { - Log.Warn("Could not find file for acceleration curve. Trying lookup in declaration data."); - try { - var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".VACC." + - acceleration.Value<string>() + - Constants.FileExtensions.DriverAccelerationCurve; - return VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), source: resourceName); - } catch (Exception) { - if (!TolerateMissing) { - throw new VectoException("Failed to read Driver Acceleration Curve: " + e.Message, e); - } - return new TableData(Path.Combine(BasePath, acceleration.Value<string>()) + MissingFileSuffix, - DataSourceType.Missing); - } - } - } - } - - #endregion - - #region IAuxiliariesEngineeringInputData - - IList<IAuxiliaryEngineeringInputData> IAuxiliariesEngineeringInputData.Auxiliaries - { - get { return AuxData().Cast<IAuxiliaryEngineeringInputData>().ToList(); } - } - - IList<IAuxiliaryDeclarationInputData> IAuxiliariesDeclarationInputData.Auxiliaries - { - get { return AuxData().Cast<IAuxiliaryDeclarationInputData>().ToList(); } - } - - protected virtual IList<AuxiliaryDataInputData> AuxData() - { - var retVal = new List<AuxiliaryDataInputData>(); - foreach (var aux in Body["Aux"] ?? Enumerable.Empty<JToken>()) { - var type = AuxiliaryTypeHelper.Parse(aux.GetEx<string>("Type")); - - var auxData = new AuxiliaryDataInputData { - ID = aux.GetEx<string>("ID"), - Type = type, - Technology = new List<string>(), - }; - var tech = aux.GetEx<string>("Technology"); - - if (auxData.Type == AuxiliaryType.ElectricSystem) { - if (aux["TechList"] == null || aux["TechList"].Any()) { - auxData.Technology.Add("Standard technology"); - } else { - auxData.Technology.Add("Standard technology - LED headlights, all"); - } - } - - if (auxData.Type == AuxiliaryType.SteeringPump) { - auxData.Technology.Add(tech); - } - - if (auxData.Type == AuxiliaryType.Fan) { - auxData.Technology.Add(MapLegacyFanTechnologies(tech)); - } - - var auxFile = aux["Path"]; - retVal.Add(auxData); - - if (auxFile == null || EmptyOrInvalidFileName(auxFile.Value<string>())) { - continue; - } - - AuxiliaryFileHelper.FillAuxiliaryDataInputData(auxData, - Path.Combine(BasePath, auxFile.Value<string>())); - } - return retVal; - } - - private static string MapLegacyFanTechnologies(string tech) - { - string newTech; - switch (tech) { - case "Crankshaft mounted - Electronically controlled visco clutch (Default)": - newTech = "Crankshaft mounted - Electronically controlled visco clutch"; - break; - case "Crankshaft mounted - On/Off clutch": - newTech = "Crankshaft mounted - On/off clutch"; - break; - case "Belt driven or driven via transm. - On/Off clutch": - newTech = "Belt driven or driven via transm. - On/off clutch"; - break; - default: - newTech = tech; - break; - } - return newTech; - } - - #endregion - - #region AdvancedAuxiliaries - - public AuxiliaryModel AuxiliaryAssembly - { - get - { - return AuxiliaryModelHelper.Parse(Body["AuxiliaryAssembly"] == null - ? "" - : Body["AuxiliaryAssembly"].ToString()); - } - } - - public string AuxiliaryVersion - { - get { return Body["AuxiliaryVersion"] != null ? Body["AuxiliaryVersion"].Value<string>() : "<CLASSIC>"; } - } - - public string AdvancedAuxiliaryFilePath - { - get - { - return Body["AdvancedAuxiliaryFilePath"] != null - ? Path.Combine(Path.GetFullPath(BasePath), Body["AdvancedAuxiliaryFilePath"].Value<string>()) - : ""; - } - } - - #endregion - } - - public class JSONInputDataV3 : JSONInputDataV2 - { - public JSONInputDataV3(JObject data, string filename, bool tolerateMissing = false) - : base(data, filename, tolerateMissing) { } - - protected override IList<AuxiliaryDataInputData> AuxData() - { - var retVal = new List<AuxiliaryDataInputData>(); - if (Body["Padd"] != null) { - retVal.Add(new AuxiliaryDataInputData() { - ID = "ConstantAux", - AuxiliaryType = AuxiliaryDemandType.Constant, - ConstantPowerDemand = Body.GetEx<double>("Padd").SI<Watt>() - }); - } - foreach (var aux in Body["Aux"] ?? Enumerable.Empty<JToken>()) { - try { - aux.GetEx("Technology").ToObject<List<string>>(); - } catch (Exception) { - throw new VectoException( - "Aux: Technology for aux '{0}' list could not be read. Maybe it is a single string instead of a list of strings?", - aux.GetEx<string>("ID")); - } - - var type = AuxiliaryTypeHelper.Parse(aux.GetEx<string>("Type")); - - var auxData = new AuxiliaryDataInputData { - ID = aux.GetEx<string>("ID"), - Type = type, - Technology = aux.GetEx("Technology").ToObject<List<string>>() - }; - - var auxFile = aux["Path"]; - retVal.Add(auxData); - - if (auxFile == null || EmptyOrInvalidFileName(auxFile.Value<string>())) { - continue; - } - AuxiliaryFileHelper.FillAuxiliaryDataInputData(auxData, - Path.Combine(BasePath, auxFile.Value<string>())); - } - return retVal; - } - } - - - public class JSONInputDataV4 : JSONInputDataV3 - { - public JSONInputDataV4(JObject data, string filename, bool tolerateMissing = false) - : base(data, filename, tolerateMissing) { } - } - - public class JSONEPTPInputDataV4 : JSONFile, IEPTPInputDataProvider, IEPTPJobInputData - { - public JSONEPTPInputDataV4(JObject data, string filename, bool tolerateMissing = false) : base(data, filename, - tolerateMissing) { } - - public IEPTPJobInputData JobInputData - { - get { return this; } - } - - public IVehicleDeclarationInputData Vehicle - { - get - { - return new XMLDeclarationInputDataProvider(Path.Combine(Path.GetFullPath(BasePath), Body["DeclarationVehicle"].Value<string>()), - true).JobInputData.Vehicle; - } - } - - public IList<ICycleData> Cycles - { - get - { - var retVal = new List<ICycleData>(); - if (Body[JsonKeys.Job_Cycles] == null) { - return retVal; - } - foreach (var cycle in Body.GetEx(JsonKeys.Job_Cycles)) { - var cycleFile = Path.Combine(BasePath, cycle.Value<string>()); - if (File.Exists(cycleFile)) { - var cycleData = VectoCSVFile.Read(cycleFile); - retVal.Add(new CycleInputData() { - Name = Path.GetFileNameWithoutExtension(cycle.Value<string>()), - CycleData = cycleData - }); - } - } - return retVal; - } - } - - public IEnumerable<double> FanPowerCoefficents - { - get - { - return Body.GetEx("FanPowerCoefficients").Select(entry => entry.ToString().ToDouble()).ToList(); - } - } - } + public abstract class JSONFile : LoggingObject + { + public const string MissingFileSuffix = " -- (MISSING!)"; + + private readonly string _sourceFile; + + protected readonly JObject Body; + + protected JSONFile(JObject data, string filename, bool tolerateMissing = false) + { + //var header = (JObject)data.GetEx(JsonKeys.JsonHeader); + Body = (JObject)data.GetEx(JsonKeys.JsonBody); + _sourceFile = Path.GetFullPath(filename); + TolerateMissing = tolerateMissing; + } + + protected bool TolerateMissing { get; set; } + + public DataSourceType SourceType + { + get { return DataSourceType.JSONFile; } + } + + public string Source + { + get { return _sourceFile; } + } + + public bool SavedInDeclarationMode + { + get { return Body.GetEx(JsonKeys.SavedInDeclMode).Value<bool>(); } + } + + internal string BasePath + { + get { return Path.GetDirectoryName(_sourceFile); } + } + + protected TableData ReadTableData(string filename, string tableType, bool required = true) + { + if (!EmptyOrInvalidFileName(filename) && File.Exists(Path.Combine(BasePath, filename))) { + try { + return VectoCSVFile.Read(Path.Combine(BasePath, filename), true); + } catch (Exception e) { + Log.Warn("Failed to read file {0} {1}", Path.Combine(BasePath, filename), tableType); + throw new VectoException("Failed to read file for {0}: {1}", e, tableType, filename); + } + } + if (required) { + throw new VectoException("Invalid filename for {0}: {1}", tableType, filename); + } + return null; + } + + internal static bool EmptyOrInvalidFileName(string filename) + { + return filename == null || !filename.Any() || + filename.Equals("<NOFILE>", StringComparison.InvariantCultureIgnoreCase) + || filename.Equals("-"); + } + + public static JObject GetDummyJSONStructure() + { + return JObject.FromObject(new Dictionary<string, object>() { + { JsonKeys.JsonHeader, new object() }, + { JsonKeys.JsonBody, new object() } + }); + } + } + + /// <summary> + /// Class for reading json data of vecto-job-file. + /// Fileformat: .vecto + /// </summary> + public class JSONInputDataV2 : JSONFile, IEngineeringInputDataProvider, IDeclarationInputDataProvider, + IEngineeringJobInputData, IDriverEngineeringInputData, IAuxiliariesEngineeringInputData, + IAuxiliariesDeclarationInputData, IJSONVehicleComponents + { + public JSONInputDataV2(JObject data, string filename, bool tolerateMissing = false) + : base(data, filename, tolerateMissing) + { + _jobname = Path.GetFileNameWithoutExtension(filename); + + Engine = ReadEngine(); + + if (Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>()) { + return; + } + + Gearbox = ReadGearbox(); + AxleGear = Gearbox as IAxleGearInputData; + TorqueConverter = Gearbox as ITorqueConverterEngineeringInputData; + + VehicleData = ReadVehicle(); + } + + public IGearboxEngineeringInputData Gearbox { get; internal set; } + public IAxleGearInputData AxleGear { get; internal set; } + public ITorqueConverterEngineeringInputData TorqueConverter { get; internal set; } + public IEngineEngineeringInputData Engine { get; internal set; } + + + protected readonly IVehicleEngineeringInputData VehicleData; + + private readonly string _jobname; + + + public IAuxiliariesEngineeringInputData EngineeringAuxiliaries + { + get { return this; } + } + + public IAuxiliariesDeclarationInputData DeclarationAuxiliaries + { + get { return this; } + } + + private IVehicleEngineeringInputData ReadVehicle() + { + try { + var vehicleFile = Body.GetEx(JsonKeys.Vehicle_VehicleFile).Value<string>(); + return JSONInputDataFactory.ReadJsonVehicle( + Path.Combine(BasePath, vehicleFile), this); + } catch (Exception e) { + if (!TolerateMissing) { + throw new VectoException("JobFile: Failed to read Vehicle file '{0}': {1}", e, + Body[JsonKeys.Vehicle_VehicleFile], + e.Message); + } + return new JSONVehicleDataV7(GetDummyJSONStructure(), + Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_VehicleFile).Value<string>()) + + MissingFileSuffix, this); + } + } + + private IGearboxEngineeringInputData ReadGearbox() + { + try { + var gearboxFile = Body.GetEx(JsonKeys.Vehicle_GearboxFile).Value<string>(); + + return JSONInputDataFactory.ReadGearbox(Path.Combine(BasePath, gearboxFile)); + } catch (Exception e) { + if (!TolerateMissing) { + throw new VectoException("JobFile: Failed to read Gearbox file '{0}': {1}", e, + Body[JsonKeys.Vehicle_GearboxFile], + e.Message); + } + return new JSONGearboxDataV6(GetDummyJSONStructure(), + Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_GearboxFile).Value<string>()) + + MissingFileSuffix); + } + } + + private IEngineEngineeringInputData ReadEngine() + { + try { + return JSONInputDataFactory.ReadEngine( + Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>())); + } catch (Exception e) { + if (!TolerateMissing) { + throw new VectoException("JobFile: Failed to read Engine file '{0}': {1}", e, + Body[JsonKeys.Vehicle_EngineFile], + e.Message); + } + + return + new JSONEngineDataV3(GetDummyJSONStructure(), + Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>()) + + MissingFileSuffix); + } + } + + #region IInputDataProvider + + IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle + { + get { return VehicleInputData; } + } + + public virtual IEngineeringJobInputData JobInputData + { + get { return this; } + } + + public XElement XMLHash + { + get { return new XElement(XMLNames.DI_Signature); } + } + + IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData + { + get { return this; } + } + + public virtual IVehicleEngineeringInputData VehicleInputData + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", + "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] + get + { + if (VehicleData == null) { + throw new InvalidFileFormatException("VehicleData not found "); + } + return VehicleData; + } + } + + public virtual IEngineEngineeringInputData EngineOnly + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", + "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] + get + { + if (Engine == null) { + throw new InvalidFileFormatException("EngineData not found"); + } + return Engine; + } + } + + IDriverEngineeringInputData IEngineeringInputDataProvider.DriverInputData + { + get { return this; } + } + + #endregion + + #region IJobInputData + + public virtual IVehicleEngineeringInputData Vehicle + { + get { return VehicleData; } + } + + public virtual IList<ICycleData> Cycles + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", + "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] + get + { + var retVal = new List<ICycleData>(); + if (Body[JsonKeys.Job_Cycles] == null) { + return retVal; + } + foreach (var cycle in Body.GetEx(JsonKeys.Job_Cycles)) { + //.Select(cycle => + var cycleFile = Path.Combine(BasePath, cycle.Value<string>()); + TableData cycleData; + if (File.Exists(cycleFile)) { + cycleData = VectoCSVFile.Read(cycleFile); + } else { + try { + var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + + cycle.Value<string>() + Constants.FileExtensions.CycleFile; + cycleData = VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), + source: resourceName); + } catch (Exception e) { + Log.Debug("Driving Cycle could not be read: " + cycleFile); + if (!TolerateMissing) { + throw new VectoException("Driving Cycle could not be read: " + cycleFile, e); + } + cycleData = new TableData(cycleFile + MissingFileSuffix, DataSourceType.Missing); + } + } + retVal.Add(new CycleInputData() { + Name = Path.GetFileNameWithoutExtension(cycle.Value<string>()), + CycleData = cycleData + }); + } + return retVal; + } + } + + public virtual bool EngineOnlyMode + { + get { return Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>(); } + } + + public virtual string JobName + { + get { return _jobname; } + } + + #endregion + + #region DriverInputData + + public virtual ILookaheadCoastingInputData Lookahead + { + get + { + if (Body[JsonKeys.DriverData_LookaheadCoasting] == null) { + return null; + } + + var lac = Body.GetEx(JsonKeys.DriverData_LookaheadCoasting); + var distanceScalingFactor = lac["PreviewDistanceFactor"] != null + ? lac.GetEx<double>("PreviewDistanceFactor") + : DeclarationData.Driver.LookAhead.LookAheadDistanceFactor; + var lacDfOffset = lac["DF_offset"] != null + ? lac.GetEx<double>("DF_offset") + : DeclarationData.Driver.LookAhead.DecisionFactorCoastingOffset; + var lacDfScaling = lac["DF_scaling"] != null + ? lac.GetEx<double>("DF_scaling") + : DeclarationData.Driver.LookAhead.DecisionFactorCoastingScaling; + var speedDependentLookup = GetSpeedDependentLookupTable(lac); + var velocityDropLookup = GetVelocityDropLookupTable(lac); + var minSpeed = lac["MinSpeed"] != null + ? lac.GetEx<double>(JsonKeys.DriverData_Lookahead_MinSpeed).KMPHtoMeterPerSecond() + : DeclarationData.Driver.LookAhead.MinimumSpeed; + return new LookAheadCoastingInputData() { + Enabled = lac.GetEx<bool>(JsonKeys.DriverData_Lookahead_Enabled), + //Deceleration = lac.GetEx<double>(JsonKeys.DriverData_Lookahead_Deceleration).SI<MeterPerSquareSecond>(), + MinSpeed = minSpeed, + LookaheadDistanceFactor = distanceScalingFactor, + CoastingDecisionFactorOffset = lacDfOffset, + CoastingDecisionFactorScaling = lacDfScaling, + CoastingDecisionFactorTargetSpeedLookup = speedDependentLookup, + CoastingDecisionFactorVelocityDropLookup = velocityDropLookup + }; + } + } + + private TableData GetVelocityDropLookupTable(JToken lac) + { + if (lac["Df_velocityDropLookup"] == null || + string.IsNullOrWhiteSpace(lac["Df_velocityDropLookup"].Value<string>())) { + return null; + } + try { + return ReadTableData(lac.GetEx<string>("Df_velocityDropLookup"), + "Lookahead Coasting Decisionfactor - Velocity drop"); + } catch (Exception) { + if (TolerateMissing) { + return + new TableData( + Path.Combine(BasePath, lac["Df_velocityDropLookup"].Value<string>()) + MissingFileSuffix, + DataSourceType.Missing); + } + } + return null; + } + + private TableData GetSpeedDependentLookupTable(JToken lac) + { + if (lac["DF_targetSpeedLookup"] == null || + string.IsNullOrWhiteSpace(lac["DF_targetSpeedLookup"].Value<string>())) { + return null; + } + try { + return ReadTableData(lac.GetEx<string>("DF_targetSpeedLookup"), + "Lookahead Coasting Decisionfactor - Target speed"); + } catch (Exception) { + if (TolerateMissing) { + return + new TableData( + Path.Combine(BasePath, lac["DF_targetSpeedLookup"].Value<string>()) + MissingFileSuffix, + DataSourceType.Missing); + } + } + return null; + } + + public virtual IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll + { + get + { + var overspeed = Body.GetEx(JsonKeys.DriverData_OverspeedEcoRoll); + return new OverSpeedEcoRollInputData() { + Mode = DriverData.ParseDriverMode( + overspeed.GetEx<string>(JsonKeys.DriverData_OverspeedEcoRoll_Mode)), + MinSpeed = overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_MinSpeed) + .KMPHtoMeterPerSecond(), + OverSpeed = overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_OverSpeed) + .KMPHtoMeterPerSecond(), + UnderSpeed = + overspeed.GetEx<double>(JsonKeys.DriverData_OverspeedEcoRoll_UnderSpeed).KMPHtoMeterPerSecond() + }; + } + } + + public virtual TableData AccelerationCurve + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", + "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] + get + { + var acceleration = Body[JsonKeys.DriverData_AccelerationCurve]; + if (acceleration == null || EmptyOrInvalidFileName(acceleration.Value<string>())) { + return null; + // throw new VectoException("AccelerationCurve (VACC) required"); + } + try { + return ReadTableData(acceleration.Value<string>(), "DriverAccelerationCurve"); + } catch (VectoException e) { + Log.Warn("Could not find file for acceleration curve. Trying lookup in declaration data."); + try { + var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".VACC." + + acceleration.Value<string>() + + Constants.FileExtensions.DriverAccelerationCurve; + return VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), source: resourceName); + } catch (Exception) { + if (!TolerateMissing) { + throw new VectoException("Failed to read Driver Acceleration Curve: " + e.Message, e); + } + return new TableData(Path.Combine(BasePath, acceleration.Value<string>()) + MissingFileSuffix, + DataSourceType.Missing); + } + } + } + } + + #endregion + + #region IAuxiliariesEngineeringInputData + + IList<IAuxiliaryEngineeringInputData> IAuxiliariesEngineeringInputData.Auxiliaries + { + get { return AuxData().Cast<IAuxiliaryEngineeringInputData>().ToList(); } + } + + IList<IAuxiliaryDeclarationInputData> IAuxiliariesDeclarationInputData.Auxiliaries + { + get { return AuxData().Cast<IAuxiliaryDeclarationInputData>().ToList(); } + } + + protected virtual IList<AuxiliaryDataInputData> AuxData() + { + var retVal = new List<AuxiliaryDataInputData>(); + foreach (var aux in Body["Aux"] ?? Enumerable.Empty<JToken>()) { + var type = AuxiliaryTypeHelper.Parse(aux.GetEx<string>("Type")); + + var auxData = new AuxiliaryDataInputData { + ID = aux.GetEx<string>("ID"), + Type = type, + Technology = new List<string>(), + }; + var tech = aux.GetEx<string>("Technology"); + + if (auxData.Type == AuxiliaryType.ElectricSystem) { + if (aux["TechList"] == null || aux["TechList"].Any()) { + auxData.Technology.Add("Standard technology"); + } else { + auxData.Technology.Add("Standard technology - LED headlights, all"); + } + } + + if (auxData.Type == AuxiliaryType.SteeringPump) { + auxData.Technology.Add(tech); + } + + if (auxData.Type == AuxiliaryType.Fan) { + auxData.Technology.Add(MapLegacyFanTechnologies(tech)); + } + + var auxFile = aux["Path"]; + retVal.Add(auxData); + + if (auxFile == null || EmptyOrInvalidFileName(auxFile.Value<string>())) { + continue; + } + + AuxiliaryFileHelper.FillAuxiliaryDataInputData(auxData, + Path.Combine(BasePath, auxFile.Value<string>())); + } + return retVal; + } + + private static string MapLegacyFanTechnologies(string tech) + { + string newTech; + switch (tech) { + case "Crankshaft mounted - Electronically controlled visco clutch (Default)": + newTech = "Crankshaft mounted - Electronically controlled visco clutch"; + break; + case "Crankshaft mounted - On/Off clutch": + newTech = "Crankshaft mounted - On/off clutch"; + break; + case "Belt driven or driven via transm. - On/Off clutch": + newTech = "Belt driven or driven via transm. - On/off clutch"; + break; + default: + newTech = tech; + break; + } + return newTech; + } + + #endregion + + #region AdvancedAuxiliaries + + public AuxiliaryModel AuxiliaryAssembly + { + get + { + return AuxiliaryModelHelper.Parse(Body["AuxiliaryAssembly"] == null + ? "" + : Body["AuxiliaryAssembly"].ToString()); + } + } + + public string AuxiliaryVersion + { + get { return Body["AuxiliaryVersion"] != null ? Body["AuxiliaryVersion"].Value<string>() : "<CLASSIC>"; } + } + + public string AdvancedAuxiliaryFilePath + { + get + { + return Body["AdvancedAuxiliaryFilePath"] != null + ? Path.Combine(Path.GetFullPath(BasePath), Body["AdvancedAuxiliaryFilePath"].Value<string>()) + : ""; + } + } + + #endregion + } + + public class JSONInputDataV3 : JSONInputDataV2 + { + public JSONInputDataV3(JObject data, string filename, bool tolerateMissing = false) + : base(data, filename, tolerateMissing) { } + + protected override IList<AuxiliaryDataInputData> AuxData() + { + var retVal = new List<AuxiliaryDataInputData>(); + if (Body["Padd"] != null) { + retVal.Add(new AuxiliaryDataInputData() { + ID = "ConstantAux", + AuxiliaryType = AuxiliaryDemandType.Constant, + ConstantPowerDemand = Body.GetEx<double>("Padd").SI<Watt>() + }); + } + foreach (var aux in Body["Aux"] ?? Enumerable.Empty<JToken>()) { + try { + aux.GetEx("Technology").ToObject<List<string>>(); + } catch (Exception) { + throw new VectoException( + "Aux: Technology for aux '{0}' list could not be read. Maybe it is a single string instead of a list of strings?", + aux.GetEx<string>("ID")); + } + + var type = AuxiliaryTypeHelper.Parse(aux.GetEx<string>("Type")); + + var auxData = new AuxiliaryDataInputData { + ID = aux.GetEx<string>("ID"), + Type = type, + Technology = aux.GetEx("Technology").ToObject<List<string>>() + }; + + var auxFile = aux["Path"]; + retVal.Add(auxData); + + if (auxFile == null || EmptyOrInvalidFileName(auxFile.Value<string>())) { + continue; + } + AuxiliaryFileHelper.FillAuxiliaryDataInputData(auxData, + Path.Combine(BasePath, auxFile.Value<string>())); + } + return retVal; + } + } + + + public class JSONInputDataV4 : JSONInputDataV3 + { + public JSONInputDataV4(JObject data, string filename, bool tolerateMissing = false) + : base(data, filename, tolerateMissing) { } + } + + public class JSONVTPInputDataV4 : JSONFile, IVTPInputDataProvider, IVTPJobInputData + { + public JSONVTPInputDataV4(JObject data, string filename, bool tolerateMissing = false) : base(data, filename, + tolerateMissing) { } + + public IVTPJobInputData JobInputData + { + get { return this; } + } + + public IVehicleDeclarationInputData Vehicle + { + get + { + return new XMLDeclarationInputDataProvider( + Path.Combine(Path.GetFullPath(BasePath), Body["DeclarationVehicle"].Value<string>()), + true).JobInputData.Vehicle; + } + } + + public IList<ICycleData> Cycles + { + get + { + var retVal = new List<ICycleData>(); + if (Body[JsonKeys.Job_Cycles] == null) { + return retVal; + } + foreach (var cycle in Body.GetEx(JsonKeys.Job_Cycles)) { + var cycleFile = Path.Combine(BasePath, cycle.Value<string>()); + if (File.Exists(cycleFile)) { + var cycleData = VectoCSVFile.Read(cycleFile); + retVal.Add(new CycleInputData() { + Name = Path.GetFileNameWithoutExtension(cycle.Value<string>()), + CycleData = cycleData + }); + } + } + return retVal; + } + } + + public IEnumerable<double> FanPowerCoefficents + { + get { return Body.GetEx("FanPowerCoefficients").Select(entry => entry.ToString().ToDouble()).ToList(); } + } + + public Meter FanDiameter + { + get { return Body.GetEx<double>("FanDiameter").SI<Meter>(); } + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs index 4091fafada..284edbe947 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs @@ -72,7 +72,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON return new JSONInputDataV3(json, filename, tolerateMissing); case 4: if (json["Body"]["DeclarationVehicle"] != null) { - return new JSONEPTPInputDataV4(json, filename, tolerateMissing); + return new JSONVTPInputDataV4(json, filename, tolerateMissing); } return new JSONInputDataV4(json, filename, tolerateMissing); default: diff --git a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs index a1722ff80c..df1ae6cbea 100644 --- a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs @@ -74,8 +74,8 @@ namespace TUGraz.VectoCore.InputData.Reader if (DistanceBasedCycleDataParser.ValidateHeader(cols, false)) { return CycleType.DistanceBased; } - if (EPTPCycleDataParser.ValidateHeader(cols, false)) { - return CycleType.EPTP; + if (VTPCycleDataParser.ValidateHeader(cols, false)) { + return CycleType.VTP; } throw new VectoException("CycleFile format is unknown."); } @@ -95,8 +95,8 @@ namespace TUGraz.VectoCore.InputData.Reader return new MeasuredSpeedDataParser(); case CycleType.PTO: return new PTOCycleDataParser(); - case CycleType.EPTP: - return new EPTPCycleDataParser(); + case CycleType.VTP: + return new VTPCycleDataParser(); default: throw new ArgumentOutOfRangeException("Cycle Type", type.ToString()); @@ -319,6 +319,11 @@ namespace TUGraz.VectoCore.InputData.Reader public const string EngineSpeed = "n"; public const string EngineSpeedSuffix = "n_eng"; public const string FanSpeed = "n_fan"; + public const string WheelTorqueLeft = "tq_left"; + public const string WheelTorqueRight = "tq_right"; + public const string WheelSpeedLeft = "n_wh_left"; + public const string WheelSpeedRight = "n_wh_right"; + public const string FuelConsumption = "fc"; public const string Gear = "gear"; public const string AdditionalAuxPowerDemand = "Padd"; public const string AirSpeedRelativeToVehicle = "vair_res"; @@ -711,20 +716,28 @@ namespace TUGraz.VectoCore.InputData.Reader /// Parser for PTO Cycles. /// </summary> // <t>,<v> [km/h],<Pwheel> [kW],<n_eng> [rpm],<n_fan> [rpm], <Padd> [kW] - private class EPTPCycleDataParser : AbstractCycleDataParser + private class VTPCycleDataParser : AbstractCycleDataParser { public override IEnumerable<DrivingCycleData.DrivingCycleEntry> Parse(DataTable table, bool crossWindRequired) { ValidateHeader(table.Columns); - var entries = table.Rows.Cast<DataRow>().Select(row => new DrivingCycleData.DrivingCycleEntry { - Time = row.ParseDouble(Fields.Time).SI<Second>(), - VehicleTargetSpeed = row.ParseDouble(Fields.VehicleSpeed).KMPHtoMeterPerSecond(), - AdditionalAuxPowerDemand = row.ParseDoubleOrGetDefault(Fields.AdditionalAuxPowerDemand).SI().Kilo.Watt.Cast<Watt>(), - PWheel = row.ParseDouble(Fields.PWheel).SI().Kilo.Watt.Cast<Watt>(), - EngineSpeed = row.ParseDouble(Fields.EngineSpeedSuffix).RPMtoRad(), - FanSpeed = row.ParseDouble(Fields.FanSpeed).RPMtoRad() - }).ToArray(); + var entries = table.Rows.Cast<DataRow>().Select(row => { + var wheelSpeed = + ((row.ParseDouble(Fields.WheelSpeedLeft) + row.ParseDouble(Fields.WheelSpeedRight)) / 2).RPMtoRad(); + return new DrivingCycleData.DrivingCycleEntry { + Time = row.ParseDouble(Fields.Time).SI<Second>(), + VehicleTargetSpeed = row.ParseDouble(Fields.VehicleSpeed).KMPHtoMeterPerSecond(), + AdditionalAuxPowerDemand = + row.ParseDoubleOrGetDefault(Fields.AdditionalAuxPowerDemand).SI().Kilo.Watt.Cast<Watt>(), + EngineSpeed = row.ParseDouble(Fields.EngineSpeedSuffix).RPMtoRad(), + WheelAngularVelocity = wheelSpeed, + Torque = (row.ParseDouble(Fields.WheelTorqueLeft).SI<NewtonMeter>() * row.ParseDouble(Fields.WheelSpeedLeft).RPMtoRad() + row.ParseDouble(Fields.WheelTorqueRight).SI<NewtonMeter>() * row.ParseDouble(Fields.WheelSpeedRight).RPMtoRad()) / wheelSpeed, + FanSpeed = row.ParseDouble(Fields.FanSpeed).RPMtoRad(), + Gear = (uint)row.ParseDoubleOrGetDefault(Fields.Gear), + Fuelconsumption = row.ParseDoubleOrGetDefault(Fields.FuelConsumption).SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second.Cast<KilogramPerSecond>(), + }; + }).ToArray(); return entries; } @@ -734,19 +747,26 @@ namespace TUGraz.VectoCore.InputData.Reader var requiredCols = new[] { Fields.Time, Fields.VehicleSpeed, - Fields.PWheel, Fields.EngineSpeedSuffix, - Fields.FanSpeed + Fields.FanSpeed, + Fields.WheelSpeedLeft, + Fields.WheelSpeedRight, + Fields.WheelTorqueLeft, + Fields.WheelTorqueRight, }; var allowedCols = new[] { - Fields.Time, - Fields.VehicleSpeed, - Fields.AdditionalAuxPowerDemand, - Fields.PWheel, - Fields.EngineSpeedSuffix, - Fields.FanSpeed - }; + Fields.Time, + Fields.VehicleSpeed, + Fields.EngineSpeedSuffix, + Fields.FanSpeed, + Fields.WheelSpeedLeft, + Fields.WheelSpeedRight, + Fields.WheelTorqueLeft, + Fields.WheelTorqueRight, + Fields.Gear, + Fields.FuelConsumption + }; const bool allowAux = true; diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringVTPModeVectoRunDataFactory.cs similarity index 73% rename from VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs rename to VectoCore/VectoCore/InputData/Reader/Impl/EngineeringVTPModeVectoRunDataFactory.cs index c0821243ea..ec388ea536 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringVTPModeVectoRunDataFactory.cs @@ -11,13 +11,13 @@ using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; namespace TUGraz.VectoCore.InputData.Reader.Impl { - internal class EngineeringEPTPModeVectoRunDataFactory : IVectoRunDataFactory + internal class EngineeringVTPModeVectoRunDataFactory : IVectoRunDataFactory { - protected IEPTPInputDataProvider InputDataProvider; + protected IVTPInputDataProvider InputDataProvider; - public EngineeringEPTPModeVectoRunDataFactory(IEPTPInputDataProvider eptpProvider) + public EngineeringVTPModeVectoRunDataFactory(IVTPInputDataProvider ivtpProvider) { - InputDataProvider = eptpProvider; + InputDataProvider = ivtpProvider; } public IEnumerable<VectoRunData> NextRun() @@ -46,8 +46,25 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { var ptoTransmissionData = dao.CreatePTOTransmissionData(InputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData); - var aux = dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), MissionType.RegionalDelivery, segment.VehicleClass).ToList(); - aux.RemoveAll(x => x.ID == Constants.Auxiliaries.IDs.Fan); + var auxRD = dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), MissionType.RegionalDelivery, segment.VehicleClass).ToList(); + foreach (var entry in auxRD) { + entry.MissionType = MissionType.RegionalDelivery; + } + var auxLH = dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), MissionType.LongHaul, segment.VehicleClass).ToList(); + foreach (var entry in auxLH) { + entry.MissionType = MissionType.LongHaul; + } + var auxUD = dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), MissionType.UrbanDelivery, segment.VehicleClass).ToList(); + foreach (var entry in auxUD) { + entry.MissionType = MissionType.UrbanDelivery; + } + + var aux = new List<VectoRunData.AuxData>(); + aux.AddRange(auxRD); + aux.AddRange(auxLH); + aux.AddRange(auxUD); + + aux.RemoveAll(x => x.ID == Constants.Auxiliaries.IDs.Fan); aux.Add(new VectoRunData.AuxData { DemandType = AuxiliaryDemandType.Direct, ID = DrivingCycleDataReader.Fields.AdditionalAuxPowerDemand @@ -71,7 +88,10 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { PTO = ptoTransmissionData, Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), ExecutionMode = ExecutionMode.Engineering, - AuxFanParameters = InputDataProvider.JobInputData.FanPowerCoefficents.ToArray() + FanData = new AuxFanData() { + FanCoefficients = InputDataProvider.JobInputData.FanPowerCoefficents.ToArray(), + FanDiameter = InputDataProvider.JobInputData.FanDiameter, + } }; }); } diff --git a/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs b/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs index 0232302186..a2c50d1397 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/VectoRunData.cs @@ -103,7 +103,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Data public int JobRunId { get; internal set; } - public double[] AuxFanParameters { get; internal set; } + public AuxFanData FanData { get; internal set; } public class AuxData { @@ -117,6 +117,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data [Required] public AuxiliaryDemandType DemandType; [ValidateObject] public AuxiliaryData Data; + + public MissionType? MissionType; } public static ValidationResult ValidateRunData(VectoRunData runData, ValidationContext validationContext) @@ -229,4 +231,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Data return null; } } + + public class AuxFanData + { + public double[] FanCoefficients; + + public Meter FanDiameter; + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index 019b7e49d1..134faae46a 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -30,6 +30,7 @@ */ using System; +using System.Collections.Generic; using System.Linq; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Models; @@ -70,8 +71,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return BuildEngineOnly(data); case CycleType.PWheel: return BuildPWheel(data); - case CycleType.EPTP: - return BuildEPTP(data); + case CycleType.VTP: + return BuildVTP(data); case CycleType.MeasuredSpeed: return BuildMeasuredSpeed(data); case CycleType.MeasuredSpeedGear: @@ -126,32 +127,27 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return container; } - private VehicleContainer BuildEPTP(VectoRunData data) + private VehicleContainer BuildVTP(VectoRunData data) { - if (data.Cycle.CycleType != CycleType.EPTP) { - throw new VectoException("CycleType must be EPTP."); + if (data.Cycle.CycleType != CycleType.VTP) { + throw new VectoException("CycleType must be VTP."); } var container = new VehicleContainer(ExecutionMode.Engineering, _modData, _sumWriter) { RunData = data }; var gearbox = new CycleGearbox(container, data); - // PWheelCycle --> AxleGear --> Clutch --> Engine <-- Aux - var powertrain = new EPTPCycle(container, data.Cycle, data.AxleGearData.AxleGear.Ratio, data.VehicleData, + // VTPCycle --> AxleGear --> Clutch --> Engine <-- Aux + var powertrain = new VTPCycle(container, data.Cycle, data.AxleGearData.AxleGear.Ratio, data.VehicleData, gearbox.ModelData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio)) .AddComponent(new AxleGear(container, data.AxleGearData)) .AddComponent(data.AngledriveData != null ? new Angledrive(container, data.AngledriveData) : null) .AddComponent(gearbox, data.Retarder, container) .AddComponent(new Clutch(container, data.EngineData)); - var engine = new EPTPCombustionEngine(container, data.EngineData, pt1Disabled: true); - - var aux = CreateAuxiliaries(data, container); - aux.AddCycle(Constants.Auxiliaries.IDs.Fan, cycleEntry => { - var fanSpeed = cycleEntry.FanSpeed.AsRPM; - var c1 = data.AuxFanParameters.Length > 0 ? data.AuxFanParameters[0] : 0; - var c2 = data.AuxFanParameters.Length > 1 ? data.AuxFanParameters[1] : 1; - var c3 = data.AuxFanParameters.Length > 2 ? data.AuxFanParameters[2] : 1; - return (c1 * Math.Pow(fanSpeed / c2, 3) * Math.Pow(fanSpeed / c3, 5) * 1000).SI<Watt>(); - }); + var engine = new VTPCombustionEngine(container, data.EngineData, pt1Disabled: true); + + var aux = CreateSpeedDependentAuxiliaries(data, container); + var engineFan = new EngineFanAuxiliary(data.FanData.FanCoefficients, data.FanData.FanDiameter); + aux.AddCycle(Constants.Auxiliaries.IDs.Fan, cycleEntry => engineFan.PowerDemand(cycleEntry.FanSpeed)); container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.Fan); engine.Connect(aux.Port()); @@ -168,7 +164,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return container; } - private VehicleContainer BuildMeasuredSpeed(VectoRunData data) + + + private VehicleContainer BuildMeasuredSpeed(VectoRunData data) { if (data.Cycle.CycleType != CycleType.MeasuredSpeed) { throw new VectoException("CycleType must be MeasuredSpeed."); @@ -319,6 +317,38 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return aux; } + private EngineAuxiliary CreateSpeedDependentAuxiliaries(VectoRunData data, IVehicleContainer container) + { + var aux = new EngineAuxiliary(container); + + var auxData = data.Aux.ToArray(); + AddSwitchingAux(aux,container.ModalData,Constants.Auxiliaries.IDs.HeatingVentilationAirCondition, auxData); + AddSwitchingAux(aux,container.ModalData,Constants.Auxiliaries.IDs.SteeringPump, auxData); + AddSwitchingAux(aux,container.ModalData,Constants.Auxiliaries.IDs.ElectricSystem, auxData); + AddSwitchingAux(aux, container.ModalData, Constants.Auxiliaries.IDs.PneumaticSystem, auxData); + + return aux; + } + + private void AddSwitchingAux(EngineAuxiliary aux, IModalDataContainer modData, string auxId, VectoRunData.AuxData[] auxData) + { + var urban = auxData.First(x => x.ID == auxId && x.MissionType == MissionType.UrbanDelivery); + var rural = auxData.First(x => x.ID == auxId && x.MissionType == MissionType.RegionalDelivery); + var motorway = auxData.First(x => x.ID == auxId && x.MissionType == MissionType.LongHaul); + + aux.AddCycle(auxId, entry => { + if (entry.VehicleTargetSpeed >= 70.KMPHtoMeterPerSecond()) { + return motorway.PowerDemand; + } + if (entry.VehicleTargetSpeed >= 50.KMPHtoMeterPerSecond()) { + return rural.PowerDemand; + } + return urban.PowerDemand; + }); + modData.AddAuxiliary(auxId); + } + + private static IGearbox GetGearbox(IVehicleContainer container, VectoRunData runData) { IShiftStrategy strategy; diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs index be8a7420b9..28fb5fe629 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs @@ -89,9 +89,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl private void CreateEngineeringDataReader(IInputDataProvider dataProvider) { - if (dataProvider is IEPTPInputDataProvider) { - var eptpProvider = dataProvider as IEPTPInputDataProvider; - DataReader = new EngineeringEPTPModeVectoRunDataFactory(eptpProvider); + if (dataProvider is IVTPInputDataProvider) { + var eptpProvider = dataProvider as IVTPInputDataProvider; + DataReader = new EngineeringVTPModeVectoRunDataFactory(eptpProvider); return; } if (dataProvider is IEngineeringInputDataProvider) { @@ -203,7 +203,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl break; case CycleType.EngineOnly: case CycleType.PWheel: - case CycleType.EPTP: + case CycleType.VTP: case CycleType.MeasuredSpeed: case CycleType.MeasuredSpeedGear: run = new TimeRun(builder.Build(data)); diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs index bc70a64d85..84178bb810 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs @@ -299,7 +299,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl commitPriority = 6; }) .If<PTOCycleController>(c => { commitPriority = 99; }) - .If<EPTPCycle>(_ => { commitPriority = 0; }); + .If<VTPCycle>(_ => { commitPriority = 0; }); _components.Add(Tuple.Create(commitPriority, component)); _components = _components.OrderBy(x => x.Item1).Reverse().ToList(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/AuxiliaryData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/AuxiliaryData.cs index c55ed0fd80..bc299d3abc 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/AuxiliaryData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/AuxiliaryData.cs @@ -29,91 +29,91 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.InputData.Reader.ComponentData; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Data -{ - [CustomValidation(typeof(AuxiliaryData), "ValidateAuxMap")] - public sealed class AuxiliaryData - { - [Required, Range(double.Epsilon, 1)] - public double EfficiencyToSupply { get; private set; } - - [Required, Range(double.Epsilon, double.MaxValue)] - public double TransmissionRatio { get; private set; } - - [Required, Range(double.Epsilon, 1)] - public double EfficiencyToEngine { get; private set; } - - [Required] private readonly DelaunayMap _map; - - private string auxId; - - public Watt GetPowerDemand(PerSecond nAuxiliary, Watt powerAuxOut) - { - var value = _map.Interpolate(nAuxiliary.Value(), powerAuxOut.Value()); - if (value.HasValue) { - return value.Value.SI<Watt>(); - } - value = _map.Extrapolate(nAuxiliary.Value(), powerAuxOut.Value()); - return value.Value.SI<Watt>(); - } - - internal AuxiliaryData(string id, double transmissionRatio, double efficiencyToEngine, double efficiencyToSupply, - DelaunayMap map) - { - auxId = id; - _map = map; - TransmissionRatio = transmissionRatio; - EfficiencyToEngine = efficiencyToEngine; - EfficiencyToSupply = efficiencyToSupply; - } - - /// <summary> - /// Validates the aux map. - /// </summary> - /// <param name="data">The data.</param> - /// <param name="context">The validation context.</param> - /// <returns></returns> - // ReSharper disable once UnusedMember.Global - public static ValidationResult ValidateAuxMap(AuxiliaryData data, ValidationContext context) - { - var xValidationRules = new[] { new RangeAttribute(0, double.MaxValue) }; - var yValidationRules = new[] { new RangeAttribute(0, 100.SI().Kilo.Watt.Value()) }; - var zValidationRules = new[] { new RangeAttribute(0, 100.SI().Kilo.Watt.Value()) }; - - var results = new List<ValidationResult>(); - foreach (var entry in data._map.Entries) { - context.DisplayName = AuxiliaryDataReader.Fields.AuxSpeed; - if (!Validator.TryValidateValue(entry.X, context, results, xValidationRules)) { - return new ValidationResult(string.Concat(results)); - } - - context.DisplayName = AuxiliaryDataReader.Fields.SupplyPower; - if (!Validator.TryValidateValue(entry.Y, context, results, yValidationRules)) { - return new ValidationResult(string.Concat(results)); - } - - context.DisplayName = AuxiliaryDataReader.Fields.MechPower; - if (!Validator.TryValidateValue(entry.Z, context, results, zValidationRules)) { - return new ValidationResult(string.Concat(results)); - } - } - return ValidationResult.Success; - } - } - - public class AdvancedAuxData - { - public AuxiliaryModel AuxiliaryAssembly; - - public string AdvancedAuxiliaryFilePath; - - public string AuxiliaryVersion; - } +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.InputData.Reader.ComponentData; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Data +{ + [CustomValidation(typeof(AuxiliaryData), "ValidateAuxMap")] + public sealed class AuxiliaryData + { + [Required, Range(double.Epsilon, 1)] + public double EfficiencyToSupply { get; private set; } + + [Required, Range(double.Epsilon, double.MaxValue)] + public double TransmissionRatio { get; private set; } + + [Required, Range(double.Epsilon, 1)] + public double EfficiencyToEngine { get; private set; } + + [Required] private readonly DelaunayMap _map; + + private string auxId; + + public Watt GetPowerDemand(PerSecond nAuxiliary, Watt powerAuxOut) + { + var value = _map.Interpolate(nAuxiliary.Value(), powerAuxOut.Value()); + if (value.HasValue) { + return value.Value.SI<Watt>(); + } + value = _map.Extrapolate(nAuxiliary.Value(), powerAuxOut.Value()); + return value.Value.SI<Watt>(); + } + + internal AuxiliaryData(string id, double transmissionRatio, double efficiencyToEngine, double efficiencyToSupply, + DelaunayMap map) + { + auxId = id; + _map = map; + TransmissionRatio = transmissionRatio; + EfficiencyToEngine = efficiencyToEngine; + EfficiencyToSupply = efficiencyToSupply; + } + + /// <summary> + /// Validates the aux map. + /// </summary> + /// <param name="data">The data.</param> + /// <param name="context">The validation context.</param> + /// <returns></returns> + // ReSharper disable once UnusedMember.Global + public static ValidationResult ValidateAuxMap(AuxiliaryData data, ValidationContext context) + { + var xValidationRules = new[] { new RangeAttribute(0, double.MaxValue) }; + var yValidationRules = new[] { new RangeAttribute(0, 100.SI().Kilo.Watt.Value()) }; + var zValidationRules = new[] { new RangeAttribute(0, 100.SI().Kilo.Watt.Value()) }; + + var results = new List<ValidationResult>(); + foreach (var entry in data._map.Entries) { + context.DisplayName = AuxiliaryDataReader.Fields.AuxSpeed; + if (!Validator.TryValidateValue(entry.X, context, results, xValidationRules)) { + return new ValidationResult(string.Concat(results)); + } + + context.DisplayName = AuxiliaryDataReader.Fields.SupplyPower; + if (!Validator.TryValidateValue(entry.Y, context, results, yValidationRules)) { + return new ValidationResult(string.Concat(results)); + } + + context.DisplayName = AuxiliaryDataReader.Fields.MechPower; + if (!Validator.TryValidateValue(entry.Z, context, results, zValidationRules)) { + return new ValidationResult(string.Concat(results)); + } + } + return ValidationResult.Success; + } + } + + public class AdvancedAuxData + { + public AuxiliaryModel AuxiliaryAssembly; + + public string AdvancedAuxiliaryFilePath; + + public string AuxiliaryVersion; + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs index e9ea12ac4d..13e3415b60 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs @@ -47,7 +47,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data MeasuredSpeed, MeasuredSpeedGear, PTO, - EPTP + VTP } public static class CycleTypeHelper @@ -170,6 +170,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data get { return (Math.Tan(RoadGradient.Value()) * 100).SI<Scalar>(); } } + public KilogramPerSecond Fuelconsumption; + /// <summary> /// relative altitude of the driving cycle over distance /// </summary> diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCombustionEngine.cs deleted file mode 100644 index 0405652043..0000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCombustionEngine.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.OutputData; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl -{ - public class EPTPCombustionEngine : CombustionEngine - { - public EPTPCombustionEngine(IVehicleContainer container, CombustionEngineData modelData, bool pt1Disabled = false) : base(container, modelData, pt1Disabled) { } - - //protected override void DoWriteModalResults(IModalDataContainer container) - //{ - // ValidatePowerDemand(CurrentState.EngineTorque, CurrentState.DynamicFullLoadTorque, - // CurrentState.FullDragTorque); - - // //var avgEngineSpeed = (PreviousState.EngineSpeed + CurrentState.EngineSpeed) / 2.0; - // var avgEngineSpeed = DataBus.CycleData.LeftSample.EngineSpeed; - // if (avgEngineSpeed.IsSmaller(EngineIdleSpeed, - // DataBus.ExecutionMode == ExecutionMode.Engineering ? 20.RPMtoRad() : 1e-3.RPMtoRad())) { - // Log.Warn("EngineSpeed below idling speed! n_eng_avg: {0}, n_idle: {1}", avgEngineSpeed, - // EngineIdleSpeed); - // } - // container[ModalResultField.P_eng_fcmap] = CurrentState.EngineTorque * avgEngineSpeed; - // container[ModalResultField.P_eng_out] = container[ModalResultField.P_eng_out] is DBNull - // ? CurrentState.EngineTorqueOut * avgEngineSpeed - // : container[ModalResultField.P_eng_out]; - // container[ModalResultField.P_eng_inertia] = CurrentState.InertiaTorqueLoss * avgEngineSpeed; - - // container[ModalResultField.n_eng_avg] = avgEngineSpeed; - // container[ModalResultField.T_eng_fcmap] = CurrentState.EngineTorque; - - // container[ModalResultField.P_eng_full] = CurrentState.DynamicFullLoadTorque * avgEngineSpeed; - // container[ModalResultField.P_eng_full_stat] = CurrentState.StationaryFullLoadTorque * avgEngineSpeed; - // container[ModalResultField.P_eng_drag] = CurrentState.FullDragTorque * avgEngineSpeed; - // container[ModalResultField.Tq_full] = CurrentState.DynamicFullLoadTorque; - // container[ModalResultField.Tq_drag] = CurrentState.FullDragTorque; - - // var result = ModelData.ConsumptionMap.GetFuelConsumption(CurrentState.EngineTorque, avgEngineSpeed, - // DataBus.ExecutionMode != ExecutionMode.Declaration); - // if (DataBus.ExecutionMode != ExecutionMode.Declaration && result.Extrapolated) { - // Log.Warn("FuelConsumptionMap was extrapolated: range for FC-Map is not sufficient: n: {0}, torque: {1}", - // avgEngineSpeed.Value(), CurrentState.EngineTorque.Value()); - // } - // var pt1 = ModelData.FullLoadCurves[DataBus.Gear].PT1(avgEngineSpeed); - // if (DataBus.ExecutionMode == ExecutionMode.Declaration && pt1.Extrapolated) { - // Log.Error("requested rpm below minimum rpm in pt1 - extrapolating. n_eng_avg: {0}", - // avgEngineSpeed); - // } - - // var fc = result.Value; - // var fcAux = fc; - - // var fcWHTC = fcAux * ModelData.FuelConsumptionCorrectionFactor; - // var fcAAUX = fcWHTC; - // var advancedAux = EngineAux as BusAuxiliariesAdapter; - // if (advancedAux != null) { - // advancedAux.DoWriteModalResults(container); - // fcAAUX = advancedAux.AAuxFuelConsumption; - // } - // var fcFinal = fcAAUX; - - // container[ModalResultField.FCMap] = fc; - // container[ModalResultField.FCAUXc] = fcAux; - // container[ModalResultField.FCWHTCc] = fcWHTC; - // container[ModalResultField.FCAAUX] = fcAAUX; - // container[ModalResultField.FCFinal] = fcFinal; - //} - - protected override PerSecond GetEngineSpeed(PerSecond angularSpeed) - { - return DataBus.CycleData.LeftSample.EngineSpeed; - } - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineFanAuxiliary.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineFanAuxiliary.cs new file mode 100644 index 0000000000..d9c158fa36 --- /dev/null +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineFanAuxiliary.cs @@ -0,0 +1,27 @@ +using System; +using TUGraz.VectoCommon.Utils; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Impl +{ + public class EngineFanAuxiliary + { + protected readonly double[] FanCoefficients; + + protected readonly double FanDiameter; + + public EngineFanAuxiliary(double[] fanParameters, Meter fanDiameter) + { + if (fanParameters.Length < 3) { + throw new ArgumentException("Three fan parameters are required!"); + } + FanCoefficients = fanParameters; + FanDiameter = fanDiameter.ConvertTo().Milli.Meter.Value(); + } + + public Watt PowerDemand(PerSecond fanSpeed) + { + + return (FanCoefficients[0] * Math.Pow(fanSpeed.AsRPM / FanCoefficients[1], 3) * Math.Pow(FanDiameter / FanCoefficients[2], 5) * 1000).SI<Watt>(); + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs new file mode 100644 index 0000000000..ea93e1afa1 --- /dev/null +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs @@ -0,0 +1,21 @@ +using System; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Models.Simulation; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.OutputData; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Impl +{ + public class VTPCombustionEngine : CombustionEngine + { + public VTPCombustionEngine(IVehicleContainer container, CombustionEngineData modelData, bool pt1Disabled = false) : base(container, modelData, pt1Disabled) { } + + + protected override PerSecond GetEngineSpeed(PerSecond angularSpeed) + { + return DataBus.CycleData.LeftSample.EngineSpeed; + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCycle.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs similarity index 90% rename from VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCycle.cs rename to VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs index 93521a6144..957d0479aa 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EPTPCycle.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs @@ -13,11 +13,11 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - internal class EPTPCycle : PWheelCycle + internal class VTPCycle : PWheelCycle { private uint StartGear; - public EPTPCycle(VehicleContainer container, IDrivingCycleData cycle, double axleGearRatio, + public VTPCycle(VehicleContainer container, IDrivingCycleData cycle, double axleGearRatio, VehicleData vehicleData, Dictionary<uint, double> gearRatios) : base(container, cycle) { } public override IResponse Initialize() @@ -97,22 +97,22 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected override void InitializeCycleData() { FirstRun = false; - var gearRatios = RunData.GearboxData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio); + var minEngineSpeed = (RunData.EngineData.FullLoadCurves[0].RatedSpeed - RunData.EngineData.IdleSpeed) * + Constants.SimulationSettings.ClutchClosingSpeedNorm + RunData.EngineData.IdleSpeed; + + var gearRatios = RunData.GearboxData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio); var stopped = false; foreach (var entry in Data.Entries) { stopped = stopped || entry.VehicleTargetSpeed.IsEqual(0.KMPHtoMeterPerSecond(), 0.3.KMPHtoMeterPerSecond()); - entry.WheelAngularVelocity = + entry.AngularVelocity = entry.VehicleTargetSpeed.IsEqual(0.KMPHtoMeterPerSecond(), 0.3.KMPHtoMeterPerSecond()) ? 0.RPMtoRad() - : entry.VehicleTargetSpeed / RunData.VehicleData.DynamicTyreRadius; - entry.Torque = entry.VehicleTargetSpeed.IsEqual(0, 0.1) - ? 0.SI<NewtonMeter>() - : entry.PWheel / entry.WheelAngularVelocity; + : entry.WheelAngularVelocity; - var cardanSpeed = entry.VehicleTargetSpeed / RunData.VehicleData.DynamicTyreRadius * + var cardanSpeed = entry.WheelAngularVelocity * RunData.AxleGearData.AxleGear.Ratio * (RunData.AngledriveData?.Angledrive.Ratio ?? 1); if (cardanSpeed.IsEqual(0, 1)) { entry.Gear = 0; @@ -127,7 +127,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (stopped && gear < StartGear) entry.Gear = StartGear; else - entry.Gear = gear == 1 && cardanSpeed * gearRatios[1] < RunData.EngineData.IdleSpeed ? 0 : gear; + entry.Gear = gear == 1 && cardanSpeed * gearRatios[1] <= minEngineSpeed ? 0 : gear; if (gear > StartGear) stopped = false; } diff --git a/VectoCore/VectoCore/Resources/Declaration/VAUX/HVAC-Table.csv b/VectoCore/VectoCore/Resources/Declaration/VAUX/HVAC-Table.csv index 5cb1fa8f1f..091638a7c0 100644 --- a/VectoCore/VectoCore/Resources/Declaration/VAUX/HVAC-Table.csv +++ b/VectoCore/VectoCore/Resources/Declaration/VAUX/HVAC-Table.csv @@ -13,10 +13,10 @@ None , 16 , 0 , 0 , 0 , 0 Default , 1 , , 150 , 150 , , Default , 2 , 200 , 200 , 150 , , Default , 3 , , 200 , 150 , , -Default , 4 , 350 , 200 , , 300 , -Default , 5 , 350 , 200 , , , -Default , 9 , 350 , 200 , , 300 , -Default , 10 , 350 , 200 , , , +Default , 4 , 350 , 200 , 200 , 300 , +Default , 5 , 350 , 200 , 200 , , +Default , 9 , 350 , 200 , 200 , 300 , +Default , 10 , 350 , 200 , 200 , , Default , 11 , 350 , 200 , , 300 , 200 Default , 12 , 350 , 200 , , , 200 Default , 16 , , , , , 200 diff --git a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv index ec4bf35e34..ca1eda4f91 100644 --- a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv +++ b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv @@ -2,13 +2,13 @@ HDV Class , Long haul , Regional delivery , Urban delivery , Municipal utility , 1 , , 240/20/20 , 220/20/30 , , 2 , 340/30/0 , 290/30/20 , 260/20/30 , , 3 , , 310/30/30 , 280/30/40 , , -4 , 510/100/0 , 490/40/40 , , 430/30/50 , +4 , 510/100/0 , 490/40/40 , 480/80/60 , 430/30/50 , 5 , 600/120/0 , 540/90/40 , 480/80/60 , , 6 , , , , , 7 , , , , , 8 , , , , , -9 , 600/120/0 , 490/60/40 , , 430/30/50 , -10 , 450/120/0 , 440/90/40 , , , +9 , 600/120/0 , 490/60/40 , 480/80/60 , 430/30/50 , +10 , 450/120/0 , 440/90/40 , 480/80/60 , , 11 , 600/120/0 , 490/60/40 , , 430/30/50 , 640/50/80 12 , 450/120/0 , 440/90/40 , , , 640/50/80 16 , , , , , 640/50/80 \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponent/EngineFanAuxTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponent/EngineFanAuxTest.cs new file mode 100644 index 0000000000..47cb92aeec --- /dev/null +++ b/VectoCore/VectoCoreTest/Models/SimulationComponent/EngineFanAuxTest.cs @@ -0,0 +1,23 @@ +using NUnit.Framework; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Models.SimulationComponent.Impl; + +namespace TUGraz.VectoCore.Tests.Models.SimulationComponent +{ + [TestFixture] + public class EngineFanAuxTest + { + + [TestCase(200 , 53.998), + TestCase(500, 843.713), + TestCase(1000, 6749.700), + TestCase(1300, 14829.091), + TestCase(1500, 22780.238)] + public void TestEngineFanPowerDemand(double fanSpeedRPM, double expectedPowerDemand) + { + var engineFan = new EngineFanAuxiliary(new[] { 5.5e-7, 14.62, 108.5 }, 0.225.SI<Meter>()); + + Assert.AreEqual(expectedPowerDemand, engineFan.PowerDemand(fanSpeedRPM.RPMtoRad()).Value(), 1e-3); + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index 06dec001cf..de45436c96 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -101,6 +101,7 @@ <Compile Include="Models\SimulationComponentData\TorqueConverterDataTest.cs" /> <Compile Include="Models\SimulationComponentData\ValidationTest.cs" /> <Compile Include="Models\SimulationComponent\ATGearboxTest.cs" /> + <Compile Include="Models\SimulationComponent\EngineFanAuxTest.cs" /> <Compile Include="Models\SimulationComponent\GearboxShiftLossesTest.cs" /> <Compile Include="Models\Simulation\FactoryTest.cs" /> <Compile Include="Models\Simulation\PTOIdleLossTest.cs" /> -- GitLab