diff --git a/VECTO.sln b/VECTO.sln index aff9d4f9bbbff58d334a8abe4415cf6d6639f3c4..d3fe7288cf10583ec65bea9d47a9263601d0c840 100644 --- a/VECTO.sln +++ b/VECTO.sln @@ -66,6 +66,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HashingCmd", "HashingCmd\HashingCmd.csproj", "{33F9848E-9257-4BE2-915F-68E748AEB204}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B5A298FD-8117-4443-9419-66BADA094716}" + ProjectSection(SolutionItems) = preProject + .nuget\packages.config = .nuget\packages.config + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -141,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 = Release|Any CPU - {FDEEE460-0B8A-4EF6-8D9E-72F203A50F65}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -169,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 = Release|Any CPU - {CD36938A-ADD9-4C65-96DA-B397CDEEA90A}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -195,7 +198,8 @@ Global {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -222,7 +226,8 @@ Global {6A27F93E-4A58-48F6-B00B-3908C5D3D5A2}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -268,8 +273,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 = Release|Any CPU - {B4B9BD2F-FD8F-4BB8-82FA-E2154D2C7FBD}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -296,8 +301,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 = Release|Any CPU - {60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -324,7 +329,8 @@ Global {6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -351,7 +357,8 @@ Global {2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -378,7 +385,8 @@ Global {E8B0B447-1A54-4BEC-A160-AF0017000781}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -403,8 +411,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 = Release|Any CPU - {79A066AD-69A9-4223-90F6-6ED5D2D084F4}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -428,7 +436,8 @@ Global {A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -451,8 +460,8 @@ Global {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.DebugTUG|x64.ActiveCfg = Debug|Any CPU {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.DebugTUG|x86.ActiveCfg = Debug|Any CPU - {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU - {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|Any CPU.Build.0 = Deploy|Any CPU + {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|Any CPU.ActiveCfg = Release|Any CPU + {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|Any CPU.Build.0 = Release|Any CPU {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|x64.ActiveCfg = Debug|Any CPU {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Deploy|x86.ActiveCfg = Debug|Any CPU {512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -475,8 +484,8 @@ Global {D959CB7C-F514-4F5E-9C33-684D0012474B}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|Any CPU - {D959CB7C-F514-4F5E-9C33-684D0012474B}.Deploy|Any CPU.Build.0 = Release|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 @@ -499,8 +508,8 @@ Global {41314A40-AB3E-4F43-B1A4-58443F4014F2}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|Any CPU - {41314A40-AB3E-4F43-B1A4-58443F4014F2}.Deploy|Any CPU.Build.0 = Release|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 @@ -546,8 +555,8 @@ Global {2C58BA97-2954-4D19-920F-A24B78FC80A4}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|Any CPU - {2C58BA97-2954-4D19-920F-A24B78FC80A4}.Deploy|Any CPU.Build.0 = Release|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 @@ -570,7 +579,8 @@ Global {7C364099-9B85-473A-8A42-BBEBE4798FF5}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -594,8 +604,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 = Release|Any CPU - {B673E12F-D323-4C4C-8805-9915B2C72D3D}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -620,7 +630,8 @@ Global {760C1C5B-A767-463E-BA85-F0BCFC23A550}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU {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 = Release|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 @@ -645,8 +656,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 = Release|Any CPU - {E14FC935-30EA-4BE6-AA8A-85CB76FEBA6A}.Deploy|Any CPU.Build.0 = Release|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|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 @@ -671,8 +682,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 = Release|Any CPU - {33F9848E-9257-4BE2-915F-68E748AEB204}.Deploy|Any CPU.Build.0 = Release|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|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 9ba0cdb648e793db7669b1480fe38451845d0fda..1cd409260f2fcbe441c1ddfdec4495a65d459309 100644 --- a/VECTO.sln.DotSettings +++ b/VECTO.sln.DotSettings @@ -24,6 +24,7 @@ <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AMT/@EntryIndexedValue">AMT</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AT/@EntryIndexedValue">AT</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CSV/@EntryIndexedValue">CSV</s:String> + <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EPTP/@EntryIndexedValue">EPTP</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HVAC/@EntryIndexedValue">HVAC</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JSON/@EntryIndexedValue">JSON</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MT/@EntryIndexedValue">MT</s:String> diff --git a/VECTO/File Browser/FileBrowserModule.vb b/VECTO/File Browser/FileBrowserModule.vb index c035d47776058e87ba801ff6a1928063005d4005..253a85419cde24483dcf4fe6d4a3473a298f33d6 100644 --- a/VECTO/File Browser/FileBrowserModule.vb +++ b/VECTO/File Browser/FileBrowserModule.vb @@ -23,6 +23,7 @@ Public Module FileBrowserModule Public JobfileFileBrowser As FileBrowser Public TextFileBrowser As FileBrowser Public VehicleFileBrowser As FileBrowser + Public VehicleXMLFileBrowser As FileBrowser Public DrivingCycleFileBrowser As FileBrowser Public PTODrivingCycleFileBrowser As FileBrowser Public FuelConsumptionMapFileBrowser As FileBrowser diff --git a/VECTO/GUI/EngineForm.vb b/VECTO/GUI/EngineForm.vb index 5360a41ee5361cbb0d35ec4d3b584635b7fcd857..15f98cfe1b90db447af4a11a4163ff81c3ab39bf 100644 --- a/VECTO/GUI/EngineForm.vb +++ b/VECTO/GUI/EngineForm.vb @@ -166,7 +166,7 @@ Public Class EngineForm Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), IEngineeringInputDataProvider) - engine = inputData.EngineInputData + engine = inputData.JobInputData.Vehicle.EngineInputData If Cfg.DeclMode <> engine.SavedInDeclarationMode Then @@ -555,4 +555,4 @@ Public Class EngineForm MsgBox("Failed to load file! " & ex.Message, MsgBoxStyle.Critical) End Try End Sub -End Class \ No newline at end of file +End Class diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index 35a3a71fe59787ce31f0dc481c7d08c68c6192a6..2594175e17b3011f43071aee38bd9d3b2f8d5aa4 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -1,1071 +1,1072 @@ -' Copyright 2017 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. -Imports System.Collections.Generic -Imports System.Drawing.Imaging -Imports System.Globalization -Imports System.IO -Imports System.Linq -Imports System.Windows.Forms.DataVisualization.Charting -Imports System.Xml.Linq -Imports TUGraz.VECTO.Input_Files -Imports TUGraz.VectoCommon.InputData -Imports TUGraz.VectoCommon.Models -Imports TUGraz.VectoCommon.Utils -Imports TUGraz.VectoCore.InputData.FileIO.JSON -Imports TUGraz.VectoCore.InputData.Impl -Imports TUGraz.VectoCore.InputData.Reader -Imports TUGraz.VectoCore.Models.Declaration -Imports TUGraz.VectoCore.Models.SimulationComponent.Data -Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine -Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox -Imports TUGraz.VectoCore.OutputData.FileIO -Imports TUGraz.VectoCore.OutputData.XML -Imports TUGraz.VectoCore.Utils - -''' <summary> -''' Gearbox Editor -''' </summary> -''' <remarks></remarks> -Public Class GearboxForm - Private Enum GearboxTbl - GearNr = 0 - 'TorqueConverter = 1 - Ratio = 1 - LossMapEfficiency = 2 - ShiftPolygons = 3 - MaxTorque = 4 - MaxSpeed = 5 - End Enum - - Private _gbxFile As String = "" - Public AutoSendTo As Boolean = False - Public JobDir As String = "" - Private _gearDialog As GearboxGearDialog - - Private _changed As Boolean = False - - 'Before closing Editor: Check if file was changed and ask to save. - Private Sub F_GBX_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then - e.Cancel = ChangeCheckCancel() - End If - End Sub - - 'Initialise. - Private Sub F_GBX_Load(sender As Object, e As EventArgs) Handles Me.Load - - _gearDialog = New GearboxGearDialog - - PnInertiaTI.Enabled = Not Cfg.DeclMode - GrGearShift.Enabled = Not Cfg.DeclMode - 'ChTCon.Enabled = Not Cfg.DeclMode - - CbGStype.Items.Clear() - CbGStype.ValueMember = "Value" - CbGStype.DisplayMember = "Label" - - If (Cfg.DeclMode) Then - CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ - .Cast (Of GearboxType)() _ - .Where(Function(type) type.ManualTransmission() OrElse type = GearboxType.ATSerial) _ - .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() - Else - CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ - .Cast (Of GearboxType)() _ - .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission()) _ - .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() - End If - DeclInit() - - _changed = False - NewGbx() - End Sub - - 'Set generic values for Declaration mode. - Private Sub DeclInit() - Dim gbxType As GearboxType - Dim lv0 As ListViewItem - - If Not Cfg.DeclMode Then Exit Sub - - TBI_getr.Text = DeclarationData.Gearbox.Inertia.ToGUIFormat() 'cDeclaration.GbInertia - - gbxType = CType(CbGStype.SelectedValue, GearboxType) 'CType(Me.CbGStype.SelectedIndex, tGearbox) - - TbTracInt.Text = gbxType.TractionInterruption().ToGUIFormat() - TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() - 'cDeclaration.MinTimeBetweenGearshift(GStype) - - TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve*100).ToGUIFormat() ' cDeclaration.TqResv - TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart*100).ToGUIFormat() 'cDeclaration.TqResvStart - TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() 'cDeclaration.StartSpeed - TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() ' cDeclaration.StartAcc - - tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbTCCUpshiftMinAcceleration.Text = "" - tbTCLUpshiftMinAcceleration.Text = "" - - tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - 'ChTCon.Checked = GStype.AutomaticTransmission() - For Each lv0 In LvGears.Items - lv0.SubItems(GearboxTbl.ShiftPolygons).Text = "" - Next - End Sub - -#Region "Toolbar" - - Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click - NewGbx() - End Sub - - Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click - If GearboxFileBrowser.OpenDialog(_gbxFile) Then - Try - OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck) - Catch ex As Exception - MsgBox("Failed to open Gearbox File: " + ex.Message) - End Try - End If - End Sub - - Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click - SaveOrSaveAs(False) - End Sub - - Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click - SaveOrSaveAs(True) - End Sub - - Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click - - If ChangeCheckCancel() Then Exit Sub - - If _gbxFile = "" Then - If MsgBox("Save file now?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then - If Not SaveOrSaveAs(True) Then Exit Sub - Else - Exit Sub - End If - End If - - If Not VectoJobForm.Visible Then - JobDir = "" - VectoJobForm.Show() - VectoJobForm.VectoNew() - Else - VectoJobForm.WindowState = FormWindowState.Normal - End If - - VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(_gbxFile, JobDir) - End Sub - - 'Help - Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click - If File.Exists(MyAppPath & "User Manual\help.html") Then - Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() - Process.Start(defaultBrowserPath, - String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#gearbox-editor")) - Else - MsgBox("User Manual not found!", MsgBoxStyle.Critical) - End If - End Sub - -#End Region - - 'New file - Private Sub NewGbx() - 'Dim lvi As ListViewItem - - If ChangeCheckCancel() Then Exit Sub - - 'CbGStype.SelectedIndex = 0 - - TbName.Text = "" - TbTracInt.Text = "" - TBI_getr.Text = "" - - LvGears.Items.Clear() - - LvGears.Items.Add(CreateListviewItem("Axle", 1, "1", "", "", "")) - - 'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged - 'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged - TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve*100).ToGUIFormat() - TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() - TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart*100).ToGUIFormat() - TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s! - TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() - - tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbTCLUpshiftMinAcceleration.Text = "" - tbTCCUpshiftMinAcceleration.Text = "" - - tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - 'ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged - TbTCfile.Text = "" - TbTCrefrpm.Text = "" - TbTCinertia.Text = "" - - DeclInit() - - _gbxFile = "" - Text = "GBX Editor" - LbStatus.Text = "" - - - _changed = False - Try - UpdatePic() - Catch - End Try - End Sub - - 'Open file - Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory) - - If ChangeCheckCancel() Then Exit Sub - - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), - IEngineeringInputDataProvider) - Dim gearbox As IGearboxEngineeringInputData = inputData.GearboxInputData - Dim axlegear As IAxleGearInputData = inputData.AxleGearInputData - - _vehicleCategory = vehicleCategory - - If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then - Select Case WrongMode() - Case 1 - Close() - MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked - MainForm.OpenVectoFile(file) - Case - 1 - Exit Sub - End Select - End If - - Dim basePath As String = Path.GetDirectoryName(file) - TbName.Text = gearbox.Model - TbTracInt.Text = gearbox.TractionInterruption.ToGUIFormat() - TBI_getr.Text = gearbox.Inertia.ToGUIFormat() - - LvGears.Items.Clear() - - Dim lossmap As String = "" - Try - lossmap = If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(), - GetRelativePath(axlegear.LossMap.Source, basePath)) - Catch ex As Exception - End Try - - LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio, lossmap, "", "", "")) - - For Each gear As ITransmissionInputData In gearbox.Gears - lossmap = "" - Try - lossmap = If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), GetRelativePath(gear.LossMap.Source, basePath)) - Catch ex As Exception - - End Try - LvGears.Items.Add(CreateListviewItem(gear.Gear.ToString("00"), gear.Ratio, - lossmap, - If(gear.ShiftPolygon Is Nothing, "", GetRelativePath(gear.ShiftPolygon.Source, basePath)), - If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat()), - If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToGUIFormat()))) - Next - - TbTqResv.Text = (gearbox.TorqueReserve*100).ToGUIFormat() - TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat() - TbTqResvStart.Text = (gearbox.StartTorqueReserve*100).ToGUIFormat() - TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat() - TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat() - - Dim torqueConverter As ITorqueConverterEngineeringInputData = gearbox.TorqueConverter - If torqueConverter Is Nothing OrElse gearbox.Type.ManualTransmission() Then - TbTCfile.Text = "" - TbTCrefrpm.Text = "" - TbTCinertia.Text = "" - TBTCShiftPolygon.Text = "" - tbTCmaxSpeed.Text = "" - tbTCLUpshiftMinAcceleration.Text = "" - tbTCCUpshiftMinAcceleration.Text = "" - - Else - TbTCfile.Text = If(torqueConverter.TCData Is Nothing, "", GetRelativePath(torqueConverter.TCData.Source, basePath)) - TbTCrefrpm.Text = If(torqueConverter.ReferenceRPM Is Nothing, "", torqueConverter.ReferenceRPM.AsRPM.ToGUIFormat()) - TbTCinertia.Text = If(torqueConverter.Inertia Is Nothing, "", torqueConverter.Inertia.ToGUIFormat()) - TBTCShiftPolygon.Text = - If(torqueConverter.ShiftPolygon Is Nothing, "", GetRelativePath(torqueConverter.ShiftPolygon.Source, basePath)) - tbTCmaxSpeed.Text = - If(torqueConverter.MaxInputSpeed Is Nothing, "", torqueConverter.MaxInputSpeed.AsRPM.ToGUIFormat()) - tbTCLUpshiftMinAcceleration.Text = torqueConverter.CLUpshiftMinAcceleration.ToGUIFormat() - tbTCCUpshiftMinAcceleration.Text = torqueConverter.CCUpshiftMinAcceleration.ToGUIFormat() - End If - - tbUpshiftMinAcceleration.Text = gearbox.UpshiftMinAcceleration.ToGUIFormat() - tbDownshiftAfterUpshift.Text = gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() - tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - - tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat() - - CbGStype.SelectedValue = gearbox.Type - - - DeclInit() - - - GearboxFileBrowser.UpdateHistory(file) - Text = GetFilenameWithoutPath(file, True) - LbStatus.Text = "" - UpdateGearboxInfoText() - _gbxFile = file - Activate() - - _changed = False - Try - UpdatePic() - Catch - End Try - End Sub - - Private Function CreateListviewItem(gear As String, ratio As Double, getrMap As String, - shiftPolygon As String, maxTorque As String, maxSpeed As String) As ListViewItem - Dim retVal As ListViewItem = New ListViewItem(gear) - 'retVal.SubItems.Add(tc) - retVal.SubItems.Add(ratio.ToGUIFormat()) - retVal.SubItems.Add(getrMap) - retVal.SubItems.Add(shiftPolygon) - retVal.SubItems.Add(maxTorque) - retVal.SubItems.Add(maxSpeed) - Return retVal - End Function - - 'Save or Save As function = true if file is saved - Private Function SaveOrSaveAs(saveAs As Boolean) As Boolean - If _gbxFile = "" Or saveAs Then - If GearboxFileBrowser.SaveDialog(_gbxFile) Then - _gbxFile = GearboxFileBrowser.Files(0) - Else - Return False - End If - End If - Return SaveGbx(_gbxFile) - End Function - - 'Save file - Private Function SaveGbx(file As String) As Boolean - - Dim gearbox As Gearbox = FillGearboxData(file) - - - If Not gearbox.SaveFile Then - MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) - Return False - End If - - If AutoSendTo Then - If VectoJobForm.Visible Then - If UCase(FileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then _ - VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(file, JobDir) - VectoJobForm.UpdatePic() - End If - End If - - GearboxFileBrowser.UpdateHistory(file) - Text = GetFilenameWithoutPath(file, True) - LbStatus.Text = "" - - _changed = False - - Return True - End Function - - Private Function FillGearboxData(file As String) As Gearbox - Dim gearbox As Gearbox - Dim i As Integer - - gearbox = New Gearbox - gearbox.FilePath = file - - gearbox.ModelName = TbName.Text - If Trim(gearbox.ModelName) = "" Then gearbox.ModelName = "Undefined" - - gearbox.TracIntrSi = TbTracInt.Text.ToDouble(0) - gearbox.GbxInertia = TBI_getr.Text.ToDouble(0) - - For i = 0 To LvGears.Items.Count - 1 - 'GBX0.IsTCgear.Add(Me.LvGears.Items(i).SubItems(GearboxTbl.TorqueConverter).Text = "on" And i > 0) - gearbox.GearRatios.Add(LvGears.Items(i).SubItems(GearboxTbl.Ratio).Text.ToDouble(0)) - gearbox.GearLossmaps.Add(New SubPath) - gearbox.GearLossMap(i) = LvGears.Items(i).SubItems(GearboxTbl.LossMapEfficiency).Text - gearbox.GearshiftFiles.Add(New SubPath) - gearbox.ShiftPolygonFile(i) = LvGears.Items(i).SubItems(GearboxTbl.ShiftPolygons).Text - 'GBX0.FldFiles.Add(New cSubPath) - 'GBX0.FldFile(i) = Me.LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text - gearbox.MaxTorque.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text) - gearbox.MaxSpeed.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxSpeed).Text) - Next - - gearbox.TorqueResv = TbTqResv.Text.ToDouble(0) - gearbox.ShiftTime = TbMinTimeBetweenShifts.Text.ToDouble(0) - gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0) - gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0) - gearbox.StartAcc = TbStartAcc.Text.ToDouble(0) - - gearbox.Type = CType(CbGStype.SelectedValue, GearboxType) - - gearbox.Type.AutomaticTransmission() - gearbox.TorqueConverterFile = TbTCfile.Text - gearbox.TorqueConverterReferenceRpm = TbTCrefrpm.Text.ToDouble(0) - gearbox.TorqueConverterInertia = TbTCinertia.Text.ToDouble(0) - gearbox.TorqueConverterShiftPolygonFile = TBTCShiftPolygon.Text - gearbox.TorqueConverterMaxSpeed = tbTCmaxSpeed.Text.ToDouble(0) - - gearbox.DownshiftAfterUpshift = tbDownshiftAfterUpshift.Text.ToDouble(0) - gearbox.UpshiftAfterDownshift = tbUpshiftAfterDownshift.Text.ToDouble(0) - - gearbox.UpshiftMinAcceleration = tbUpshiftMinAcceleration.Text.ToDouble(0) - gearbox.TCLUpshiftMinAcceleration = tbTCLUpshiftMinAcceleration.Text.ToDouble(0) - gearbox.TCCUpshiftMinAcceleration = tbTCCUpshiftMinAcceleration.Text.ToDouble(0) - - gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0) - Return gearbox - End Function - -#Region "Change Events" - - 'Change Status ändern |@@| Change Status change - Private Sub Change() - If Not _changed Then - LbStatus.Text = "Unsaved changes in current file" - _changed = True - End If - End Sub - - ' "Save changes ?" ...liefert True wenn User Vorgang abbricht |@@| Save changes? "... Returns True if user aborts - Private Function ChangeCheckCancel() As Boolean - - If _changed Then - Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) - Case MsgBoxResult.Yes - Return Not SaveOrSaveAs(False) - Case MsgBoxResult.Cancel - Return True - Case Else 'MsgBoxResult.No - _changed = False - Return False - End Select - - Else - - Return False - - End If - End Function - - Private Sub TbName_TextChanged(sender As Object, e As EventArgs) _ - Handles TbName.TextChanged, TBI_getr.TextChanged, TbTracInt.TextChanged, TbTqResv.TextChanged, - TbMinTimeBetweenShifts.TextChanged, TbTqResvStart.TextChanged, TbStartSpeed.TextChanged, TbStartAcc.TextChanged, - TbTCfile.TextChanged, - tbTCCUpshiftMinAcceleration.TextChanged, tbTCLUpshiftMinAcceleration.TextChanged - Change() - End Sub - -#End Region - - 'Save and close - Private Sub ButOK_Click(sender As Object, e As EventArgs) Handles ButOK.Click - If SaveOrSaveAs(False) Then Close() - End Sub - - 'Cancel - Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click - Close() - End Sub - - 'Enable/Disable settings for specific transmission types - Private Sub CbGStype_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles CbGStype.SelectedIndexChanged - Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) - - Change() - - 'ChTCon.Enabled = (GStype.AutomaticTransmission()) - gbTC.Enabled = gStype.AutomaticTransmission() - pnTcEngineering.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - gbTCAccMin.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - gbPowershiftLosses.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() - TbStartAcc.Enabled = Not gStype.AutomaticTransmission() - TbStartSpeed.Enabled = Not gStype.AutomaticTransmission() - TbTqResv.Enabled = Not gStype.AutomaticTransmission() - GroupBox2.Enabled = Not gStype.AutomaticTransmission() - TBI_getr.Enabled = Not gStype.AutomaticTransmission() - TbTracInt.Enabled = Not gStype.AutomaticTransmission() - tbDownshiftAfterUpshift.Enabled = Not gStype.AutomaticTransmission() - tbUpshiftAfterDownshift.Enabled = Not gStype.AutomaticTransmission() - UpdateGearboxInfoText() - End Sub - - Private Sub UpdateGearboxInfoText() - Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) - - Dim text As String = "" - If (gStype = GearboxType.ATSerial) Then - If LvGears.Items.Count > 2 Then - Dim ratio1 As Double = LvGears.Items.Item(1).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) - Dim ratio2 As Double = LvGears.Items.Item(2).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) - - If ratio1/ratio2 >= DeclarationData.Gearbox.TorqueConverterSecondGearThreshold(_vehicleCategory) Then - text = "Torque converter is used in 1st and 2nd gear" - Else - text = "Torque converter is used in 1st gear only" - End If - End If - End If - lblGbxInfo.Text = text - End Sub - - - Private Sub LvGears_SelectedIndexChanged(sender As Object, e As EventArgs) _ - Handles LvGears.SelectedIndexChanged - Try - UpdatePic() - btExportVGBS.Enabled = True - Catch - btExportVGBS.Enabled = False - End Try - End Sub - -#Region "Gears" - - 'Gear-DoubleClick - Private Sub LvGears_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) _ - Handles LvGears.MouseDoubleClick - EditGear() - End Sub - - 'Gear-KeyDown - Private Sub LvGears_KeyDown(sender As Object, e As KeyEventArgs) Handles LvGears.KeyDown - Select Case e.KeyCode - Case Keys.Delete, Keys.Back - RemoveGear(False) - Case Keys.Enter - EditGear() - End Select - End Sub - - 'Remove Gear Button - Private Sub BtClearGear_Click(sender As Object, e As EventArgs) Handles BtRemGear.Click - RemoveGear(False) - End Sub - - 'Add Gear button - Private Sub BtAddGear_Click(sender As Object, e As EventArgs) Handles BtAddGear.Click - AddGear() - LvGears.Items(LvGears.Items.Count - 1).Selected = True - EditGear() - End Sub - - 'Edit Gear - Private Sub EditGear() - - Do - - 'GearDia.ChIsTCgear.Enabled = (Me.ChTCon.Checked And Me.LvGears.SelectedIndices(0) > 0) - _gearDialog.GearboxType = CType(CbGStype.SelectedValue, GearboxType) - _gearDialog.PnShiftPoly.Enabled = (Not Cfg.DeclMode And LvGears.SelectedIndices(0) > 0) - _gearDialog.PnFld.Enabled = (LvGears.SelectedIndices(0) > 0) - _gearDialog.GbxPath = GetPath(_gbxFile) - _gearDialog.TbGear.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.GearNr).Text - _gearDialog.TbRatio.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text - _gearDialog.TbMapPath.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text - If LvGears.SelectedIndices(0) > 0 Then - _gearDialog.TbShiftPolyFile.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text - _gearDialog.TbMaxTorque.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text - _gearDialog.tbMaxSpeed.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text - Else - _gearDialog.TbShiftPolyFile.Text = "" - _gearDialog.TbMaxTorque.Text = "" - _gearDialog.tbMaxSpeed.Text = "" - End If - - If LvGears.SelectedItems(0).Index = 0 Then - _gearDialog.BtPrevious.Enabled = False - Else - _gearDialog.BtPrevious.Enabled = True - End If - - If _gearDialog.ShowDialog = DialogResult.OK Then - 'Me.LvGears.SelectedItems(0).SubItems(GearboxTbl.TorqueConverter).Text = "-" - LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = _gearDialog.TbRatio.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text = _gearDialog.TbMapPath.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text = _gearDialog.TbShiftPolyFile.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text = _gearDialog.TbMaxTorque.Text - LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text = _gearDialog.tbMaxSpeed.Text - - UpdateGearboxInfoText() - Try - UpdatePic() - Catch - End Try - - Change() - - Else - - If LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = "" Then RemoveGear(True) - - End If - - If _gearDialog.NextGear Then - If LvGears.Items.Count - 1 = LvGears.SelectedIndices(0) Then AddGear() - - LvGears.Items(LvGears.SelectedIndices(0) + 1).Selected = True - End If - - If _gearDialog.PreviousGear AndAlso LvGears.SelectedIndices(0) > 0 Then - LvGears.Items(LvGears.SelectedIndices(0) - 1).Selected = True - End If - - Loop Until Not (_gearDialog.NextGear OrElse _gearDialog.PreviousGear) - End Sub - - 'Add Gear - Private Sub AddGear() - Dim lvi As ListViewItem - - lvi = CreateListviewItem(LvGears.Items.Count.ToString("00"), 1, "", "", "", "") - - LvGears.Items.Add(lvi) - - lvi.EnsureVisible() - UpdateGearboxInfoText() - LvGears.Focus() - - 'Change() => NO! Change() is already handled by EditGear - End Sub - - 'Remove Gear - Private Sub RemoveGear(noChange As Boolean) - Dim i0 As Integer - Dim i As Integer - Dim lv0 As ListViewItem - - If LvGears.Items.Count < 2 Then Exit Sub - - If LvGears.SelectedItems.Count = 0 Then LvGears.Items(LvGears.Items.Count - 1).Selected = True - - i0 = LvGears.SelectedItems(0).Index - - If i0 = 0 Then Exit Sub 'Must not remove axle - - LvGears.SelectedItems(0).Remove() - - i = 0 - For Each lv0 In LvGears.Items - If lv0.SubItems(GearboxTbl.GearNr).Text = "Axle" Then Continue For - i += 1 - lv0.SubItems(GearboxTbl.GearNr).Text = i.ToString("00") - Next - - If i0 < LvGears.Items.Count Then - LvGears.Items(i0).Selected = True - LvGears.Items(i0).EnsureVisible() - End If - UpdateGearboxInfoText() - LvGears.Focus() - Try - UpdatePic() - Catch - End Try - - If Not noChange Then Change() - End Sub - - -#End Region - - -#Region "Open File Context Menu" - - Private _contextMenuFiles As String() - Private _vehicleCategory As VehicleCategory - - Private Sub OpenFiles(ParamArray files() As String) - - If files.Length = 0 Then Exit Sub - - _contextMenuFiles = files - - OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName - - CmOpenFile.Show(Windows.Forms.Cursor.Position) - End Sub - - Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles OpenWithToolStripMenuItem.Click - If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") - End Sub - - Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ - Handles ShowInFolderToolStripMenuItem.Click - If File.Exists(_contextMenuFiles(0)) Then - Try - Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") - Catch ex As Exception - MsgBox("Failed to open file!") - End Try - Else - MsgBox("File not found!") - End If - End Sub - -#End Region - - - Private Sub UpdatePic() - - Dim path As String - - Dim chart As Chart - Dim s As Series - Dim a As ChartArea - Dim img As Bitmap - Dim gear As Integer - 'Dim fullLoadCurve As EngineFullLoadCurve = Nothing - 'Dim shiftOk As Boolean - - - PicBox.Image = Nothing - - Dim shiftPolygon As ShiftPolygon = Nothing - 'Dim engineFld As FullLoadCurve - - If LvGears.Items.Count <= 1 Then Exit Sub - - Try - If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then - path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = LvGears.SelectedIndices(0) - Else - path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = 1 - End If - - If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) - - Catch ex As Exception - - End Try - - chart = New Chart - chart.Width = PicBox.Width - chart.Height = PicBox.Height - - a = New ChartArea - - 'Shiftpolygons from file - - If Not shiftPolygon Is Nothing Then - s = New Series - s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Upshift curve" - chart.Series.Add(s) - - s = New Series - s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), - shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.Name = "Downshift curve" - chart.Series.Add(s) - End If - - 'Dim vectoJob As VectoJob = New VectoJob() With {.FilePath = VectoJobForm.VECTOfile} - 'Dim vectoOk As Boolean = vectoJob.ReadFile() - Dim jobFile As String = VectoJobForm.VectoFile - If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then - - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), - IEngineeringInputDataProvider) - If (inputData Is Nothing) Then - Exit Sub - End If - Dim vehicle As IVehicleEngineeringInputData = inputData.VehicleInputData - 'inputData = TryCast(JSONInputDataFactory.ReadComponentData(vectoJob.PathEng(False)), IEngineeringInputDataProvider) - Dim engine As IEngineEngineeringInputData = inputData.EngineInputData - Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) - - - s = New Series - s.Points.DataBindXY(engineFld.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), - engineFld.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkBlue - s.Name = "Full load" - chart.Series.Add(s) - - If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then - 'If FLD0.Init(VectoJobForm.n_idle) Then - - 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) - Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) - If (Not IsNothing(shiftLines)) Then - - - s = New Series - - 's.Points.DataBindXY(Shiftpoly.gs_nUup, Shiftpoly.gs_TqUp) - s.Points.DataBindXY( - shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.AsRPM). - ToArray(), - shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.BorderDashStyle = ChartDashStyle.Dash - s.Name = "Upshift curve (generic)" - chart.Series.Add(s) - - s = New Series - 's.Points.DataBindXY(Shiftpoly.gs_nUdown, Shiftpoly.gs_TqDown) - s.Points.DataBindXY( - shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.AsRPM) _ - .ToArray(), - shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToArray()) - s.ChartType = SeriesChartType.FastLine - s.BorderWidth = 2 - s.Color = Color.DarkRed - s.BorderDashStyle = ChartDashStyle.Dash - s.Name = "Downshift curve (generic)" - chart.Series.Add(s) - End If - 'End If - End If - End If - - a.Name = "main" - - a.AxisX.Title = "engine speed [1/min]" - a.AxisX.TitleFont = New Font("Helvetica", 10) - a.AxisX.LabelStyle.Font = New Font("Helvetica", 8) - a.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None - a.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - a.AxisY.Title = "engine torque [Nm]" - a.AxisY.TitleFont = New Font("Helvetica", 10) - a.AxisY.LabelStyle.Font = New Font("Helvetica", 8) - a.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None - a.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot - - a.AxisX.Minimum = 300 - a.BorderDashStyle = ChartDashStyle.Solid - a.BorderWidth = 1 - - a.BackColor = Color.GhostWhite - - chart.ChartAreas.Add(a) - - chart.Titles.Add("Gear " & gear & " shift polygons") - chart.Titles(0).Font = New Font("Helvetica", 12) - - chart.Update() - - img = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) - chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) - - PicBox.Image = img - End Sub - - - Private Function GetShiftLines(ByVal idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, - vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), ByVal gear As Integer) _ - As ShiftPolygon - Dim maxTqStr As String = LvGears.Items(gear).SubItems(GearboxTbl.MaxTorque).Text - Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, idleSpeed, gear, - If(String.IsNullOrWhiteSpace(maxTqStr), Nothing, maxTqStr.ToDouble(0).SI (Of NewtonMeter))) - If gears.Count <= 1 Then - Return Nothing - End If - Dim rDyn As Meter = vehicle.DynamicTyreRadius - If rDyn.IsEqual(0) Then - If (vehicle.Axles.Count < 2) Then - Return Nothing - End If - rDyn = DeclarationData.Wheels.Lookup(vehicle.Axles(1).Wheels).DynamicTyreRadius - End If - If (rDyn.IsEqual(0)) Then - Return Nothing - End If - Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon( - CType(CbGStype.SelectedValue, GearboxType), gear - 1, - engine.FullLoadCurves(CType(gear, UInteger)), gears, engine, - Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), - (rDyn)) - Return shiftLines - End Function - - Private Function ConvertToGears(gbx As ListView.ListViewItemCollection) As IList(Of ITransmissionInputData) - Dim retVal As List(Of ITransmissionInputData) = New List(Of ITransmissionInputData) - Dim value As Double - - For i As Integer = 1 To gbx.Count - 1 - If _ - gbx(i).SubItems(GearboxTbl.Ratio).Text <> "" AndAlso Double.TryParse(gbx(i).SubItems(GearboxTbl.Ratio).Text, value) _ - Then - Dim maxSpeed As PerSecond = - If _ - (String.IsNullOrWhiteSpace(gbx(i).SubItems(GearboxTbl.MaxSpeed).Text), Nothing, - gbx(i).SubItems(GearboxTbl.MaxSpeed).Text.ToDouble().RPMtoRad()) - retVal.Add( - New TransmissionInputData() _ - With {.Ratio = value, .MaxInputSpeed = maxSpeed}) - - End If - Next - Return retVal - End Function - - -#Region "Torque Converter" - - - 'Browse TC file - Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click - If TorqueConverterFileBrowser.OpenDialog(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) Then - TbTCfile.Text = GetFilenameWithoutDirectory(TorqueConverterFileBrowser.Files(0), GetPath(_gbxFile)) - End If - End Sub - - 'Open TC file - Private Sub BtTCfileOpen_Click(sender As Object, e As EventArgs) Handles BtTCfileOpen.Click - OpenFiles(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) - End Sub - - -#End Region - - Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter - End Sub - - Public Sub New() - - ' Dieser Aufruf ist für den Designer erforderlich. - InitializeComponent() - - ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - End Sub - - Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click - If TorqueConverterShiftPolygonFileBrowser.OpenDialog(FileRepl(TBTCShiftPolygon.Text, GetPath(_gbxFile))) Then - TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(TorqueConverterShiftPolygonFileBrowser.Files(0), - GetPath(_gbxFile)) - End If - End Sub - - Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click - If Not Cfg.DeclMode Then - MsgBox("XML Export is only supported in Declaration Mode") - Exit Sub - End If - If Not FolderFileBrowser.OpenDialog("") Then - Exit Sub - End If - Dim filePath As String = FolderFileBrowser.Files(0) - - Dim data As Gearbox = FillGearboxData(_gbxFile) - If (Cfg.DeclMode) Then - Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data, data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - Else - Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data, - data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - End If - End Sub - - Private Sub btnExportAxlGearXML_Click(sender As Object, e As EventArgs) Handles btnExportAxlGearXML.Click - If Not Cfg.DeclMode Then - MsgBox("XML Export is only supported in Declaration Mode") - Exit Sub - End If - If Not FolderFileBrowser.OpenDialog("") Then - Exit Sub - End If - Dim filePath As String = FolderFileBrowser.Files(0) - - Dim data As Gearbox = FillGearboxData(_gbxFile) - If (Cfg.DeclMode) Then - Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - Else - Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data) - export.Save(Path.Combine(filePath, data.ModelName + ".xml")) - End If - End Sub +' Copyright 2017 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. +Imports System.Collections.Generic +Imports System.Drawing.Imaging +Imports System.Globalization +Imports System.IO +Imports System.Linq +Imports System.Windows.Forms.DataVisualization.Charting +Imports System.Xml.Linq +Imports TUGraz.VECTO.Input_Files +Imports TUGraz.VectoCommon.InputData +Imports TUGraz.VectoCommon.Models +Imports TUGraz.VectoCommon.Utils +Imports TUGraz.VectoCore.InputData.FileIO.JSON +Imports TUGraz.VectoCore.InputData.Impl +Imports TUGraz.VectoCore.InputData.Reader +Imports TUGraz.VectoCore.Models.Declaration +Imports TUGraz.VectoCore.Models.SimulationComponent.Data +Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine +Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox +Imports TUGraz.VectoCore.OutputData.FileIO +Imports TUGraz.VectoCore.OutputData.XML +Imports TUGraz.VectoCore.Utils + +''' <summary> +''' Gearbox Editor +''' </summary> +''' <remarks></remarks> +Public Class GearboxForm + Private Enum GearboxTbl + GearNr = 0 + 'TorqueConverter = 1 + Ratio = 1 + LossMapEfficiency = 2 + ShiftPolygons = 3 + MaxTorque = 4 + MaxSpeed = 5 + End Enum + + Private _gbxFile As String = "" + Public AutoSendTo As Boolean = False + Public JobDir As String = "" + Private _gearDialog As GearboxGearDialog + + Private _changed As Boolean = False + + 'Before closing Editor: Check if file was changed and ask to save. + Private Sub F_GBX_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing + If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then + e.Cancel = ChangeCheckCancel() + End If + End Sub + + 'Initialise. + Private Sub F_GBX_Load(sender As Object, e As EventArgs) Handles Me.Load + + _gearDialog = New GearboxGearDialog + + PnInertiaTI.Enabled = Not Cfg.DeclMode + GrGearShift.Enabled = Not Cfg.DeclMode + 'ChTCon.Enabled = Not Cfg.DeclMode + + CbGStype.Items.Clear() + CbGStype.ValueMember = "Value" + CbGStype.DisplayMember = "Label" + + If (Cfg.DeclMode) Then + CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ + .Cast(Of GearboxType)() _ + .Where(Function(type) type.ManualTransmission() OrElse type = GearboxType.ATSerial) _ + .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() + Else + CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ + .Cast(Of GearboxType)() _ + .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission()) _ + .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() + End If + DeclInit() + + _changed = False + NewGbx() + End Sub + + 'Set generic values for Declaration mode. + Private Sub DeclInit() + Dim gbxType As GearboxType + Dim lv0 As ListViewItem + + If Not Cfg.DeclMode Then Exit Sub + + TBI_getr.Text = DeclarationData.Gearbox.Inertia.ToGUIFormat() 'cDeclaration.GbInertia + + gbxType = CType(CbGStype.SelectedValue, GearboxType) 'CType(Me.CbGStype.SelectedIndex, tGearbox) + + TbTracInt.Text = gbxType.TractionInterruption().ToGUIFormat() + TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() + 'cDeclaration.MinTimeBetweenGearshift(GStype) + + TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() ' cDeclaration.TqResv + TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() 'cDeclaration.TqResvStart + TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() 'cDeclaration.StartSpeed + TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() ' cDeclaration.StartAcc + + tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbTCCUpshiftMinAcceleration.Text = "" + tbTCLUpshiftMinAcceleration.Text = "" + + tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + 'ChTCon.Checked = GStype.AutomaticTransmission() + For Each lv0 In LvGears.Items + lv0.SubItems(GearboxTbl.ShiftPolygons).Text = "" + Next + End Sub + +#Region "Toolbar" + + Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click + NewGbx() + End Sub + + Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click + If GearboxFileBrowser.OpenDialog(_gbxFile) Then + Try + OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck) + Catch ex As Exception + MsgBox("Failed to open Gearbox File: " + ex.Message) + End Try + End If + End Sub + + Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click + SaveOrSaveAs(False) + End Sub + + Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click + SaveOrSaveAs(True) + End Sub + + Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click + + If ChangeCheckCancel() Then Exit Sub + + If _gbxFile = "" Then + If MsgBox("Save file now?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then + If Not SaveOrSaveAs(True) Then Exit Sub + Else + Exit Sub + End If + End If + + If Not VectoJobForm.Visible Then + JobDir = "" + VectoJobForm.Show() + VectoJobForm.VectoNew() + Else + VectoJobForm.WindowState = FormWindowState.Normal + End If + + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(_gbxFile, JobDir) + End Sub + + 'Help + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + If File.Exists(MyAppPath & "User Manual\help.html") Then + Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() + Process.Start(defaultBrowserPath, + String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#gearbox-editor")) + Else + MsgBox("User Manual not found!", MsgBoxStyle.Critical) + End If + End Sub + +#End Region + + 'New file + Private Sub NewGbx() + 'Dim lvi As ListViewItem + + If ChangeCheckCancel() Then Exit Sub + + 'CbGStype.SelectedIndex = 0 + + TbName.Text = "" + TbTracInt.Text = "" + TBI_getr.Text = "" + + LvGears.Items.Clear() + + LvGears.Items.Add(CreateListviewItem("Axle", 1, "1", "", "", "")) + + 'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged + 'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged + TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() + TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() + TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() + TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s! + TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() + + tbUpshiftMinAcceleration.Text = DeclarationData.Gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbTCLUpshiftMinAcceleration.Text = "" + tbTCCUpshiftMinAcceleration.Text = "" + + tbDownshiftAfterUpshift.Text = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + 'ChTCon.Checked = False 'set by CbGStype.SelectedIndexChanged + TbTCfile.Text = "" + TbTCrefrpm.Text = "" + TbTCinertia.Text = "" + + DeclInit() + + _gbxFile = "" + Text = "GBX Editor" + LbStatus.Text = "" + + + _changed = False + Try + UpdatePic() + Catch + End Try + End Sub + + 'Open file + Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory) + + If ChangeCheckCancel() Then Exit Sub + + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), + IEngineeringInputDataProvider) + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + Dim gearbox As IGearboxEngineeringInputData = vehicle.GearboxInputData + Dim axlegear As IAxleGearInputData = vehicle.AxleGearInputData + + _vehicleCategory = vehicleCategory + + If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then + Select Case WrongMode() + Case 1 + Close() + MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked + MainForm.OpenVectoFile(file) + Case -1 + Exit Sub + End Select + End If + + Dim basePath As String = Path.GetDirectoryName(file) + TbName.Text = gearbox.Model + TbTracInt.Text = gearbox.TractionInterruption.ToGUIFormat() + TBI_getr.Text = gearbox.Inertia.ToGUIFormat() + + LvGears.Items.Clear() + + Dim lossmap As String = "" + Try + lossmap = If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(), + GetRelativePath(axlegear.LossMap.Source, basePath)) + Catch ex As Exception + End Try + + LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio, lossmap, "", "", "")) + + For Each gear As ITransmissionInputData In gearbox.Gears + lossmap = "" + Try + lossmap = If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), GetRelativePath(gear.LossMap.Source, basePath)) + Catch ex As Exception + + End Try + LvGears.Items.Add(CreateListviewItem(gear.Gear.ToString("00"), gear.Ratio, + lossmap, + If(gear.ShiftPolygon Is Nothing, "", GetRelativePath(gear.ShiftPolygon.Source, basePath)), + If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat()), + If(gear.MaxInputSpeed Is Nothing, "", gear.MaxInputSpeed.AsRPM.ToGUIFormat()))) + Next + + TbTqResv.Text = (gearbox.TorqueReserve * 100).ToGUIFormat() + TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat() + TbTqResvStart.Text = (gearbox.StartTorqueReserve * 100).ToGUIFormat() + TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat() + TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat() + + Dim torqueConverter As ITorqueConverterEngineeringInputData = gearbox.TorqueConverter + If torqueConverter Is Nothing OrElse gearbox.Type.ManualTransmission() Then + TbTCfile.Text = "" + TbTCrefrpm.Text = "" + TbTCinertia.Text = "" + TBTCShiftPolygon.Text = "" + tbTCmaxSpeed.Text = "" + tbTCLUpshiftMinAcceleration.Text = "" + tbTCCUpshiftMinAcceleration.Text = "" + + Else + TbTCfile.Text = If(torqueConverter.TCData Is Nothing, "", GetRelativePath(torqueConverter.TCData.Source, basePath)) + TbTCrefrpm.Text = If(torqueConverter.ReferenceRPM Is Nothing, "", torqueConverter.ReferenceRPM.AsRPM.ToGUIFormat()) + TbTCinertia.Text = If(torqueConverter.Inertia Is Nothing, "", torqueConverter.Inertia.ToGUIFormat()) + TBTCShiftPolygon.Text = + If(torqueConverter.ShiftPolygon Is Nothing, "", GetRelativePath(torqueConverter.ShiftPolygon.Source, basePath)) + tbTCmaxSpeed.Text = + If(torqueConverter.MaxInputSpeed Is Nothing, "", torqueConverter.MaxInputSpeed.AsRPM.ToGUIFormat()) + tbTCLUpshiftMinAcceleration.Text = torqueConverter.CLUpshiftMinAcceleration.ToGUIFormat() + tbTCCUpshiftMinAcceleration.Text = torqueConverter.CCUpshiftMinAcceleration.ToGUIFormat() + End If + + tbUpshiftMinAcceleration.Text = gearbox.UpshiftMinAcceleration.ToGUIFormat() + tbDownshiftAfterUpshift.Text = gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() + tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() + + tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat() + + CbGStype.SelectedValue = gearbox.Type + + + DeclInit() + + + GearboxFileBrowser.UpdateHistory(file) + Text = GetFilenameWithoutPath(file, True) + LbStatus.Text = "" + UpdateGearboxInfoText() + _gbxFile = file + Activate() + + _changed = False + Try + UpdatePic() + Catch + End Try + End Sub + + Private Function CreateListviewItem(gear As String, ratio As Double, getrMap As String, + shiftPolygon As String, maxTorque As String, maxSpeed As String) As ListViewItem + Dim retVal As ListViewItem = New ListViewItem(gear) + 'retVal.SubItems.Add(tc) + retVal.SubItems.Add(ratio.ToGUIFormat()) + retVal.SubItems.Add(getrMap) + retVal.SubItems.Add(shiftPolygon) + retVal.SubItems.Add(maxTorque) + retVal.SubItems.Add(maxSpeed) + Return retVal + End Function + + 'Save or Save As function = true if file is saved + Private Function SaveOrSaveAs(saveAs As Boolean) As Boolean + If _gbxFile = "" Or saveAs Then + If GearboxFileBrowser.SaveDialog(_gbxFile) Then + _gbxFile = GearboxFileBrowser.Files(0) + Else + Return False + End If + End If + Return SaveGbx(_gbxFile) + End Function + + 'Save file + Private Function SaveGbx(file As String) As Boolean + + Dim gearbox As Gearbox = FillGearboxData(file) + + + If Not gearbox.SaveFile Then + MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) + Return False + End If + + If AutoSendTo Then + If VectoJobForm.Visible Then + If UCase(FileRepl(VectoJobForm.TbGBX.Text, JobDir)) <> UCase(file) Then _ + VectoJobForm.TbGBX.Text = GetFilenameWithoutDirectory(file, JobDir) + VectoJobForm.UpdatePic() + End If + End If + + GearboxFileBrowser.UpdateHistory(file) + Text = GetFilenameWithoutPath(file, True) + LbStatus.Text = "" + + _changed = False + + Return True + End Function + + Private Function FillGearboxData(file As String) As Gearbox + Dim gearbox As Gearbox + Dim i As Integer + + gearbox = New Gearbox + gearbox.FilePath = file + + gearbox.ModelName = TbName.Text + If Trim(gearbox.ModelName) = "" Then gearbox.ModelName = "Undefined" + + gearbox.TracIntrSi = TbTracInt.Text.ToDouble(0) + gearbox.GbxInertia = TBI_getr.Text.ToDouble(0) + + For i = 0 To LvGears.Items.Count - 1 + 'GBX0.IsTCgear.Add(Me.LvGears.Items(i).SubItems(GearboxTbl.TorqueConverter).Text = "on" And i > 0) + gearbox.GearRatios.Add(LvGears.Items(i).SubItems(GearboxTbl.Ratio).Text.ToDouble(0)) + gearbox.GearLossmaps.Add(New SubPath) + gearbox.GearLossMap(i) = LvGears.Items(i).SubItems(GearboxTbl.LossMapEfficiency).Text + gearbox.GearshiftFiles.Add(New SubPath) + gearbox.ShiftPolygonFile(i) = LvGears.Items(i).SubItems(GearboxTbl.ShiftPolygons).Text + 'GBX0.FldFiles.Add(New cSubPath) + 'GBX0.FldFile(i) = Me.LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text + gearbox.MaxTorque.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxTorque).Text) + gearbox.MaxSpeed.Add(LvGears.Items(i).SubItems(GearboxTbl.MaxSpeed).Text) + Next + + gearbox.TorqueResv = TbTqResv.Text.ToDouble(0) + gearbox.ShiftTime = TbMinTimeBetweenShifts.Text.ToDouble(0) + gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0) + gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0) + gearbox.StartAcc = TbStartAcc.Text.ToDouble(0) + + gearbox.Type = CType(CbGStype.SelectedValue, GearboxType) + + gearbox.Type.AutomaticTransmission() + gearbox.TorqueConverterFile = TbTCfile.Text + gearbox.TorqueConverterReferenceRpm = TbTCrefrpm.Text.ToDouble(0) + gearbox.TorqueConverterInertia = TbTCinertia.Text.ToDouble(0) + gearbox.TorqueConverterShiftPolygonFile = TBTCShiftPolygon.Text + gearbox.TorqueConverterMaxSpeed = tbTCmaxSpeed.Text.ToDouble(0) + + gearbox.DownshiftAfterUpshift = tbDownshiftAfterUpshift.Text.ToDouble(0) + gearbox.UpshiftAfterDownshift = tbUpshiftAfterDownshift.Text.ToDouble(0) + + gearbox.UpshiftMinAcceleration = tbUpshiftMinAcceleration.Text.ToDouble(0) + gearbox.TCLUpshiftMinAcceleration = tbTCLUpshiftMinAcceleration.Text.ToDouble(0) + gearbox.TCCUpshiftMinAcceleration = tbTCCUpshiftMinAcceleration.Text.ToDouble(0) + + gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0) + Return gearbox + End Function + +#Region "Change Events" + + 'Change Status ändern |@@| Change Status change + Private Sub Change() + If Not _changed Then + LbStatus.Text = "Unsaved changes in current file" + _changed = True + End If + End Sub + + ' "Save changes ?" ...liefert True wenn User Vorgang abbricht |@@| Save changes? "... Returns True if user aborts + Private Function ChangeCheckCancel() As Boolean + + If _changed Then + Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + Return Not SaveOrSaveAs(False) + Case MsgBoxResult.Cancel + Return True + Case Else 'MsgBoxResult.No + _changed = False + Return False + End Select + + Else + + Return False + + End If + End Function + + Private Sub TbName_TextChanged(sender As Object, e As EventArgs) _ + Handles TbName.TextChanged, TBI_getr.TextChanged, TbTracInt.TextChanged, TbTqResv.TextChanged, + TbMinTimeBetweenShifts.TextChanged, TbTqResvStart.TextChanged, TbStartSpeed.TextChanged, TbStartAcc.TextChanged, + TbTCfile.TextChanged, + tbTCCUpshiftMinAcceleration.TextChanged, tbTCLUpshiftMinAcceleration.TextChanged + Change() + End Sub + +#End Region + + 'Save and close + Private Sub ButOK_Click(sender As Object, e As EventArgs) Handles ButOK.Click + If SaveOrSaveAs(False) Then Close() + End Sub + + 'Cancel + Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click + Close() + End Sub + + 'Enable/Disable settings for specific transmission types + Private Sub CbGStype_SelectedIndexChanged(sender As Object, e As EventArgs) _ + Handles CbGStype.SelectedIndexChanged + Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) + + Change() + + 'ChTCon.Enabled = (GStype.AutomaticTransmission()) + gbTC.Enabled = gStype.AutomaticTransmission() + pnTcEngineering.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + gbTCAccMin.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + gbPowershiftLosses.Enabled = Not Cfg.DeclMode AndAlso gStype.AutomaticTransmission() + TbStartAcc.Enabled = Not gStype.AutomaticTransmission() + TbStartSpeed.Enabled = Not gStype.AutomaticTransmission() + TbTqResv.Enabled = Not gStype.AutomaticTransmission() + GroupBox2.Enabled = Not gStype.AutomaticTransmission() + TBI_getr.Enabled = Not gStype.AutomaticTransmission() + TbTracInt.Enabled = Not gStype.AutomaticTransmission() + tbDownshiftAfterUpshift.Enabled = Not gStype.AutomaticTransmission() + tbUpshiftAfterDownshift.Enabled = Not gStype.AutomaticTransmission() + UpdateGearboxInfoText() + End Sub + + Private Sub UpdateGearboxInfoText() + Dim gStype As GearboxType = CType(CbGStype.SelectedValue, GearboxType) + + Dim text As String = "" + If (gStype = GearboxType.ATSerial) Then + If LvGears.Items.Count > 2 Then + Dim ratio1 As Double = LvGears.Items.Item(1).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) + Dim ratio2 As Double = LvGears.Items.Item(2).SubItems(GearboxTbl.Ratio).Text.ToDouble(0) + + If ratio1 / ratio2 >= DeclarationData.Gearbox.TorqueConverterSecondGearThreshold(_vehicleCategory) Then + text = "Torque converter is used in 1st and 2nd gear" + Else + text = "Torque converter is used in 1st gear only" + End If + End If + End If + lblGbxInfo.Text = text + End Sub + + + Private Sub LvGears_SelectedIndexChanged(sender As Object, e As EventArgs) _ + Handles LvGears.SelectedIndexChanged + Try + UpdatePic() + btExportVGBS.Enabled = True + Catch + btExportVGBS.Enabled = False + End Try + End Sub + +#Region "Gears" + + 'Gear-DoubleClick + Private Sub LvGears_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) _ + Handles LvGears.MouseDoubleClick + EditGear() + End Sub + + 'Gear-KeyDown + Private Sub LvGears_KeyDown(sender As Object, e As KeyEventArgs) Handles LvGears.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + RemoveGear(False) + Case Keys.Enter + EditGear() + End Select + End Sub + + 'Remove Gear Button + Private Sub BtClearGear_Click(sender As Object, e As EventArgs) Handles BtRemGear.Click + RemoveGear(False) + End Sub + + 'Add Gear button + Private Sub BtAddGear_Click(sender As Object, e As EventArgs) Handles BtAddGear.Click + AddGear() + LvGears.Items(LvGears.Items.Count - 1).Selected = True + EditGear() + End Sub + + 'Edit Gear + Private Sub EditGear() + + Do + + 'GearDia.ChIsTCgear.Enabled = (Me.ChTCon.Checked And Me.LvGears.SelectedIndices(0) > 0) + _gearDialog.GearboxType = CType(CbGStype.SelectedValue, GearboxType) + _gearDialog.PnShiftPoly.Enabled = (Not Cfg.DeclMode And LvGears.SelectedIndices(0) > 0) + _gearDialog.PnFld.Enabled = (LvGears.SelectedIndices(0) > 0) + _gearDialog.GbxPath = GetPath(_gbxFile) + _gearDialog.TbGear.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.GearNr).Text + _gearDialog.TbRatio.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text + _gearDialog.TbMapPath.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text + If LvGears.SelectedIndices(0) > 0 Then + _gearDialog.TbShiftPolyFile.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text + _gearDialog.TbMaxTorque.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text + _gearDialog.tbMaxSpeed.Text = LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text + Else + _gearDialog.TbShiftPolyFile.Text = "" + _gearDialog.TbMaxTorque.Text = "" + _gearDialog.tbMaxSpeed.Text = "" + End If + + If LvGears.SelectedItems(0).Index = 0 Then + _gearDialog.BtPrevious.Enabled = False + Else + _gearDialog.BtPrevious.Enabled = True + End If + + If _gearDialog.ShowDialog = DialogResult.OK Then + 'Me.LvGears.SelectedItems(0).SubItems(GearboxTbl.TorqueConverter).Text = "-" + LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = _gearDialog.TbRatio.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text = _gearDialog.TbMapPath.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text = _gearDialog.TbShiftPolyFile.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxTorque).Text = _gearDialog.TbMaxTorque.Text + LvGears.SelectedItems(0).SubItems(GearboxTbl.MaxSpeed).Text = _gearDialog.tbMaxSpeed.Text + + UpdateGearboxInfoText() + Try + UpdatePic() + Catch + End Try + + Change() + + Else + + If LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text = "" Then RemoveGear(True) + + End If + + If _gearDialog.NextGear Then + If LvGears.Items.Count - 1 = LvGears.SelectedIndices(0) Then AddGear() + + LvGears.Items(LvGears.SelectedIndices(0) + 1).Selected = True + End If + + If _gearDialog.PreviousGear AndAlso LvGears.SelectedIndices(0) > 0 Then + LvGears.Items(LvGears.SelectedIndices(0) - 1).Selected = True + End If + + Loop Until Not (_gearDialog.NextGear OrElse _gearDialog.PreviousGear) + End Sub + + 'Add Gear + Private Sub AddGear() + Dim lvi As ListViewItem + + lvi = CreateListviewItem(LvGears.Items.Count.ToString("00"), 1, "", "", "", "") + + LvGears.Items.Add(lvi) + + lvi.EnsureVisible() + UpdateGearboxInfoText() + LvGears.Focus() + + 'Change() => NO! Change() is already handled by EditGear + End Sub + + 'Remove Gear + Private Sub RemoveGear(noChange As Boolean) + Dim i0 As Integer + Dim i As Integer + Dim lv0 As ListViewItem + + If LvGears.Items.Count < 2 Then Exit Sub + + If LvGears.SelectedItems.Count = 0 Then LvGears.Items(LvGears.Items.Count - 1).Selected = True + + i0 = LvGears.SelectedItems(0).Index + + If i0 = 0 Then Exit Sub 'Must not remove axle + + LvGears.SelectedItems(0).Remove() + + i = 0 + For Each lv0 In LvGears.Items + If lv0.SubItems(GearboxTbl.GearNr).Text = "Axle" Then Continue For + i += 1 + lv0.SubItems(GearboxTbl.GearNr).Text = i.ToString("00") + Next + + If i0 < LvGears.Items.Count Then + LvGears.Items(i0).Selected = True + LvGears.Items(i0).EnsureVisible() + End If + UpdateGearboxInfoText() + LvGears.Focus() + Try + UpdatePic() + Catch + End Try + + If Not noChange Then Change() + End Sub + + +#End Region + + +#Region "Open File Context Menu" + + Private _contextMenuFiles As String() + Private _vehicleCategory As VehicleCategory + + Private Sub OpenFiles(ParamArray files() As String) + + If files.Length = 0 Then Exit Sub + + _contextMenuFiles = files + + OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName + + CmOpenFile.Show(Windows.Forms.Cursor.Position) + End Sub + + Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles OpenWithToolStripMenuItem.Click + If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") + End Sub + + Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles ShowInFolderToolStripMenuItem.Click + If File.Exists(_contextMenuFiles(0)) Then + Try + Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found!") + End If + End Sub + +#End Region + + + Private Sub UpdatePic() + + Dim path As String + + Dim chart As Chart + Dim s As Series + Dim a As ChartArea + Dim img As Bitmap + Dim gear As Integer + 'Dim fullLoadCurve As EngineFullLoadCurve = Nothing + 'Dim shiftOk As Boolean + + + PicBox.Image = Nothing + + Dim shiftPolygon As ShiftPolygon = Nothing + 'Dim engineFld As FullLoadCurve + + If LvGears.Items.Count <= 1 Then Exit Sub + + Try + If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then + path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = LvGears.SelectedIndices(0) + Else + path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = 1 + End If + + If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) + + Catch ex As Exception + + End Try + + chart = New Chart + chart.Width = PicBox.Width + chart.Height = PicBox.Height + + a = New ChartArea + + 'Shiftpolygons from file + + If Not shiftPolygon Is Nothing Then + s = New Series + s.Points.DataBindXY(shiftPolygon.Upshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Upshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Upshift curve" + chart.Series.Add(s) + + s = New Series + s.Points.DataBindXY(shiftPolygon.Downshift.Select(Function(x) x.AngularSpeed.AsRPM).ToArray(), + shiftPolygon.Downshift.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.Name = "Downshift curve" + chart.Series.Add(s) + End If + + 'Dim vectoJob As VectoJob = New VectoJob() With {.FilePath = VectoJobForm.VECTOfile} + 'Dim vectoOk As Boolean = vectoJob.ReadFile() + Dim jobFile As String = VectoJobForm.VectoFile + If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), + IEngineeringInputDataProvider) + If (inputData Is Nothing) Then + Exit Sub + End If + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + 'inputData = TryCast(JSONInputDataFactory.ReadComponentData(vectoJob.PathEng(False)), IEngineeringInputDataProvider) + Dim engine As IEngineEngineeringInputData = inputData.JobInputData.Vehicle.EngineInputData + Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + + s = New Series + s.Points.DataBindXY(engineFld.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + engineFld.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkBlue + s.Name = "Full load" + chart.Series.Add(s) + + If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then + 'If FLD0.Init(VectoJobForm.n_idle) Then + + 'Dim fullLoadCurve As FullLoadCurve = ConvertToFullLoadCurve(FLD0.LnU, FLD0.LTq) + Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + If (Not IsNothing(shiftLines)) Then + + + s = New Series + + 's.Points.DataBindXY(Shiftpoly.gs_nUup, Shiftpoly.gs_TqUp) + s.Points.DataBindXY( + shiftLines.Upshift.Select(Function(pt) pt.AngularSpeed.AsRPM). + ToArray(), + shiftLines.Upshift.Select(Function(pt) pt.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.BorderDashStyle = ChartDashStyle.Dash + s.Name = "Upshift curve (generic)" + chart.Series.Add(s) + + s = New Series + 's.Points.DataBindXY(Shiftpoly.gs_nUdown, Shiftpoly.gs_TqDown) + s.Points.DataBindXY( + shiftLines.Downshift.Select(Function(pt) pt.AngularSpeed.AsRPM) _ + .ToArray(), + shiftLines.Downshift.Select(Function(pt) pt.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkRed + s.BorderDashStyle = ChartDashStyle.Dash + s.Name = "Downshift curve (generic)" + chart.Series.Add(s) + End If + 'End If + End If + End If + + a.Name = "main" + + a.AxisX.Title = "engine speed [1/min]" + a.AxisX.TitleFont = New Font("Helvetica", 10) + a.AxisX.LabelStyle.Font = New Font("Helvetica", 8) + a.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None + a.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + a.AxisY.Title = "engine torque [Nm]" + a.AxisY.TitleFont = New Font("Helvetica", 10) + a.AxisY.LabelStyle.Font = New Font("Helvetica", 8) + a.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None + a.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + a.AxisX.Minimum = 300 + a.BorderDashStyle = ChartDashStyle.Solid + a.BorderWidth = 1 + + a.BackColor = Color.GhostWhite + + chart.ChartAreas.Add(a) + + chart.Titles.Add("Gear " & gear & " shift polygons") + chart.Titles(0).Font = New Font("Helvetica", 12) + + chart.Update() + + img = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) + chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) + + PicBox.Image = img + End Sub + + + Private Function GetShiftLines(ByVal idleSpeed As PerSecond, engineFullLoadCurve As EngineFullLoadCurve, + vehicle As IVehicleEngineeringInputData, gears As IList(Of ITransmissionInputData), ByVal gear As Integer) _ + As ShiftPolygon + Dim maxTqStr As String = LvGears.Items(gear).SubItems(GearboxTbl.MaxTorque).Text + Dim engine As CombustionEngineData = ConvertToEngineData(engineFullLoadCurve, idleSpeed, gear, + If(String.IsNullOrWhiteSpace(maxTqStr), Nothing, maxTqStr.ToDouble(0).SI(Of NewtonMeter))) + If gears.Count <= 1 Then + Return Nothing + End If + Dim rDyn As Meter = vehicle.DynamicTyreRadius + If rDyn.IsEqual(0) Then + If (vehicle.Axles.Count < 2) Then + Return Nothing + End If + rDyn = DeclarationData.Wheels.Lookup(vehicle.Axles(1).Wheels).DynamicTyreRadius + End If + If (rDyn.IsEqual(0)) Then + Return Nothing + End If + Dim shiftLines As ShiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon( + CType(CbGStype.SelectedValue, GearboxType), gear - 1, + engine.FullLoadCurves(CType(gear, UInteger)), gears, engine, + Double.Parse(LvGears.Items(0).SubItems(GearboxTbl.Ratio).Text, CultureInfo.InvariantCulture), + (rDyn)) + Return shiftLines + End Function + + Private Function ConvertToGears(gbx As ListView.ListViewItemCollection) As IList(Of ITransmissionInputData) + Dim retVal As List(Of ITransmissionInputData) = New List(Of ITransmissionInputData) + Dim value As Double + + For i As Integer = 1 To gbx.Count - 1 + If _ + gbx(i).SubItems(GearboxTbl.Ratio).Text <> "" AndAlso Double.TryParse(gbx(i).SubItems(GearboxTbl.Ratio).Text, value) _ + Then + Dim maxSpeed As PerSecond = + If _ + (String.IsNullOrWhiteSpace(gbx(i).SubItems(GearboxTbl.MaxSpeed).Text), Nothing, + gbx(i).SubItems(GearboxTbl.MaxSpeed).Text.ToDouble().RPMtoRad()) + retVal.Add( + New TransmissionInputData() _ + With {.Ratio = value, .MaxInputSpeed = maxSpeed}) + + End If + Next + Return retVal + End Function + + +#Region "Torque Converter" + + + 'Browse TC file + Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click + If TorqueConverterFileBrowser.OpenDialog(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) Then + TbTCfile.Text = GetFilenameWithoutDirectory(TorqueConverterFileBrowser.Files(0), GetPath(_gbxFile)) + End If + End Sub + + 'Open TC file + Private Sub BtTCfileOpen_Click(sender As Object, e As EventArgs) Handles BtTCfileOpen.Click + OpenFiles(FileRepl(TbTCfile.Text, GetPath(_gbxFile))) + End Sub + + +#End Region + + Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter + End Sub + + Public Sub New() + + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + End Sub + + Private Sub BtTCShiftFileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCShiftFileBrowse.Click + If TorqueConverterShiftPolygonFileBrowser.OpenDialog(FileRepl(TBTCShiftPolygon.Text, GetPath(_gbxFile))) Then + TBTCShiftPolygon.Text = GetFilenameWithoutDirectory(TorqueConverterShiftPolygonFileBrowser.Files(0), + GetPath(_gbxFile)) + End If + End Sub + + Private Sub btnExportXML_Click(sender As Object, e As EventArgs) Handles btnExportXML.Click + If Not Cfg.DeclMode Then + MsgBox("XML Export is only supported in Declaration Mode") + Exit Sub + End If + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub + End If + Dim filePath As String = FolderFileBrowser.Files(0) + + Dim data As Gearbox = FillGearboxData(_gbxFile) + If (Cfg.DeclMode) Then + Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data, data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + Else + Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data, + data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + End If + End Sub + + Private Sub btnExportAxlGearXML_Click(sender As Object, e As EventArgs) Handles btnExportAxlGearXML.Click + If Not Cfg.DeclMode Then + MsgBox("XML Export is only supported in Declaration Mode") + Exit Sub + End If + If Not FolderFileBrowser.OpenDialog("") Then + Exit Sub + End If + Dim filePath As String = FolderFileBrowser.Files(0) + + Dim data As Gearbox = FillGearboxData(_gbxFile) + If (Cfg.DeclMode) Then + Dim export As XDocument = New XMLDeclarationWriter(data.Manufacturer).GenerateVectoComponent(data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + Else + Dim export As XDocument = New XMLEngineeringWriter(_gbxFile, True, data.Manufacturer).GenerateVectoComponent(data) + export.Save(Path.Combine(filePath, data.ModelName + ".xml")) + End If + End Sub Private Sub btExportVGBS_Click(sender As Object, e As EventArgs) Handles btExportVGBS.Click - If LvGears.Items.Count <= 1 Then Exit Sub - - Dim shiftPolygon As ShiftPolygon = Nothing - Dim path As String - Dim gear As Integer - Try - If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then - path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = LvGears.SelectedIndices(0) - Else - path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) - gear = 1 - End If - - If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) - - If Not shiftPolygon Is Nothing Then - ShiftPolygonExport.WriteShiftPolygon(shiftPolygon, path & ".vgbs") - End If - Catch ex As Exception - End Try - - Dim jobFile As String = VectoJobForm.VectoFile - If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then - Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), - IEngineeringInputDataProvider) - If (inputData Is Nothing) Then - Exit Sub - End If - - Dim vehicle As IVehicleEngineeringInputData = inputData.VehicleInputData - Dim engine As IEngineEngineeringInputData = inputData.EngineInputData - Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) - - If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then - Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) - Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) - If (Not IsNothing(shiftLines)) Then - ShiftPolygonExport.WriteShiftPolygon(shiftLines, jobFile & "_Gear " & gear & ".vgbs") - End If - End If + If LvGears.Items.Count <= 1 Then Exit Sub + + Dim shiftPolygon As ShiftPolygon = Nothing + Dim path As String + Dim gear As Integer + Try + If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then + path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = LvGears.SelectedIndices(0) + Else + path = FileRepl(LvGears.Items(1).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile)) + gear = 1 + End If + + If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path) + + If Not shiftPolygon Is Nothing Then + ShiftPolygonExport.WriteShiftPolygon(shiftPolygon, path & ".vgbs") + End If + Catch ex As Exception + End Try + + Dim jobFile As String = VectoJobForm.VectoFile + If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), + IEngineeringInputDataProvider) + If (inputData Is Nothing) Then + Exit Sub + End If + + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + Dim engine As IEngineEngineeringInputData = vehicle.EngineInputData + Dim engineFld As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + If VectoJobForm.Visible AndAlso engine.IdleSpeed > 0 Then + Dim gears As IList(Of ITransmissionInputData) = ConvertToGears(LvGears.Items) + Dim shiftLines As ShiftPolygon = GetShiftLines(engine.IdleSpeed, engineFld, vehicle, gears, gear) + If (Not IsNothing(shiftLines)) Then + ShiftPolygonExport.WriteShiftPolygon(shiftLines, jobFile & "_Gear " & gear & ".vgbs") + End If + End If End If End Sub -End Class - - +End Class + + diff --git a/VECTO/GUI/MainForm.Designer.vb b/VECTO/GUI/MainForm.Designer.vb index bf88bcc11cf8cfdc9c6a59b4c170df5d5717da6a..f54f39410299855ae930bd0845515da33be21d1f 100644 --- a/VECTO/GUI/MainForm.Designer.vb +++ b/VECTO/GUI/MainForm.Designer.vb @@ -35,826 +35,834 @@ Partial Class MainForm 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. <DebuggerStepThrough()> _ Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainForm)) - Me.StatusBAR = New System.Windows.Forms.StatusStrip() - Me.ToolStripLbStatus = New System.Windows.Forms.ToolStripStatusLabel() - Me.ToolStripProgBarJob = New System.Windows.Forms.ToolStripProgressBar() - Me.ToolStripProgBarOverall = New System.Windows.Forms.ToolStripProgressBar() - Me.TabControl1 = New System.Windows.Forms.TabControl() - Me.TabPageGEN = New System.Windows.Forms.TabPage() - Me.btnImportXML = New System.Windows.Forms.Button() - Me.btnExportXML = New System.Windows.Forms.Button() - Me.Label6 = New System.Windows.Forms.Label() - Me.btStartV3 = New System.Windows.Forms.Button() - Me.LbDecl = New System.Windows.Forms.Label() - Me.PictureBox1 = New System.Windows.Forms.PictureBox() - Me.BtGENdown = New System.Windows.Forms.Button() - Me.BtGENup = New System.Windows.Forms.Button() - Me.ChBoxAllGEN = New System.Windows.Forms.CheckBox() - Me.LvGEN = New System.Windows.Forms.ListView() - Me.ColGENpath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColGENstatus = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ButtonGENremove = New System.Windows.Forms.Button() - Me.ButtonGENadd = New System.Windows.Forms.Button() - Me.TabPgOptions = New System.Windows.Forms.TabPage() - Me.PanelOptAllg = New System.Windows.Forms.Panel() - Me.GroupBox3 = New System.Windows.Forms.GroupBox() - Me.cbActVmod = New System.Windows.Forms.CheckBox() - Me.cbValidateRunData = New System.Windows.Forms.CheckBox() - Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.ChBoxModOut = New System.Windows.Forms.CheckBox() - Me.ChBoxMod1Hz = New System.Windows.Forms.CheckBox() - Me.GroupBox1 = New System.Windows.Forms.GroupBox() - Me.RbDev = New System.Windows.Forms.RadioButton() - Me.RbDecl = New System.Windows.Forms.RadioButton() - Me.TabPageDEV = New System.Windows.Forms.TabPage() - Me.Label1 = New System.Windows.Forms.Label() - Me.LvDEVoptions = New System.Windows.Forms.ListView() - Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader7 = 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.ColumnHeader8 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader9 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ConMenFilelist = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.ShowInFolderMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.SaveListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.LoadListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.LoadDefaultListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ClearListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() - Me.LvMsg = New System.Windows.Forms.ListView() - Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() - Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() - Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() - Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() - Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() - Me.ToolStripDrDnBtTools = New System.Windows.Forms.ToolStripDropDownButton() - Me.GENEditorToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() - Me.VEHEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.EngineEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.GearboxEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.GraphToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator() - Me.OpenLogToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.SettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripDrDnBtInfo = New System.Windows.Forms.ToolStripDropDownButton() - Me.UserManualToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.UpdateNotesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ReportBugViaCITnetToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() - Me.AboutVECTOToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() - Me.CmDEV = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.TmProgSec = New System.Windows.Forms.Timer(Me.components) - Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.OpenInGraphWindowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) - Me.StatusBAR.SuspendLayout() - Me.TabControl1.SuspendLayout() - Me.TabPageGEN.SuspendLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.TabPgOptions.SuspendLayout() - Me.PanelOptAllg.SuspendLayout() - Me.GroupBox3.SuspendLayout() - Me.GroupBox2.SuspendLayout() - Me.GroupBox1.SuspendLayout() - Me.TabPageDEV.SuspendLayout() - Me.ConMenFilelist.SuspendLayout() - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainer1.Panel1.SuspendLayout() - Me.SplitContainer1.Panel2.SuspendLayout() - Me.SplitContainer1.SuspendLayout() - Me.ToolStrip1.SuspendLayout() - Me.CmOpenFile.SuspendLayout() - Me.SuspendLayout() - ' - 'StatusBAR - ' - Me.StatusBAR.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLbStatus, Me.ToolStripProgBarJob, Me.ToolStripProgBarOverall}) - Me.StatusBAR.Location = New System.Drawing.Point(0, 648) - Me.StatusBAR.Name = "StatusBAR" - Me.StatusBAR.Size = New System.Drawing.Size(1045, 22) - Me.StatusBAR.TabIndex = 7 - Me.StatusBAR.Text = "StatusBAR" - ' - 'ToolStripLbStatus - ' - Me.ToolStripLbStatus.Name = "ToolStripLbStatus" - Me.ToolStripLbStatus.Size = New System.Drawing.Size(1030, 17) - Me.ToolStripLbStatus.Spring = True - Me.ToolStripLbStatus.Text = "Status Text" - Me.ToolStripLbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' - 'ToolStripProgBarJob - ' - Me.ToolStripProgBarJob.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.ToolStripProgBarJob.AutoSize = False - Me.ToolStripProgBarJob.Name = "ToolStripProgBarJob" - Me.ToolStripProgBarJob.Size = New System.Drawing.Size(100, 16) - Me.ToolStripProgBarJob.Style = System.Windows.Forms.ProgressBarStyle.Continuous - Me.ToolStripProgBarJob.ToolTipText = "overall progress" - Me.ToolStripProgBarJob.Visible = False - ' - 'ToolStripProgBarOverall - ' - Me.ToolStripProgBarOverall.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.ToolStripProgBarOverall.AutoSize = False - Me.ToolStripProgBarOverall.Name = "ToolStripProgBarOverall" - Me.ToolStripProgBarOverall.Size = New System.Drawing.Size(100, 16) - Me.ToolStripProgBarOverall.Style = System.Windows.Forms.ProgressBarStyle.Continuous - Me.ToolStripProgBarOverall.ToolTipText = "job progress" - Me.ToolStripProgBarOverall.Visible = False - ' - 'TabControl1 - ' - Me.TabControl1.Controls.Add(Me.TabPageGEN) - Me.TabControl1.Controls.Add(Me.TabPgOptions) - Me.TabControl1.Controls.Add(Me.TabPageDEV) - Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.TabControl1.Location = New System.Drawing.Point(3, 3) - Me.TabControl1.Margin = New System.Windows.Forms.Padding(0) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.Padding = New System.Drawing.Point(0, 0) - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(1042, 328) - Me.TabControl1.TabIndex = 10 - ' - 'TabPageGEN - ' - Me.TabPageGEN.Controls.Add(Me.btnImportXML) - Me.TabPageGEN.Controls.Add(Me.btnExportXML) - Me.TabPageGEN.Controls.Add(Me.Label6) - Me.TabPageGEN.Controls.Add(Me.btStartV3) - Me.TabPageGEN.Controls.Add(Me.LbDecl) - Me.TabPageGEN.Controls.Add(Me.PictureBox1) - Me.TabPageGEN.Controls.Add(Me.BtGENdown) - Me.TabPageGEN.Controls.Add(Me.BtGENup) - Me.TabPageGEN.Controls.Add(Me.ChBoxAllGEN) - Me.TabPageGEN.Controls.Add(Me.LvGEN) - Me.TabPageGEN.Controls.Add(Me.ButtonGENremove) - Me.TabPageGEN.Controls.Add(Me.ButtonGENadd) - Me.TabPageGEN.Location = New System.Drawing.Point(4, 22) - Me.TabPageGEN.Margin = New System.Windows.Forms.Padding(0) - Me.TabPageGEN.Name = "TabPageGEN" - Me.TabPageGEN.Size = New System.Drawing.Size(1034, 302) - Me.TabPageGEN.TabIndex = 0 - Me.TabPageGEN.Text = "Job Files" - Me.TabPageGEN.UseVisualStyleBackColor = True - ' - 'btnImportXML - ' - Me.btnImportXML.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.btnImportXML.Location = New System.Drawing.Point(460, 267) - Me.btnImportXML.Name = "btnImportXML" - Me.btnImportXML.Size = New System.Drawing.Size(115, 30) - Me.btnImportXML.TabIndex = 23 - Me.btnImportXML.Text = "Import from XML" - Me.btnImportXML.UseVisualStyleBackColor = True - Me.btnImportXML.Visible = False - ' - 'btnExportXML - ' - Me.btnExportXML.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.btnExportXML.Enabled = False - Me.btnExportXML.Location = New System.Drawing.Point(344, 267) - Me.btnExportXML.Name = "btnExportXML" - Me.btnExportXML.Size = New System.Drawing.Size(115, 30) - Me.btnExportXML.TabIndex = 22 - Me.btnExportXML.Text = "Export as XML" - Me.btnExportXML.UseVisualStyleBackColor = True - ' - 'Label6 - ' - Me.Label6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label6.AutoSize = True - Me.Label6.Location = New System.Drawing.Point(814, 268) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(217, 13) - Me.Label6.TabIndex = 21 - Me.Label6.Text = "(Double-Click to Edit, Right-Click for Options)" - ' - 'btStartV3 - ' - Me.btStartV3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.btStartV3.Image = Global.TUGraz.VECTO.My.Resources.Resources.Play_icon - Me.btStartV3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btStartV3.Location = New System.Drawing.Point(3, 56) - Me.btStartV3.Name = "btStartV3" - Me.btStartV3.Size = New System.Drawing.Size(108, 50) - Me.btStartV3.TabIndex = 20 - Me.btStartV3.Text = "START" - Me.btStartV3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText - Me.ToolTip1.SetToolTip(Me.btStartV3, "Start Simulation") - Me.btStartV3.UseVisualStyleBackColor = True - ' - 'LbDecl - ' - Me.LbDecl.AutoSize = True - Me.LbDecl.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LbDecl.Location = New System.Drawing.Point(5, 109) - Me.LbDecl.Name = "LbDecl" - Me.LbDecl.Size = New System.Drawing.Size(107, 13) - Me.LbDecl.TabIndex = 19 - Me.LbDecl.Text = "Declaration Mode" - Me.LbDecl.Visible = False - ' - 'PictureBox1 - ' - Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) - Me.PictureBox1.Location = New System.Drawing.Point(3, 3) - Me.PictureBox1.Name = "PictureBox1" - Me.PictureBox1.Size = New System.Drawing.Size(108, 47) - Me.PictureBox1.TabIndex = 18 - Me.PictureBox1.TabStop = False - ' - 'BtGENdown - ' - Me.BtGENdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.BtGENdown.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_arrow_down_icon - Me.BtGENdown.Location = New System.Drawing.Point(307, 267) - Me.BtGENdown.Name = "BtGENdown" - Me.BtGENdown.Size = New System.Drawing.Size(30, 30) - Me.BtGENdown.TabIndex = 6 - Me.ToolTip1.SetToolTip(Me.BtGENdown, "Move job down one row") - Me.BtGENdown.UseVisualStyleBackColor = True - ' - 'BtGENup - ' - Me.BtGENup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.BtGENup.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_arrow_up_icon - Me.BtGENup.Location = New System.Drawing.Point(276, 267) - Me.BtGENup.Name = "BtGENup" - Me.BtGENup.Size = New System.Drawing.Size(30, 30) - Me.BtGENup.TabIndex = 4 - Me.ToolTip1.SetToolTip(Me.BtGENup, "Move job up one row") - Me.BtGENup.UseVisualStyleBackColor = True - ' - 'ChBoxAllGEN - ' - Me.ChBoxAllGEN.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.ChBoxAllGEN.AutoSize = True - Me.ChBoxAllGEN.Location = New System.Drawing.Point(195, 274) - Me.ChBoxAllGEN.Name = "ChBoxAllGEN" - Me.ChBoxAllGEN.Size = New System.Drawing.Size(70, 17) - Me.ChBoxAllGEN.TabIndex = 16 - Me.ChBoxAllGEN.Text = "Select All" - Me.ToolTip1.SetToolTip(Me.ChBoxAllGEN, "Select All / None") - Me.ChBoxAllGEN.UseVisualStyleBackColor = True - ' - 'LvGEN - ' - Me.LvGEN.AllowDrop = True - Me.LvGEN.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.LvGEN.CheckBoxes = True - Me.LvGEN.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColGENpath, Me.ColGENstatus}) - Me.LvGEN.FullRowSelect = True - Me.LvGEN.GridLines = True - Me.LvGEN.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable - Me.LvGEN.HideSelection = False - Me.LvGEN.LabelEdit = True - Me.LvGEN.Location = New System.Drawing.Point(114, 3) - Me.LvGEN.Name = "LvGEN" - Me.LvGEN.Size = New System.Drawing.Size(917, 263) - Me.LvGEN.TabIndex = 14 - Me.LvGEN.UseCompatibleStateImageBehavior = False - Me.LvGEN.View = System.Windows.Forms.View.Details - ' - 'ColGENpath - ' - Me.ColGENpath.Text = "Filepath" - Me.ColGENpath.Width = 797 - ' - 'ColGENstatus - ' - Me.ColGENstatus.Text = "" - Me.ColGENstatus.Width = 175 - ' - 'ButtonGENremove - ' - Me.ButtonGENremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.ButtonGENremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonGENremove.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon - Me.ButtonGENremove.Location = New System.Drawing.Point(147, 267) - Me.ButtonGENremove.Name = "ButtonGENremove" - Me.ButtonGENremove.Size = New System.Drawing.Size(33, 30) - Me.ButtonGENremove.TabIndex = 2 - Me.ToolTip1.SetToolTip(Me.ButtonGENremove, "Remove selected entries") - Me.ButtonGENremove.UseVisualStyleBackColor = True - ' - 'ButtonGENadd - ' - Me.ButtonGENadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.ButtonGENadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ButtonGENadd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon - Me.ButtonGENadd.Location = New System.Drawing.Point(113, 267) - Me.ButtonGENadd.Name = "ButtonGENadd" - Me.ButtonGENadd.Size = New System.Drawing.Size(33, 30) - Me.ButtonGENadd.TabIndex = 1 - Me.ToolTip1.SetToolTip(Me.ButtonGENadd, "Add Job File") - Me.ButtonGENadd.UseVisualStyleBackColor = True - ' - 'TabPgOptions - ' - Me.TabPgOptions.Controls.Add(Me.PanelOptAllg) - Me.TabPgOptions.Location = New System.Drawing.Point(4, 22) - Me.TabPgOptions.Name = "TabPgOptions" - Me.TabPgOptions.Padding = New System.Windows.Forms.Padding(3) - Me.TabPgOptions.Size = New System.Drawing.Size(1034, 302) - Me.TabPgOptions.TabIndex = 2 - Me.TabPgOptions.Text = "Options" - Me.TabPgOptions.UseVisualStyleBackColor = True - ' - 'PanelOptAllg - ' - Me.PanelOptAllg.Controls.Add(Me.GroupBox3) - Me.PanelOptAllg.Controls.Add(Me.GroupBox2) - Me.PanelOptAllg.Controls.Add(Me.GroupBox1) - Me.PanelOptAllg.Location = New System.Drawing.Point(6, 6) - Me.PanelOptAllg.Name = "PanelOptAllg" - Me.PanelOptAllg.Size = New System.Drawing.Size(1022, 290) - Me.PanelOptAllg.TabIndex = 0 - ' - 'GroupBox3 - ' - Me.GroupBox3.Controls.Add(Me.cbActVmod) - Me.GroupBox3.Controls.Add(Me.cbValidateRunData) - Me.GroupBox3.Location = New System.Drawing.Point(3, 177) - Me.GroupBox3.Name = "GroupBox3" - Me.GroupBox3.Size = New System.Drawing.Size(173, 110) - Me.GroupBox3.TabIndex = 18 - Me.GroupBox3.TabStop = False - Me.GroupBox3.Text = "Misc" - ' - 'cbActVmod - ' - Me.cbActVmod.Location = New System.Drawing.Point(6, 41) - Me.cbActVmod.Name = "cbActVmod" - Me.cbActVmod.Size = New System.Drawing.Size(161, 63) - Me.cbActVmod.TabIndex = 18 - Me.cbActVmod.Text = "Output values in vmod at beginning and end of simulation interval (EXPERT!)" - Me.cbActVmod.UseVisualStyleBackColor = True - ' - 'cbValidateRunData - ' - Me.cbValidateRunData.AutoSize = True - Me.cbValidateRunData.Checked = True - Me.cbValidateRunData.CheckState = System.Windows.Forms.CheckState.Checked - Me.cbValidateRunData.Location = New System.Drawing.Point(6, 19) - Me.cbValidateRunData.Name = "cbValidateRunData" - Me.cbValidateRunData.Size = New System.Drawing.Size(90, 17) - Me.cbValidateRunData.TabIndex = 17 - Me.cbValidateRunData.Text = "Validate Data" - Me.cbValidateRunData.UseVisualStyleBackColor = True - ' - 'GroupBox2 - ' - Me.GroupBox2.Controls.Add(Me.ChBoxModOut) - Me.GroupBox2.Controls.Add(Me.ChBoxMod1Hz) - Me.GroupBox2.Location = New System.Drawing.Point(3, 82) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(173, 89) - Me.GroupBox2.TabIndex = 16 - Me.GroupBox2.TabStop = False - Me.GroupBox2.Text = "Output" - ' - 'ChBoxModOut - ' - Me.ChBoxModOut.AutoSize = True - Me.ChBoxModOut.Checked = True - Me.ChBoxModOut.CheckState = System.Windows.Forms.CheckState.Checked - Me.ChBoxModOut.Location = New System.Drawing.Point(6, 19) - Me.ChBoxModOut.Name = "ChBoxModOut" - Me.ChBoxModOut.Size = New System.Drawing.Size(115, 17) - Me.ChBoxModOut.TabIndex = 0 - Me.ChBoxModOut.Text = "Write modal results" - Me.ChBoxModOut.UseVisualStyleBackColor = True - ' - 'ChBoxMod1Hz - ' - Me.ChBoxMod1Hz.AutoSize = True - Me.ChBoxMod1Hz.Location = New System.Drawing.Point(6, 42) - Me.ChBoxMod1Hz.Name = "ChBoxMod1Hz" - Me.ChBoxMod1Hz.Size = New System.Drawing.Size(121, 17) - Me.ChBoxMod1Hz.TabIndex = 16 - Me.ChBoxMod1Hz.Text = "Modal results in 1Hz" - Me.ChBoxMod1Hz.UseVisualStyleBackColor = True - ' - 'GroupBox1 - ' - Me.GroupBox1.Controls.Add(Me.RbDev) - Me.GroupBox1.Controls.Add(Me.RbDecl) - Me.GroupBox1.Location = New System.Drawing.Point(3, 3) - Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New System.Drawing.Size(173, 72) - Me.GroupBox1.TabIndex = 15 - Me.GroupBox1.TabStop = False - Me.GroupBox1.Text = "Mode" - ' - 'RbDev - ' - Me.RbDev.AutoSize = True - Me.RbDev.Checked = True - Me.RbDev.Location = New System.Drawing.Point(6, 42) - Me.RbDev.Name = "RbDev" - Me.RbDev.Size = New System.Drawing.Size(111, 17) - Me.RbDev.TabIndex = 1 - Me.RbDev.TabStop = True - Me.RbDev.Text = "Engineering Mode" - Me.RbDev.UseVisualStyleBackColor = True - ' - 'RbDecl - ' - Me.RbDecl.AutoSize = True - Me.RbDecl.Location = New System.Drawing.Point(6, 19) - Me.RbDecl.Name = "RbDecl" - Me.RbDecl.Size = New System.Drawing.Size(109, 17) - Me.RbDecl.TabIndex = 0 - Me.RbDecl.TabStop = True - Me.RbDecl.Text = "Declaration Mode" - Me.RbDecl.UseVisualStyleBackColor = True - ' - 'TabPageDEV - ' - Me.TabPageDEV.Controls.Add(Me.Label1) - Me.TabPageDEV.Controls.Add(Me.LvDEVoptions) - Me.TabPageDEV.Location = New System.Drawing.Point(4, 22) - Me.TabPageDEV.Name = "TabPageDEV" - Me.TabPageDEV.Padding = New System.Windows.Forms.Padding(3) - Me.TabPageDEV.Size = New System.Drawing.Size(1034, 302) - Me.TabPageDEV.TabIndex = 3 - Me.TabPageDEV.Text = "Test" - Me.TabPageDEV.UseVisualStyleBackColor = True - ' - 'Label1 - ' - Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(1012, 283) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(106, 13) - Me.Label1.TabIndex = 1 - Me.Label1.Text = "(Double-Click to Edit)" - ' - 'LvDEVoptions - ' - Me.LvDEVoptions.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.LvDEVoptions.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader7, Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader8, Me.ColumnHeader9}) - Me.LvDEVoptions.FullRowSelect = True - Me.LvDEVoptions.GridLines = True - Me.LvDEVoptions.Location = New System.Drawing.Point(6, 6) - Me.LvDEVoptions.MultiSelect = False - Me.LvDEVoptions.Name = "LvDEVoptions" - Me.LvDEVoptions.Size = New System.Drawing.Size(1022, 277) - Me.LvDEVoptions.TabIndex = 0 - Me.LvDEVoptions.UseCompatibleStateImageBehavior = False - Me.LvDEVoptions.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader4 - ' - Me.ColumnHeader4.Text = "Property" - Me.ColumnHeader4.Width = 89 - ' - 'ColumnHeader7 - ' - Me.ColumnHeader7.Text = "Description" - Me.ColumnHeader7.Width = 527 - ' - 'ColumnHeader5 - ' - Me.ColumnHeader5.Text = "Type" - Me.ColumnHeader5.Width = 82 - ' - 'ColumnHeader6 - ' - Me.ColumnHeader6.Text = "Value" - Me.ColumnHeader6.Width = 134 - ' - 'ColumnHeader8 - ' - Me.ColumnHeader8.Text = "Default" - Me.ColumnHeader8.Width = 120 - ' - 'ColumnHeader9 - ' - Me.ColumnHeader9.Text = "Saved In DEVconfig.txt" - Me.ColumnHeader9.Width = 129 - ' - 'ConMenFilelist - ' - Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ShowInFolderMenuItem, Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) - Me.ConMenFilelist.Name = "ConMenFilelist" - Me.ConMenFilelist.ShowImageMargin = False - Me.ConMenFilelist.Size = New System.Drawing.Size(151, 114) - ' - 'ShowInFolderMenuItem - ' - Me.ShowInFolderMenuItem.Name = "ShowInFolderMenuItem" - Me.ShowInFolderMenuItem.Size = New System.Drawing.Size(150, 22) - Me.ShowInFolderMenuItem.Text = "Show in Folder" - ' - 'SaveListToolStripMenuItem - ' - Me.SaveListToolStripMenuItem.Name = "SaveListToolStripMenuItem" - Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) - Me.SaveListToolStripMenuItem.Text = "Save List..." - ' - 'LoadListToolStripMenuItem - ' - Me.LoadListToolStripMenuItem.Name = "LoadListToolStripMenuItem" - Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) - Me.LoadListToolStripMenuItem.Text = "Load List..." - ' - 'LoadDefaultListToolStripMenuItem - ' - Me.LoadDefaultListToolStripMenuItem.Name = "LoadDefaultListToolStripMenuItem" - Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) - Me.LoadDefaultListToolStripMenuItem.Text = "Load Autosave-List" - ' - 'ClearListToolStripMenuItem - ' - Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem" - Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) - Me.ClearListToolStripMenuItem.Text = "Clear List" - ' - 'LvMsg - ' - Me.LvMsg.AllowColumnReorder = True - Me.LvMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.LvMsg.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3}) - Me.LvMsg.Dock = System.Windows.Forms.DockStyle.Fill - Me.LvMsg.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LvMsg.FullRowSelect = True - Me.LvMsg.GridLines = True - Me.LvMsg.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable - Me.LvMsg.LabelWrap = False - Me.LvMsg.Location = New System.Drawing.Point(0, 0) - Me.LvMsg.Margin = New System.Windows.Forms.Padding(0) - Me.LvMsg.Name = "LvMsg" - Me.LvMsg.Size = New System.Drawing.Size(1045, 281) - Me.LvMsg.TabIndex = 0 - Me.LvMsg.UseCompatibleStateImageBehavior = False - Me.LvMsg.View = System.Windows.Forms.View.Details - ' - 'ColumnHeader1 - ' - Me.ColumnHeader1.Text = "Message" - Me.ColumnHeader1.Width = 779 - ' - 'ColumnHeader2 - ' - Me.ColumnHeader2.Text = "Time" - Me.ColumnHeader2.Width = 151 - ' - 'ColumnHeader3 - ' - Me.ColumnHeader3.Text = "Source" - Me.ColumnHeader3.Width = 138 - ' - 'SplitContainer1 - ' - Me.SplitContainer1.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.SplitContainer1.Location = New System.Drawing.Point(0, 27) - Me.SplitContainer1.Margin = New System.Windows.Forms.Padding(0) - Me.SplitContainer1.Name = "SplitContainer1" - Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal - ' - 'SplitContainer1.Panel1 - ' - Me.SplitContainer1.Panel1.Controls.Add(Me.TabControl1) - Me.SplitContainer1.Panel1.Padding = New System.Windows.Forms.Padding(3, 3, 0, 2) - ' - 'SplitContainer1.Panel2 - ' - Me.SplitContainer1.Panel2.Controls.Add(Me.LvMsg) - Me.SplitContainer1.Size = New System.Drawing.Size(1045, 618) - Me.SplitContainer1.SplitterDistance = 333 - Me.SplitContainer1.TabIndex = 12 - ' - 'ToolStrip1 - ' - Me.ToolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None - Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden - Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripSeparator2, Me.ToolStripDrDnBtTools, Me.ToolStripDrDnBtInfo}) - Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) - Me.ToolStrip1.Name = "ToolStrip1" - Me.ToolStrip1.Size = New System.Drawing.Size(1045, 25) - Me.ToolStrip1.TabIndex = 11 - Me.ToolStrip1.Text = "ToolStrip1" - ' - 'ToolStripBtNew - ' - Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtNew.Image = Global.TUGraz.VECTO.My.Resources.Resources.blue_document_icon - Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtNew.Name = "ToolStripBtNew" - Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtNew.Text = "ToolStripBtNew" - Me.ToolStripBtNew.ToolTipText = "New Job File" - ' - 'ToolStripBtOpen - ' - Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - Me.ToolStripBtOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon - Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripBtOpen.Name = "ToolStripBtOpen" - Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) - Me.ToolStripBtOpen.Text = "ToolStripButton1" - Me.ToolStripBtOpen.ToolTipText = "Open File..." - ' - 'ToolStripSeparator2 - ' - Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) - ' - 'ToolStripDrDnBtTools - ' - Me.ToolStripDrDnBtTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GENEditorToolStripMenuItem1, Me.VEHEditorToolStripMenuItem, Me.EngineEditorToolStripMenuItem, Me.GearboxEditorToolStripMenuItem, Me.GraphToolStripMenuItem, Me.ToolStripSeparator6, Me.OpenLogToolStripMenuItem, Me.SettingsToolStripMenuItem}) - Me.ToolStripDrDnBtTools.Image = Global.TUGraz.VECTO.My.Resources.Resources.Misc_Tools_icon - Me.ToolStripDrDnBtTools.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripDrDnBtTools.Name = "ToolStripDrDnBtTools" - Me.ToolStripDrDnBtTools.Size = New System.Drawing.Size(65, 22) - Me.ToolStripDrDnBtTools.Text = "Tools" - ' - 'GENEditorToolStripMenuItem1 - ' - Me.GENEditorToolStripMenuItem1.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_VECTO - Me.GENEditorToolStripMenuItem1.Name = "GENEditorToolStripMenuItem1" - Me.GENEditorToolStripMenuItem1.Size = New System.Drawing.Size(151, 22) - Me.GENEditorToolStripMenuItem1.Text = "Job Editor" - ' - 'VEHEditorToolStripMenuItem - ' - Me.VEHEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_VEH - Me.VEHEditorToolStripMenuItem.Name = "VEHEditorToolStripMenuItem" - Me.VEHEditorToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.VEHEditorToolStripMenuItem.Text = "Vehicle Editor" - ' - 'EngineEditorToolStripMenuItem - ' - Me.EngineEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_ENG - Me.EngineEditorToolStripMenuItem.Name = "EngineEditorToolStripMenuItem" - Me.EngineEditorToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.EngineEditorToolStripMenuItem.Text = "Engine Editor" - ' - 'GearboxEditorToolStripMenuItem - ' - Me.GearboxEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_GBX - Me.GearboxEditorToolStripMenuItem.Name = "GearboxEditorToolStripMenuItem" - Me.GearboxEditorToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.GearboxEditorToolStripMenuItem.Text = "Gearbox Editor" - ' - 'GraphToolStripMenuItem - ' - Me.GraphToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_Graph - Me.GraphToolStripMenuItem.Name = "GraphToolStripMenuItem" - Me.GraphToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.GraphToolStripMenuItem.Text = "Graph" - ' - 'ToolStripSeparator6 - ' - Me.ToolStripSeparator6.Name = "ToolStripSeparator6" - Me.ToolStripSeparator6.Size = New System.Drawing.Size(148, 6) - ' - 'OpenLogToolStripMenuItem - ' - Me.OpenLogToolStripMenuItem.Name = "OpenLogToolStripMenuItem" - Me.OpenLogToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.OpenLogToolStripMenuItem.Text = "Open Log" - ' - 'SettingsToolStripMenuItem - ' - Me.SettingsToolStripMenuItem.Name = "SettingsToolStripMenuItem" - Me.SettingsToolStripMenuItem.Size = New System.Drawing.Size(151, 22) - Me.SettingsToolStripMenuItem.Text = "Settings" - ' - 'ToolStripDrDnBtInfo - ' - Me.ToolStripDrDnBtInfo.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UserManualToolStripMenuItem, Me.UpdateNotesToolStripMenuItem, Me.ReportBugViaCITnetToolStripMenuItem, Me.ToolStripSeparator3, Me.AboutVECTOToolStripMenuItem1}) - Me.ToolStripDrDnBtInfo.Image = Global.TUGraz.VECTO.My.Resources.Resources.Help_icon - Me.ToolStripDrDnBtInfo.ImageTransparentColor = System.Drawing.Color.Magenta - Me.ToolStripDrDnBtInfo.Name = "ToolStripDrDnBtInfo" - Me.ToolStripDrDnBtInfo.Size = New System.Drawing.Size(61, 22) - Me.ToolStripDrDnBtInfo.Text = "Help" - ' - 'UserManualToolStripMenuItem - ' - Me.UserManualToolStripMenuItem.Name = "UserManualToolStripMenuItem" - Me.UserManualToolStripMenuItem.Size = New System.Drawing.Size(222, 22) - Me.UserManualToolStripMenuItem.Text = "User Manual" - ' - 'UpdateNotesToolStripMenuItem - ' - Me.UpdateNotesToolStripMenuItem.Name = "UpdateNotesToolStripMenuItem" - Me.UpdateNotesToolStripMenuItem.Size = New System.Drawing.Size(222, 22) - Me.UpdateNotesToolStripMenuItem.Text = "Release Notes" - ' - 'ReportBugViaCITnetToolStripMenuItem - ' - Me.ReportBugViaCITnetToolStripMenuItem.Name = "ReportBugViaCITnetToolStripMenuItem" - Me.ReportBugViaCITnetToolStripMenuItem.Size = New System.Drawing.Size(222, 22) - Me.ReportBugViaCITnetToolStripMenuItem.Text = "Report Bug via CITnet / JIRA" - ' - 'ToolStripSeparator3 - ' - Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(219, 6) - ' - 'AboutVECTOToolStripMenuItem1 - ' - Me.AboutVECTOToolStripMenuItem1.Name = "AboutVECTOToolStripMenuItem1" - Me.AboutVECTOToolStripMenuItem1.Size = New System.Drawing.Size(222, 22) - Me.AboutVECTOToolStripMenuItem1.Text = "About VECTO" - ' - 'CmDEV - ' - Me.CmDEV.Name = "CmDEV" - Me.CmDEV.ShowImageMargin = False - Me.CmDEV.Size = New System.Drawing.Size(36, 4) - ' - 'TmProgSec - ' - Me.TmProgSec.Interval = 1000 - ' - 'CmOpenFile - ' - Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.OpenInGraphWindowToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) - Me.CmOpenFile.Name = "CmOpenFile" - Me.CmOpenFile.ShowImageMargin = False - Me.CmOpenFile.Size = New System.Drawing.Size(174, 70) - ' - 'OpenWithToolStripMenuItem - ' - Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" - Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(173, 22) - Me.OpenWithToolStripMenuItem.Text = "Open with ..." - ' - 'OpenInGraphWindowToolStripMenuItem - ' - Me.OpenInGraphWindowToolStripMenuItem.Name = "OpenInGraphWindowToolStripMenuItem" - Me.OpenInGraphWindowToolStripMenuItem.Size = New System.Drawing.Size(173, 22) - Me.OpenInGraphWindowToolStripMenuItem.Text = "Open in Graph Window" - ' - 'ShowInFolderToolStripMenuItem - ' - Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" - Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(173, 22) - Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" - ' - 'MainForm - ' - Me.AcceptButton = Me.btStartV3 - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1045, 670) - Me.Controls.Add(Me.ToolStrip1) - Me.Controls.Add(Me.SplitContainer1) - Me.Controls.Add(Me.StatusBAR) - Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) - Me.MinimumSize = New System.Drawing.Size(785, 485) - Me.Name = "MainForm" - Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "VECTO" - Me.StatusBAR.ResumeLayout(False) - Me.StatusBAR.PerformLayout() - Me.TabControl1.ResumeLayout(False) - Me.TabPageGEN.ResumeLayout(False) - Me.TabPageGEN.PerformLayout() - CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() - Me.TabPgOptions.ResumeLayout(False) - Me.PanelOptAllg.ResumeLayout(False) - Me.GroupBox3.ResumeLayout(False) - Me.GroupBox3.PerformLayout() - Me.GroupBox2.ResumeLayout(False) - Me.GroupBox2.PerformLayout() - Me.GroupBox1.ResumeLayout(False) - Me.GroupBox1.PerformLayout() - Me.TabPageDEV.ResumeLayout(False) - Me.TabPageDEV.PerformLayout() - Me.ConMenFilelist.ResumeLayout(False) - Me.SplitContainer1.Panel1.ResumeLayout(False) - Me.SplitContainer1.Panel2.ResumeLayout(False) - CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer1.ResumeLayout(False) - Me.ToolStrip1.ResumeLayout(False) - Me.ToolStrip1.PerformLayout() - Me.CmOpenFile.ResumeLayout(False) - Me.ResumeLayout(False) - Me.PerformLayout() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainForm)) + Me.StatusBAR = New System.Windows.Forms.StatusStrip() + Me.ToolStripLbStatus = New System.Windows.Forms.ToolStripStatusLabel() + Me.ToolStripProgBarJob = New System.Windows.Forms.ToolStripProgressBar() + Me.ToolStripProgBarOverall = New System.Windows.Forms.ToolStripProgressBar() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.TabPageGEN = New System.Windows.Forms.TabPage() + Me.btnImportXML = New System.Windows.Forms.Button() + Me.btnExportXML = New System.Windows.Forms.Button() + Me.Label6 = New System.Windows.Forms.Label() + Me.btStartV3 = New System.Windows.Forms.Button() + Me.LbDecl = New System.Windows.Forms.Label() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.BtGENdown = New System.Windows.Forms.Button() + Me.BtGENup = New System.Windows.Forms.Button() + Me.ChBoxAllGEN = New System.Windows.Forms.CheckBox() + Me.LvGEN = New System.Windows.Forms.ListView() + Me.ColGENpath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColGENstatus = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ButtonGENremove = New System.Windows.Forms.Button() + Me.ButtonGENadd = New System.Windows.Forms.Button() + Me.TabPgOptions = New System.Windows.Forms.TabPage() + Me.PanelOptAllg = New System.Windows.Forms.Panel() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.cbActVmod = New System.Windows.Forms.CheckBox() + Me.cbValidateRunData = New System.Windows.Forms.CheckBox() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.ChBoxModOut = New System.Windows.Forms.CheckBox() + Me.ChBoxMod1Hz = New System.Windows.Forms.CheckBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.RbDev = New System.Windows.Forms.RadioButton() + Me.RbDecl = New System.Windows.Forms.RadioButton() + Me.TabPageDEV = New System.Windows.Forms.TabPage() + Me.Label1 = New System.Windows.Forms.Label() + Me.LvDEVoptions = New System.Windows.Forms.ListView() + Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader7 = 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.ColumnHeader8 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader9 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ConMenFilelist = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.ShowInFolderMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.SaveListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.LoadListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.LoadDefaultListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ClearListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() + Me.LvMsg = New System.Windows.Forms.ListView() + Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) + Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() + Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() + Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripDrDnBtTools = New System.Windows.Forms.ToolStripDropDownButton() + Me.GENEditorToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() + Me.EPTPJobEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.VEHEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.EngineEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.GearboxEditorToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.GraphToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator() + Me.OpenLogToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.SettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripDrDnBtInfo = New System.Windows.Forms.ToolStripDropDownButton() + Me.UserManualToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.UpdateNotesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ReportBugViaCITnetToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() + Me.AboutVECTOToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() + Me.CmDEV = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.TmProgSec = New System.Windows.Forms.Timer(Me.components) + Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.OpenInGraphWindowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) + Me.StatusBAR.SuspendLayout() + Me.TabControl1.SuspendLayout() + Me.TabPageGEN.SuspendLayout() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.TabPgOptions.SuspendLayout() + Me.PanelOptAllg.SuspendLayout() + Me.GroupBox3.SuspendLayout() + Me.GroupBox2.SuspendLayout() + Me.GroupBox1.SuspendLayout() + Me.TabPageDEV.SuspendLayout() + Me.ConMenFilelist.SuspendLayout() + CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainer1.Panel1.SuspendLayout() + Me.SplitContainer1.Panel2.SuspendLayout() + Me.SplitContainer1.SuspendLayout() + Me.ToolStrip1.SuspendLayout() + Me.CmOpenFile.SuspendLayout() + Me.SuspendLayout() + ' + 'StatusBAR + ' + Me.StatusBAR.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLbStatus, Me.ToolStripProgBarJob, Me.ToolStripProgBarOverall}) + Me.StatusBAR.Location = New System.Drawing.Point(0, 648) + Me.StatusBAR.Name = "StatusBAR" + Me.StatusBAR.Size = New System.Drawing.Size(1045, 22) + Me.StatusBAR.TabIndex = 7 + Me.StatusBAR.Text = "StatusBAR" + ' + 'ToolStripLbStatus + ' + Me.ToolStripLbStatus.Name = "ToolStripLbStatus" + Me.ToolStripLbStatus.Size = New System.Drawing.Size(1030, 17) + Me.ToolStripLbStatus.Spring = True + Me.ToolStripLbStatus.Text = "Status Text" + Me.ToolStripLbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'ToolStripProgBarJob + ' + Me.ToolStripProgBarJob.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right + Me.ToolStripProgBarJob.AutoSize = False + Me.ToolStripProgBarJob.Name = "ToolStripProgBarJob" + Me.ToolStripProgBarJob.Size = New System.Drawing.Size(100, 16) + Me.ToolStripProgBarJob.Style = System.Windows.Forms.ProgressBarStyle.Continuous + Me.ToolStripProgBarJob.ToolTipText = "overall progress" + Me.ToolStripProgBarJob.Visible = False + ' + 'ToolStripProgBarOverall + ' + Me.ToolStripProgBarOverall.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right + Me.ToolStripProgBarOverall.AutoSize = False + Me.ToolStripProgBarOverall.Name = "ToolStripProgBarOverall" + Me.ToolStripProgBarOverall.Size = New System.Drawing.Size(100, 16) + Me.ToolStripProgBarOverall.Style = System.Windows.Forms.ProgressBarStyle.Continuous + Me.ToolStripProgBarOverall.ToolTipText = "job progress" + Me.ToolStripProgBarOverall.Visible = False + ' + 'TabControl1 + ' + Me.TabControl1.Controls.Add(Me.TabPageGEN) + Me.TabControl1.Controls.Add(Me.TabPgOptions) + Me.TabControl1.Controls.Add(Me.TabPageDEV) + Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.TabControl1.Location = New System.Drawing.Point(3, 3) + Me.TabControl1.Margin = New System.Windows.Forms.Padding(0) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.Padding = New System.Drawing.Point(0, 0) + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(1042, 328) + Me.TabControl1.TabIndex = 10 + ' + 'TabPageGEN + ' + Me.TabPageGEN.Controls.Add(Me.btnImportXML) + Me.TabPageGEN.Controls.Add(Me.btnExportXML) + Me.TabPageGEN.Controls.Add(Me.Label6) + Me.TabPageGEN.Controls.Add(Me.btStartV3) + Me.TabPageGEN.Controls.Add(Me.LbDecl) + Me.TabPageGEN.Controls.Add(Me.PictureBox1) + Me.TabPageGEN.Controls.Add(Me.BtGENdown) + Me.TabPageGEN.Controls.Add(Me.BtGENup) + Me.TabPageGEN.Controls.Add(Me.ChBoxAllGEN) + Me.TabPageGEN.Controls.Add(Me.LvGEN) + Me.TabPageGEN.Controls.Add(Me.ButtonGENremove) + Me.TabPageGEN.Controls.Add(Me.ButtonGENadd) + Me.TabPageGEN.Location = New System.Drawing.Point(4, 22) + Me.TabPageGEN.Margin = New System.Windows.Forms.Padding(0) + Me.TabPageGEN.Name = "TabPageGEN" + Me.TabPageGEN.Size = New System.Drawing.Size(1034, 302) + Me.TabPageGEN.TabIndex = 0 + Me.TabPageGEN.Text = "Job Files" + Me.TabPageGEN.UseVisualStyleBackColor = True + ' + 'btnImportXML + ' + Me.btnImportXML.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnImportXML.Location = New System.Drawing.Point(460, 267) + Me.btnImportXML.Name = "btnImportXML" + Me.btnImportXML.Size = New System.Drawing.Size(115, 30) + Me.btnImportXML.TabIndex = 23 + Me.btnImportXML.Text = "Import from XML" + Me.btnImportXML.UseVisualStyleBackColor = True + Me.btnImportXML.Visible = False + ' + 'btnExportXML + ' + Me.btnExportXML.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnExportXML.Enabled = False + Me.btnExportXML.Location = New System.Drawing.Point(344, 267) + Me.btnExportXML.Name = "btnExportXML" + Me.btnExportXML.Size = New System.Drawing.Size(115, 30) + Me.btnExportXML.TabIndex = 22 + Me.btnExportXML.Text = "Export as XML" + Me.btnExportXML.UseVisualStyleBackColor = True + ' + 'Label6 + ' + Me.Label6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(814, 268) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(217, 13) + Me.Label6.TabIndex = 21 + Me.Label6.Text = "(Double-Click to Edit, Right-Click for Options)" + ' + 'btStartV3 + ' + Me.btStartV3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.btStartV3.Image = Global.TUGraz.VECTO.My.Resources.Resources.Play_icon + Me.btStartV3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btStartV3.Location = New System.Drawing.Point(3, 56) + Me.btStartV3.Name = "btStartV3" + Me.btStartV3.Size = New System.Drawing.Size(108, 50) + Me.btStartV3.TabIndex = 20 + Me.btStartV3.Text = "START" + Me.btStartV3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText + Me.ToolTip1.SetToolTip(Me.btStartV3, "Start Simulation") + Me.btStartV3.UseVisualStyleBackColor = True + ' + 'LbDecl + ' + Me.LbDecl.AutoSize = True + Me.LbDecl.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LbDecl.Location = New System.Drawing.Point(5, 109) + Me.LbDecl.Name = "LbDecl" + Me.LbDecl.Size = New System.Drawing.Size(107, 13) + Me.LbDecl.TabIndex = 19 + Me.LbDecl.Text = "Declaration Mode" + Me.LbDecl.Visible = False + ' + 'PictureBox1 + ' + Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) + Me.PictureBox1.Location = New System.Drawing.Point(3, 3) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(108, 47) + Me.PictureBox1.TabIndex = 18 + Me.PictureBox1.TabStop = False + ' + 'BtGENdown + ' + Me.BtGENdown.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.BtGENdown.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_arrow_down_icon + Me.BtGENdown.Location = New System.Drawing.Point(307, 267) + Me.BtGENdown.Name = "BtGENdown" + Me.BtGENdown.Size = New System.Drawing.Size(30, 30) + Me.BtGENdown.TabIndex = 6 + Me.ToolTip1.SetToolTip(Me.BtGENdown, "Move job down one row") + Me.BtGENdown.UseVisualStyleBackColor = True + ' + 'BtGENup + ' + Me.BtGENup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.BtGENup.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_arrow_up_icon + Me.BtGENup.Location = New System.Drawing.Point(276, 267) + Me.BtGENup.Name = "BtGENup" + Me.BtGENup.Size = New System.Drawing.Size(30, 30) + Me.BtGENup.TabIndex = 4 + Me.ToolTip1.SetToolTip(Me.BtGENup, "Move job up one row") + Me.BtGENup.UseVisualStyleBackColor = True + ' + 'ChBoxAllGEN + ' + Me.ChBoxAllGEN.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.ChBoxAllGEN.AutoSize = True + Me.ChBoxAllGEN.Location = New System.Drawing.Point(195, 274) + Me.ChBoxAllGEN.Name = "ChBoxAllGEN" + Me.ChBoxAllGEN.Size = New System.Drawing.Size(70, 17) + Me.ChBoxAllGEN.TabIndex = 16 + Me.ChBoxAllGEN.Text = "Select All" + Me.ToolTip1.SetToolTip(Me.ChBoxAllGEN, "Select All / None") + Me.ChBoxAllGEN.UseVisualStyleBackColor = True + ' + 'LvGEN + ' + Me.LvGEN.AllowDrop = True + Me.LvGEN.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.LvGEN.CheckBoxes = True + Me.LvGEN.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColGENpath, Me.ColGENstatus}) + Me.LvGEN.FullRowSelect = True + Me.LvGEN.GridLines = True + Me.LvGEN.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable + Me.LvGEN.HideSelection = False + Me.LvGEN.LabelEdit = True + Me.LvGEN.Location = New System.Drawing.Point(114, 3) + Me.LvGEN.Name = "LvGEN" + Me.LvGEN.Size = New System.Drawing.Size(917, 263) + Me.LvGEN.TabIndex = 14 + Me.LvGEN.UseCompatibleStateImageBehavior = False + Me.LvGEN.View = System.Windows.Forms.View.Details + ' + 'ColGENpath + ' + Me.ColGENpath.Text = "Filepath" + Me.ColGENpath.Width = 797 + ' + 'ColGENstatus + ' + Me.ColGENstatus.Text = "" + Me.ColGENstatus.Width = 175 + ' + 'ButtonGENremove + ' + Me.ButtonGENremove.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.ButtonGENremove.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonGENremove.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon + Me.ButtonGENremove.Location = New System.Drawing.Point(147, 267) + Me.ButtonGENremove.Name = "ButtonGENremove" + Me.ButtonGENremove.Size = New System.Drawing.Size(33, 30) + Me.ButtonGENremove.TabIndex = 2 + Me.ToolTip1.SetToolTip(Me.ButtonGENremove, "Remove selected entries") + Me.ButtonGENremove.UseVisualStyleBackColor = True + ' + 'ButtonGENadd + ' + Me.ButtonGENadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.ButtonGENadd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ButtonGENadd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon + Me.ButtonGENadd.Location = New System.Drawing.Point(113, 267) + Me.ButtonGENadd.Name = "ButtonGENadd" + Me.ButtonGENadd.Size = New System.Drawing.Size(33, 30) + Me.ButtonGENadd.TabIndex = 1 + Me.ToolTip1.SetToolTip(Me.ButtonGENadd, "Add Job File") + Me.ButtonGENadd.UseVisualStyleBackColor = True + ' + 'TabPgOptions + ' + Me.TabPgOptions.Controls.Add(Me.PanelOptAllg) + Me.TabPgOptions.Location = New System.Drawing.Point(4, 22) + Me.TabPgOptions.Name = "TabPgOptions" + Me.TabPgOptions.Padding = New System.Windows.Forms.Padding(3) + Me.TabPgOptions.Size = New System.Drawing.Size(1034, 302) + Me.TabPgOptions.TabIndex = 2 + Me.TabPgOptions.Text = "Options" + Me.TabPgOptions.UseVisualStyleBackColor = True + ' + 'PanelOptAllg + ' + Me.PanelOptAllg.Controls.Add(Me.GroupBox3) + Me.PanelOptAllg.Controls.Add(Me.GroupBox2) + Me.PanelOptAllg.Controls.Add(Me.GroupBox1) + Me.PanelOptAllg.Location = New System.Drawing.Point(6, 6) + Me.PanelOptAllg.Name = "PanelOptAllg" + Me.PanelOptAllg.Size = New System.Drawing.Size(1022, 290) + Me.PanelOptAllg.TabIndex = 0 + ' + 'GroupBox3 + ' + Me.GroupBox3.Controls.Add(Me.cbActVmod) + Me.GroupBox3.Controls.Add(Me.cbValidateRunData) + Me.GroupBox3.Location = New System.Drawing.Point(3, 177) + Me.GroupBox3.Name = "GroupBox3" + Me.GroupBox3.Size = New System.Drawing.Size(173, 110) + Me.GroupBox3.TabIndex = 18 + Me.GroupBox3.TabStop = False + Me.GroupBox3.Text = "Misc" + ' + 'cbActVmod + ' + Me.cbActVmod.Location = New System.Drawing.Point(6, 41) + Me.cbActVmod.Name = "cbActVmod" + Me.cbActVmod.Size = New System.Drawing.Size(161, 63) + Me.cbActVmod.TabIndex = 18 + Me.cbActVmod.Text = "Output values in vmod at beginning and end of simulation interval (EXPERT!)" + Me.cbActVmod.UseVisualStyleBackColor = True + ' + 'cbValidateRunData + ' + Me.cbValidateRunData.AutoSize = True + Me.cbValidateRunData.Checked = True + Me.cbValidateRunData.CheckState = System.Windows.Forms.CheckState.Checked + Me.cbValidateRunData.Location = New System.Drawing.Point(6, 19) + Me.cbValidateRunData.Name = "cbValidateRunData" + Me.cbValidateRunData.Size = New System.Drawing.Size(90, 17) + Me.cbValidateRunData.TabIndex = 17 + Me.cbValidateRunData.Text = "Validate Data" + Me.cbValidateRunData.UseVisualStyleBackColor = True + ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.ChBoxModOut) + Me.GroupBox2.Controls.Add(Me.ChBoxMod1Hz) + Me.GroupBox2.Location = New System.Drawing.Point(3, 82) + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.Size = New System.Drawing.Size(173, 89) + Me.GroupBox2.TabIndex = 16 + Me.GroupBox2.TabStop = False + Me.GroupBox2.Text = "Output" + ' + 'ChBoxModOut + ' + Me.ChBoxModOut.AutoSize = True + Me.ChBoxModOut.Checked = True + Me.ChBoxModOut.CheckState = System.Windows.Forms.CheckState.Checked + Me.ChBoxModOut.Location = New System.Drawing.Point(6, 19) + Me.ChBoxModOut.Name = "ChBoxModOut" + Me.ChBoxModOut.Size = New System.Drawing.Size(115, 17) + Me.ChBoxModOut.TabIndex = 0 + Me.ChBoxModOut.Text = "Write modal results" + Me.ChBoxModOut.UseVisualStyleBackColor = True + ' + 'ChBoxMod1Hz + ' + Me.ChBoxMod1Hz.AutoSize = True + Me.ChBoxMod1Hz.Location = New System.Drawing.Point(6, 42) + Me.ChBoxMod1Hz.Name = "ChBoxMod1Hz" + Me.ChBoxMod1Hz.Size = New System.Drawing.Size(121, 17) + Me.ChBoxMod1Hz.TabIndex = 16 + Me.ChBoxMod1Hz.Text = "Modal results in 1Hz" + Me.ChBoxMod1Hz.UseVisualStyleBackColor = True + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.RbDev) + Me.GroupBox1.Controls.Add(Me.RbDecl) + Me.GroupBox1.Location = New System.Drawing.Point(3, 3) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(173, 72) + Me.GroupBox1.TabIndex = 15 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Mode" + ' + 'RbDev + ' + Me.RbDev.AutoSize = True + Me.RbDev.Checked = True + Me.RbDev.Location = New System.Drawing.Point(6, 42) + Me.RbDev.Name = "RbDev" + Me.RbDev.Size = New System.Drawing.Size(111, 17) + Me.RbDev.TabIndex = 1 + Me.RbDev.TabStop = True + Me.RbDev.Text = "Engineering Mode" + Me.RbDev.UseVisualStyleBackColor = True + ' + 'RbDecl + ' + Me.RbDecl.AutoSize = True + Me.RbDecl.Location = New System.Drawing.Point(6, 19) + Me.RbDecl.Name = "RbDecl" + Me.RbDecl.Size = New System.Drawing.Size(109, 17) + Me.RbDecl.TabIndex = 0 + Me.RbDecl.TabStop = True + Me.RbDecl.Text = "Declaration Mode" + Me.RbDecl.UseVisualStyleBackColor = True + ' + 'TabPageDEV + ' + Me.TabPageDEV.Controls.Add(Me.Label1) + Me.TabPageDEV.Controls.Add(Me.LvDEVoptions) + Me.TabPageDEV.Location = New System.Drawing.Point(4, 22) + Me.TabPageDEV.Name = "TabPageDEV" + Me.TabPageDEV.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageDEV.Size = New System.Drawing.Size(1034, 302) + Me.TabPageDEV.TabIndex = 3 + Me.TabPageDEV.Text = "Test" + Me.TabPageDEV.UseVisualStyleBackColor = True + ' + 'Label1 + ' + Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(1012, 283) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(106, 13) + Me.Label1.TabIndex = 1 + Me.Label1.Text = "(Double-Click to Edit)" + ' + 'LvDEVoptions + ' + Me.LvDEVoptions.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.LvDEVoptions.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader7, Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader8, Me.ColumnHeader9}) + Me.LvDEVoptions.FullRowSelect = True + Me.LvDEVoptions.GridLines = True + Me.LvDEVoptions.Location = New System.Drawing.Point(6, 6) + Me.LvDEVoptions.MultiSelect = False + Me.LvDEVoptions.Name = "LvDEVoptions" + Me.LvDEVoptions.Size = New System.Drawing.Size(1022, 277) + Me.LvDEVoptions.TabIndex = 0 + Me.LvDEVoptions.UseCompatibleStateImageBehavior = False + Me.LvDEVoptions.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader4 + ' + Me.ColumnHeader4.Text = "Property" + Me.ColumnHeader4.Width = 89 + ' + 'ColumnHeader7 + ' + Me.ColumnHeader7.Text = "Description" + Me.ColumnHeader7.Width = 527 + ' + 'ColumnHeader5 + ' + Me.ColumnHeader5.Text = "Type" + Me.ColumnHeader5.Width = 82 + ' + 'ColumnHeader6 + ' + Me.ColumnHeader6.Text = "Value" + Me.ColumnHeader6.Width = 134 + ' + 'ColumnHeader8 + ' + Me.ColumnHeader8.Text = "Default" + Me.ColumnHeader8.Width = 120 + ' + 'ColumnHeader9 + ' + Me.ColumnHeader9.Text = "Saved In DEVconfig.txt" + Me.ColumnHeader9.Width = 129 + ' + 'ConMenFilelist + ' + Me.ConMenFilelist.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ShowInFolderMenuItem, Me.SaveListToolStripMenuItem, Me.LoadListToolStripMenuItem, Me.LoadDefaultListToolStripMenuItem, Me.ClearListToolStripMenuItem}) + Me.ConMenFilelist.Name = "ConMenFilelist" + Me.ConMenFilelist.ShowImageMargin = False + Me.ConMenFilelist.Size = New System.Drawing.Size(151, 114) + ' + 'ShowInFolderMenuItem + ' + Me.ShowInFolderMenuItem.Name = "ShowInFolderMenuItem" + Me.ShowInFolderMenuItem.Size = New System.Drawing.Size(150, 22) + Me.ShowInFolderMenuItem.Text = "Show in Folder" + ' + 'SaveListToolStripMenuItem + ' + Me.SaveListToolStripMenuItem.Name = "SaveListToolStripMenuItem" + Me.SaveListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) + Me.SaveListToolStripMenuItem.Text = "Save List..." + ' + 'LoadListToolStripMenuItem + ' + Me.LoadListToolStripMenuItem.Name = "LoadListToolStripMenuItem" + Me.LoadListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) + Me.LoadListToolStripMenuItem.Text = "Load List..." + ' + 'LoadDefaultListToolStripMenuItem + ' + Me.LoadDefaultListToolStripMenuItem.Name = "LoadDefaultListToolStripMenuItem" + Me.LoadDefaultListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) + Me.LoadDefaultListToolStripMenuItem.Text = "Load Autosave-List" + ' + 'ClearListToolStripMenuItem + ' + Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem" + Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(150, 22) + Me.ClearListToolStripMenuItem.Text = "Clear List" + ' + 'LvMsg + ' + Me.LvMsg.AllowColumnReorder = True + Me.LvMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.LvMsg.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3}) + Me.LvMsg.Dock = System.Windows.Forms.DockStyle.Fill + Me.LvMsg.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LvMsg.FullRowSelect = True + Me.LvMsg.GridLines = True + Me.LvMsg.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable + Me.LvMsg.LabelWrap = False + Me.LvMsg.Location = New System.Drawing.Point(0, 0) + Me.LvMsg.Margin = New System.Windows.Forms.Padding(0) + Me.LvMsg.Name = "LvMsg" + Me.LvMsg.Size = New System.Drawing.Size(1045, 281) + Me.LvMsg.TabIndex = 0 + Me.LvMsg.UseCompatibleStateImageBehavior = False + Me.LvMsg.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader1 + ' + Me.ColumnHeader1.Text = "Message" + Me.ColumnHeader1.Width = 779 + ' + 'ColumnHeader2 + ' + Me.ColumnHeader2.Text = "Time" + Me.ColumnHeader2.Width = 151 + ' + 'ColumnHeader3 + ' + Me.ColumnHeader3.Text = "Source" + Me.ColumnHeader3.Width = 138 + ' + 'SplitContainer1 + ' + Me.SplitContainer1.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.SplitContainer1.Location = New System.Drawing.Point(0, 27) + Me.SplitContainer1.Margin = New System.Windows.Forms.Padding(0) + Me.SplitContainer1.Name = "SplitContainer1" + Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal + ' + 'SplitContainer1.Panel1 + ' + Me.SplitContainer1.Panel1.Controls.Add(Me.TabControl1) + Me.SplitContainer1.Panel1.Padding = New System.Windows.Forms.Padding(3, 3, 0, 2) + ' + 'SplitContainer1.Panel2 + ' + Me.SplitContainer1.Panel2.Controls.Add(Me.LvMsg) + Me.SplitContainer1.Size = New System.Drawing.Size(1045, 618) + Me.SplitContainer1.SplitterDistance = 333 + Me.SplitContainer1.TabIndex = 12 + ' + 'ToolStrip1 + ' + Me.ToolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None + Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden + Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripSeparator2, Me.ToolStripDrDnBtTools, Me.ToolStripDrDnBtInfo}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) + Me.ToolStrip1.Name = "ToolStrip1" + Me.ToolStrip1.Size = New System.Drawing.Size(1045, 25) + Me.ToolStrip1.TabIndex = 11 + Me.ToolStrip1.Text = "ToolStrip1" + ' + 'ToolStripBtNew + ' + Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtNew.Image = Global.TUGraz.VECTO.My.Resources.Resources.blue_document_icon + Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtNew.Name = "ToolStripBtNew" + Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtNew.Text = "ToolStripBtNew" + Me.ToolStripBtNew.ToolTipText = "New Job File" + ' + 'ToolStripBtOpen + ' + Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtOpen.Name = "ToolStripBtOpen" + Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtOpen.Text = "ToolStripButton1" + Me.ToolStripBtOpen.ToolTipText = "Open File..." + ' + 'ToolStripSeparator2 + ' + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripDrDnBtTools + ' + Me.ToolStripDrDnBtTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GENEditorToolStripMenuItem1, Me.EPTPJobEditorToolStripMenuItem, Me.VEHEditorToolStripMenuItem, Me.EngineEditorToolStripMenuItem, Me.GearboxEditorToolStripMenuItem, Me.GraphToolStripMenuItem, Me.ToolStripSeparator6, Me.OpenLogToolStripMenuItem, Me.SettingsToolStripMenuItem}) + Me.ToolStripDrDnBtTools.Image = Global.TUGraz.VECTO.My.Resources.Resources.Misc_Tools_icon + Me.ToolStripDrDnBtTools.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripDrDnBtTools.Name = "ToolStripDrDnBtTools" + Me.ToolStripDrDnBtTools.Size = New System.Drawing.Size(64, 22) + Me.ToolStripDrDnBtTools.Text = "Tools" + ' + 'GENEditorToolStripMenuItem1 + ' + Me.GENEditorToolStripMenuItem1.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_VECTO + Me.GENEditorToolStripMenuItem1.Name = "GENEditorToolStripMenuItem1" + Me.GENEditorToolStripMenuItem1.Size = New System.Drawing.Size(156, 22) + Me.GENEditorToolStripMenuItem1.Text = "Job Editor" + ' + 'EPTPJobEditorToolStripMenuItem + ' + 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" + ' + 'VEHEditorToolStripMenuItem + ' + Me.VEHEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_VEH + Me.VEHEditorToolStripMenuItem.Name = "VEHEditorToolStripMenuItem" + Me.VEHEditorToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.VEHEditorToolStripMenuItem.Text = "Vehicle Editor" + ' + 'EngineEditorToolStripMenuItem + ' + Me.EngineEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_ENG + Me.EngineEditorToolStripMenuItem.Name = "EngineEditorToolStripMenuItem" + Me.EngineEditorToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.EngineEditorToolStripMenuItem.Text = "Engine Editor" + ' + 'GearboxEditorToolStripMenuItem + ' + Me.GearboxEditorToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_GBX + Me.GearboxEditorToolStripMenuItem.Name = "GearboxEditorToolStripMenuItem" + Me.GearboxEditorToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.GearboxEditorToolStripMenuItem.Text = "Gearbox Editor" + ' + 'GraphToolStripMenuItem + ' + Me.GraphToolStripMenuItem.Image = Global.TUGraz.VECTO.My.Resources.Resources.F_Graph + Me.GraphToolStripMenuItem.Name = "GraphToolStripMenuItem" + Me.GraphToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.GraphToolStripMenuItem.Text = "Graph" + ' + 'ToolStripSeparator6 + ' + Me.ToolStripSeparator6.Name = "ToolStripSeparator6" + Me.ToolStripSeparator6.Size = New System.Drawing.Size(153, 6) + ' + 'OpenLogToolStripMenuItem + ' + Me.OpenLogToolStripMenuItem.Name = "OpenLogToolStripMenuItem" + Me.OpenLogToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.OpenLogToolStripMenuItem.Text = "Open Log" + ' + 'SettingsToolStripMenuItem + ' + Me.SettingsToolStripMenuItem.Name = "SettingsToolStripMenuItem" + Me.SettingsToolStripMenuItem.Size = New System.Drawing.Size(156, 22) + Me.SettingsToolStripMenuItem.Text = "Settings" + ' + 'ToolStripDrDnBtInfo + ' + Me.ToolStripDrDnBtInfo.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UserManualToolStripMenuItem, Me.UpdateNotesToolStripMenuItem, Me.ReportBugViaCITnetToolStripMenuItem, Me.ToolStripSeparator3, Me.AboutVECTOToolStripMenuItem1}) + Me.ToolStripDrDnBtInfo.Image = Global.TUGraz.VECTO.My.Resources.Resources.Help_icon + Me.ToolStripDrDnBtInfo.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripDrDnBtInfo.Name = "ToolStripDrDnBtInfo" + Me.ToolStripDrDnBtInfo.Size = New System.Drawing.Size(61, 22) + Me.ToolStripDrDnBtInfo.Text = "Help" + ' + 'UserManualToolStripMenuItem + ' + Me.UserManualToolStripMenuItem.Name = "UserManualToolStripMenuItem" + Me.UserManualToolStripMenuItem.Size = New System.Drawing.Size(221, 22) + Me.UserManualToolStripMenuItem.Text = "User Manual" + ' + 'UpdateNotesToolStripMenuItem + ' + Me.UpdateNotesToolStripMenuItem.Name = "UpdateNotesToolStripMenuItem" + Me.UpdateNotesToolStripMenuItem.Size = New System.Drawing.Size(221, 22) + Me.UpdateNotesToolStripMenuItem.Text = "Release Notes" + ' + 'ReportBugViaCITnetToolStripMenuItem + ' + Me.ReportBugViaCITnetToolStripMenuItem.Name = "ReportBugViaCITnetToolStripMenuItem" + Me.ReportBugViaCITnetToolStripMenuItem.Size = New System.Drawing.Size(221, 22) + Me.ReportBugViaCITnetToolStripMenuItem.Text = "Report Bug via CITnet / JIRA" + ' + 'ToolStripSeparator3 + ' + Me.ToolStripSeparator3.Name = "ToolStripSeparator3" + Me.ToolStripSeparator3.Size = New System.Drawing.Size(218, 6) + ' + 'AboutVECTOToolStripMenuItem1 + ' + Me.AboutVECTOToolStripMenuItem1.Name = "AboutVECTOToolStripMenuItem1" + Me.AboutVECTOToolStripMenuItem1.Size = New System.Drawing.Size(221, 22) + Me.AboutVECTOToolStripMenuItem1.Text = "About VECTO" + ' + 'CmDEV + ' + Me.CmDEV.Name = "CmDEV" + Me.CmDEV.ShowImageMargin = False + Me.CmDEV.Size = New System.Drawing.Size(36, 4) + ' + 'TmProgSec + ' + Me.TmProgSec.Interval = 1000 + ' + 'CmOpenFile + ' + Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.OpenInGraphWindowToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) + Me.CmOpenFile.Name = "CmOpenFile" + Me.CmOpenFile.ShowImageMargin = False + Me.CmOpenFile.Size = New System.Drawing.Size(174, 70) + ' + 'OpenWithToolStripMenuItem + ' + Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" + Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(173, 22) + Me.OpenWithToolStripMenuItem.Text = "Open with ..." + ' + 'OpenInGraphWindowToolStripMenuItem + ' + Me.OpenInGraphWindowToolStripMenuItem.Name = "OpenInGraphWindowToolStripMenuItem" + Me.OpenInGraphWindowToolStripMenuItem.Size = New System.Drawing.Size(173, 22) + Me.OpenInGraphWindowToolStripMenuItem.Text = "Open in Graph Window" + ' + 'ShowInFolderToolStripMenuItem + ' + Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" + Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(173, 22) + Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" + ' + 'MainForm + ' + Me.AcceptButton = Me.btStartV3 + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1045, 670) + Me.Controls.Add(Me.ToolStrip1) + Me.Controls.Add(Me.SplitContainer1) + Me.Controls.Add(Me.StatusBAR) + Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) + Me.MinimumSize = New System.Drawing.Size(785, 485) + Me.Name = "MainForm" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "VECTO" + Me.StatusBAR.ResumeLayout(False) + Me.StatusBAR.PerformLayout() + Me.TabControl1.ResumeLayout(False) + Me.TabPageGEN.ResumeLayout(False) + Me.TabPageGEN.PerformLayout() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() + Me.TabPgOptions.ResumeLayout(False) + Me.PanelOptAllg.ResumeLayout(False) + Me.GroupBox3.ResumeLayout(False) + Me.GroupBox3.PerformLayout() + Me.GroupBox2.ResumeLayout(False) + Me.GroupBox2.PerformLayout() + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.TabPageDEV.ResumeLayout(False) + Me.TabPageDEV.PerformLayout() + Me.ConMenFilelist.ResumeLayout(False) + Me.SplitContainer1.Panel1.ResumeLayout(False) + Me.SplitContainer1.Panel2.ResumeLayout(False) + CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainer1.ResumeLayout(False) + Me.ToolStrip1.ResumeLayout(False) + Me.ToolStrip1.PerformLayout() + Me.CmOpenFile.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() - End Sub - Friend WithEvents StatusBAR As StatusStrip + End Sub + Friend WithEvents StatusBAR As StatusStrip Friend WithEvents ToolStripLbStatus As ToolStripStatusLabel Friend WithEvents TabControl1 As TabControl Friend WithEvents TabPageGEN As TabPage @@ -942,5 +950,6 @@ Partial Class MainForm Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox Friend WithEvents cbValidateRunData As System.Windows.Forms.CheckBox Friend WithEvents cbActVmod As System.Windows.Forms.CheckBox + Friend WithEvents EPTPJobEditorToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/VECTO/GUI/MainForm.resx b/VECTO/GUI/MainForm.resx index 1ab95c20be0eb1a9777f7aae6720fb67961848f1..b00fb45de6f7935415bddf8185a50c0bcac9ba1c 100644 --- a/VECTO/GUI/MainForm.resx +++ b/VECTO/GUI/MainForm.resx @@ -126,83 +126,83 @@ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="PictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAAGkAAAAsCAYAAABmF5blAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAALuIAAC8GAUsgSLcAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfcChILJTNC/q9R - AAARd0lEQVR4Xu2bh19Vx7bH3//wrsm9N9WuscWCvdfYa2JEY4sNQbGb2EBEBMWeqIiFYkEQUJoamoCo - IBgFC4JSLKBgAREQLOut35wz230qB/S+p+/D+nx+n8PZe2b27PnuNbPW7MN/UZ199FYH6ROwOkifgNVB - +gSsDtJ72Nu3b7V/1cxQryZ1FUioVFrxggqeFVqkyldVBhd6w98fPisyWr56FXHdQlFfqNhQj4ofKyos - gZ4IFUHPn9JjoWf0pBQqpqfQixJ6xiouey5UUl5Kz1m419KKMnrBKntZTuUvK6i8soIqKl/Sy6pKvj+o - iqpevaJXr1/R6zevWW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H1 + 8ZqYup6+LDV1HWxBYa8Pe3MI1WWAYGl7tYYEw0WwNuG/3/ib5mCdfXB7L0h19r9jdZA+AauD9AlYHaSP + 3oj+Bw6SK4zL+dWDAAAAAElFTkSuQmCC </value> </data> <metadata name="ConMenFilelist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> diff --git a/VECTO/GUI/MainForm.vb b/VECTO/GUI/MainForm.vb index 0eaeddb9708b2c82f703bf9a057a4d38628eb8d3..d8802473ae3f90f06219f82e343fdd44ee1af8b5 100644 --- a/VECTO/GUI/MainForm.vb +++ b/VECTO/GUI/MainForm.vb @@ -115,6 +115,7 @@ Public Class MainForm TextFileBrowser = New FileBrowser("FileLists") JobfileFileBrowser = New FileBrowser("vecto") VehicleFileBrowser = New FileBrowser("vveh") + VehicleXMLFileBrowser = New FileBrowser("vveh_xml") FuelConsumptionMapFileBrowser = New FileBrowser("vmap") DrivingCycleFileBrowser = New FileBrowser("vdri") FullLoadCurveFileBrowser = New FileBrowser("vfld") @@ -142,6 +143,7 @@ Public Class MainForm TextFileBrowser.Extensions = New String() {"txt"} JobfileFileBrowser.Extensions = New String() {"vecto"} VehicleFileBrowser.Extensions = New String() {"vveh"} + VehicleXMLFileBrowser.Extensions = New String() {"xml"} FuelConsumptionMapFileBrowser.Extensions = New String() {"vmap"} DrivingCycleFileBrowser.Extensions = New String() {"vdri"} FullLoadCurveFileBrowser.Extensions = New String() {"vfld"} @@ -166,6 +168,7 @@ Public Class MainForm TextFileBrowser.Close() JobfileFileBrowser.Close() VehicleFileBrowser.Close() + VehicleXMLFileBrowser.Close() FuelConsumptionMapFileBrowser.Close() DrivingCycleFileBrowser.Close() FullLoadCurveFileBrowser.Close() @@ -1265,18 +1268,22 @@ lbFound: 'Open Job Editor and open file (or new file) Friend Sub OpenVECTOeditor(x As String) - If Not VectoJobForm.Visible Then - VectoJobForm.Show() - Else - If VectoJobForm.WindowState = FormWindowState.Minimized Then VectoJobForm.WindowState = FormWindowState.Normal - VectoJobForm.BringToFront() - End If - If x = "<New>" Then + ShowVectoJobForm() VectoJobForm.VectoNew() + ElseIf x = "<EPTP>" Then + ShowVectoEPTPJobForm() + VectoEPTPJobForm.VectoNew() Else Try - VectoJobForm.VECTOload2Form(x) + Dim job As IEPTPInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(x), IEPTPInputDataProvider) + If job Is Nothing Then + ShowVectoJobForm() + VectoJobForm.VECTOload2Form(x) + Else + ShowVectoEPTPJobForm() + VectoEPTPJobForm.VECTOload2Form(x) + End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vecto Job File") End Try @@ -1285,6 +1292,25 @@ lbFound: VectoJobForm.Activate() End Sub + Private Sub ShowVectoJobForm() + If Not VectoJobForm.Visible Then + VectoJobForm.Show() + Else + If VectoJobForm.WindowState = FormWindowState.Minimized Then VectoJobForm.WindowState = FormWindowState.Normal + VectoJobForm.BringToFront() + End If + End Sub + + Private Sub ShowVectoEPTPJobForm() + If Not VectoEPTPJobForm.Visible Then + VectoEPTPJobForm.Show() + Else + If VectoEPTPJobForm.WindowState = FormWindowState.Minimized Then _ + VectoEPTPJobForm.WindowState = FormWindowState.Normal + VectoEPTPJobForm.BringToFront() + End If + End Sub + 'Save job and cycle file lists Private Sub SaveFileLists() _jobListView.SaveList() @@ -2001,6 +2027,11 @@ Lb1: End If Next End Sub + + Private Sub EPTPJobEditorToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles EPTPJobEditorToolStripMenuItem.Click + OpenVECTOeditor("<EPTP>") + End Sub End Class diff --git a/VECTO/GUI/VectoEPTPJobForm.Designer.vb b/VECTO/GUI/VectoEPTPJobForm.Designer.vb new file mode 100644 index 0000000000000000000000000000000000000000..4aa60fd6d31c560efcc32e31125a688a76fd18e4 --- /dev/null +++ b/VECTO/GUI/VectoEPTPJobForm.Designer.vb @@ -0,0 +1,637 @@ +Imports System.ComponentModel +Imports Microsoft.VisualBasic.CompilerServices + +<DesignerGenerated()> _ +Partial Class VectoEPTPJobForm + Inherits Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + <DebuggerNonUserCode()> _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + <DebuggerStepThrough()> _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(VectoEPTPJobForm)) + 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.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.TbVEH = New System.Windows.Forms.TextBox() + Me.ButtonVEH = New System.Windows.Forms.Button() + Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() + Me.ToolStripStatusLabelGEN = New System.Windows.Forms.ToolStripStatusLabel() + Me.ButOK = New System.Windows.Forms.Button() + Me.ButCancel = New System.Windows.Forms.Button() + Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() + Me.ToolStripBtNew = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtOpen = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtSave = New System.Windows.Forms.ToolStripButton() + Me.ToolStripBtSaveAs = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripBtSendTo = New System.Windows.Forms.ToolStripButton() + Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.CmOpenFile = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.PicVehicle = New System.Windows.Forms.PictureBox() + Me.PicBox = New System.Windows.Forms.PictureBox() + Me.TbEngTxt = New System.Windows.Forms.TextBox() + Me.TbVehCat = New System.Windows.Forms.TextBox() + Me.TbAxleConf = New System.Windows.Forms.TextBox() + Me.TbHVCclass = New System.Windows.Forms.TextBox() + Me.TbGbxTxt = New System.Windows.Forms.TextBox() + Me.TbMass = New System.Windows.Forms.TextBox() + Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) + Me.lblEngineCharacteristics = New System.Windows.Forms.Label() + Me.PictureBox2 = New System.Windows.Forms.PictureBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.tbC3 = New System.Windows.Forms.TextBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.tbC2 = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + 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() + ' + '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.Controls.Add(Me.Label2) + Me.GrCycles.Controls.Add(Me.LvCycles) + Me.GrCycles.Controls.Add(Me.BtDRIrem) + Me.GrCycles.Controls.Add(Me.BtDRIadd) + Me.GrCycles.Location = New System.Drawing.Point(12, 260) + Me.GrCycles.Name = "GrCycles" + Me.GrCycles.Size = New System.Drawing.Size(515, 138) + Me.GrCycles.TabIndex = 10 + 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.Location = New System.Drawing.Point(391, 109) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(118, 13) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "(Right-Click for Options)" + ' + '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.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) + 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.Location = New System.Drawing.Point(6, 19) + 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.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader1 + ' + Me.ColumnHeader1.Text = "Cycle path" + Me.ColumnHeader1.Width = 470 + ' + '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.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 + ' + '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.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 + ' + '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.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.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.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.Location = New System.Drawing.Point(4, 19) + 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.View = System.Windows.Forms.View.Details + ' + 'ColumnHeader4 + ' + Me.ColumnHeader4.Text = "ID" + Me.ColumnHeader4.Width = 45 + ' + 'ColumnHeader5 + ' + Me.ColumnHeader5.Text = "Type" + Me.ColumnHeader5.Width = 108 + ' + 'ColumnHeader6 + ' + Me.ColumnHeader6.Text = "Input File" + Me.ColumnHeader6.Width = 331 + ' + '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.Location = New System.Drawing.Point(90, 86) + Me.TbVEH.Name = "TbVEH" + Me.TbVEH.Size = New System.Drawing.Size(411, 20) + Me.TbVEH.TabIndex = 1 + ' + '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.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 + ' + 'StatusStrip1 + ' + Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelGEN}) + 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.TabIndex = 6 + Me.StatusStrip1.Text = "StatusStrip1" + ' + 'ToolStripStatusLabelGEN + ' + Me.ToolStripStatusLabelGEN.Name = "ToolStripStatusLabelGEN" + Me.ToolStripStatusLabelGEN.Size = New System.Drawing.Size(120, 17) + Me.ToolStripStatusLabelGEN.Text = "ToolStripStatusLabel1" + ' + 'ButOK + ' + 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 + ' + 'ButCancel + ' + 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 + ' + 'ToolStrip1 + ' + Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden + Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripBtNew, Me.ToolStripBtOpen, Me.ToolStripBtSave, Me.ToolStripBtSaveAs, Me.ToolStripSeparator1, Me.ToolStripBtSendTo, Me.ToolStripSeparator2, Me.ToolStripButton1}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) + Me.ToolStrip1.Name = "ToolStrip1" + Me.ToolStrip1.Size = New System.Drawing.Size(944, 25) + Me.ToolStrip1.TabIndex = 20 + Me.ToolStrip1.Text = "ToolStrip1" + ' + 'ToolStripBtNew + ' + Me.ToolStripBtNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtNew.Image = Global.TUGraz.VECTO.My.Resources.Resources.blue_document_icon + Me.ToolStripBtNew.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtNew.Name = "ToolStripBtNew" + Me.ToolStripBtNew.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtNew.Text = "New" + Me.ToolStripBtNew.ToolTipText = "New" + ' + 'ToolStripBtOpen + ' + Me.ToolStripBtOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtOpen.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon + Me.ToolStripBtOpen.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtOpen.Name = "ToolStripBtOpen" + Me.ToolStripBtOpen.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtOpen.Text = "Open" + Me.ToolStripBtOpen.ToolTipText = "Open..." + ' + 'ToolStripBtSave + ' + Me.ToolStripBtSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSave.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_icon + Me.ToolStripBtSave.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSave.Name = "ToolStripBtSave" + Me.ToolStripBtSave.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSave.Text = "Save" + Me.ToolStripBtSave.ToolTipText = "Save" + ' + 'ToolStripBtSaveAs + ' + Me.ToolStripBtSaveAs.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSaveAs.Image = Global.TUGraz.VECTO.My.Resources.Resources.Actions_document_save_as_icon + Me.ToolStripBtSaveAs.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSaveAs.Name = "ToolStripBtSaveAs" + Me.ToolStripBtSaveAs.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSaveAs.Text = "Save As" + Me.ToolStripBtSaveAs.ToolTipText = "Save As..." + ' + 'ToolStripSeparator1 + ' + Me.ToolStripSeparator1.Name = "ToolStripSeparator1" + Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripBtSendTo + ' + Me.ToolStripBtSendTo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripBtSendTo.Image = Global.TUGraz.VECTO.My.Resources.Resources.export_icon + Me.ToolStripBtSendTo.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripBtSendTo.Name = "ToolStripBtSendTo" + Me.ToolStripBtSendTo.Size = New System.Drawing.Size(23, 22) + Me.ToolStripBtSendTo.Text = "Send to Job List" + Me.ToolStripBtSendTo.ToolTipText = "Send to Job List" + ' + 'ToolStripSeparator2 + ' + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25) + ' + 'ToolStripButton1 + ' + Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + Me.ToolStripButton1.Image = Global.TUGraz.VECTO.My.Resources.Resources.Help_icon + Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton1.Name = "ToolStripButton1" + Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22) + Me.ToolStripButton1.Text = "Help" + ' + '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.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 + ' + 'CmOpenFile + ' + Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem}) + Me.CmOpenFile.Name = "CmOpenFile" + Me.CmOpenFile.ShowImageMargin = False + Me.CmOpenFile.Size = New System.Drawing.Size(128, 48) + ' + 'OpenWithToolStripMenuItem + ' + Me.OpenWithToolStripMenuItem.Name = "OpenWithToolStripMenuItem" + Me.OpenWithToolStripMenuItem.Size = New System.Drawing.Size(127, 22) + Me.OpenWithToolStripMenuItem.Text = "Open with ..." + ' + 'ShowInFolderToolStripMenuItem + ' + Me.ShowInFolderToolStripMenuItem.Name = "ShowInFolderToolStripMenuItem" + Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(127, 22) + Me.ShowInFolderToolStripMenuItem.Text = "Show in Folder" + ' + 'PicVehicle + ' + Me.PicVehicle.BackColor = System.Drawing.Color.LightGray + Me.PicVehicle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PicVehicle.Location = New System.Drawing.Point(542, 80) + Me.PicVehicle.Name = "PicVehicle" + 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 + ' + 'PicBox + ' + Me.PicBox.BackColor = System.Drawing.Color.LightGray + Me.PicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PicBox.Location = New System.Drawing.Point(542, 219) + Me.PicBox.Name = "PicBox" + Me.PicBox.Size = New System.Drawing.Size(390, 296) + Me.PicBox.TabIndex = 36 + Me.PicBox.TabStop = False + ' + 'TbEngTxt + ' + Me.TbEngTxt.Location = New System.Drawing.Point(542, 171) + Me.TbEngTxt.Name = "TbEngTxt" + Me.TbEngTxt.ReadOnly = True + Me.TbEngTxt.Size = New System.Drawing.Size(390, 20) + Me.TbEngTxt.TabIndex = 6 + ' + 'TbVehCat + ' + Me.TbVehCat.Location = New System.Drawing.Point(848, 84) + Me.TbVehCat.Name = "TbVehCat" + Me.TbVehCat.ReadOnly = True + Me.TbVehCat.Size = New System.Drawing.Size(87, 20) + Me.TbVehCat.TabIndex = 2 + ' + 'TbAxleConf + ' + Me.TbAxleConf.Location = New System.Drawing.Point(904, 113) + Me.TbAxleConf.Name = "TbAxleConf" + Me.TbAxleConf.ReadOnly = True + Me.TbAxleConf.Size = New System.Drawing.Size(31, 20) + Me.TbAxleConf.TabIndex = 4 + ' + 'TbHVCclass + ' + Me.TbHVCclass.Location = New System.Drawing.Point(848, 142) + Me.TbHVCclass.Name = "TbHVCclass" + Me.TbHVCclass.ReadOnly = True + Me.TbHVCclass.Size = New System.Drawing.Size(87, 20) + Me.TbHVCclass.TabIndex = 5 + ' + 'TbGbxTxt + ' + Me.TbGbxTxt.Location = New System.Drawing.Point(542, 194) + Me.TbGbxTxt.Name = "TbGbxTxt" + Me.TbGbxTxt.ReadOnly = True + Me.TbGbxTxt.Size = New System.Drawing.Size(390, 20) + Me.TbGbxTxt.TabIndex = 7 + ' + 'TbMass + ' + Me.TbMass.Location = New System.Drawing.Point(848, 113) + Me.TbMass.Name = "TbMass" + Me.TbMass.ReadOnly = True + Me.TbMass.Size = New System.Drawing.Size(50, 20) + Me.TbMass.TabIndex = 3 + ' + 'lblEngineCharacteristics + ' + 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) + Me.lblEngineCharacteristics.TabIndex = 37 + ' + '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.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 + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.tbC3) + Me.GroupBox1.Controls.Add(Me.Label4) + Me.GroupBox1.Controls.Add(Me.tbC2) + Me.GroupBox1.Controls.Add(Me.Label3) + Me.GroupBox1.Controls.Add(Me.tbC1) + Me.GroupBox1.Controls.Add(Me.Label1) + Me.GroupBox1.Controls.Add(Me.PictureBox2) + Me.GroupBox1.Location = New System.Drawing.Point(11, 404) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(515, 135) + Me.GroupBox1.TabIndex = 39 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Fan Power" + ' + 'tbC3 + ' + Me.tbC3.Location = New System.Drawing.Point(363, 77) + 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.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(23, 13) + Me.Label4.TabIndex = 43 + Me.Label4.Text = "C3:" + ' + 'tbC2 + ' + Me.tbC2.Location = New System.Drawing.Point(363, 51) + 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.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(23, 13) + Me.Label3.TabIndex = 41 + Me.Label3.Text = "C2:" + ' + 'tbC1 + ' + Me.tbC1.Location = New System.Drawing.Point(363, 25) + 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.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(23, 13) + Me.Label1.TabIndex = 39 + Me.Label1.Text = "C1:" + ' + 'Label5 + ' + 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 + ' + Me.AcceptButton = Me.ButOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.CancelButton = Me.ButCancel + Me.ClientSize = New System.Drawing.Size(944, 590) + Me.Controls.Add(Me.Label5) + Me.Controls.Add(Me.GroupBox1) + Me.Controls.Add(Me.GrAux) + Me.Controls.Add(Me.GrCycles) + Me.Controls.Add(Me.lblEngineCharacteristics) + Me.Controls.Add(Me.TbHVCclass) + Me.Controls.Add(Me.TbMass) + Me.Controls.Add(Me.TbVEH) + Me.Controls.Add(Me.TbAxleConf) + Me.Controls.Add(Me.TbVehCat) + Me.Controls.Add(Me.TbGbxTxt) + Me.Controls.Add(Me.TbEngTxt) + Me.Controls.Add(Me.ButtonVEH) + Me.Controls.Add(Me.PicBox) + Me.Controls.Add(Me.PicVehicle) + Me.Controls.Add(Me.PictureBox1) + Me.Controls.Add(Me.ToolStrip1) + Me.Controls.Add(Me.ButCancel) + 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.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() + + End Sub + Friend WithEvents StatusStrip1 As StatusStrip + Friend WithEvents ButtonVEH As Button + Friend WithEvents ToolStripStatusLabelGEN As ToolStripStatusLabel + Friend WithEvents ButOK As Button + Friend WithEvents TbVEH As TextBox + Friend WithEvents ButCancel As Button + Friend WithEvents ToolStrip1 As ToolStrip + Friend WithEvents ToolStripBtNew As ToolStripButton + Friend WithEvents ToolStripBtOpen As ToolStripButton + Friend WithEvents ToolStripBtSave As ToolStripButton + Friend WithEvents ToolStripBtSaveAs As ToolStripButton + Friend WithEvents ToolStripBtSendTo As ToolStripButton + Friend WithEvents ToolStripSeparator1 As ToolStripSeparator + Friend WithEvents GrAux As GroupBox + Friend WithEvents LvAux As ListView + Friend WithEvents ColumnHeader4 As ColumnHeader + Friend WithEvents ColumnHeader5 As ColumnHeader + Friend WithEvents ColumnHeader6 As ColumnHeader + Friend WithEvents PictureBox1 As PictureBox + Friend WithEvents GrCycles As GroupBox + Friend WithEvents LvCycles As ListView + Friend WithEvents ColumnHeader1 As ColumnHeader + Friend WithEvents BtDRIrem As Button + Friend WithEvents BtDRIadd As Button + Friend WithEvents ToolStripSeparator2 As ToolStripSeparator + Friend WithEvents ToolStripButton1 As ToolStripButton + Friend WithEvents Label2 As Label + Friend WithEvents CmOpenFile As ContextMenuStrip + Friend WithEvents OpenWithToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ShowInFolderToolStripMenuItem As ToolStripMenuItem + Friend WithEvents PicVehicle As PictureBox + Friend WithEvents PicBox As PictureBox + Friend WithEvents TbEngTxt As TextBox + Friend WithEvents TbVehCat As TextBox + Friend WithEvents TbAxleConf As TextBox + Friend WithEvents TbHVCclass As TextBox + Friend WithEvents TbGbxTxt As TextBox + Friend WithEvents TbMass As TextBox + Friend WithEvents ToolTip1 As ToolTip + Friend WithEvents lblEngineCharacteristics As System.Windows.Forms.Label + Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents tbC3 As System.Windows.Forms.TextBox + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents tbC2 As System.Windows.Forms.TextBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents tbC1 As System.Windows.Forms.TextBox + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents Label5 As System.Windows.Forms.Label +End Class diff --git a/VECTO/GUI/VectoEPTPJobForm.resx b/VECTO/GUI/VectoEPTPJobForm.resx new file mode 100644 index 0000000000000000000000000000000000000000..391e34605b0b0f20b59e976681ea3a5208ca4cce --- /dev/null +++ b/VECTO/GUI/VectoEPTPJobForm.resx @@ -0,0 +1,649 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="ButtonVEH.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAAtVJREFUOE+FkmtIk2EYhhc6zU1zyjyAlZn5Q0QS6k/EMDDSQiuzkmxM5wpEA00S + zTzbsozQEDUyVKjQbejUPGQSyyjUmofysFRKU/M859J5qORu77s1KX/0wPXju7/vvp4X3o/RVsHv7pDy + 0VklwIfaCPTXCzHQEPkXn5pEUDWJNH31kRGMf4eUocvF7GAShlqjQZ6H3qZjYUICQGliVfscvc+EGmNt + c0hhY/kONpYMrC/cwowqiYowchcYNaKRoa7mDDyfcuFRYpdnrBsEv7S3KT8XCTkUkq/3xGOj9xrQn0Cp + qQrGvnJ7uJTuwK58G4VJ8GMhh25eV29Ccp0yDmvd8SZBV7UA7sW2R5wfWsO+0ApO2ewMKlibE2N11siM + GCt6SL7YEQtdZxxUShECq7wQ9MQLZKnTfbbcqpQJuwxLDRWsTN+EbiobuslsLBsh+eybK3j/WgBfmQeq + 1RKcqPalAgexlYIIrNMtQAVLE1lYGs/Cd8JYJrR6SK5ovoCzjTzI1VLE9gjgVsiBYza7jJvHAhGwkpkG + gfZrJhZHM6D5QtBf4ed0yKSnENLEg0L3AlHKIBxq2Ik9BRy4FNrA4bFBYJlgbhCQgno4DeqhNMwPpuFb + TyICan3waqUF0coAHGtxpwJvuSPcJBwqYBUzwby8TUEF84OpmFOlYnYghR69XcLHUdl+RLX7I6TVc4uA + W8aCZZy5hhnO8KECUpzuu4Gpj8lU0FgShuIHgeAVucK/0d0k8KzgwjGXje0xZiPMS/oyGVIgxcme65jo + MvyBNUWhqMw/j7ryi+Dlu+KwfDcVcNNYEOfx6E2Ypq0iVKN6GYNxZRLG3iVSQXnOcRSk+EGadxK1j4Jx + IMsZPhXOsE+2QnPZOcPmP9MtD+d0SMPkXTVCDLdeRadciPjIg7H6V3sNXzAYtrEMjmW0udxCZFZmjLZO + eyX/NDkNOcG9FD9vY/yfYTB+A9kMOLKC3dXwAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>125, 17</value> + </metadata> + <metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>242, 17</value> + </metadata> + <metadata name="CmOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>350, 15</value> + </metadata> + <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+oZAAAOw9JREFUeF7tnYu16zayRF8IE4NDmBgcgmNw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KRAAAAAElFTkSuQmCC +</value> + </data> + <data name="PictureBox2.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAApMAAACBCAYAAACclzFEAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wAAADsABataJCQAAIcpJREFUeF7tnY2167xxRVNCakgJqcElpAaXkB5SgmtwCV8NLsE1uARnH5ojj0ag + REok+HfOWvs9XZAiKYgABjMD6j/++c9/GmOMMacB/Tf8Bf4G/4C/wx/w59b+xphtaRYaY4wxRwT9FWRA + /hn+cyz7L5BxqT+07U/1fcaY7WgWGmOMMUdjNBjlhRyMyMZ2eSf1Qvx3ax9jzPo0C40xxpgjgeR91IvJ + UDb607iP+HtrH2PM+jQLjTHGmCOBFNYOQ/EvE/v8Z9pHND2Yxph1aRYaY4wxRwL9bzIS/2jtI9I+wsak + MR1oFhpjjDFHQoYhKF9ycoENilC4+EdrH2PM+jQLjTHGmLOB/icZk81QuDFmfZqFxhhjzNlAeTW3Q9zG + dKJZaIwxa4H+bxzc7Sk6CSgWsiis/F+tfY4Gyiu5/ZxJYzrSLDTGmDVA+UHSpzBKzL9AMQnQd3fYZzYi + 5UnGSm8ZvzYkjelMs9AYY34F6ZdK9EL4AdInBMVk4HDfIZKRG9cm/Ms3xuxEs9AYY34B2ZC8CGf4LnVd + 4J9TNGYnmoXGGPMtaVAXHtQvAIqFLYdOV0D5WZT/29rHGLM+zUJjjPmGMphP/uydOR9I+Yh6IYPysCul + 03UKe8WNWQiKPOTJ9jPuo0dxDfs0dzLGmKWMHYteCK/cvhgoPxD8b619jgCKhUOHvk5jjgrKToFAk0hR + y4ZIRfNAxhizBHUoY+ciPIBfFJQnDP/X2mcrdD5Q/ubb1AmUf8ObovZ+xpg2qGVMVpT68ohQvBzEGGOW + gnJo0Y8AujCoe04smm0gomzwCj+83JgFIBmT6tNlMIY3Uv/rb7X/lz7+6Q9jjFkKyqt9/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Y/rQLDTGmF9A + CuvaoDw5KK/ctiFpjGnSLDTGmF9B2UPpR8icDJTzPG1IGmMmaRYaY8waoGxQ+pFBJwHlRwD5ezPGvKVZ + aIwxazEaJsq786NkToS/M2PMPP75H/8P3C2RO8+dg8cAAAAASUVORK5CYII= +</value> + </data> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>49</value> + </metadata> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAEAJCAAAAEAIAAoEwAAFgAAACgAAAAkAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAD9/f0C4OjbBv7+/gIAAAAAAAAAAAAAAAAAAAAAAAAAAP///8/////t////+/// + //3////9/////f///+7////B////Zv///wMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/gHW4NAQiKV2LfX38xD///8BAAAAAAAA + AAAAAAAAAAAAAP////8wMDD/EhIS/wQEBP8CAgL/ERER/z4+Pv+ZmZn//Pz8/////7////8KAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+ + /gudtI5FRHEmhMbUvS7+/v4CAAAAAAA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V/zZmFf82Zhb/NmYX/zZmF/83Zxj/N2cY/zlp + Gv86ahv/Omob/zlpGv86ahv/Omob/wAAAAAAAAAA////AfX49B5ylFyGNGUT5jVmFP41ZhT/NWYU/zVm + FP81ZhT/NWYU9leAPLPp7uYu////A+nu5ixZgT6vNWYU9DVmFP81ZhT/NWYU/zVmFP82ZxX/NmcV/zZm + FP82ZhX/NmYX/zZmF/83Zxf/N2cY/zlpGv86ahv/Omob/zlpGv86ahv/Omob/wAAAAAAAAAA/v7+AsjV + vzFBbyK6NGUU9jVmFP01ZhT9NWYU/TVmFP01ZhT8NGUT3IGgbW78/PwW////Af39/RGJpXZiNGUT2DVm + FPw1ZhT9NGUT/TVmFP02ZxX9NmcV/TZmFf02ZhX9NmYX/TZmF/03Zxf9N2cY/ThoGf06aRr9Omob/Tho + Gf06aRr9Omob/QAAAAAAAAAA/f79A4+qfS42ZxWhNmcVyDZnFco2ZxXKNmcVyjZnFco2ZxXJOGgYo6/C + ojT+/v4FAAAAAP7+/gO6yq8wO2obojZnFck2ZxXKNmcVyjdnFso3aBbKN2gWyjdoFso3ZxfKN2cYyjhn + Gco4aBnKOWgayjpqG8o7axzKPGsdyjpqG8o7axzKPGsdygAAAAAAAAAA+vv6AcHQtwyxxKQqscSkNbHE + pDWxxKQ1scSkNbHEpDWxxKQ1tMaoKu7y7Az///4BAAAAAAAAAADz9vELtseqKrHEpDWxxKQ1scSkNbHE + pDWxxKU1scSlNbHEpTWxxKU1scSlNbHEpTWxxKY1ssSmNbLFpjWzxac1s8WnNbLFpjWzxac1s8WnNQAA + AAAAAAAAAAAAAAAAAAD///8C////Av///wL///8C////Av///wL///8C////AgAAAAAAAAAAAAAAAAAA + AAAAAAAA////Av///wL///8C////Av///wL///8C////Av///wL///8C////Av///wL///8C////Av// + /wL///8C////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////8AAAAP// + 8A/wAAAA///wA/AAAAD/+/AB8AAAAP/z8AHwAAAA//HwAfAAAAD/8f8B8AAAAP/g/4HwAAAA/+D/gfAA + AAD/wP+B8AAAAP/Af4HwAAAA/8B/gfAAAAD/gD+B8AAAAP+APAHwAAAA/wA8AfAAAAD/ABwB8AAAAP8A + HAHwAAAA/gAMAfAAAAD+AA//8AAAAPwAB//wAAAA/AAAABAAAAD4AAAAEAAAAPgAAAAQAAAA+AQAABAA + AADwDgAAEAAAAPAOAAAQAAAA4A4AABAAAADgHwAAEAAAAOAfAAAQAAAA//////AAAAD/////8AAAAP// + ///wAAAA +</value> + </data> +</root> \ No newline at end of file diff --git a/VECTO/GUI/VectoEPTPJobForm.vb b/VECTO/GUI/VectoEPTPJobForm.vb new file mode 100644 index 0000000000000000000000000000000000000000..6f1995750497aa20a1b27eb0360e25a19853c0f4 --- /dev/null +++ b/VECTO/GUI/VectoEPTPJobForm.vb @@ -0,0 +1,709 @@ +' Copyright 2017 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. +'Option Infer On + +Imports System.Collections.Generic +Imports System.Drawing.Imaging +Imports System.IO +Imports System.Linq +Imports System.Runtime.CompilerServices +Imports System.Text.RegularExpressions +Imports System.Windows.Forms.DataVisualization.Charting +Imports System.Xml +Imports TUGraz.VECTO.Input_Files +Imports TUGraz.VectoCommon.InputData +Imports TUGraz.VectoCommon.Models +Imports TUGraz.VectoCommon.Utils +Imports TUGraz.VectoCore.InputData.FileIO.JSON +Imports TUGraz.VectoCore.InputData.FileIO.XML.Declaration +Imports TUGraz.VectoCore.InputData.Reader +Imports TUGraz.VectoCore.Models.Declaration +Imports TUGraz.VectoCore.Models.SimulationComponent.Data +Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine +Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox + +''' <summary> +''' Job Editor. Create/Edit VECTO job files (.vecto) +''' </summary> +''' <remarks></remarks> +Public Class VectoEPTPJobForm + Public VectoFile As String + Private _changed As Boolean = False + + Private _pgDriver As TabPage + + Private _pgDriverOn As Boolean = True + + Private _auxDialog As VehicleAuxiliariesDialog + + Enum AuxViewColumns + AuxID = 0 + AuxType = 1 + AuxInputOrTech = 2 + End Enum + + + + 'Initialise form + Private Sub F02_GEN_Load(sender As Object, e As EventArgs) Handles Me.Load + + _auxDialog = New VehicleAuxiliariesDialog + + + LvAux.Columns(AuxViewColumns.AuxInputOrTech).Width = -2 + + LvAux.Columns(AuxViewColumns.AuxInputOrTech).Text = "Technology" + + GrCycles.Enabled = True + + _changed = False + End Sub + + 'Close - Check for unsaved changes + Private Sub F02_GEN_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing + If e.CloseReason <> CloseReason.ApplicationExitCall And e.CloseReason <> CloseReason.WindowsShutDown Then + e.Cancel = ChangeCheckCancel() + End If + End Sub + + + + +#Region "Browse Buttons" + + Private Sub ButtonVEH_Click(sender As Object, e As EventArgs) Handles ButtonVEH.Click + If VehicleXMLFileBrowser.OpenDialog(FileRepl(TbVEH.Text, GetPath(VectoFile))) Then + TbVEH.Text = GetFilenameWithoutDirectory(VehicleXMLFileBrowser.Files(0), GetPath(VectoFile)) + End If + End Sub + + +#End Region + + +#Region "Toolbar" + + 'New + Private Sub ToolStripBtNew_Click(sender As Object, e As EventArgs) Handles ToolStripBtNew.Click + VectoNew() + End Sub + + 'Open + Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click + If JobfileFileBrowser.OpenDialog(VectoFile, False, "vecto") Then + Try + VECTOload2Form(JobfileFileBrowser.Files(0)) + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error loading Vecto Job File") + End Try + + End If + End Sub + + 'Save + Private Sub ToolStripBtSave_Click(sender As Object, e As EventArgs) Handles ToolStripBtSave.Click + Save() + End Sub + + 'Save As + Private Sub ToolStripBtSaveAs_Click(sender As Object, e As EventArgs) Handles ToolStripBtSaveAs.Click + If JobfileFileBrowser.SaveDialog(VectoFile) Then Call VECTOsave(JobfileFileBrowser.Files(0)) + End Sub + + 'Send to Job file list in main form + Private Sub ToolStripBtSendTo_Click(sender As Object, e As EventArgs) Handles ToolStripBtSendTo.Click + If ChangeCheckCancel() Then Exit Sub + If VectoFile = "" Then + MsgBox("File not found!" & ChrW(10) & ChrW(10) & "Save file and try again.") + Else + MainForm.AddToJobListView(VectoFile) + End If + End Sub + + 'Help + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + If File.Exists(MyAppPath & "User Manual\help.html") Then + Dim defaultBrowserPath As String = BrowserUtils.GetDefaultBrowserPath() + Process.Start(defaultBrowserPath, + String.Format("""file://{0}{1}""", MyAppPath, "User Manual\help.html#job-editor")) + Else + MsgBox("User Manual not found!", MsgBoxStyle.Critical) + End If + End Sub + + +#End Region + + 'Save ("Save" or "Save As" when new file) + Private Function Save() As Boolean + If VectoFile = "" Then + If JobfileFileBrowser.SaveDialog("") Then + VectoFile = JobfileFileBrowser.Files(0) + Else + Return False + End If + End If + Try + Return VECTOsave(VectoFile) + Catch ex As Exception + MsgBox("Error when saving file" + Environment.NewLine + ex.Message) + Return False + End Try + End Function + + 'Open file + Public Sub VECTOload2Form(file As String) + + If ChangeCheckCancel() Then Exit Sub + + VectoNew() + + 'Read GEN + Dim vectoJob As IEPTPJobInputData = Nothing + Dim inputData As IEPTPInputDataProvider = Nothing + Try + inputData = TryCast(JSONInputDataFactory.ReadComponentData(file), + IEPTPInputDataProvider) + vectoJob = inputData.JobInputData() + Catch ex As Exception + MsgBox("Failed to read Job-File" + Environment.NewLine + ex.Message) + Return + End Try + + + If Cfg.DeclMode <> vectoJob.SavedInDeclarationMode Then + Select Case WrongMode() + Case 1 + Close() + MainForm.RbDecl.Checked = Not MainForm.RbDecl.Checked + MainForm.OpenVectoFile(file) + Case -1 + Exit Sub + End Select + End If + + VectoFile = file + _basePath = Path.GetDirectoryName(file) + 'Update Form + + + 'Files ----------------------------- + TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.Source, _basePath) + + Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.AuxiliaryInputData() + + PopulateAuxiliaryList(auxInput) + + Dim coefficients As Double() = vectoJob.FanPowerCoefficents.ToArray() + If (coefficients.Length >= 1) Then + tbC1.Text = coefficients(0).ToGUIFormat() + End If + If (coefficients.Length >= 2) Then + tbC2.Text = coefficients(1).ToGUIFormat() + End If + If (coefficients.Length >= 3) Then + tbC3.Text = coefficients(2).ToGUIFormat() + End If + Try + Dim sb As ICycleData + For Each sb In vectoJob.Cycles + Dim lv0 As ListViewItem = New ListViewItem + lv0.Text = GetRelativePath(sb.CycleData.Source, Path.GetDirectoryName(Path.GetFullPath(file))) 'sb.Name + LvCycles.Items.Add(lv0) + Next + Catch ex As Exception + End Try + + VehicleForm.AutoSendTo = False + + + Dim x As Integer = Len(file) + While Mid(file, x, 1) <> "\" And x > 0 + x = x - 1 + End While + Text = Mid(file, x + 1, Len(file) - x) + _changed = False + ToolStripStatusLabelGEN.Text = "" 'file & " opened." + + UpdatePic() + + '------------------------------------------------------------- + End Sub + + Private Sub PopulateAuxiliaryList(auxInput As IAuxiliariesDeclarationInputData) + + LvAux.Items.Clear() + Dim entry As IAuxiliaryDeclarationInputData + For Each entry In auxInput.Auxiliaries + 'If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then Continue For + Try + LvAux.Items.Add(CreateAuxListEntry(AuxiliaryTypeHelper.GetAuxKey(entry.Type), + AuxiliaryTypeHelper.ToString(entry.Type), String.Join("; ", entry.Technology))) + Catch ex As Exception + End Try + Next + End Sub + + Private Function CreateAuxListEntry(auxKey As String, type As String, technology As String) As ListViewItem + Dim lv0 As ListViewItem = New ListViewItem + lv0.SubItems(AuxViewColumns.AuxID).Text = auxKey + lv0.SubItems.Add(type) + lv0.SubItems.Add(technology) + Return lv0 + End Function + + + 'Save file + Private Function VECTOsave(file As String) As Boolean + Dim message As String = String.Empty + + + Dim vectoJob As VectoEPTPJob = New VectoEPTPJob + vectoJob.FilePath = file + + 'Files ------------------------------------------------- ----------------- + + vectoJob.PathVeh = TbVEH.Text + + For Each lv0 As ListViewItem In LvCycles.Items + Dim sb As SubPath = New SubPath + sb.Init(GetPath(file), lv0.Text) + vectoJob.CycleFiles.Add(sb) + Next + + vectoJob.FanCoefficients = New Double() { + tbC1.Text.ToDouble(0), + tbC2.Text.ToDouble(0), + tbC3.Text.ToDouble(0) + } + + 'SAVE + If Not vectoJob.SaveFile Then + MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical) + Return False + End If + + VectoFile = file + + file = GetFilenameWithoutPath(VectoFile, True) + + Text = file + ToolStripStatusLabelGEN.Text = "" + + MainForm.AddToJobListView(VectoFile) + + _changed = False + + Return True + End Function + + 'New file + Public Sub VectoNew() + + If ChangeCheckCancel() Then Exit Sub + + 'Files + TbVEH.Text = "" + LvCycles.Items.Clear() + + + LvAux.Items.Clear() + + EngineForm.AutoSendTo = False + + VectoFile = "" + Text = "Job Editor" + ToolStripStatusLabelGEN.Text = "" + _changed = False + UpdatePic() + End Sub + + +#Region "Track changes" + +#Region "'Change' Events" + + Private Sub TextBoxVEH_TextChanged(sender As Object, e As EventArgs) _ + Handles TbVEH.TextChanged + UpdateAuxList() + UpdatePic() + Change() + End Sub + + Private Sub UpdateAuxList() + Dim vehicleFile As String = + If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbVEH.Text), TbVEH.Text) + If File.Exists(vehicleFile) Then + Try + Dim inputData As XMLDeclarationInputDataProvider = New XMLDeclarationInputDataProvider(XmlReader.Create(vehicleFile), True) + Dim auxInput As IAuxiliariesDeclarationInputData = inputData.JobInputData.Vehicle.AuxiliaryInputData() + PopulateAuxiliaryList(auxInput) + Catch + End Try + End If + + End Sub + + + Private Sub LvCycles_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) _ + Handles LvCycles.AfterLabelEdit + Change() + End Sub + + +#End Region + + Private Sub Change() + If Not _changed Then + ToolStripStatusLabelGEN.Text = "Unsaved changes in current file" + _changed = True + End If + End Sub + + ' "Save changes? "... Returns True if User aborts + Private Function ChangeCheckCancel() As Boolean + + If _changed Then + + Select Case MsgBox("Save changes ?", MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + Return Not Save() + Case MsgBoxResult.Cancel + Return True + Case Else 'MsgBoxResult.No + _changed = False + Return False + End Select + + Else + + Return False + + End If + End Function + +#End Region + + + 'OK (Save & Close) + Private Sub ButSave_Click(sender As Object, e As EventArgs) Handles ButOK.Click + If Not Save() Then Exit Sub + Close() + End Sub + + 'Cancel + Private Sub ButCancel_Click(sender As Object, e As EventArgs) Handles ButCancel.Click + Close() + End Sub + +#Region "Cycle list" + + Private Sub LvCycles_KeyDown(sender As Object, e As KeyEventArgs) Handles LvCycles.KeyDown + Select Case e.KeyCode + Case Keys.Delete, Keys.Back + RemoveCycle() + Case Keys.Enter + If LvCycles.SelectedItems.Count > 0 Then LvCycles.SelectedItems(0).BeginEdit() + End Select + End Sub + + Private Sub BtDRIadd_Click(sender As Object, e As EventArgs) Handles BtDRIadd.Click + Dim genDir As String = GetPath(VectoFile) + + If DrivingCycleFileBrowser.OpenDialog("", True) Then + Dim s As String + For Each s In DrivingCycleFileBrowser.Files + LvCycles.Items.Add(GetFilenameWithoutDirectory(s, genDir)) + Next + Change() + End If + End Sub + + Private Sub BtDRIrem_Click(sender As Object, e As EventArgs) Handles BtDRIrem.Click + RemoveCycle() + End Sub + + Private Sub RemoveCycle() + Dim i As Integer + + If LvCycles.SelectedItems.Count = 0 Then + If LvCycles.Items.Count = 0 Then + Exit Sub + Else + LvCycles.Items(LvCycles.Items.Count - 1).Selected = True + End If + End If + + i = LvCycles.SelectedItems(0).Index + + LvCycles.SelectedItems(0).Remove() + + If LvCycles.Items.Count > 0 Then + If i < LvCycles.Items.Count Then + LvCycles.Items(i).Selected = True + Else + LvCycles.Items(LvCycles.Items.Count - 1).Selected = True + End If + + LvCycles.Focus() + End If + + Change() + End Sub + +#End Region + + + Public Sub UpdatePic() + + + TbHVCclass.Text = "" + TbVehCat.Text = "" + TbMass.Text = "" + TbAxleConf.Text = "" + TbEngTxt.Text = "" + TbGbxTxt.Text = "" + PicVehicle.Image = Nothing + PicBox.Image = Nothing + + Try + UpdateVehiclePic() + + Dim chart As Chart = Nothing + UpdateEnginePic(chart) + + + UpdateGearboxPic(chart) + + If chart Is Nothing Then Return + + Dim chartArea As ChartArea = New ChartArea() + chartArea.Name = "main" + + chartArea.AxisX.Title = "engine speed [1/min]" + chartArea.AxisX.TitleFont = New Font("Helvetica", 10) + chartArea.AxisX.LabelStyle.Font = New Font("Helvetica", 8) + chartArea.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None + chartArea.AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + chartArea.AxisY.Title = "engine torque [Nm]" + chartArea.AxisY.TitleFont = New Font("Helvetica", 10) + chartArea.AxisY.LabelStyle.Font = New Font("Helvetica", 8) + chartArea.AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None + chartArea.AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dot + + chartArea.AxisX.Minimum = 300 + chartArea.BorderDashStyle = ChartDashStyle.Solid + chartArea.BorderWidth = 1 + + chartArea.BackColor = Color.GhostWhite + + chart.ChartAreas.Add(chartArea) + chart.Update() + + Dim img As Bitmap = New Bitmap(chart.Width, chart.Height, PixelFormat.Format32bppArgb) + chart.DrawToBitmap(img, New Rectangle(0, 0, PicBox.Width, PicBox.Height)) + + PicBox.Image = img + Catch + End Try + End Sub + + Private Sub UpdateGearboxPic(ByRef chartArea As Chart) + + Dim gearbox As IGearboxDeclarationInputData = Nothing + Dim vehicleFile As String = + If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbVEH.Text), TbVEH.Text) + If File.Exists(vehicleFile) Then + Try + Dim inputData As XMLDeclarationInputDataProvider = New XMLDeclarationInputDataProvider(XmlReader.Create(vehicleFile), True) + gearbox = inputData.JobInputData.Vehicle.GearboxInputData + Catch + End Try + End If + + If gearbox Is Nothing Then Return + + TbGbxTxt.Text = String.Format("{0}-Speed {1} {2}", gearbox.Gears.Count, gearbox.Type.ShortName(), gearbox.Model) + + End Sub + + Private Sub UpdateEnginePic(ByRef chart As Chart) + Dim s As Series + Dim pmax As Double + + Dim engine As IEngineDeclarationInputData = Nothing + lblEngineCharacteristics.Text = "" + Dim vehicleFile As String = + If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbVEH.Text), TbVEH.Text) + If File.Exists(vehicleFile) Then + Try + Dim inputData As XMLDeclarationInputDataProvider = New XMLDeclarationInputDataProvider(XmlReader.Create(vehicleFile), True) + engine = inputData.JobInputData.Vehicle.EngineInputData + Catch + Return + End Try + End If + + 'engine.FilePath = fFileRepl(TbENG.Text, GetPath(VECTOfile)) + + 'Create plot + chart = New Chart + chart.Width = PicBox.Width + chart.Height = PicBox.Height + + + 'Dim FLD0 As EngineFullLoadCurve = New EngineFullLoadCurve + + If engine Is Nothing Then Return + + + engine.IdleSpeed.Value() + + Dim fullLoadCurve As EngineFullLoadCurve = FullLoadCurveReader.Create(engine.FullLoadCurve) + + s = New Series + s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueFullLoad.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.DarkBlue + s.Name = "Full load" + chart.Series.Add(s) + + s = New Series + s.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fullLoadCurve.FullLoadEntries.Select(Function(x) x.TorqueDrag.Value()).ToArray()) + s.ChartType = SeriesChartType.FastLine + s.BorderWidth = 2 + s.Color = Color.Blue + s.Name = "Motoring" + chart.Series.Add(s) + + pmax = fullLoadCurve.MaxPower.Value() / 1000 'FLD0.Pfull(FLD0.EngineRatedSpeed) + + + TbEngTxt.Text = String.Format("{0} l {1} kw {2}", (engine.Displacement.Value() * 1000).ToString("0.0"), + pmax.ToString("#"), engine.Model) + + Dim fuelConsumptionMap As FuelConsumptionMap = FuelConsumptionMapReader.Create(engine.FuelConsumptionMap) + + s = New Series + s.Points.DataBindXY(fuelConsumptionMap.Entries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(), + fuelConsumptionMap.Entries.Select(Function(x) x.Torque.Value()).ToArray()) + s.ChartType = SeriesChartType.Point + s.MarkerSize = 3 + s.Color = Color.Red + s.Name = "Map" + chart.Series.Add(s) + + Dim engineCharacteristics As String = + String.Format("Max. Torque: {0:F0} Nm; Max. Power: {1:F1} kW; n_rated: {2:F0} rpm; n_95h: {3:F0} rpm", + fullLoadCurve.MaxTorque.Value(), fullLoadCurve.MaxPower.Value() / 1000, fullLoadCurve.RatedSpeed.AsRPM, + fullLoadCurve.N95hSpeed.AsRPM) + lblEngineCharacteristics.Text = engineCharacteristics + End Sub + + Private Sub UpdateVehiclePic() + Dim HDVclass As String + + Dim vehicle As IVehicleDeclarationInputData = Nothing + + Dim vehicleFile As String = + If(Not String.IsNullOrWhiteSpace(VectoFile), Path.Combine(Path.GetDirectoryName(VectoFile), TbVEH.Text), TbVEH.Text) + If File.Exists(vehicleFile) Then + Try + Dim inputData As XMLDeclarationInputDataProvider = New XMLDeclarationInputDataProvider(XmlReader.Create(vehicleFile), True) + vehicle = inputData.JobInputData.Vehicle + Catch + End Try + End If + + If vehicle Is Nothing Then Return + + Dim maxMass As Kilogram = vehicle.GrossVehicleMassRating 'CSng(fTextboxToNumString(TbMassMass.Text)) + + Dim s0 As Segment = Nothing + Try + s0 = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration, maxMass, 0.SI(Of Kilogram), + True) + Catch + End Try + If Not s0.Found Then + HDVclass = "-" + Else + HDVclass = s0.VehicleClass.GetClassNumber() + + If Cfg.DeclMode Then + LvCycles.Items.Clear() + Dim m0 As Mission + For Each m0 In s0.Missions + LvCycles.Items.Add(m0.MissionType.ToString()) + Next + End If + + End If + + PicVehicle.Image = ConvPicPath(If(Not s0.Found, -1, HDVclass.ToInt()), False) _ + 'Image.FromFile(cDeclaration.ConvPicPath(HDVclass, False)) + + TbHVCclass.Text = String.Format("HDV Class {0}", HDVclass) + TbVehCat.Text = vehicle.VehicleCategory.GetCategoryName() 'ConvVehCat(VEH0.VehCat, True) + TbMass.Text = (vehicle.GrossVehicleMassRating.Value() / 1000) & " t" + TbAxleConf.Text = vehicle.AxleConfiguration.GetName() 'ConvAxleConf(VEH0.AxleConf) + End Sub + + +#Region "Open File Context Menu" + + Private _contextMenuFiles As String() + Private _basePath As String = "" + + Private Sub OpenFiles(ParamArray files() As String) + If files.Length = 0 Then Exit Sub + + _contextMenuFiles = files + OpenWithToolStripMenuItem.Text = "Open with " & Cfg.OpenCmdName + CmOpenFile.Show(Windows.Forms.Cursor.Position) + End Sub + + Private Sub OpenWithToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles OpenWithToolStripMenuItem.Click + If Not FileOpenAlt(_contextMenuFiles(0)) Then MsgBox("Failed to open file!") + End Sub + + Private Sub ShowInFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) _ + Handles ShowInFolderToolStripMenuItem.Click + If File.Exists(_contextMenuFiles(0)) Then + Try + Process.Start("explorer", "/select,""" & _contextMenuFiles(0) & "") + Catch ex As Exception + MsgBox("Failed to open file!") + End Try + Else + MsgBox("File not found!") + End If + End Sub + +#End Region + + + Private Sub LvCycles_MouseClick(sender As Object, e As MouseEventArgs) Handles LvCycles.MouseClick + If e.Button = MouseButtons.Right AndAlso LvCycles.SelectedItems.Count > 0 Then + OpenFiles(FileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VectoFile))) + End If + End Sub + + Private Sub LvAux_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvAux.SelectedIndexChanged + End Sub +End Class + + diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 06575c2357f8fea6438aa55ee1a64878a029b010..8add30eee942d8790109646ef7bebefb50fc231f 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -301,7 +301,7 @@ Public Class VectoJobForm If Not Trim(f) = "" Then Dim vehInput As IVehicleDeclarationInputData = CType(JSONInputDataFactory.ReadComponentData(FileRepl(TbVEH.Text, GetPath(VectoFile))), - IEngineeringInputDataProvider).VehicleInputData + IEngineeringInputDataProvider).JobInputData.Vehicle vehicleType = vehInput.VehicleCategory End If @@ -423,7 +423,7 @@ Public Class VectoJobForm 'Update Form If inputData.JobInputData().EngineOnlyMode Then - TbENG.Text = GetRelativePath(inputData.EngineInputData.Source, _basePath) + TbENG.Text = GetRelativePath(inputData.JobInputData.Vehicle.EngineInputData.Source, _basePath) CbEngOnly.Checked = True Try Dim sb As ICycleData @@ -440,9 +440,9 @@ Public Class VectoJobForm CbEngOnly.Checked = False CheckEngOnly() 'Files ----------------------------- - TbVEH.Text = GetRelativePath(inputData.VehicleInputData.Source, _basePath) - TbENG.Text = GetRelativePath(inputData.EngineInputData.Source, _basePath) - TbGBX.Text = GetRelativePath(inputData.GearboxInputData.Source, _basePath) + TbVEH.Text = GetRelativePath(inputData.JobInputData.Vehicle.Source, _basePath) + TbENG.Text = GetRelativePath(inputData.JobInputData.Vehicle.EngineInputData.Source, _basePath) + TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.GearboxInputData.Source, _basePath) 'Start/Stop Dim driver As IDriverEngineeringInputData = inputData.DriverInputData @@ -452,7 +452,7 @@ Public Class VectoJobForm 'AA-TB 'Try and Select any previously selected Auxiliary Type Dim declarationInput As IDeclarationInputDataProvider = CType(inputData, IDeclarationInputDataProvider) - Dim auxInput As IAuxiliariesDeclarationInputData = declarationInput.AuxiliaryInputData() + Dim auxInput As IAuxiliariesDeclarationInputData = declarationInput.JobInputData.Vehicle.AuxiliaryInputData() cboAdvancedAuxiliaries.SelectedIndex = 0 cboAdvancedAuxiliaries.Enabled = False @@ -472,7 +472,7 @@ Public Class VectoJobForm If(driver.AccelerationCurve Is Nothing, "", GetRelativePath(driver.AccelerationCurve.Source, _basePath)) cboAdvancedAuxiliaries.Enabled = True - Dim auxInput As IAuxiliariesEngineeringInputData = inputData.AuxiliaryInputData() + Dim auxInput As IAuxiliariesEngineeringInputData = inputData.JobInputData.Vehicle.AuxiliaryInputData() For Each item As AdvancedAuxiliary In cboAdvancedAuxiliaries.Items If _ AuxiliaryModelHelper.Parse(item.AssemblyName) = auxInput.AuxiliaryAssembly AndAlso @@ -1144,7 +1144,7 @@ lbDlog: Try Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(gearboxFile), IEngineeringInputDataProvider) - gearbox = inputData.GearboxInputData + gearbox = inputData.JobInputData.Vehicle.GearboxInputData Catch End Try End If @@ -1228,7 +1228,7 @@ lbDlog: Try Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(engineFile), IEngineeringInputDataProvider) - engine = inputData.EngineInputData + engine = inputData.JobInputData.Vehicle.EngineInputData Catch Return End Try @@ -1304,7 +1304,7 @@ lbDlog: Try Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(vehicleFile), IEngineeringInputDataProvider) - vehicle = inputData.VehicleInputData + vehicle = inputData.JobInputData.Vehicle Catch End Try End If diff --git a/VECTO/GUI/VehicleForm.vb b/VECTO/GUI/VehicleForm.vb index d33f796457485e8908ecd75bb540a91617cc65d5..bb1c333c168a6844606e54265e971311ec7ab580 100644 --- a/VECTO/GUI/VehicleForm.vb +++ b/VECTO/GUI/VehicleForm.vb @@ -338,11 +338,11 @@ Public Class VehicleForm Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadComponentData(file), IEngineeringInputDataProvider) - Dim vehicle As IVehicleEngineeringInputData = inputData.VehicleInputData - Dim airdrag As IAirdragEngineeringInputData = inputData.AirdragInputData - Dim retarder As IRetarderInputData = inputData.RetarderInputData - Dim angledrive As IAngledriveInputData = inputData.AngledriveInputData - Dim pto As IPTOTransmissionInputData = inputData.PTOTransmissionInputData + Dim vehicle As IVehicleEngineeringInputData = inputData.JobInputData.Vehicle + Dim airdrag As IAirdragEngineeringInputData = inputData.JobInputData.Vehicle.AirdragInputData + Dim retarder As IRetarderInputData = inputData.JobInputData.Vehicle.RetarderInputData + Dim angledrive As IAngledriveInputData = inputData.JobInputData.Vehicle.AngledriveInputData + Dim pto As IPTOTransmissionInputData = inputData.JobInputData.Vehicle.PTOTransmissionInputData If Cfg.DeclMode <> vehicle.SavedInDeclarationMode Then Select Case WrongMode() diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index e2b8f1ba39c5d71867055e137be4d48cd6049ad7..7e7114271978b843958bfd2eb2a92587d0222212 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -208,7 +208,7 @@ Public Class Gearbox Dim vehiclecategory As VehicleCategory Dim rdyn As Meter = 0.5.SI(Of Meter)() Try - vehiclecategory = inputData.VehicleInputData.VehicleCategory + vehiclecategory = inputData.JobInputData.Vehicle.VehicleCategory Catch ex As Exception vehiclecategory = vehiclecategory.RigidTruck End Try @@ -217,7 +217,7 @@ Public Class Gearbox Try - engine = doa.CreateEngineData(inputData.EngineInputData, Nothing, gearbox, New List(Of ITorqueLimitInputData)) + engine = doa.CreateEngineData(inputData.JobInputData.Vehicle.EngineInputData, Nothing, gearbox, New List(Of ITorqueLimitInputData)) Catch engine = GetDefaultEngine(gearbox.Gears) End Try @@ -227,7 +227,7 @@ Public Class Gearbox Else Dim doa As EngineeringDataAdapter = New EngineeringDataAdapter() Try - engine = doa.CreateEngineData(inputData.EngineInputData, gearbox, New List(Of ITorqueLimitInputData)) + engine = doa.CreateEngineData(inputData.JobInputData.Vehicle.EngineInputData, gearbox, New List(Of ITorqueLimitInputData)) Catch engine = GetDefaultEngine(gearbox.Gears) End Try diff --git a/VECTO/Input Files/VectoEPTPJob.vb b/VECTO/Input Files/VectoEPTPJob.vb new file mode 100644 index 0000000000000000000000000000000000000000..8611f5bfb483db7b04a1696ea1a6c6d4fc23c789 --- /dev/null +++ b/VECTO/Input Files/VectoEPTPJob.vb @@ -0,0 +1,157 @@ + +Imports System.Collections.Generic +Imports System.ComponentModel.DataAnnotations +Imports System.IO +Imports System.Linq +Imports System.Xml +Imports TUGraz.VECTO.Input_Files +Imports TUGraz.VectoCommon.Exceptions +Imports TUGraz.VectoCommon.InputData +Imports TUGraz.VectoCommon.Models +Imports TUGraz.VectoCommon.Utils +Imports TUGraz.VectoCore.InputData.FileIO.JSON +Imports TUGraz.VectoCore.InputData.FileIO.XML.Declaration +Imports TUGraz.VectoCore.InputData.Impl +Imports TUGraz.VectoCore.Models.Declaration +Imports TUGraz.VectoCore.Utils + +<CustomValidation(GetType(VectoEPTPJob), "ValidateJob")> +Public Class VectoEPTPJob + Implements IEPTPInputDataProvider, IEPTPJobInputData + + Private _sFilePath As String + Private _myPath As String + + Private ReadOnly _vehicleFile As SubPath + + Public ReadOnly CycleFiles As List(Of SubPath) + Public FanCoefficients As Double() + + + Public Sub New() + CycleFiles = New List(Of SubPath) + _vehicleFile = New SubPath + End Sub + + Public Property FilePath As String + Get + Return _sFilePath + End Get + Set(value As String) + _sFilePath = value + If _sFilePath = "" Then + _myPath = "" + Else + _myPath = Path.GetDirectoryName(_sFilePath) & "\" + End If + End Set + End Property + + + Public Property PathVeh(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _vehicleFile.OriginalPath + Else + Return _vehicleFile.FullPath + End If + End Get + Set(value As String) + _vehicleFile.Init(_myPath, value) + End Set + End Property + + + Public Function SaveFile() As Boolean + Dim validationResults As IList(Of ValidationResult) = + Validate(ExecutionMode.Declaration, Nothing, False) + + If validationResults.Count > 0 Then + Dim messages As IEnumerable(Of String) = + validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct())) + MsgBox("Invalid input." + Environment.NewLine + String.Join(Environment.NewLine, messages), MsgBoxStyle.OkOnly, + "Failed to save Vecto Job") + Return False + End If + + Try + Dim writer As JSONFileWriter = JSONFileWriter.Instance + writer.SaveJob(Me, _sFilePath) + Catch ex As Exception + MsgBox("Failed to save Job file: " + ex.Message) + Return False + End Try + Return True + End Function + + ' ReSharper disable once UnusedMember.Global -- used by Validation + Public Shared Function ValidateJob(vectoJob As VectoEPTPJob, validationContext As ValidationContext) As ValidationResult + Dim modeService As VectoValidationModeServiceContainer = + TryCast(validationContext.GetService(GetType(VectoValidationModeServiceContainer)), + VectoValidationModeServiceContainer) + Dim mode As ExecutionMode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode) + + Return ValidateVehicleJob(vectoJob, mode) + End Function + + Private Shared Function ValidateVehicleJob(vectoJob As VectoEPTPJob, mode As ExecutionMode) As ValidationResult + + ' TODO!! + + End Function + + Public ReadOnly Property Vehicle As IVehicleDeclarationInputData Implements IEPTPJobInputData.Vehicle + Get + If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_vehicleFile.FullPath).JobInputData.Vehicle + Return New XMLDeclarationInputDataProvider(_vehicleFile.FullPath, True).JobInputData.Vehicle + End Get + End Property + + Public ReadOnly Property Cycles As IList(Of ICycleData) Implements IEPTPJobInputData.Cycles + Get + Dim retVal As ICycleData() = New ICycleData(CycleFiles.Count - 1) {} + Dim i As Integer = 0 + For Each cycleFile As SubPath In CycleFiles + Dim cycleData As TableData + If (File.Exists(cycleFile.FullPath)) Then + cycleData = VectoCSVFile.Read(cycleFile.FullPath) + Else + Try + Dim resourceName As String = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + + cycleFile.OriginalPath + TUGraz.VectoCore.Configuration.Constants.FileExtensions.CycleFile + Dim cycleDataRes As Stream = RessourceHelper.ReadStream(resourceName) + cycleData = VectoCSVFile.ReadStream(cycleDataRes, source:=resourceName) + Catch ex As Exception + Throw New VectoException("Driving Cycle could not be read: " + cycleFile.OriginalPath) + End Try + End If + retVal(i) = New CycleInputData With { + .Name = Path.GetFileNameWithoutExtension(cycleFile.FullPath), + .CycleData = cycleData + } + i += 1 + Next + Return retVal + + End Get + End Property + + Public ReadOnly Property FanPowerCoefficents As IEnumerable(Of Double) Implements IEPTPJobInputData.FanPowerCoefficents + Get + Return FanCoefficients + End Get + End Property + + Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IEPTPJobInputData.SavedInDeclarationMode + Get + Return False + End Get + End Property + + Public ReadOnly Property JobInputData As IEPTPJobInputData Implements IEPTPInputDataProvider.JobInputData + Get + Return Me + End Get + End Property +End Class diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb index d4b167272a4e884ebfcfef60544aed470ee412bd..ed64feae2d54fa9c41ef727a3929487c5c4d2170 100644 --- a/VECTO/Input Files/VectoJob.vb +++ b/VECTO/Input Files/VectoJob.vb @@ -15,10 +15,8 @@ Imports System.Collections.Generic Imports System.ComponentModel.DataAnnotations Imports System.IO Imports System.Linq -Imports System.Runtime.Remoting.Messaging Imports System.Text Imports System.Xml.Linq -Imports Newtonsoft.Json.Linq Imports TUGraz.VECTO.Input_Files Imports TUGraz.VectoCommon.Exceptions Imports TUGraz.VectoCommon.InputData @@ -33,714 +31,587 @@ Imports TUGraz.VectoCore.Utils <CustomValidation(GetType(VectoJob), "ValidateJob")> Public Class VectoJob - Implements IEngineeringInputDataProvider, IDeclarationInputDataProvider, IEngineeringJobInputData, - IDeclarationJobInputData, IDriverEngineeringInputData, IDriverDeclarationInputData, IAuxiliariesEngineeringInputData, - IAuxiliariesDeclarationInputData + Implements IEngineeringInputDataProvider, IDeclarationInputDataProvider, IEngineeringJobInputData, + IDeclarationJobInputData, IDriverEngineeringInputData, IDriverDeclarationInputData, IAuxiliariesEngineeringInputData, + IAuxiliariesDeclarationInputData, IJSONVehicleComponents - 'AA-TB - 'STORES THE Type and version of the chosen or default Auxiliary Type ( Classic/Original or other ) - Public AuxiliaryAssembly As String - Public AuxiliaryVersion As String - Public AdvancedAuxiliaryFilePath As String + 'AA-TB + 'STORES THE Type and version of the chosen or default Auxiliary Type ( Classic/Original or other ) + Public AuxiliaryAssembly As String + Public AuxiliaryVersion As String + Public AdvancedAuxiliaryFilePath As String - Private _sFilePath As String - Private _myPath As String + Private _sFilePath As String + Private _myPath As String - 'Input parameters - Private ReadOnly _vehicleFile As SubPath - Private ReadOnly _engineFile As SubPath - Private ReadOnly _gearboxFile As SubPath + 'Input parameters + Private ReadOnly _vehicleFile As SubPath + Private ReadOnly _engineFile As SubPath + Private ReadOnly _gearboxFile As SubPath - Private _startStop As Boolean - Public StartStopDelay As Double + Private _startStop As Boolean + Public StartStopDelay As Double - Private ReadOnly _driverAccelerationFile As SubPath + Private ReadOnly _driverAccelerationFile As SubPath - Public ReadOnly AuxPaths As Dictionary(Of String, AuxEntry) - 'Alle Nebenverbraucher die in der Veh-Datei UND im Zyklus definiert sind + Public ReadOnly AuxPaths As Dictionary(Of String, AuxEntry) + 'Alle Nebenverbraucher die in der Veh-Datei UND im Zyklus definiert sind - Public ReadOnly CycleFiles As List(Of SubPath) + Public ReadOnly CycleFiles As List(Of SubPath) - Public EngineOnly As Boolean + Public EngineOnly As Boolean - Public VMin As Double - Public LookAheadOn As Boolean - Public OverSpeedOn As Boolean - Public OverSpeed As Double - Public UnderSpeed As Double - Public EcoRollOn As Boolean + Public VMin As Double + Public LookAheadOn As Boolean + Public OverSpeedOn As Boolean + Public OverSpeed As Double + Public UnderSpeed As Double + Public EcoRollOn As Boolean - Public LookAheadMinSpeed As Double + Public LookAheadMinSpeed As Double - Public Property StartStopMaxSpeed As Double + Public Property StartStopMaxSpeed As Double - Public Property StartStopTime As Double + Public Property StartStopTime As Double - 'Private _vehicleInputData As JSONComponentInputData - 'Private _engineInputData As JSONComponentInputData - 'Private _gearboxInputData As JSONComponentInputData + 'Private _vehicleInputData As JSONComponentInputData + 'Private _engineInputData As JSONComponentInputData + 'Private _gearboxInputData As JSONComponentInputData - Public Class AuxEntry - Public Type As AuxiliaryType - Public ReadOnly Path As SubPath - Public ReadOnly TechnologyList As List(Of String) + Public Class AuxEntry + Public Type As AuxiliaryType + Public ReadOnly Path As SubPath + Public ReadOnly TechnologyList As List(Of String) - Public Sub New() - Path = New SubPath - TechnologyList = New List(Of String)() - End Sub - End Class + Public Sub New() + Path = New SubPath + TechnologyList = New List(Of String)() + End Sub + End Class - Public Sub New() + Public Sub New() - _myPath = "" - _sFilePath = "" + _myPath = "" + _sFilePath = "" - _vehicleFile = New SubPath - _engineFile = New SubPath - _gearboxFile = New SubPath + _vehicleFile = New SubPath + _engineFile = New SubPath + _gearboxFile = New SubPath - _driverAccelerationFile = New SubPath + _driverAccelerationFile = New SubPath - AuxPaths = New Dictionary(Of String, AuxEntry) + AuxPaths = New Dictionary(Of String, AuxEntry) - CycleFiles = New List(Of SubPath) - End Sub + CycleFiles = New List(Of SubPath) + End Sub - Public Function SaveFile() As Boolean - Dim validationResults As IList(Of ValidationResult) = - Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), - If(GearboxInputData Is Nothing, GearboxType.MT, GearboxInputData.Type), False) + Public Function SaveFile() As Boolean + Dim validationResults As IList(Of ValidationResult) = + Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), + Nothing, False) - If validationResults.Count > 0 Then - Dim messages As IEnumerable(Of String) = - validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct())) - MsgBox("Invalid input." + Environment.NewLine + String.Join(Environment.NewLine, messages), MsgBoxStyle.OkOnly, - "Failed to save Vecto Job") - Return False - End If + If validationResults.Count > 0 Then + Dim messages As IEnumerable(Of String) = + validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct())) + MsgBox("Invalid input." + Environment.NewLine + String.Join(Environment.NewLine, messages), MsgBoxStyle.OkOnly, + "Failed to save Vecto Job") + Return False + End If - Try - Dim writer As JSONFileWriter = JSONFileWriter.Instance - writer.SaveJob(Me, _sFilePath) - Catch ex As Exception - MsgBox("Failed to save Job file: " + ex.Message) - Return False - End Try - Return True - End Function + Try + Dim writer As JSONFileWriter = JSONFileWriter.Instance + writer.SaveJob(Me, _sFilePath) + Catch ex As Exception + MsgBox("Failed to save Job file: " + ex.Message) + Return False + End Try + Return True + End Function - 'This Sub reads those Input-files that do not have their own class, etc. + 'This Sub reads those Input-files that do not have their own class, etc. #Region "Properties" - Public Property FilePath As String - Get - Return _sFilePath - End Get - Set(value As String) - _sFilePath = value - If _sFilePath = "" Then - _myPath = "" - Else - _myPath = Path.GetDirectoryName(_sFilePath) & "\" - End If - End Set - End Property - - - Public Property PathVeh(Optional ByVal original As Boolean = False) As String - Get - If original Then - Return _vehicleFile.OriginalPath - Else - Return _vehicleFile.FullPath - End If - End Get - Set(value As String) - _vehicleFile.Init(_myPath, value) - End Set - End Property - - Public Property PathEng(Optional ByVal original As Boolean = False) As String - Get - If original Then - Return _engineFile.OriginalPath - Else - Return _engineFile.FullPath - End If - End Get - Set(value As String) - _engineFile.Init(_myPath, value) - End Set - End Property - - Public Property PathGbx(Optional ByVal original As Boolean = False) As String - Get - If original Then - Return _gearboxFile.OriginalPath - Else - Return _gearboxFile.FullPath - End If - End Get - Set(value As String) - _gearboxFile.Init(_myPath, value) - End Set - End Property - - - Public ReadOnly Property IDriverDeclarationInputData_SavedInDeclarationMode As Boolean _ - Implements IDriverDeclarationInputData.SavedInDeclarationMode - Get - Return Cfg.DeclMode - End Get - End Property - - Public Property StartStop As Boolean - Get - Return _startStop - End Get - Set(value As Boolean) - _startStop = value - End Set - End Property - - Public ReadOnly Property IDriverEngineeringInputData_OverSpeedEcoRoll As IOverSpeedEcoRollEngineeringInputData _ - Implements IDriverEngineeringInputData.OverSpeedEcoRoll - Get - Dim mode As DriverMode = DriverMode.Off - If EcoRollOn Then - mode = DriverMode.EcoRoll - ElseIf OverSpeedOn Then - mode = DriverMode.Overspeed - End If - - Return New OverSpeedEcoRollInputData() With { - .Mode = mode, - .MinSpeed = VMin.KMPHtoMeterPerSecond(), - .OverSpeed = OverSpeed.KMPHtoMeterPerSecond(), - .UnderSpeed = UnderSpeed.KMPHtoMeterPerSecond() - } - End Get - End Property - - - Public ReadOnly Property OverSpeedEcoRoll As IOverSpeedEcoRollDeclarationInputData _ - Implements IDriverDeclarationInputData.OverSpeedEcoRoll - Get - Return IDriverEngineeringInputData_OverSpeedEcoRoll - End Get - End Property - - Public ReadOnly Property AccelerationCurve As TableData Implements IDriverEngineeringInputData.AccelerationCurve - Get - If String.IsNullOrWhiteSpace(_driverAccelerationFile.FullPath) Then Return Nothing - If Not File.Exists(_driverAccelerationFile.FullPath) Then - Try - Dim cycleDataRes As Stream = - RessourceHelper.ReadStream( - DeclarationData.DeclarationDataResourcePrefix + ".VACC." + _driverAccelerationFile.OriginalPath + - VectoCore.Configuration.Constants.FileExtensions.DriverAccelerationCurve) - Return _ - VectoCSVFile.ReadStream(cycleDataRes, - source:=DeclarationData.DeclarationDataResourcePrefix + ".VACC." + _driverAccelerationFile.OriginalPath + - VectoCore.Configuration.Constants.FileExtensions.DriverAccelerationCurve) - Catch ex As Exception - Return Nothing - End Try - End If - Return VectoCSVFile.Read(_driverAccelerationFile.FullPath) - End Get - End Property - - Public ReadOnly Property Lookahead As ILookaheadCoastingInputData Implements IDriverEngineeringInputData.Lookahead - Get - Dim lacTargetLookup As TableData = - If(File.Exists(LacDfTargetSpeedFile), VectoCSVFile.Read(LacDfTargetSpeedFile), Nothing) - Dim lacVdropLookup As TableData = - If(File.Exists(LacDfVelocityDropFile), VectoCSVFile.Read(LacDfVelocityDropFile), Nothing) - Return New LookAheadCoastingInputData With { - .Enabled = LookAheadOn, - .MinSpeed = LookAheadMinSpeed.KMPHtoMeterPerSecond(), - .CoastingDecisionFactorScaling = LacDfScale, - .CoastingDecisionFactorOffset = LacDfOffset, - .LookaheadDistanceFactor = LacPreviewFactor, - .CoastingDecisionFactorTargetSpeedLookup = lacTargetLookup, - .CoastingDecisionFactorVelocityDropLookup = lacVdropLookup - } - End Get - End Property - - - Public Property DesMaxFile(Optional ByVal original As Boolean = False) As String - Get - If original Then - Return _driverAccelerationFile.OriginalPath - Else - Return _driverAccelerationFile.FullPath - End If - End Get - Set(value As String) - _driverAccelerationFile.Init(_myPath, value) - End Set - End Property - - Public Property LacPreviewFactor As Double - Public Property LacDfOffset As Double - Public Property LacDfScale As Double - Public Property LacDfTargetSpeedFile As String - Public Property LacDfVelocityDropFile As String + Public Property FilePath As String + Get + Return _sFilePath + End Get + Set(value As String) + _sFilePath = value + If _sFilePath = "" Then + _myPath = "" + Else + _myPath = Path.GetDirectoryName(_sFilePath) & "\" + End If + End Set + End Property + + + Public Property PathVeh(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _vehicleFile.OriginalPath + Else + Return _vehicleFile.FullPath + End If + End Get + Set(value As String) + _vehicleFile.Init(_myPath, value) + End Set + End Property + + Public Property PathEng(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _engineFile.OriginalPath + Else + Return _engineFile.FullPath + End If + End Get + Set(value As String) + _engineFile.Init(_myPath, value) + End Set + End Property + + Public Property PathGbx(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _gearboxFile.OriginalPath + Else + Return _gearboxFile.FullPath + End If + End Get + Set(value As String) + _gearboxFile.Init(_myPath, value) + End Set + End Property + + + Public ReadOnly Property IDriverDeclarationInputData_SavedInDeclarationMode As Boolean _ + Implements IDriverDeclarationInputData.SavedInDeclarationMode + Get + Return Cfg.DeclMode + End Get + End Property + + 'Public Property StartStop As Boolean + ' Get + ' Return _startStop + ' End Get + ' Set(value As Boolean) + ' _startStop = value + ' End Set + 'End Property + + Public ReadOnly Property IDriverEngineeringInputData_OverSpeedEcoRoll As IOverSpeedEcoRollEngineeringInputData _ + Implements IDriverEngineeringInputData.OverSpeedEcoRoll + Get + Dim mode As DriverMode = DriverMode.Off + If EcoRollOn Then + mode = DriverMode.EcoRoll + ElseIf OverSpeedOn Then + mode = DriverMode.Overspeed + End If + + Return New OverSpeedEcoRollInputData() With { + .Mode = mode, + .MinSpeed = VMin.KMPHtoMeterPerSecond(), + .OverSpeed = OverSpeed.KMPHtoMeterPerSecond(), + .UnderSpeed = UnderSpeed.KMPHtoMeterPerSecond() + } + End Get + End Property + + + Public ReadOnly Property AccelerationCurve As TableData Implements IDriverEngineeringInputData.AccelerationCurve + Get + If String.IsNullOrWhiteSpace(_driverAccelerationFile.FullPath) Then Return Nothing + If Not File.Exists(_driverAccelerationFile.FullPath) Then + Try + Dim cycleDataRes As Stream = + RessourceHelper.ReadStream( + DeclarationData.DeclarationDataResourcePrefix + ".VACC." + _driverAccelerationFile.OriginalPath + + VectoCore.Configuration.Constants.FileExtensions.DriverAccelerationCurve) + Return _ + VectoCSVFile.ReadStream(cycleDataRes, + source:=DeclarationData.DeclarationDataResourcePrefix + ".VACC." + _driverAccelerationFile.OriginalPath + + VectoCore.Configuration.Constants.FileExtensions.DriverAccelerationCurve) + Catch ex As Exception + Return Nothing + End Try + End If + Return VectoCSVFile.Read(_driverAccelerationFile.FullPath) + End Get + End Property + + Public ReadOnly Property Lookahead As ILookaheadCoastingInputData Implements IDriverEngineeringInputData.Lookahead + Get + Dim lacTargetLookup As TableData = + If(File.Exists(LacDfTargetSpeedFile), VectoCSVFile.Read(LacDfTargetSpeedFile), Nothing) + Dim lacVdropLookup As TableData = + If(File.Exists(LacDfVelocityDropFile), VectoCSVFile.Read(LacDfVelocityDropFile), Nothing) + Return New LookAheadCoastingInputData With { + .Enabled = LookAheadOn, + .MinSpeed = LookAheadMinSpeed.KMPHtoMeterPerSecond(), + .CoastingDecisionFactorScaling = LacDfScale, + .CoastingDecisionFactorOffset = LacDfOffset, + .LookaheadDistanceFactor = LacPreviewFactor, + .CoastingDecisionFactorTargetSpeedLookup = lacTargetLookup, + .CoastingDecisionFactorVelocityDropLookup = lacVdropLookup + } + End Get + End Property + + + Public Property DesMaxFile(Optional ByVal original As Boolean = False) As String + Get + If original Then + Return _driverAccelerationFile.OriginalPath + Else + Return _driverAccelerationFile.FullPath + End If + End Get + Set(value As String) + _driverAccelerationFile.Init(_myPath, value) + End Set + End Property + + Public Property LacPreviewFactor As Double + Public Property LacDfOffset As Double + Public Property LacDfScale As Double + Public Property LacDfTargetSpeedFile As String + Public Property LacDfVelocityDropFile As String #End Region - ' ReSharper disable once UnusedMember.Global -- used by Validation - Public Shared Function ValidateJob(vectoJob As VectoJob, validationContext As ValidationContext) As ValidationResult - Dim modeService As VectoValidationModeServiceContainer = - TryCast(validationContext.GetService(GetType(VectoValidationModeServiceContainer)), - VectoValidationModeServiceContainer) - Dim mode As ExecutionMode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode) - - If mode = ExecutionMode.Engineering AndAlso vectoJob.EngineOnly Then - Return ValidateEngineOnlyJob(vectoJob, mode) - End If - - Return ValidateVehicleJob(vectoJob, mode) - End Function - - Private Shared Function ValidateEngineOnlyJob(vectoJob As VectoJob, executionMode As ExecutionMode) As ValidationResult - Dim result As IList(Of ValidationResult) = New List(Of ValidationResult) - - 'vectoJob._engineInputData = New JSONComponentInputData(vectoJob._engineFile.FullPath) - - If vectoJob.EngineInputData Is Nothing Then _ - result.Add(New ValidationResult("Engine File is missing or invalid")) - If result.Any() Then - Return _ - New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - - Return ValidationResult.Success - End Function - - Private Shared Function ValidateVehicleJob(vectoJob As VectoJob, mode As ExecutionMode) As ValidationResult - - Dim jobData As VectoRunData - - 'vectoJob._vehicleInputData = New JSONComponentInputData(vectoJob._vehicleFile.FullPath) - 'vectoJob._engineInputData = New JSONComponentInputData(vectoJob._engineFile.FullPath) - 'vectoJob._gearboxInputData = New JSONComponentInputData(vectoJob._gearboxFile.FullPath) - - - Dim result As IList(Of ValidationResult) = New List(Of ValidationResult) - - Dim vehicleInputData As IVehicleEngineeringInputData = vectoJob.VehicleInputData - Dim engineInputData As IEngineEngineeringInputData = vectoJob.EngineInputData - Dim gearboxInputData As IGearboxEngineeringInputData = vectoJob.GearboxInputData - - If vehicleInputData Is Nothing Then _ - result.Add(New ValidationResult("Vehicle File is missing or invalid")) - If engineInputData Is Nothing Then _ - result.Add(New ValidationResult("Engine File is missing or invalid")) - If gearboxInputData Is Nothing Then _ - result.Add(New ValidationResult("Gearbox File is missing or invalid")) - - If result.Any() Then - Return _ - New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - Try - If mode = ExecutionMode.Declaration Then - If Not vehicleInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Vehicle File is not in Declaration Mode")) - End If - If Not engineInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Engine File is not in Declaration Mode")) - End If - If Not gearboxInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Gearbox File is not in Declaration Mode")) - End If - If result.Any() Then - Return _ - New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - - Dim dataFactory As DeclarationModeVectoRunDataFactory = New DeclarationModeVectoRunDataFactory(vectoJob, Nothing) - - jobData = dataFactory.NextRun().First() - Else - If vehicleInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Vehicle File is not in Engineering Mode")) - End If - If engineInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Engine File is not in Engineering Mode")) - End If - If gearboxInputData.SavedInDeclarationMode Then - result.Add(New ValidationResult("Gearbox File is not in Engineering Mode")) - End If - If result.Any() Then - Return _ - New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - Dim dataFactory As EngineeringModeVectoRunDataFactory = New EngineeringModeVectoRunDataFactory(vectoJob) - jobData = dataFactory.NextRun().FirstOrDefault() - If jobData Is Nothing Then - Return New ValidationResult("No cycles selected in Vecto Job.", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - End If - - - result = jobData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), - jobData.GearboxData.Type, False) - If result.Any() Then - Return _ - New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) - End If - - - Return ValidationResult.Success - - Catch ex As Exception - Return New ValidationResult(ex.Message) - 'Finally - ' vectoJob._vehicleInputData = Nothing - ' vectoJob._engineInputData = Nothing - ' vectoJob._gearboxInputData = Nothing - End Try - End Function + ' ReSharper disable once UnusedMember.Global -- used by Validation + Public Shared Function ValidateJob(vectoJob As VectoJob, validationContext As ValidationContext) As ValidationResult + Dim modeService As VectoValidationModeServiceContainer = + TryCast(validationContext.GetService(GetType(VectoValidationModeServiceContainer)), + VectoValidationModeServiceContainer) + Dim mode As ExecutionMode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode) + + If mode = ExecutionMode.Engineering AndAlso vectoJob.EngineOnly Then + Return ValidateEngineOnlyJob(vectoJob, mode) + End If + + Return ValidateVehicleJob(vectoJob, mode) + End Function + + Private Shared Function ValidateEngineOnlyJob(vectoJob As VectoJob, executionMode As ExecutionMode) As ValidationResult + Dim result As IList(Of ValidationResult) = New List(Of ValidationResult) + + 'vectoJob._engineInputData = New JSONComponentInputData(vectoJob._engineFile.FullPath) + + If vectoJob.Vehicle.EngineInputData Is Nothing Then _ + result.Add(New ValidationResult("Engine File is missing or invalid")) + If result.Any() Then + Return _ + New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + + Return ValidationResult.Success + End Function + + Private Shared Function ValidateVehicleJob(vectoJob As VectoJob, mode As ExecutionMode) As ValidationResult + + Dim jobData As VectoRunData + + Dim result As IList(Of ValidationResult) = New List(Of ValidationResult) + + Dim vehicleInputData As IVehicleEngineeringInputData = vectoJob.JobInputData.Vehicle + Dim engineInputData As IEngineDeclarationInputData = vectoJob.JobInputData.Vehicle.EngineInputData + Dim gearboxInputData As IGearboxDeclarationInputData = vectoJob.Vehicle.GearboxInputData + + If vehicleInputData Is Nothing Then _ + result.Add(New ValidationResult("Vehicle File is missing or invalid")) + If engineInputData Is Nothing Then _ + result.Add(New ValidationResult("Engine File is missing or invalid")) + If gearboxInputData Is Nothing Then _ + result.Add(New ValidationResult("Gearbox File is missing or invalid")) + + If result.Any() Then + Return _ + New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + Try + If mode = ExecutionMode.Declaration Then + If Not vehicleInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Vehicle File is not in Declaration Mode")) + End If + If Not engineInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Engine File is not in Declaration Mode")) + End If + If Not gearboxInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Gearbox File is not in Declaration Mode")) + End If + If result.Any() Then + Return _ + New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + + Dim dataFactory As DeclarationModeVectoRunDataFactory = New DeclarationModeVectoRunDataFactory(vectoJob, Nothing) + + jobData = dataFactory.NextRun().First() + Else + If vehicleInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Vehicle File is not in Engineering Mode")) + End If + If engineInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Engine File is not in Engineering Mode")) + End If + If gearboxInputData.SavedInDeclarationMode Then + result.Add(New ValidationResult("Gearbox File is not in Engineering Mode")) + End If + If result.Any() Then + Return _ + New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + Dim dataFactory As EngineeringModeVectoRunDataFactory = New EngineeringModeVectoRunDataFactory(vectoJob) + jobData = dataFactory.NextRun().FirstOrDefault() + If jobData Is Nothing Then + Return New ValidationResult("No cycles selected in Vecto Job.", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + End If + + + result = jobData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), + jobData.GearboxData.Type, False) + If result.Any() Then + Return _ + New ValidationResult("Vecto Job Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList()) + End If + + + Return ValidationResult.Success + + Catch ex As Exception + Return New ValidationResult(ex.Message) + 'Finally + ' vectoJob._vehicleInputData = Nothing + ' vectoJob._engineInputData = Nothing + ' vectoJob._gearboxInputData = Nothing + End Try + End Function #Region "IInputData" - Public Function JobInputData() As IEngineeringJobInputData Implements IEngineeringInputDataProvider.JobInputData - Return Me - End Function - - Public ReadOnly Property IDeclarationInputDataProvider_VehicleInputData As IVehicleDeclarationInputData _ - Implements IDeclarationInputDataProvider.VehicleInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).VehicleInputData - End Get - End Property - - Public ReadOnly Property VehicleInputData As IVehicleEngineeringInputData _ - Implements IEngineeringInputDataProvider.VehicleInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).VehicleInputData - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_AirdragInputData As IAirdragDeclarationInputData _ - Implements IDeclarationInputDataProvider.AirdragInputData - Get - Return AirdragInputData - End Get - End Property - - Public ReadOnly Property AirdragInputData As IAirdragEngineeringInputData _ - Implements IEngineeringInputDataProvider.AirdragInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).AirdragInputData - End Get - End Property - - - Public Function IDeclarationInputDataProvider_JobInputData() As IDeclarationJobInputData _ - Implements IDeclarationInputDataProvider.JobInputData - Return Me - End Function - - - Public ReadOnly Property IDeclarationInputDataProvider_GearboxInputData As IGearboxDeclarationInputData _ - Implements IDeclarationInputDataProvider.GearboxInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).GearboxInputData - End Get - End Property - - Public ReadOnly Property GearboxInputData As IGearboxEngineeringInputData _ - Implements IEngineeringInputDataProvider.GearboxInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).GearboxInputData - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_TorqueConverterInputData As ITorqueConverterDeclarationInputData _ - Implements IDeclarationInputDataProvider.TorqueConverterInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).TorqueConverterInputData - End Get - End Property - - Public ReadOnly Property TorqueConverterInputData As ITorqueConverterEngineeringInputData _ - Implements IEngineeringInputDataProvider.TorqueConverterInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).TorqueConverterInputData - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_AxleGearInputData As IAxleGearInputData _ - Implements IDeclarationInputDataProvider.AxleGearInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).AxleGearInputData - End Get - End Property - - Public ReadOnly Property AxleGearInputData As IAxleGearInputData _ - Implements IEngineeringInputDataProvider.AxleGearInputData - Get - If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_gearboxFile.FullPath).AxleGearInputData - End Get - End Property - - Public ReadOnly Property DeclarationInputDataProviderAngledriveInputData As IAngledriveInputData _ - Implements IDeclarationInputDataProvider.AngledriveInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).AngledriveInputData - End Get - End Property - - Public ReadOnly Property AngledriveInputData As IAngledriveInputData _ - Implements IEngineeringInputDataProvider.AngledriveInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).AngledriveInputData - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_EngineInputData As IEngineDeclarationInputData _ - Implements IDeclarationInputDataProvider.EngineInputData - Get - If Not File.Exists(_engineFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_engineFile.FullPath).EngineInputData - End Get - End Property - - Public ReadOnly Property EngineInputData As IEngineEngineeringInputData _ - Implements IEngineeringInputDataProvider.EngineInputData - Get - If Not File.Exists(_engineFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_engineFile.FullPath).EngineInputData - End Get - End Property - - Public Function AuxiliaryInputData() As IAuxiliariesEngineeringInputData _ - Implements IEngineeringInputDataProvider.AuxiliaryInputData - - Return Me - End Function - - Public Function IDeclarationInputDataProvider_AuxiliaryInputData() As IAuxiliariesDeclarationInputData _ - Implements IDeclarationInputDataProvider.AuxiliaryInputData - - Return Me - End Function - - Public ReadOnly Property IDeclarationInputDataProvider_RetarderInputData As IRetarderInputData _ - Implements IDeclarationInputDataProvider.RetarderInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).RetarderInputData - End Get - End Property - - Public ReadOnly Property RetarderInputData As IRetarderInputData _ - Implements IEngineeringInputDataProvider.RetarderInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).RetarderInputData - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_DriverInputData As IDriverDeclarationInputData _ - Implements IDeclarationInputDataProvider.DriverInputData - Get - Return Me - End Get - End Property - - Public ReadOnly Property DriverInputData As IDriverEngineeringInputData _ - Implements IEngineeringInputDataProvider.DriverInputData - Get - Return Me - End Get - End Property - - Public ReadOnly Property IDeclarationInputDataProvider_PTOTransmissionInputData As IPTOTransmissionInputData _ - Implements IDeclarationInputDataProvider.PTOTransmissionInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).PTOTransmissionInputData - End Get - End Property - - Public ReadOnly Property PTOTransmissionInputData As IPTOTransmissionInputData _ - Implements IEngineeringInputDataProvider.PTOTransmissionInputData - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).PTOTransmissionInputData - End Get - End Property - - Public ReadOnly Property XMLHash As XElement Implements IDeclarationInputDataProvider.XMLHash - Get - Return Nothing - End Get - End Property - - - Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IDeclarationJobInputData.SavedInDeclarationMode - Get - Return Cfg.DeclMode - End Get - End Property - - - Public ReadOnly Property IEngineeringJobInputData_Vehicle As IVehicleEngineeringInputData _ - Implements IEngineeringJobInputData.Vehicle - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).VehicleInputData - End Get - End Property - - Public ReadOnly Property Vehicle As IVehicleDeclarationInputData Implements IDeclarationJobInputData.Vehicle - Get - If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing - Return New JSONComponentInputData(_vehicleFile.FullPath).VehicleInputData - End Get - End Property - - Public ReadOnly Property Cycles As IList(Of ICycleData) Implements IEngineeringJobInputData.Cycles - Get - Dim retVal As ICycleData() = New ICycleData(CycleFiles.Count - 1) {} - Dim i As Integer = 0 - For Each cycleFile As SubPath In CycleFiles - Dim cycleData As TableData - If (File.Exists(cycleFile.FullPath)) Then - cycleData = VectoCSVFile.Read(cycleFile.FullPath) - Else - Try - Dim resourceName As String = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + - cycleFile.OriginalPath + TUGraz.VectoCore.Configuration.Constants.FileExtensions.CycleFile - Dim cycleDataRes As Stream = RessourceHelper.ReadStream(resourceName) - cycleData = VectoCSVFile.ReadStream(cycleDataRes, source:=resourceName) - Catch ex As Exception - Throw New VectoException("Driving Cycle could not be read: " + cycleFile.OriginalPath) - End Try - End If - retVal(i) = New CycleInputData With { - .Name = Path.GetFileNameWithoutExtension(cycleFile.FullPath), - .CycleData = cycleData - } - i += 1 - Next - Return retVal - End Get - End Property - - Public ReadOnly Property EngineOnlyMode As Boolean Implements IEngineeringJobInputData.EngineOnlyMode - Get - Return EngineOnly - End Get - End Property - - Public ReadOnly Property JobName As String Implements IDeclarationJobInputData.JobName - Get - Return Path.GetFileNameWithoutExtension(FilePath) - End Get - End Property - - Public Property AuxPAdd As Double - - Public ReadOnly Property IAuxiliariesDeclarationInputData_SavedInDeclarationMode As Boolean _ - Implements IAuxiliariesDeclarationInputData.SavedInDeclarationMode - Get - Return Cfg.DeclMode - End Get - End Property - - Public ReadOnly Property Auxiliaries As IList(Of IAuxiliaryEngineeringInputData) _ - Implements IAuxiliariesEngineeringInputData.Auxiliaries - Get - Return AuxData().Cast(Of IAuxiliaryEngineeringInputData).ToList() - End Get - End Property - - Public ReadOnly Property IAuxiliariesEngineeringInputData_AdvancedAuxiliaryFilePath As String _ - Implements IAuxiliariesEngineeringInputData.AdvancedAuxiliaryFilePath - Get - Return AdvancedAuxiliaryFilePath - End Get - End Property - - Public ReadOnly Property IAuxiliariesEngineeringInputData_AuxiliaryVersion As String _ - Implements IAuxiliariesEngineeringInputData.AuxiliaryVersion - Get - Return AuxiliaryVersion - End Get - End Property - - Public ReadOnly Property IAuxiliariesEngineeringInputData_AuxiliaryAssembly As AuxiliaryModel _ - Implements IAuxiliariesEngineeringInputData.AuxiliaryAssembly - Get - Return AuxiliaryModelHelper.Parse(AuxiliaryAssembly) - End Get - End Property - - Public ReadOnly Property IAuxiliariesDeclarationInputData_Auxiliaries As IList(Of IAuxiliaryDeclarationInputData) _ - Implements IAuxiliariesDeclarationInputData.Auxiliaries - Get - Return AuxData().Cast(Of IAuxiliaryDeclarationInputData).ToList() - End Get - End Property - - Protected Function AuxData() As IList(Of AuxiliaryDataInputData) - Dim retVal As List(Of AuxiliaryDataInputData) = New List(Of AuxiliaryDataInputData) - - If AuxPAdd > 0 Then - retVal.Add(New AuxiliaryDataInputData() With { - .ID = "ConstantAux", - .AuxiliaryType = AuxiliaryDemandType.Constant, - .ConstantPowerDemand = AuxPAdd.SI(Of Watt)() - }) - End If - For Each auxEntry As KeyValuePair(Of String, AuxEntry) In AuxPaths - Dim theAuxData As AuxiliaryDataInputData = New AuxiliaryDataInputData() With { - .Type = auxEntry.Value.Type, - .Technology = auxEntry.Value.TechnologyList, - .ID = auxEntry.Key - } - retVal.Add(theAuxData) - If Not File.Exists(auxEntry.Value.Path.FullPath) Then Continue For - - Dim stream As StreamReader = New StreamReader(auxEntry.Value.Path.FullPath) - stream.ReadLine() ' skip header "Transmission ration to engine rpm [-]" - theAuxData.TransmissionRatio = stream.ReadLine().IndulgentParse() - stream.ReadLine() ' skip header "Efficiency to engine [-]" - theAuxData.EfficiencyToEngine = stream.ReadLine().IndulgentParse() - stream.ReadLine() ' skip header "Efficiency auxiliary to supply [-]" - theAuxData.EfficiencyToSupply = stream.ReadLine().IndulgentParse() - theAuxData.DemandMap = VectoCSVFile.ReadStream(New MemoryStream(Encoding.UTF8.GetBytes(stream.ReadToEnd())), - source:=auxEntry.Value.Path.FullPath) - Next - - Return retVal - End Function + Public ReadOnly Property JobInputData As IEngineeringJobInputData Implements IEngineeringInputDataProvider.JobInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property IDeclarationInputDataProvider_JobInputData As IDeclarationJobInputData _ + Implements IDeclarationInputDataProvider.JobInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property DriverInputData As IDriverEngineeringInputData _ + Implements IEngineeringInputDataProvider.DriverInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property XMLHash As XElement Implements IDeclarationInputDataProvider.XMLHash + Get + Return Nothing + End Get + End Property + + + Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IDeclarationJobInputData.SavedInDeclarationMode + Get + Return Cfg.DeclMode + End Get + End Property + + + Public ReadOnly Property IEngineeringJobInputData_Vehicle As IVehicleEngineeringInputData _ + Implements IEngineeringJobInputData.Vehicle + Get + If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing + Return New JSONComponentInputData(_vehicleFile.FullPath, Me).JobInputData.Vehicle + End Get + End Property + + Public ReadOnly Property Vehicle As IVehicleDeclarationInputData Implements IDeclarationJobInputData.Vehicle + Get + If Not File.Exists(_vehicleFile.FullPath) Then Return Nothing + Return New JSONComponentInputData(_vehicleFile.FullPath, Me).JobInputData.Vehicle + End Get + End Property + + Public ReadOnly Property Cycles As IList(Of ICycleData) Implements IEngineeringJobInputData.Cycles + Get + Dim retVal As ICycleData() = New ICycleData(CycleFiles.Count - 1) {} + Dim i As Integer = 0 + For Each cycleFile As SubPath In CycleFiles + Dim cycleData As TableData + If (File.Exists(cycleFile.FullPath)) Then + cycleData = VectoCSVFile.Read(cycleFile.FullPath) + Else + Try + Dim resourceName As String = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + + cycleFile.OriginalPath + TUGraz.VectoCore.Configuration.Constants.FileExtensions.CycleFile + Dim cycleDataRes As Stream = RessourceHelper.ReadStream(resourceName) + cycleData = VectoCSVFile.ReadStream(cycleDataRes, source:=resourceName) + Catch ex As Exception + Throw New VectoException("Driving Cycle could not be read: " + cycleFile.OriginalPath) + End Try + End If + retVal(i) = New CycleInputData With { + .Name = Path.GetFileNameWithoutExtension(cycleFile.FullPath), + .CycleData = cycleData + } + i += 1 + Next + Return retVal + End Get + End Property + + Public ReadOnly Property EngineOnlyMode As Boolean Implements IEngineeringJobInputData.EngineOnlyMode + Get + Return EngineOnly + End Get + End Property + + Public ReadOnly Property IEngineeringJobInputData_EngineOnly As IEngineEngineeringInputData Implements IEngineeringJobInputData.EngineOnly + Get + If Not File.Exists(_engineFile.FullPath) Then Return Nothing + Return New JSONComponentInputData(_engineFile.FullPath, Me).JobInputData.Vehicle.EngineInputData + End Get + End Property + + Public ReadOnly Property JobName As String Implements IDeclarationJobInputData.JobName + Get + Return Path.GetFileNameWithoutExtension(FilePath) + End Get + End Property + + Public Property AuxPAdd As Double + + Public ReadOnly Property IAuxiliariesDeclarationInputData_SavedInDeclarationMode As Boolean _ + Implements IAuxiliariesDeclarationInputData.SavedInDeclarationMode + Get + Return Cfg.DeclMode + End Get + End Property + + Public ReadOnly Property Auxiliaries As IList(Of IAuxiliaryEngineeringInputData) _ + Implements IAuxiliariesEngineeringInputData.Auxiliaries + Get + Return AuxData().Cast(Of IAuxiliaryEngineeringInputData).ToList() + End Get + End Property + + Public ReadOnly Property IAuxiliariesEngineeringInputData_AdvancedAuxiliaryFilePath As String _ + Implements IAuxiliariesEngineeringInputData.AdvancedAuxiliaryFilePath + Get + Return AdvancedAuxiliaryFilePath + End Get + End Property + + Public ReadOnly Property IAuxiliariesEngineeringInputData_AuxiliaryVersion As String _ + Implements IAuxiliariesEngineeringInputData.AuxiliaryVersion + Get + Return AuxiliaryVersion + End Get + End Property + + Public ReadOnly Property IAuxiliariesEngineeringInputData_AuxiliaryAssembly As AuxiliaryModel _ + Implements IAuxiliariesEngineeringInputData.AuxiliaryAssembly + Get + Return AuxiliaryModelHelper.Parse(AuxiliaryAssembly) + End Get + End Property + + Public ReadOnly Property IAuxiliariesDeclarationInputData_Auxiliaries As IList(Of IAuxiliaryDeclarationInputData) _ + Implements IAuxiliariesDeclarationInputData.Auxiliaries + Get + Return AuxData().Cast(Of IAuxiliaryDeclarationInputData).ToList() + End Get + End Property + + Protected Function AuxData() As IList(Of AuxiliaryDataInputData) + Dim retVal As List(Of AuxiliaryDataInputData) = New List(Of AuxiliaryDataInputData) + + If AuxPAdd > 0 Then + retVal.Add(New AuxiliaryDataInputData() With { + .ID = "ConstantAux", + .AuxiliaryType = AuxiliaryDemandType.Constant, + .ConstantPowerDemand = AuxPAdd.SI(Of Watt)() + }) + End If + For Each auxEntry As KeyValuePair(Of String, AuxEntry) In AuxPaths + Dim theAuxData As AuxiliaryDataInputData = New AuxiliaryDataInputData() With { + .Type = auxEntry.Value.Type, + .Technology = auxEntry.Value.TechnologyList, + .ID = auxEntry.Key + } + retVal.Add(theAuxData) + If Not File.Exists(auxEntry.Value.Path.FullPath) Then Continue For + + Dim stream As StreamReader = New StreamReader(auxEntry.Value.Path.FullPath) + stream.ReadLine() ' skip header "Transmission ration to engine rpm [-]" + theAuxData.TransmissionRatio = stream.ReadLine().IndulgentParse() + stream.ReadLine() ' skip header "Efficiency to engine [-]" + theAuxData.EfficiencyToEngine = stream.ReadLine().IndulgentParse() + stream.ReadLine() ' skip header "Efficiency auxiliary to supply [-]" + theAuxData.EfficiencyToSupply = stream.ReadLine().IndulgentParse() + theAuxData.DemandMap = VectoCSVFile.ReadStream(New MemoryStream(Encoding.UTF8.GetBytes(stream.ReadToEnd())), + source:=auxEntry.Value.Path.FullPath) + Next + + Return retVal + End Function #End Region + + Public ReadOnly Property Gearbox As IGearboxEngineeringInputData Implements IJSONVehicleComponents.Gearbox + Get + Return New JSONComponentInputData(_gearboxFile.FullPath, Me).JobInputData.Vehicle.GearboxInputData + End Get + End Property + + Public ReadOnly Property TorqueConverter As ITorqueConverterEngineeringInputData Implements IJSONVehicleComponents.TorqueConverter + Get + Return New JSONComponentInputData(_gearboxFile.FullPath, Me).JobInputData.Vehicle.TorqueConverterInputData + End Get + + End Property + + Public ReadOnly Property AxleGear As IAxleGearInputData Implements IJSONVehicleComponents.AxleGear + Get + Return New JSONComponentInputData(_gearboxFile.FullPath, Me).JobInputData.Vehicle.AxleGearInputData + End Get + + End Property + + Public ReadOnly Property Engine As IEngineEngineeringInputData Implements IJSONVehicleComponents.Engine + Get + Return New JSONComponentInputData(_engineFile.FullPath, Me).JobInputData.Vehicle.EngineInputData + End Get + End Property + + Public ReadOnly Property DeclarationAuxiliaries As IAuxiliariesDeclarationInputData Implements IJSONVehicleComponents.DeclarationAuxiliaries + Get + Return Me + End Get + End Property + + Public ReadOnly Property EngineeringAuxiliaries As IAuxiliariesEngineeringInputData Implements IJSONVehicleComponents.EngineeringAuxiliaries + Get + Return Me + End Get + End Property End Class diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb index 73ef0e472c2a6e8c5b322f6724120718ea336579..73b06f1558974ca94c525f64bc13f230d374084d 100644 --- a/VECTO/Input Files/Vehicle.vb +++ b/VECTO/Input Files/Vehicle.vb @@ -18,6 +18,7 @@ Imports TUGraz.VECTO.Input_Files Imports TUGraz.VectoCommon.InputData Imports TUGraz.VectoCommon.Models Imports TUGraz.VectoCommon.Utils +Imports TUGraz.VectoCore.InputData.FileIO.JSON Imports TUGraz.VectoCore.InputData.Impl Imports TUGraz.VectoCore.InputData.Reader.DataObjectAdapter Imports TUGraz.VectoCore.Models.Declaration @@ -495,4 +496,153 @@ Public Class Vehicle Return VectoCSVFile.Read(PtoLossMap.FullPath) End Get End Property -End Class \ No newline at end of file + + + Public ReadOnly Property IDeclarationInputDataProvider_AirdragInputData As IAirdragDeclarationInputData _ + Implements IVehicleDeclarationInputData.AirdragInputData + Get + Return AirdragInputData + End Get + End Property + + Public ReadOnly Property AirdragInputData As IAirdragEngineeringInputData _ + Implements IVehicleEngineeringInputData.AirdragInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property IDeclarationInputDataProvider_GearboxInputData As IGearboxDeclarationInputData _ + Implements IVehicleDeclarationInputData.GearboxInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.GearboxInputData + End Get + End Property + + Public ReadOnly Property GearboxInputData As IGearboxEngineeringInputData _ + Implements IVehicleEngineeringInputData.GearboxInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.GearboxInputData + End Get + End Property + + Public ReadOnly Property IDeclarationInputDataProvider_TorqueConverterInputData As ITorqueConverterDeclarationInputData _ + Implements IVehicleDeclarationInputData.TorqueConverterInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.TorqueConverterInputData + End Get + End Property + + Public ReadOnly Property TorqueConverterInputData As ITorqueConverterEngineeringInputData _ + Implements IVehicleEngineeringInputData.TorqueConverterInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.TorqueConverterInputData + End Get + End Property + + Public ReadOnly Property IDeclarationInputDataProvider_AxleGearInputData As IAxleGearInputData _ + Implements IVehicleDeclarationInputData.AxleGearInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.AxleGearInputData + End Get + End Property + + Public ReadOnly Property AxleGearInputData As IAxleGearInputData _ + Implements IVehicleEngineeringInputData.AxleGearInputData + Get + Return Nothing + 'If Not File.Exists(_gearboxFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_gearboxFile.FullPath).JobInputData.Vehicle.AxleGearInputData + End Get + End Property + + Public ReadOnly Property DeclarationInputDataProviderAngledriveInputData As IAngledriveInputData _ + Implements IVehicleDeclarationInputData.AngledriveInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property AngledriveInputData As IAngledriveInputData _ + Implements IVehicleEngineeringInputData.AngledriveInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property IDeclarationInputDataProvider_EngineInputData As IEngineDeclarationInputData _ + Implements IVehicleDeclarationInputData.EngineInputData + Get + Return Nothing + 'If Not File.Exists(_engineFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_engineFile.FullPath).JobInputData.Vehicle.EngineInputData + End Get + End Property + + Public ReadOnly Property EngineInputData As IEngineEngineeringInputData _ + Implements IVehicleEngineeringInputData.EngineInputData + Get + Return Nothing + 'If Not File.Exists(_engineFile.FullPath) Then Return Nothing + 'Return New JSONComponentInputData(_engineFile.FullPath).JobInputData.Vehicle.EngineInputData + End Get + End Property + + Public Function AuxiliaryInputData() As IAuxiliariesEngineeringInputData _ + Implements IVehicleEngineeringInputData.AuxiliaryInputData + + Return Nothing + End Function + + Public Function IDeclarationInputDataProvider_AuxiliaryInputData() As IAuxiliariesDeclarationInputData _ + Implements IVehicleDeclarationInputData.AuxiliaryInputData + + Return Nothing + End Function + + Public ReadOnly Property IDeclarationInputDataProvider_RetarderInputData As IRetarderInputData _ + Implements IVehicleDeclarationInputData.RetarderInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property RetarderInputData As IRetarderInputData _ + Implements IVehicleEngineeringInputData.RetarderInputData + Get + Return Me + End Get + End Property + + + 'Public ReadOnly Property DriverInputData As IDriverEngineeringInputData _ + ' Implements IEngineeringInputDataProvider.DriverInputData + ' Get + ' Return Nothing + ' End Get + 'End Property + + Public ReadOnly Property IDeclarationInputDataProvider_PTOTransmissionInputData As IPTOTransmissionInputData _ + Implements IVehicleDeclarationInputData.PTOTransmissionInputData + Get + Return Me + End Get + End Property + + Public ReadOnly Property PTOTransmissionInputData As IPTOTransmissionInputData _ + Implements IVehicleEngineeringInputData.PTOTransmissionInputData + Get + Return Me + End Get + End Property +End Class diff --git a/VECTO/My Project/Resources.Designer.vb b/VECTO/My Project/Resources.Designer.vb index ed250025c5c6fc3fdc7d2ba8e8ee72d9d61c044b..b9c25834d4dcd1a61463268983ab34ef475bfc3c 100644 --- a/VECTO/My Project/Resources.Designer.vb +++ b/VECTO/My Project/Resources.Designer.vb @@ -1,547 +1,553 @@ '------------------------------------------------------------------------------ ' <auto-generated> -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 ' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On -Imports System.CodeDom.Compiler -Imports System.ComponentModel -Imports System.Globalization -Imports System.Resources -Imports System.Runtime.CompilerServices +Imports System Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - '''<summary> - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - '''</summary> - <GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ - DebuggerNonUserCode(), _ - CompilerGenerated(), _ - HideModuleName()> _ - Friend Module Resources - - Private resourceMan As ResourceManager - - Private resourceCulture As CultureInfo - - '''<summary> - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - '''</summary> - <EditorBrowsable(EditorBrowsableState.Advanced)> _ - Friend ReadOnly Property ResourceManager() As ResourceManager - Get - If ReferenceEquals(resourceMan, Nothing) Then - Dim temp As ResourceManager = New ResourceManager("TUGraz.VECTO.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - '''<summary> - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - '''</summary> - <EditorBrowsable(EditorBrowsableState.Advanced)> _ - Friend Property Culture() As CultureInfo - Get - Return resourceCulture - End Get - Set(value As CultureInfo) - resourceCulture = value - End Set - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _4x2r() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_4x2r", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _4x2rt() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_4x2rt", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _4x2tt() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_4x2tt", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _6x2r() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_6x2r", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _6x2rt() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_6x2rt", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property _6x2tt() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("_6x2tt", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Actions_arrow_down_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Actions_arrow_down_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Actions_arrow_up_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Actions_arrow_up_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Actions_document_save_as_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Actions_document_save_as_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Actions_document_save_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Actions_document_save_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property application_add_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("application_add_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property application_export_icon_small() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("application_export_icon_small", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property blue_document_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("blue_document_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property desktop() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("desktop", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property export_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("export_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property F_ENG() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("F_ENG", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property F_GBX() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("F_GBX", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property F_Graph() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("F_Graph", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property F_VECTO() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("F_VECTO", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property F_VEH() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("F_VEH", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property favorites() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("favorites", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property file_history() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("file_history", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Help_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Help_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). - '''</summary> - Friend ReadOnly Property Icon2() As Icon - Get - Dim obj As Object = ResourceManager.GetObject("Icon2", resourceCulture) - Return CType(obj, Icon) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Information_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Information_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property IVT_91x44() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("IVT_91x44", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property IVT_About() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("IVT_About", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property JRC_About() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("JRC_About", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property minus_circle_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("minus_circle_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Misc_Tools_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Misc_Tools_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property new_dir() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("new_dir", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Open_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Open_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Play_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Play_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Play_icon_gray() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Play_icon_gray", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property plus_circle_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("plus_circle_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Refresh_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Refresh_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Status_dialog_password_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Status_dialog_password_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Stop_icon() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Stop_icon", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property TUG_91x34() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("TUG_91x34", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property TUG_About() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("TUG_About", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property Undef() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("Undef", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property up_directory() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("up_directory", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_About() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_About", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_ENG() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_ENG", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_GBX() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_GBX", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_Mainform() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_Mainform", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_VECTO() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_VECTO", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - - '''<summary> - ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. - '''</summary> - Friend ReadOnly Property VECTO_VEH() As Bitmap - Get - Dim obj As Object = ResourceManager.GetObject("VECTO_VEH", resourceCulture) - Return CType(obj, Bitmap) - End Get - End Property - End Module + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + '''<summary> + ''' A strongly-typed resource class, for looking up localized strings, etc. + '''</summary> + <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ + Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ + Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ + Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + '''<summary> + ''' Returns the cached ResourceManager instance used by this class. + '''</summary> + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("TUGraz.VECTO.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + '''<summary> + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + '''</summary> + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _4x2r() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_4x2r", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _4x2rt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_4x2rt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _4x2tt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_4x2tt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _6x2r() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_6x2r", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _6x2rt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_6x2rt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property _6x2tt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_6x2tt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Actions_arrow_down_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Actions_arrow_down_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Actions_arrow_up_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Actions_arrow_up_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Actions_document_save_as_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Actions_document_save_as_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Actions_document_save_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Actions_document_save_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property application_add_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("application_add_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property application_export_icon_small() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("application_export_icon_small", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property blue_document_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("blue_document_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property desktop() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("desktop", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property export_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("export_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property F_ENG() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("F_ENG", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property F_GBX() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("F_GBX", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property F_Graph() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("F_Graph", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property F_VECTO() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("F_VECTO", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property F_VEH() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("F_VEH", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property favorites() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("favorites", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property file_history() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("file_history", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Help_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Help_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + '''</summary> + Friend ReadOnly Property Icon2() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("Icon2", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Information_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Information_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property IVT_91x44() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("IVT_91x44", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property IVT_About() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("IVT_About", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property JRC_About() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("JRC_About", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property minus_circle_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("minus_circle_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Misc_Tools_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Misc_Tools_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property new_dir() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("new_dir", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Open_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Open_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property P_fan_eqn() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("P_fan_eqn", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Play_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Play_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Play_icon_gray() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Play_icon_gray", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property plus_circle_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("plus_circle_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Refresh_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Refresh_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Status_dialog_password_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Status_dialog_password_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Stop_icon() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Stop_icon", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property TUG_91x34() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("TUG_91x34", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property TUG_About() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("TUG_About", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property Undef() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Undef", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property up_directory() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("up_directory", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_About() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_About", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_ENG() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_ENG", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_GBX() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_GBX", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_Mainform() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_Mainform", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_VECTO() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_VECTO", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + '''<summary> + ''' Looks up a localized resource of type System.Drawing.Bitmap. + '''</summary> + Friend ReadOnly Property VECTO_VEH() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("VECTO_VEH", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + End Module End Namespace diff --git a/VECTO/My Project/Resources.resx b/VECTO/My Project/Resources.resx index 7338ebea8417c443ad6dd80922ce9e3a04cee2fd..08268b9e00b457688c1339d6b2886f62cc755004 100644 --- a/VECTO/My Project/Resources.resx +++ b/VECTO/My Project/Resources.resx @@ -262,4 +262,7 @@ <data name="_6x2tt" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\6x2tt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="P_fan_eqn" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\P_fan_eqn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ No newline at end of file diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb index 2f2bb936839f8c0f89014491a3f85b85d2d8e668..9d4c18ab8c25c20fbccecc5c2f7c7b1e3c2d72ce 100644 --- a/VECTO/OutputData/JSONFileWriter.vb +++ b/VECTO/OutputData/JSONFileWriter.vb @@ -18,7 +18,7 @@ Public Class JSONFileWriter Public Const VehicleFormatVersion As Integer = 7 - Private Const VectoJobFormatVersion As Integer = 3 + Private Const VectoJobFormatVersion As Integer = 4 Private Shared _instance As JSONFileWriter @@ -254,7 +254,7 @@ Public Class JSONFileWriter 'SavedInDeclMode = Cfg.DeclMode Dim job As IEngineeringJobInputData = input.JobInputData() - Dim aux As IAuxiliariesEngineeringInputData = input.AuxiliaryInputData() + Dim aux As IAuxiliariesEngineeringInputData = input.JobInputData.Vehicle.AuxiliaryInputData() Dim driver As IDriverEngineeringInputData = input.DriverInputData body.Add("SavedInDeclMode", job.SavedInDeclarationMode) @@ -262,7 +262,7 @@ Public Class JSONFileWriter body.Add("EngineOnlyMode", job.EngineOnlyMode) If job.EngineOnlyMode Then - body.Add("EngineFile", GetRelativePath(input.EngineInputData.Source, basePath)) + body.Add("EngineFile", GetRelativePath(input.JobInputData.Vehicle.EngineInputData.Source, basePath)) body.Add("Cycles", job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) WriteFile(header, body, filename) @@ -271,8 +271,8 @@ Public Class JSONFileWriter 'Main Files body.Add("VehicleFile", GetRelativePath(job.Vehicle.Source, basePath)) - body.Add("EngineFile", GetRelativePath(input.EngineInputData.Source, basePath)) - body.Add("GearboxFile", GetRelativePath(input.GearboxInputData.Source, basePath)) + body.Add("EngineFile", GetRelativePath(input.JobInputData.Vehicle.EngineInputData.Source, basePath)) + body.Add("GearboxFile", GetRelativePath(input.JobInputData.Vehicle.GearboxInputData.Source, basePath)) 'AA-TB 'ADVANCED AUXILIARIES @@ -353,6 +353,23 @@ Public Class JSONFileWriter WriteFile(header, body, filename) End Sub + Public Sub SaveJob(input As IEPTPInputDataProvider, filename As String) Implements IOutputFileWriter.SaveJob + Dim basePath As String = Path.GetDirectoryName(filename) + 'Header + Dim header As Dictionary(Of String, Object) = GetHeader(VectoJobFormatVersion) + + 'Body + Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object) + Dim job As IEPTPJobInputData = input.JobInputData + body.Add("SavedInDeclMode", False) + body.Add("DeclarationVehicle", GetRelativePath(job.Vehicle.Source, Path.GetDirectoryName(filename))) + body.Add("FanPowerCoefficients", job.FanPowerCoefficents) + body.Add("Cycles", + job.Cycles.Select(Function(x) GetRelativePath(x.CycleData.Source, Path.GetDirectoryName(filename))).ToArray()) + + WriteFile(header, body, filename) + End Sub + Public Sub ExportJob(input As IEngineeringInputDataProvider, filename As String, separateFiles As Boolean) _ Implements IOutputFileWriter.ExportJob Throw New NotImplementedException @@ -390,4 +407,4 @@ Public Class JSONFileWriter path As String) WriteFile(JToken.FromObject(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}}), path) End Sub -End Class \ No newline at end of file +End Class diff --git a/VECTO/Resources/P_fan_eqn.png b/VECTO/Resources/P_fan_eqn.png new file mode 100644 index 0000000000000000000000000000000000000000..25ccb5e969f5254a29338a6ced69429aaf8cfc33 Binary files /dev/null and b/VECTO/Resources/P_fan_eqn.png differ diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index 1eb8d624686c6a045252554217ddb783bbc5528d..c549ca0e9ceac7e2e1062a004d48e411d44818c8 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -187,6 +187,12 @@ </ItemGroup> <ItemGroup> <Compile Include="ApplicationEvents.vb" /> + <Compile Include="GUI\VectoEPTPJobForm.Designer.vb"> + <DependentUpon>VectoEPTPJobForm.vb</DependentUpon> + </Compile> + <Compile Include="GUI\VectoEPTPJobForm.vb"> + <SubType>Form</SubType> + </Compile> <Compile Include="Input Files\BrowserUtils.vb" /> <Compile Include="GUI\VehicleTorqueLimitsDialog.Designer.vb"> <DependentUpon>VehicleTorqueLimitsDialog.vb</DependentUpon> @@ -272,6 +278,7 @@ <Compile Include="File Browser\FileBrowserFavoritesDialog.vb"> <SubType>Form</SubType> </Compile> + <Compile Include="Input Files\VectoEPTPJob.vb" /> <Compile Include="Input Files\VectoJob.vb" /> <Compile Include="Input Files\Vehicle.vb" /> <Compile Include="GUI\GearboxGearDialog.Designer.vb"> @@ -351,6 +358,10 @@ <EmbeddedResource Include="GUI\JiraDialog.resx"> <DependentUpon>JiraDialog.vb</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="GUI\VectoEPTPJobForm.resx"> + <DependentUpon>VectoEPTPJobForm.vb</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="GUI\VehicleTorqueLimitsDialog.resx"> <DependentUpon>VehicleTorqueLimitsDialog.vb</DependentUpon> </EmbeddedResource> @@ -529,6 +540,9 @@ <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" /> <Content Include="Resources\up.ico" /> @@ -536,7 +550,6 @@ </ItemGroup> <ItemGroup /> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> - <PropertyGroup> <PostBuildEvent> </PostBuildEvent> diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index 75060d28e6ee1a754cd0940625c1e97951e67dd2..e14e0b86806779bd7a4d75d020efdee436e9b22e 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -113,6 +113,24 @@ namespace TUGraz.VectoCommon.InputData string ManufacturerAddress { get; } PerSecond EngineIdleSpeed { get; } + + IAirdragDeclarationInputData AirdragInputData { get; } + + IGearboxDeclarationInputData GearboxInputData { get; } + + ITorqueConverterDeclarationInputData TorqueConverterInputData { get; } + + IAxleGearInputData AxleGearInputData { get; } + + IAngledriveInputData AngledriveInputData { get; } + + IEngineDeclarationInputData EngineInputData { get; } + + IAuxiliariesDeclarationInputData AuxiliaryInputData(); + + IRetarderInputData RetarderInputData { get; } + + IPTOTransmissionInputData PTOTransmissionInputData { get; } } public interface IAirdragDeclarationInputData : IComponentInputData @@ -243,11 +261,6 @@ namespace TUGraz.VectoCommon.InputData /// </summary> double Efficiency { get; } - ///// <summary> - ///// P145 - ///// cf. VECTO Input Parameters.xlsx - ///// </summary> - //DataTable FullLoadCurve { get; } // deprecated /// <summary> /// P157 @@ -262,12 +275,6 @@ namespace TUGraz.VectoCommon.InputData /// cf. VECTO Input Parameters.xlsx /// </summary> TableData ShiftPolygon { get; } - - ///// <summary> - ///// P077 - ///// cf. VECTO Input Parameters.xlsx - ///// </summary> - //bool HasTorqueConverter { get; } // DEPRECATED } public interface IAxleGearInputData : IComponentInputData @@ -391,8 +398,6 @@ namespace TUGraz.VectoCommon.InputData public interface IDriverDeclarationInputData { bool SavedInDeclarationMode { get; } - - IOverSpeedEcoRollDeclarationInputData OverSpeedEcoRoll { get; } } public interface IOverSpeedEcoRollDeclarationInputData @@ -425,4 +430,4 @@ namespace TUGraz.VectoCommon.InputData NewtonMeter MaxTorque { get; } } -} \ No newline at end of file +} diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index 376f432fccd70852f32bbb5c988c9ac8d4000e19..40e0a9ebdac137b0bd276419a3e423c3e7f6f2a5 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -50,6 +50,8 @@ namespace TUGraz.VectoCommon.InputData /// cf. VECTO Input Parameters.xlsx /// </summary> bool EngineOnlyMode { get; } + + IEngineEngineeringInputData EngineOnly { get; } } public interface IVehicleEngineeringInputData : IVehicleDeclarationInputData @@ -80,6 +82,25 @@ namespace TUGraz.VectoCommon.InputData Meter DynamicTyreRadius { get; } Meter Height { get; } + + + new IAirdragEngineeringInputData AirdragInputData { get; } + + new IGearboxEngineeringInputData GearboxInputData { get; } + + new ITorqueConverterEngineeringInputData TorqueConverterInputData { get; } + + new IAxleGearInputData AxleGearInputData { get; } + + new IAngledriveInputData AngledriveInputData { get; } + + new IEngineEngineeringInputData EngineInputData { get; } + + new IAuxiliariesEngineeringInputData AuxiliaryInputData(); + + new IRetarderInputData RetarderInputData { get; } + + new IPTOTransmissionInputData PTOTransmissionInputData { get; } } public interface IAirdragEngineeringInputData : IAirdragDeclarationInputData @@ -367,4 +388,4 @@ namespace TUGraz.VectoCommon.InputData /// </summary> Watt ConstantPowerDemand { get; } } -} \ No newline at end of file +} diff --git a/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs b/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs index 836135d05d95e69cacff2f26dde7ec2169d3743a..54c88176291d34798b43d75c45749cec2c630ee7 100644 --- a/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs +++ b/VectoCommon/VectoCommon/InputData/IInputDataProvider.cs @@ -29,6 +29,7 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.Collections.Generic; using System.Xml.Linq; namespace TUGraz.VectoCommon.InputData @@ -37,57 +38,30 @@ namespace TUGraz.VectoCommon.InputData public interface IDeclarationInputDataProvider : IInputDataProvider { - IDeclarationJobInputData JobInputData(); - - IVehicleDeclarationInputData VehicleInputData { get; } - - IAirdragDeclarationInputData AirdragInputData { get; } - - IGearboxDeclarationInputData GearboxInputData { get; } - - ITorqueConverterDeclarationInputData TorqueConverterInputData { get; } - - IAxleGearInputData AxleGearInputData { get; } - - IAngledriveInputData AngledriveInputData { get; } - - IEngineDeclarationInputData EngineInputData { get; } - - IAuxiliariesDeclarationInputData AuxiliaryInputData(); - - IRetarderInputData RetarderInputData { get; } - - IDriverDeclarationInputData DriverInputData { get; } - - IPTOTransmissionInputData PTOTransmissionInputData { get; } + IDeclarationJobInputData JobInputData { get; } XElement XMLHash { get; } } public interface IEngineeringInputDataProvider : IInputDataProvider { - IEngineeringJobInputData JobInputData(); - - IVehicleEngineeringInputData VehicleInputData { get; } + IEngineeringJobInputData JobInputData { get; } - IAirdragEngineeringInputData AirdragInputData { get; } - - IGearboxEngineeringInputData GearboxInputData { get; } - - ITorqueConverterEngineeringInputData TorqueConverterInputData { get; } - - IAxleGearInputData AxleGearInputData { get; } - - IAngledriveInputData AngledriveInputData { get; } - - IEngineEngineeringInputData EngineInputData { get; } + IDriverEngineeringInputData DriverInputData { get; } + } - IAuxiliariesEngineeringInputData AuxiliaryInputData(); + public interface IEPTPInputDataProvider : IInputDataProvider + { + IEPTPJobInputData JobInputData { get; } + } - IRetarderInputData RetarderInputData { get; } + public interface IEPTPJobInputData + { + IVehicleDeclarationInputData Vehicle { get; } - IDriverEngineeringInputData DriverInputData { get; } + IList<ICycleData> Cycles { get; } - IPTOTransmissionInputData PTOTransmissionInputData { get; } - } -} \ No newline at end of file + IEnumerable<double> FanPowerCoefficents { get; } + bool SavedInDeclarationMode { get; } + } +} diff --git a/VectoCommon/VectoCommon/Models/ExecutionMode.cs b/VectoCommon/VectoCommon/Models/ExecutionMode.cs index 641b41989f62ace66101556079732fe5371d9334..d627105885646857191649977e7296b5d3d91aed 100644 --- a/VectoCommon/VectoCommon/Models/ExecutionMode.cs +++ b/VectoCommon/VectoCommon/Models/ExecutionMode.cs @@ -35,5 +35,6 @@ namespace TUGraz.VectoCommon.Models { Engineering, Declaration, +// ExPostTest, } -} \ No newline at end of file +} diff --git a/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs b/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs index 12395cafa9481f5a98aade38416e9605b1a44514..3787810749d4b540b853fb6dbe12858d1b500df4 100644 --- a/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs +++ b/VectoCommon/VectoCommon/OutputData/IOutputFileWriter.cs @@ -29,22 +29,24 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using TUGraz.VectoCommon.InputData; - -namespace TUGraz.VectoCommon.OutputData -{ - public interface IOutputFileWriter - { - void SaveEngine(IEngineEngineeringInputData eng, string filename); - - void SaveGearbox(IGearboxEngineeringInputData gbx, IAxleGearInputData axl, string filename); - - void SaveVehicle(IVehicleEngineeringInputData vehicle, IAirdragEngineeringInputData airdrag, - IRetarderInputData retarder, - IPTOTransmissionInputData pto, IAngledriveInputData angledrive, string filename); - - void SaveJob(IEngineeringInputDataProvider input, string filename); - - void ExportJob(IEngineeringInputDataProvider input, string filename, bool separateFiles); - } -} \ No newline at end of file +using TUGraz.VectoCommon.InputData; + +namespace TUGraz.VectoCommon.OutputData +{ + public interface IOutputFileWriter + { + void SaveEngine(IEngineEngineeringInputData eng, string filename); + + void SaveGearbox(IGearboxEngineeringInputData gbx, IAxleGearInputData axl, string filename); + + void SaveVehicle(IVehicleEngineeringInputData vehicle, IAirdragEngineeringInputData airdrag, + IRetarderInputData retarder, + IPTOTransmissionInputData pto, IAngledriveInputData angledrive, string filename); + + void SaveJob(IEngineeringInputDataProvider input, string filename); + + void SaveJob(IEPTPInputDataProvider input, string filename); + + void ExportJob(IEngineeringInputDataProvider input, string filename, bool separateFiles); + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/IJSONVehicleComponents.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/IJSONVehicleComponents.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5b32d8cf456998afa0247ab559a0ce0b715af4d --- /dev/null +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/IJSONVehicleComponents.cs @@ -0,0 +1,13 @@ +using TUGraz.VectoCommon.InputData; + +namespace TUGraz.VectoCore.InputData.FileIO.JSON { + public interface IJSONVehicleComponents { + + IGearboxEngineeringInputData Gearbox { get; } + ITorqueConverterEngineeringInputData TorqueConverter { get; } + IAxleGearInputData AxleGear { get; } + IEngineEngineeringInputData Engine { get; } + IAuxiliariesEngineeringInputData EngineeringAuxiliaries { get; } + IAuxiliariesDeclarationInputData DeclarationAuxiliaries { get; } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index 53f64fc8c4ea957001a627be8194ec63a575b602..47245ca263b79172af4204253e91176e3916d9a7 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -30,15 +30,21 @@ */ using System; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Xml.Linq; using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.JSON { - public class JSONComponentInputData : IEngineeringInputDataProvider, IDeclarationInputDataProvider + public class JSONComponentInputData : IEngineeringInputDataProvider, IDeclarationInputDataProvider, + IEngineeringJobInputData, IVehicleEngineeringInputData { protected IGearboxEngineeringInputData Gearbox; protected IAxleGearInputData AxleGear; @@ -49,15 +55,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON protected IRetarderInputData Retarder; protected IPTOTransmissionInputData PTOTransmission; private IAirdragEngineeringInputData AirdragData; + private string _filename; - public JSONComponentInputData(string filename, bool tolerateMissing = false) + public JSONComponentInputData(string filename, IJSONVehicleComponents job, bool tolerateMissing = false) { var extension = Path.GetExtension(filename); object tmp = null; switch (extension) { case Constants.FileExtensions.VehicleDataFile: - tmp = JSONInputDataFactory.ReadJsonVehicle(filename, tolerateMissing); + tmp = JSONInputDataFactory.ReadJsonVehicle(filename, job, tolerateMissing); break; case Constants.FileExtensions.EngineDataFile: tmp = JSONInputDataFactory.ReadEngine(filename, tolerateMissing); @@ -76,48 +83,124 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON .If<ITorqueConverterEngineeringInputData>(c => TorqueConverter = c) .If<IAngledriveInputData>(c => Angledrive = c) .If<IPTOTransmissionInputData>(c => PTOTransmission = c); + _filename = filename; } - public IEngineeringJobInputData JobInputData() + public IEngineeringJobInputData JobInputData { - throw new NotImplementedException(); + get { return this; } + } + + public XElement XMLHash + { + get { return new XElement(XMLNames.DI_Signature); } } - IVehicleDeclarationInputData IDeclarationInputDataProvider.VehicleInputData + IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData { - get { return VehicleData; } + get { return this; } } - IAirdragDeclarationInputData IDeclarationInputDataProvider.AirdragInputData + public IDriverEngineeringInputData DriverInputData { - get { return AirdragInputData; } + get { return null; } } - public IAirdragEngineeringInputData AirdragInputData + public DataSourceType SourceType { - get { return AirdragData; } + get { return DataSourceType.JSONFile; } } - IGearboxDeclarationInputData IDeclarationInputDataProvider.GearboxInputData + public string Source { - get { return GearboxInputData; } + get { return _filename; } + } + + public bool SavedInDeclarationMode { get; private set; } + public string Manufacturer { get; private set; } + public string Model { get; private set; } + public string Date { get; private set; } + public CertificationMethod CertificationMethod { get; private set; } + public string CertificationNumber { get; private set; } + public string DigestValue { get; private set; } + + IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle + { + get { return Vehicle; } } - ITorqueConverterDeclarationInputData IDeclarationInputDataProvider.TorqueConverterInputData + public IVehicleEngineeringInputData Vehicle { - get { return TorqueConverterInputData; } + get { return VehicleData ?? this; } + } + + public IList<ICycleData> Cycles { get; private set; } + + public bool EngineOnlyMode { get; private set; } + + public IEngineEngineeringInputData EngineOnly { get; private set; } + + + public string JobName + { + get { return ""; } } - IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData() + public string VIN { - throw new NotImplementedException(); + get { return Vehicle.VIN; } + } + + public LegislativeClass LegislativeClass + { + get { return Vehicle.LegislativeClass; } + } + + public VehicleCategory VehicleCategory + { + get { return Vehicle.VehicleCategory; } + } + + public AxleConfiguration AxleConfiguration + { + get { return Vehicle.AxleConfiguration; } + } + + public Kilogram CurbMassChassis + { + get { return Vehicle.CurbMassChassis; } + } + + public Kilogram GrossVehicleMassRating + { + get { return Vehicle.GrossVehicleMassRating; } + } + + public IList<ITorqueLimitInputData> TorqueLimits + { + get { return Vehicle.TorqueLimits; } + } + + IList<IAxleEngineeringInputData> IVehicleEngineeringInputData.Axles + { + get { return Vehicle.Axles; } + } + + public Meter DynamicTyreRadius + { + get { return Vehicle.DynamicTyreRadius; } } - public IVehicleEngineeringInputData VehicleInputData + public Meter Height { - get { return VehicleData; } + get { return Vehicle.Height; } + } + + public IAirdragEngineeringInputData AirdragInputData + { + get { return AirdragData; } } public IGearboxEngineeringInputData GearboxInputData @@ -130,19 +213,64 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return TorqueConverter; } } - public IAxleGearInputData AxleGearInputData + IAxleGearInputData IVehicleEngineeringInputData.AxleGearInputData { get { return AxleGear; } } - public IAngledriveInputData AngledriveInputData + IAngledriveInputData IVehicleEngineeringInputData.AngledriveInputData { get { return Angledrive; } } - IEngineDeclarationInputData IDeclarationInputDataProvider.EngineInputData + public Kilogram CurbMassExtra + { + get { return Vehicle.CurbMassExtra; } + } + + public Kilogram Loading + { + get { return Vehicle.Loading; } + } + + IList<IAxleDeclarationInputData> IVehicleDeclarationInputData.Axles + { + get { return Vehicle.Axles.Cast<IAxleDeclarationInputData>().ToList(); } + } + + public string ManufacturerAddress + { + get { return Vehicle.ManufacturerAddress; } + } + + public PerSecond EngineIdleSpeed + { + get { return Vehicle.EngineIdleSpeed; } + } + + IAirdragDeclarationInputData IVehicleDeclarationInputData.AirdragInputData + { + get { return AirdragInputData; } + } + + IGearboxDeclarationInputData IVehicleDeclarationInputData.GearboxInputData { - get { return EngineInputData; } + get { return GearboxInputData; } + } + + ITorqueConverterDeclarationInputData IVehicleDeclarationInputData.TorqueConverterInputData + { + get { return TorqueConverterInputData; } + } + + IAxleGearInputData IVehicleDeclarationInputData.AxleGearInputData + { + get { return AxleGear; } + } + + IAngledriveInputData IVehicleDeclarationInputData.AngledriveInputData + { + get { return Angledrive; } } public IEngineEngineeringInputData EngineInputData @@ -150,39 +278,40 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return Engine; } } - public IAuxiliariesEngineeringInputData AuxiliaryInputData() + + IEngineDeclarationInputData IVehicleDeclarationInputData.EngineInputData { - throw new NotImplementedException(); + get { return Engine; } } - IAuxiliariesDeclarationInputData IDeclarationInputDataProvider.AuxiliaryInputData() + IAuxiliariesDeclarationInputData IVehicleDeclarationInputData.AuxiliaryInputData() { throw new NotImplementedException(); } - public IRetarderInputData RetarderInputData + IRetarderInputData IVehicleEngineeringInputData.RetarderInputData { get { return Retarder; } } - IDriverDeclarationInputData IDeclarationInputDataProvider.DriverInputData + IPTOTransmissionInputData IVehicleEngineeringInputData.PTOTransmissionInputData { - get { throw new NotImplementedException(); } + get { return PTOTransmission; } } - public IDriverEngineeringInputData DriverInputData + IAuxiliariesEngineeringInputData IVehicleEngineeringInputData.AuxiliaryInputData() { - get { throw new NotImplementedException(); } + throw new NotImplementedException(); } - public IPTOTransmissionInputData PTOTransmissionInputData + IRetarderInputData IVehicleDeclarationInputData.RetarderInputData { - get { return PTOTransmission; } + get { return Retarder; } } - public XElement XMLHash + IPTOTransmissionInputData IVehicleDeclarationInputData.PTOTransmissionInputData { - get { return null; } + get { return PTOTransmission; } } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 19d015b541a80c3718189125ec065210c939c25f..cbe40440f2769c29bf688c8dd035bd1f2846373a 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -34,12 +34,15 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Xml; using System.Xml.Linq; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; using TUGraz.VectoCore.InputData.Impl; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -47,661 +50,625 @@ 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 - { - protected readonly IGearboxEngineeringInputData Gearbox; - protected readonly IAxleGearInputData AxleGear; - protected readonly ITorqueConverterEngineeringInputData TorqueConverter; - protected readonly IAngledriveInputData Angledrive; - protected readonly IEngineEngineeringInputData Engine; - protected readonly IVehicleEngineeringInputData VehicleData; - protected readonly IRetarderInputData Retarder; - protected readonly IPTOTransmissionInputData PTOTransmission; - - private readonly string _jobname; - protected internal IAirdragEngineeringInputData AirdragData; - - 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(); - Angledrive = VehicleData as IAngledriveInputData; - Retarder = VehicleData as IRetarderInputData; - PTOTransmission = VehicleData as IPTOTransmissionInputData; - AirdragData = VehicleData as IAirdragEngineeringInputData; - } - - private IVehicleEngineeringInputData ReadVehicle() - { - try { - var vehicleFile = Body.GetEx(JsonKeys.Vehicle_VehicleFile).Value<string>(); - return JSONInputDataFactory.ReadJsonVehicle( - Path.Combine(BasePath, vehicleFile)); - } 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); - } - } - - 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); - } - //JToken.FromObject(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}}) - return - new JSONEngineDataV3(GetDummyJSONStructure(), - Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>()) + MissingFileSuffix); - } - } - - #region IInputDataProvider - - public virtual IEngineeringJobInputData JobInputData() - { - return this; - } - - IVehicleDeclarationInputData IDeclarationInputDataProvider.VehicleInputData - { - get { return VehicleInputData; } - } - - IAirdragDeclarationInputData IDeclarationInputDataProvider.AirdragInputData - { - get { return AirdragInputData; } - } - - public IAirdragEngineeringInputData AirdragInputData - { - get { return AirdragData; } - } - - IGearboxDeclarationInputData IDeclarationInputDataProvider.GearboxInputData - { - get { return GearboxInputData; } - } - - ITorqueConverterDeclarationInputData IDeclarationInputDataProvider.TorqueConverterInputData - { - get { return TorqueConverterInputData; } - } - - public ITorqueConverterEngineeringInputData TorqueConverterInputData - { - get - { - if (TorqueConverter == null) { - throw new InvalidFileFormatException("TorqueConverterData not found"); - } - return TorqueConverter; - } - } - - IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData() - { - return JobInputData(); - } - - 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 IGearboxEngineeringInputData GearboxInputData - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (Gearbox == null) { - throw new InvalidFileFormatException("GearboxData not found"); - } - return Gearbox; - } - } - - public virtual IAxleGearInputData AxleGearInputData - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (AxleGear == null) { - throw new InvalidFileFormatException("AxleGearData not found"); - } - return AxleGear; - } - } - - public IAngledriveInputData AngledriveInputData - { - get { return Angledrive; } - } - - IEngineDeclarationInputData IDeclarationInputDataProvider.EngineInputData - { - get { return EngineInputData; } - } - - public virtual IEngineEngineeringInputData EngineInputData - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (Engine == null) { - throw new InvalidFileFormatException("EngineData not found"); - } - return Engine; - } - } - - public virtual IAuxiliariesEngineeringInputData AuxiliaryInputData() - { - return this; - } - - IDriverEngineeringInputData IEngineeringInputDataProvider.DriverInputData - { - get { return this; } - } - - public IPTOTransmissionInputData PTOTransmissionInputData - { - get { return PTOTransmission; } - } - - public XElement XMLHash - { - get { return null; } - } - - IAuxiliariesDeclarationInputData IDeclarationInputDataProvider.AuxiliaryInputData() - { - return this; - } - - public virtual IRetarderInputData RetarderInputData - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", - "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { - if (Retarder == null) { - throw new InvalidFileFormatException("RetarderData not found"); - } - return Retarder; - } - } - - public virtual IDriverDeclarationInputData 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>(); } - } - - IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle - { - get { return Vehicle; } - } - - public virtual string JobName - { - get { return _jobname; } - } - - #endregion - - #region DriverInputData - - IOverSpeedEcoRollDeclarationInputData IDriverDeclarationInputData.OverSpeedEcoRoll - { - get - { - var overspeed = Body.GetEx(JsonKeys.DriverData_OverspeedEcoRoll); - return new OverSpeedEcoRollInputData() { - Mode = DriverData.ParseDriverMode(overspeed.GetEx<string>(JsonKeys.DriverData_OverspeedEcoRoll_Mode)) - }; - } - } - - 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 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(); + } + } + } } \ 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 84520f0a606ea9de508fb2a5a096b860c97d0320..4091fafada15d000620ea33ea013250e764a7678 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputDataFactory.cs @@ -57,7 +57,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON if (Constants.FileExtensions.VectoJobFile.Equals(Path.GetExtension(filename), StringComparison.OrdinalIgnoreCase)) { return ReadJsonJob(filename, true); } - return new JSONComponentInputData(filename, true); + return new JSONComponentInputData(filename, null, true); } public static IInputDataProvider ReadJsonJob(string filename, bool tolerateMissing = false) @@ -70,18 +70,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON return new JSONInputDataV2(json, filename, tolerateMissing); case 3: return new JSONInputDataV3(json, filename, tolerateMissing); + case 4: + if (json["Body"]["DeclarationVehicle"] != null) { + return new JSONEPTPInputDataV4(json, filename, tolerateMissing); + } + return new JSONInputDataV4(json, filename, tolerateMissing); default: throw new VectoException("Job-File: Unsupported FileVersion. Got: {0} ", version); } } - public static IVehicleEngineeringInputData ReadJsonVehicle(string filename, bool tolerateMissing = false) + public static IVehicleEngineeringInputData ReadJsonVehicle(string filename, IJSONVehicleComponents job, bool tolerateMissing = false) { var json = ReadFile(filename); var version = ReadVersion(json); switch (version) { case 7: - return new JSONVehicleDataV7(json, filename, tolerateMissing); + return new JSONVehicleDataV7(json, filename, job,tolerateMissing); default: throw new VectoException("Vehicle-File: Unsupported FileVersion. Got {0}", version); } @@ -121,4 +126,4 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON return (int)double.Parse(value.Trim('"')); } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs index 10c92f2e4b00ee958e3b656ee79b8d9fea9bbb06..4bcc058941df0889914b0718a786767cd26683ef 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs @@ -34,6 +34,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Newtonsoft.Json.Linq; +using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; @@ -44,8 +45,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public class JSONVehicleDataV7 : JSONFile, IVehicleEngineeringInputData, IRetarderInputData, IAngledriveInputData, IPTOTransmissionInputData, IAirdragEngineeringInputData { - public JSONVehicleDataV7(JObject data, string fileName, bool tolerateMissing = false) - : base(data, fileName, tolerateMissing) {} + public JSONVehicleDataV7(JObject data, string fileName, IJSONVehicleComponents job, bool tolerateMissing = false) + : base(data, fileName, tolerateMissing) + { + Job = job; + } + + private IJSONVehicleComponents Job; #region IVehicleInputData @@ -167,6 +173,103 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON }); } + #endregion + + #region "VehicleComponents" + + IAirdragDeclarationInputData IVehicleDeclarationInputData.AirdragInputData + { + get { return this; } + } + + IAirdragEngineeringInputData IVehicleEngineeringInputData.AirdragInputData + { + get { return this; } + } + + IGearboxDeclarationInputData IVehicleDeclarationInputData.GearboxInputData + { + get { return Job.Gearbox; } + } + + IGearboxEngineeringInputData IVehicleEngineeringInputData.GearboxInputData + { + get { return Job.Gearbox; } + } + + ITorqueConverterDeclarationInputData IVehicleDeclarationInputData.TorqueConverterInputData + { + get { return Job.TorqueConverter; } + } + + ITorqueConverterEngineeringInputData IVehicleEngineeringInputData.TorqueConverterInputData + { + get { return Job.TorqueConverter; } + } + + IAxleGearInputData IVehicleEngineeringInputData.AxleGearInputData + { + get { return Job.AxleGear; } + } + + IAngledriveInputData IVehicleEngineeringInputData.AngledriveInputData + { + get { return this; } + } + + public IEngineEngineeringInputData EngineInputData + { + get { return Job.Engine; } + } + + IAxleGearInputData IVehicleDeclarationInputData.AxleGearInputData + { + get { return Job.AxleGear; } + } + + IAngledriveInputData IVehicleDeclarationInputData.AngledriveInputData + { + get { return this; } + } + + IEngineDeclarationInputData IVehicleDeclarationInputData.EngineInputData + { + get { return Job.Engine; } + } + + IAuxiliariesDeclarationInputData IVehicleDeclarationInputData.AuxiliaryInputData() + { + return Job.DeclarationAuxiliaries; + } + + IRetarderInputData IVehicleEngineeringInputData.RetarderInputData + { + get { return this; } + } + + IPTOTransmissionInputData IVehicleEngineeringInputData.PTOTransmissionInputData + { + get { return this; } + } + + IAuxiliariesEngineeringInputData IVehicleEngineeringInputData.AuxiliaryInputData() + { + return Job.EngineeringAuxiliaries; + } + + IRetarderInputData IVehicleDeclarationInputData.RetarderInputData + { + get { return this; } + } + + + IPTOTransmissionInputData IVehicleDeclarationInputData.PTOTransmissionInputData + { + get { return this; } + } + + + #endregion #region Airdrag @@ -387,4 +490,4 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return ""; } } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/AbstractDeclarationXMLComponentDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/AbstractDeclarationXMLComponentDataProvider.cs index 915c604e57fb1127bae0d6c2e65058e7c94ce4d6..09dd2e462eadbae8a5d552b5bbbe2eaf18e5eeee 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/AbstractDeclarationXMLComponentDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/AbstractDeclarationXMLComponentDataProvider.cs @@ -67,15 +67,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration Helper.AddNamespaces(Manager); SourceType = DataSourceType.Embedded; - Source = ""; - + VehiclePath = Helper.QueryAbs( Helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix), XMLNames.Component_Vehicle ); } - public string Source { get; protected set; } + public string Source { get { return InputData.Source; } } public DataSourceType SourceType { get; protected set; } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationAngledriveDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationAngledriveDataProvider.cs index 09de364e5a1efd6eea072b88275fb26a3cf7d541..c50041ecf62e1eaafb4f655b30f58568d8f6d90c 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationAngledriveDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationAngledriveDataProvider.cs @@ -29,48 +29,48 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using TUGraz.IVT.VectoXML; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration -{ - public class XMLDeclarationAngledriveDataProvider : AbstractDeclarationXMLComponentDataProvider, IAngledriveInputData - { - public XMLDeclarationAngledriveDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) - { - XBasePath = Helper.Query(VehiclePath, - XMLNames.Vehicle_Components, - XMLNames.Component_Angledrive, - XMLNames.ComponentDataWrapper); - } - - public AngledriveType Type - { - get { return InputData._vehicleInputData.AngulargearType; } - } - - public double Ratio - { - get { return GetDoubleElementValue(XMLNames.AngleDrive_Ratio); } - } - - public TableData LossMap - { - get - { - return ReadTableData(AttributeMappings.TransmissionLossmapMapping, - Helper.Query( - XMLNames.AngleDrive_TorqueLossMap, - XMLNames.Angledrive_LossMap_Entry)); - } - } - - public double Efficiency - { - get { throw new VectoException("Efficiency not supported in Declaration Mode!"); } - } - } -} \ No newline at end of file +using TUGraz.IVT.VectoXML; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration +{ + public class XMLDeclarationAngledriveDataProvider : AbstractDeclarationXMLComponentDataProvider, IAngledriveInputData + { + public XMLDeclarationAngledriveDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) + { + XBasePath = Helper.Query(VehiclePath, + XMLNames.Vehicle_Components, + XMLNames.Component_Angledrive, + XMLNames.ComponentDataWrapper); + } + + public AngledriveType Type + { + get { return InputData.XMLJob.XMLVehicle.AngulargearType; } + } + + public double Ratio + { + get { return GetDoubleElementValue(XMLNames.AngleDrive_Ratio); } + } + + public TableData LossMap + { + get + { + return ReadTableData(AttributeMappings.TransmissionLossmapMapping, + Helper.Query( + XMLNames.AngleDrive_TorqueLossMap, + XMLNames.Angledrive_LossMap_Entry)); + } + } + + public double Efficiency + { + get { throw new VectoException("Efficiency not supported in Declaration Mode!"); } + } + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationDriverDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationDriverDataProvider.cs deleted file mode 100644 index 76b683eb75cee947b6b3d85ecdc7e8d60d205339..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationDriverDataProvider.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2017 European Union -* -* Developed by Graz University of Technology, -* Institute of Internal Combustion Engines and Thermodynamics, -* Institute of Technical Informatics -* -* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved -* by the European Commission - subsequent versions of the EUPL (the "Licence"); -* You may not use VECTO except in compliance with the Licence. -* You may obtain a copy of the Licence at: -* -* https://joinup.ec.europa.eu/community/eupl/og_page/eupl -* -* Unless required by applicable law or agreed to in writing, VECTO -* distributed under the Licence is distributed on an "AS IS" basis, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the Licence for the specific language governing permissions and -* limitations under the Licence. -* -* Authors: -* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology -* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology -* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology -* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology -* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology -* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology -*/ - -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCore.InputData.Impl; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration -{ - public class XMLDeclarationDriverDataProvider : AbstractDeclarationXMLComponentDataProvider, - IDriverDeclarationInputData - { - public XMLDeclarationDriverDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) - : base(xmlInputDataProvider) - { - XBasePath = VehiclePath; - } - - public IOverSpeedEcoRollDeclarationInputData OverSpeedEcoRoll - { - get { - //var node = - // Navigator.SelectSingleNode(Helper.Query(VehiclePath, - // XMLNames.Vehicle_AdvancedDriverAssist, - // XMLNames.DriverModel_Overspeed, - // XMLNames.DriverModel_Overspeed_Mode), Manager); - return new OverSpeedEcoRollInputData() { - Mode = DriverMode.Overspeed - }; - } - } - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationInputDataProvider.cs index 87fdd1356c60bb0f627039844a89bf6bd40757b7..6e8b95b5732bfe188958eaafcd9e76b963b388e1 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationInputDataProvider.cs @@ -45,13 +45,22 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration { internal readonly XPathDocument Document; - private readonly IAuxiliariesDeclarationInputData XMLAuxiliaryData; - private readonly IDriverDeclarationInputData XMLDriverData; - private readonly IDeclarationJobInputData XMLJobData; - protected internal readonly XMLDeclarationVehicleDataProvider _vehicleInputData; + private readonly XMLDeclarationJobInputDataProvider _xmlJobData; - public XMLDeclarationInputDataProvider(XmlReader inputData, bool verifyXml) - { + + public XMLDeclarationInputDataProvider(string filename, bool verifyXml) : + this(XmlReader.Create(filename), filename, verifyXml) + { + } + + public XMLDeclarationInputDataProvider(XmlReader inputData, bool verifyXml) : this(inputData, "", verifyXml) + { + + } + + protected XMLDeclarationInputDataProvider(XmlReader inputData, string source, bool verifyXml) + { + Source = source; if (verifyXml) { var settings = new XmlReaderSettings { ValidationType = ValidationType.Schema, @@ -64,32 +73,19 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration inputData = XmlReader.Create(inputData, settings); } - //Document = new XPathDocument(inputData); - + var xmldoc = new XmlDocument(); xmldoc.Load(inputData); var h = VectoHash.Load(xmldoc); XMLHash = h.ComputeXmlHash(); - Document = new XPathDocument(new XmlNodeReader(xmldoc)); - - //CheckInputDocument(); - - XMLJobData = new XMLDeclarationJobInputDataProvider(this); - _vehicleInputData = new XMLDeclarationVehicleDataProvider(this); - AirdragInputData = new XMLDeclarationAirdragDataProvider(this); - AxleGearInputData = new XMLDeclarationAxlegearDataProvider(this); - AngledriveInputData = new XMLDeclarationAngledriveDataProvider(this); - EngineInputData = new XMLDeclarationEngineDataProvider(this); - GearboxInputData = new XMLDeclarationGearboxDataProvider(this); - TorqueConverterInputData = new XMLDeclarationTorqueConverterDataProvider(this); - RetarderInputData = new XMLDeclarationRetarderDataProvider(this); - XMLDriverData = new XMLDeclarationDriverDataProvider(this); - XMLAuxiliaryData = new XMLDeclarationAuxiliaryDataProvider(this); - PTOTransmissionInputData = _vehicleInputData.GetPTOData(); + + _xmlJobData = new XMLDeclarationJobInputDataProvider(this); } - private static void ValidationCallBack(object sender, ValidationEventArgs args) + public string Source { get; protected set; } + + private static void ValidationCallBack(object sender, ValidationEventArgs args) { if (args.Severity == XmlSeverityType.Error) { throw new VectoException("Validation error: {0}" + Environment.NewLine + @@ -107,42 +103,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration return xset; } - public IDeclarationJobInputData JobInputData() + public IDeclarationJobInputData JobInputData { - return XMLJobData; + get { return _xmlJobData; } } - public IVehicleDeclarationInputData VehicleInputData + public XMLDeclarationJobInputDataProvider XMLJob { - get { return _vehicleInputData; } + get { return _xmlJobData; } } - public IAirdragDeclarationInputData AirdragInputData { get; private set; } - - public IGearboxDeclarationInputData GearboxInputData { get; private set; } - - public ITorqueConverterDeclarationInputData TorqueConverterInputData { get; private set; } - - public IAxleGearInputData AxleGearInputData { get; private set; } - - public IAngledriveInputData AngledriveInputData { get; private set; } - - public IEngineDeclarationInputData EngineInputData { get; private set; } - - public IAuxiliariesDeclarationInputData AuxiliaryInputData() - { - return XMLAuxiliaryData; - } - - public IRetarderInputData RetarderInputData { get; private set; } - - public IDriverDeclarationInputData DriverInputData - { - get { return XMLDriverData; } - } - - public IPTOTransmissionInputData PTOTransmissionInputData { get; private set; } - public XElement XMLHash { get; private set; } } } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs index 5f0447ef1b0e03cc73383d22aa07667083eb5170..300a9294e0646b4052d84792caa08a4d0e6ae1bf 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs @@ -37,15 +37,24 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration // ReSharper disable once InconsistentNaming public class XMLDeclarationJobInputDataProvider : AbstractDeclarationXMLComponentDataProvider, IDeclarationJobInputData { - public XMLDeclarationJobInputDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) + private readonly XMLDeclarationVehicleDataProvider _vehicle; + + public XMLDeclarationJobInputDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) + : base(xmlInputDataProvider) { XBasePath = VehiclePath; + _vehicle = new XMLDeclarationVehicleDataProvider(xmlInputDataProvider); } public IVehicleDeclarationInputData Vehicle { - get { return InputData.VehicleInputData; } + get { return _vehicle; } + } + + public XMLDeclarationVehicleDataProvider XMLVehicle + { + get { return _vehicle; } } public string JobName diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationRetarderDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationRetarderDataProvider.cs index f13861ad1680ea92c38ab84abd5e92e0290097ea..4e03a20b1c6b79586569b7d29f278eb7149e53eb 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationRetarderDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationRetarderDataProvider.cs @@ -29,46 +29,46 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using TUGraz.IVT.VectoXML; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration -{ - public class XMLDeclarationRetarderDataProvider : AbstractDeclarationXMLComponentDataProvider, IRetarderInputData - { - public XMLDeclarationRetarderDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) - { - XBasePath = Helper.Query(VehiclePath, - XMLNames.Vehicle_Components, - XMLNames.Component_Retarder, - XMLNames.ComponentDataWrapper); - } - - - public override bool SavedInDeclarationMode - { - get { return true; } - } - - public RetarderType Type - { - get { return InputData._vehicleInputData.RetarderType; } - } - - public double Ratio - { - get { return InputData._vehicleInputData.RetarderRatio; } - } - - public TableData LossMap - { - get - { - return ReadTableData(AttributeMappings.RetarderLossmapMapping, - Helper.Query(XMLNames.Retarder_RetarderLossMap, XMLNames.Retarder_RetarderLossMap_Entry)); - } - } - } -} \ No newline at end of file +using TUGraz.IVT.VectoXML; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration +{ + public class XMLDeclarationRetarderDataProvider : AbstractDeclarationXMLComponentDataProvider, IRetarderInputData + { + public XMLDeclarationRetarderDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) + { + XBasePath = Helper.Query(VehiclePath, + XMLNames.Vehicle_Components, + XMLNames.Component_Retarder, + XMLNames.ComponentDataWrapper); + } + + + public override bool SavedInDeclarationMode + { + get { return true; } + } + + public RetarderType Type + { + get { return InputData.XMLJob.XMLVehicle.RetarderType; } + } + + public double Ratio + { + get { return InputData.XMLJob.XMLVehicle.RetarderRatio; } + } + + public TableData LossMap + { + get + { + return ReadTableData(AttributeMappings.RetarderLossmapMapping, + Helper.Query(XMLNames.Retarder_RetarderLossMap, XMLNames.Retarder_RetarderLossMap_Entry)); + } + } + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationVehicleDataProvider.cs index af787557a5dcd8bd7a6a284e15f8d83bb8915d7c..b2c8e7c15e92f90ba1ee8550081b1b2ca38e40f1 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationVehicleDataProvider.cs @@ -46,10 +46,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration public class XMLDeclarationVehicleDataProvider : AbstractDeclarationXMLComponentDataProvider, IVehicleDeclarationInputData, IPTOTransmissionInputData { + private readonly IAuxiliariesDeclarationInputData XMLAuxiliaryData; + public XMLDeclarationVehicleDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) : base(xmlInputDataProvider) { XBasePath = VehiclePath; + AirdragInputData = new XMLDeclarationAirdragDataProvider(xmlInputDataProvider); + AxleGearInputData = new XMLDeclarationAxlegearDataProvider(xmlInputDataProvider); + AngledriveInputData = new XMLDeclarationAngledriveDataProvider(xmlInputDataProvider); + EngineInputData = new XMLDeclarationEngineDataProvider(xmlInputDataProvider); + GearboxInputData = new XMLDeclarationGearboxDataProvider(xmlInputDataProvider); + TorqueConverterInputData = new XMLDeclarationTorqueConverterDataProvider(xmlInputDataProvider); + RetarderInputData = new XMLDeclarationRetarderDataProvider(xmlInputDataProvider); + XMLAuxiliaryData = new XMLDeclarationAuxiliaryDataProvider(xmlInputDataProvider); } public string VIN @@ -181,11 +191,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration get { return GetElementValue(XMLNames.Vehicle_AngledriveType).ParseEnum<AngledriveType>(); } } - public IPTOTransmissionInputData GetPTOData() - { - return this; - } - public string PTOTransmissionType { get { @@ -214,5 +219,29 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration { get { return null; } } + + public IAirdragDeclarationInputData AirdragInputData { get; private set; } + + public IGearboxDeclarationInputData GearboxInputData { get; private set; } + + public ITorqueConverterDeclarationInputData TorqueConverterInputData { get; private set; } + + public IAxleGearInputData AxleGearInputData { get; private set; } + + public IAngledriveInputData AngledriveInputData { get; private set; } + + public IEngineDeclarationInputData EngineInputData { get; private set; } + + public IAuxiliariesDeclarationInputData AuxiliaryInputData() + { + return XMLAuxiliaryData; + } + + public IRetarderInputData RetarderInputData { get; private set; } + + public IPTOTransmissionInputData PTOTransmissionInputData + { + get { return this; } + } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/AbstractEngineeringXMLComponentDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/AbstractEngineeringXMLComponentDataProvider.cs index 3c91f09a198339d28523e4b04bbba671b8c54302..68cbf355d3996fdbf13dd3fd0c1b09e41e2b88b7 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/AbstractEngineeringXMLComponentDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/AbstractEngineeringXMLComponentDataProvider.cs @@ -29,103 +29,103 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.IO; -using System.Xml; -using System.Xml.XPath; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering -{ - public class AbstractEngineeringXMLComponentDataProvider : AbstractDeclarationXMLComponentDataProvider - { - protected new readonly XMLEngineeringInputDataProvider InputData; - - protected readonly string FSBasePath; - - - protected readonly XPathDocument XMLDocument; - - protected AbstractEngineeringXMLComponentDataProvider( - XMLEngineeringInputDataProvider xmlEngineeringJobInputDataProvider, - XPathDocument document, string xmlBasePath, string fsBasePath) - { - XMLDocument = document; - XBasePath = xmlBasePath; - FSBasePath = fsBasePath; - InputData = xmlEngineeringJobInputDataProvider; - Navigator = document.CreateNavigator(); - Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable()); - Helper = new XPathHelper(ExecutionMode.Engineering); - Helper.AddNamespaces(Manager); - - Source = fsBasePath; - SourceType = DataSourceType.Embedded; - } - - - public override bool SavedInDeclarationMode - { - get { return false; } - } - - public override string Manufacturer - { - get { return GetElementValue(XMLNames.Component_Manufacturer); } - } - - public override string Model - { - get { return GetElementValue(XMLNames.Component_Model); } - } - - - public override string Date - { - get { return GetElementValue(XMLNames.Component_Date); } - } - - public override string DigestValue - { - get { return ""; } - } - - public override string CertificationNumber - { - get { return "N.A."; } - } - - public override CertificationMethod CertificationMethod - { - get { return CertificationMethod.NotCertified; } - } - - - protected TableData ReadCSVResourceFile(string relPath) - { - if (!ElementExists(Helper.Query(relPath, ExtCsvResourceTag))) { - throw new VectoException("Failed to read {0} resource", relPath); - } - var file = - GetAttributeValue( - Helper.Query(relPath, ExtCsvResourceTag), XMLNames.ExtResource_File_Attr); - var fullFilename = Path.Combine(FSBasePath ?? "", file); - if (file == null || !File.Exists(fullFilename)) { - throw new VectoException("{1} file not found: {0}", file, relPath); - } - return VectoCSVFile.Read(fullFilename); - } - - protected string ExtCsvResourceTag - { - get { - return Helper.Query(Helper.QueryConstraint(XMLNames.ExternalResource, XMLNames.ExtResource_Type_Attr, - XMLNames.ExtResource_Type_Value_CSV)); - } - } - } +using System.IO; +using System.Xml; +using System.Xml.XPath; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering +{ + public class AbstractEngineeringXMLComponentDataProvider : AbstractDeclarationXMLComponentDataProvider + { + protected new readonly XMLEngineeringInputDataProvider InputData; + + protected readonly string FSBasePath; + + + protected readonly XPathDocument XMLDocument; + + protected AbstractEngineeringXMLComponentDataProvider( + XMLEngineeringInputDataProvider xmlEngineeringJobInputDataProvider, + XPathDocument document, string xmlBasePath, string fsBasePath) + { + XMLDocument = document; + XBasePath = xmlBasePath; + FSBasePath = fsBasePath; + InputData = xmlEngineeringJobInputDataProvider; + Navigator = document.CreateNavigator(); + Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable()); + Helper = new XPathHelper(ExecutionMode.Engineering); + Helper.AddNamespaces(Manager); + + SourceType = DataSourceType.Embedded; + } + + public new string Source { get { return FSBasePath; } } + + public override bool SavedInDeclarationMode + { + get { return false; } + } + + public override string Manufacturer + { + get { return GetElementValue(XMLNames.Component_Manufacturer); } + } + + public override string Model + { + get { return GetElementValue(XMLNames.Component_Model); } + } + + + public override string Date + { + get { return GetElementValue(XMLNames.Component_Date); } + } + + public override string DigestValue + { + get { return ""; } + } + + public override string CertificationNumber + { + get { return "N.A."; } + } + + public override CertificationMethod CertificationMethod + { + get { return CertificationMethod.NotCertified; } + } + + + protected TableData ReadCSVResourceFile(string relPath) + { + if (!ElementExists(Helper.Query(relPath, ExtCsvResourceTag))) { + throw new VectoException("Failed to read {0} resource", relPath); + } + var file = + GetAttributeValue( + Helper.Query(relPath, ExtCsvResourceTag), XMLNames.ExtResource_File_Attr); + var fullFilename = Path.Combine(FSBasePath ?? "", file); + if (file == null || !File.Exists(fullFilename)) { + throw new VectoException("{1} file not found: {0}", file, relPath); + } + return VectoCSVFile.Read(fullFilename); + } + + protected string ExtCsvResourceTag + { + get { + return Helper.Query(Helper.QueryConstraint(XMLNames.ExternalResource, XMLNames.ExtResource_Type_Attr, + XMLNames.ExtResource_Type_Value_CSV)); + } + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs index 5d40e4ce5c52129d48f98d3cac1c0e40cf8139d9..e7083336b72004a21083836fd9b776b7dd9193e8 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs @@ -29,217 +29,186 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.IO; -using System.Xml; -using System.Xml.Schema; -using System.Xml.XPath; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering -{ - public class XMLEngineeringInputDataProvider : IEngineeringInputDataProvider - { - public readonly string FileName; - - internal XPathDocument Document; - - protected internal XMLEngineeringAuxiliaryDataProvider XMLEngineeringAuxiliaryData; - protected internal XMLEngineeringDriverDataProvider XMLEngineeringDriverData; - protected internal XMLEngineeringJobInputDataProvider XMLEngineeringJobData; - protected internal XMLEngineeringVehicleDataProvider VehicleData; - protected internal XMLEngineeringAxlegearDataProvider AxlegearData; - - public XMLEngineeringInputDataProvider(string filename, bool verifyXml) - { - FileName = filename; - ReadXMLDocument(File.OpenRead(filename), verifyXml); - - InitializeComponentDataProvider(verifyXml); - } - - - public XMLEngineeringInputDataProvider(Stream inputData, bool verifyXml) - { - FileName = "."; - ReadXMLDocument(inputData, verifyXml); - - var nav = Document.CreateNavigator(); - var manager = new XmlNamespaceManager(nav.NameTable); - var helper = new XPathHelper(ExecutionMode.Engineering); - helper.AddNamespaces(manager); - - var refNodes = - nav.Select( - "//" + helper.Query(helper.QueryConstraint(XMLNames.ExternalResource, XMLNames.ExtResource_File_Attr, null)), - manager); - if (refNodes.Count > 0) { - throw new VectoException("XML input data with file references can not be read via stream!"); - } - - InitializeComponentDataProvider(verifyXml); - } - - - private void ReadXMLDocument(Stream inputData, bool verifyXml) - { - XmlReaderSettings settings = null; - if (verifyXml) { - settings = new XmlReaderSettings { - ValidationType = ValidationType.Schema, - ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema | - //XmlSchemaValidationFlags.ProcessSchemaLocation | - XmlSchemaValidationFlags.ReportValidationWarnings - }; - settings.ValidationEventHandler += ValidationCallBack; - settings.Schemas.Add(GetXMLSchema("")); - } - try { - Document = new XPathDocument(XmlReader.Create(inputData, settings)); - } catch (XmlSchemaValidationException validationException) { - throw new VectoException("Validation of input data failed", validationException); - } - } - - private void InitializeComponentDataProvider(bool verifyXml) - { - XmlReaderSettings settings = null; - if (verifyXml) { - settings = new XmlReaderSettings { - ValidationType = ValidationType.Schema, - ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema | - //XmlSchemaValidationFlags.ProcessSchemaLocation | - XmlSchemaValidationFlags.ReportValidationWarnings - }; - settings.Schemas.Add(GetXMLSchema("")); - } - - var helper = new XPathHelper(ExecutionMode.Engineering); - XMLEngineeringJobData = new XMLEngineeringJobInputDataProvider(this, Document, - helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix)), - Path.GetDirectoryName(Path.GetFullPath(FileName))); - if (XMLEngineeringJobData.EngineOnlyMode) { - EngineInputData = new XMLEngineeringEngineDataProvider(this, Document, - helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), - XMLNames.Component_Engine, - XMLNames.ComponentDataWrapper), Path.GetDirectoryName(Path.GetFullPath(FileName))); - return; - } - ReadVehicle(settings); - - XMLEngineeringDriverData = XMLEngineeringJobData.GetDriverData(); - AxlegearData = VehicleData.GetAxleGearInputData(settings); - AngledriveInputData = VehicleData.GetAngularGearInputData(); - EngineInputData = VehicleData.GetEngineInputData(settings); - RetarderInputData = VehicleData.GetRetarderInputData(settings); - XMLEngineeringAuxiliaryData = VehicleData.GetAuxiliaryData(settings); - GearboxInputData = VehicleData.GetGearboxData(settings); - TorqueConverterInputData = GearboxInputData.TorqueConverter; - PTOTransmissionInputData = VehicleData.GetPTOData(); - AirdragInputData = VehicleData.GetAirdragInputData(settings); - } - - private static void ValidationCallBack(object sender, ValidationEventArgs args) - { - if (args.Severity == XmlSeverityType.Error) { - throw new VectoException("Validation error: {0}", args.Message); - } - } - - private void ReadVehicle(XmlReaderSettings settings) - { - var helper = new XPathHelper(ExecutionMode.Engineering); - - - var nav = Document.CreateNavigator(); - var vehiclePath = helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), - XMLNames.Component_Vehicle); - var manager = new XmlNamespaceManager(nav.NameTable); - helper.AddNamespaces(manager); - var vehicle = nav.SelectSingleNode(vehiclePath, manager); - if (vehicle != null) { - VehicleData = new XMLEngineeringVehicleDataProvider(this, Document, vehiclePath, - Path.GetDirectoryName(Path.GetFullPath(FileName))); - return; - } - - var extVehilePath = helper.QueryAbs( - helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), - helper.QueryConstraint(XMLNames.ExternalResource, "@component='Vehicle' and @type='xml'", null, "")); - var extVehicle = nav.SelectSingleNode(extVehilePath, manager); - if (extVehicle != null) { - try { - var vehicleFile = extVehicle.GetAttribute(XMLNames.ExtResource_File_Attr, ""); - var vehicleDocument = new XPathDocument( - XmlReader.Create(Path.Combine(Path.GetDirectoryName(FileName) ?? "./", vehicleFile), - settings)); - var vehicleCompPath = - helper.QueryAbs( - helper.NSPrefix("VectoComponentEngineering", Constants.XML.RootNSPrefix), - XMLNames.Component_Vehicle); - VehicleData = new XMLEngineeringVehicleDataProvider(this, vehicleDocument, vehicleCompPath, - Path.GetDirectoryName(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(FileName) ?? "./", vehicleFile)))); - return; - } catch (XmlSchemaValidationException validationException) { - throw new VectoException("Validation of XML-file for Vehicle failed", validationException); - } - } - throw new VectoException("No Vehicle found"); - } - - private static XmlSchemaSet GetXMLSchema(string version) - { - var resource = RessourceHelper.LoadResourceAsStream(RessourceHelper.ResourceType.XMLSchema, - "VectoEngineeringInput.xsd"); - var xset = new XmlSchemaSet() { XmlResolver = new XmlResourceResolver() }; - var reader = XmlReader.Create(resource, new XmlReaderSettings(), XmlResourceResolver.BaseUri); - xset.Add(XmlSchema.Read(reader, null)); - xset.Compile(); - return xset; - } - - public IEngineeringJobInputData JobInputData() - { - return XMLEngineeringJobData; - } - - public IVehicleEngineeringInputData VehicleInputData - { - get { return VehicleData; } - } - - public IAirdragEngineeringInputData AirdragInputData { get; private set; } - - - public IGearboxEngineeringInputData GearboxInputData { get; private set; } - - public ITorqueConverterEngineeringInputData TorqueConverterInputData { get; private set; } - - public IAxleGearInputData AxleGearInputData - { - get { return AxlegearData; } - } - - public IAngledriveInputData AngledriveInputData { get; private set; } - - public IEngineEngineeringInputData EngineInputData { get; private set; } - - public IAuxiliariesEngineeringInputData AuxiliaryInputData() - { - return XMLEngineeringAuxiliaryData; - } - - public IRetarderInputData RetarderInputData { get; private set; } - - public IDriverEngineeringInputData DriverInputData - { - get { return XMLEngineeringDriverData; } - } - - public IPTOTransmissionInputData PTOTransmissionInputData { get; private set; } - } -} \ No newline at end of file +using System.IO; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering +{ + public class XMLEngineeringInputDataProvider : IEngineeringInputDataProvider + { + public readonly string FileName; + + internal XPathDocument Document; + + protected internal XMLEngineeringJobInputDataProvider XMLEngineeringJobData; + + protected internal XMLEngineeringVehicleDataProvider VehicleData; + protected internal XMLEngineeringDriverDataProvider XMLEngineeringDriverData; + + public XmlReaderSettings Settings { get; private set; } + + public XMLEngineeringInputDataProvider(string filename, bool verifyXml) + { + FileName = filename; + ReadXMLDocument(File.OpenRead(filename), verifyXml); + + InitializeComponentDataProvider(verifyXml); + } + + + public XMLEngineeringInputDataProvider(Stream inputData, bool verifyXml) + { + FileName = "."; + ReadXMLDocument(inputData, verifyXml); + + var nav = Document.CreateNavigator(); + var manager = new XmlNamespaceManager(nav.NameTable); + var helper = new XPathHelper(ExecutionMode.Engineering); + helper.AddNamespaces(manager); + + var refNodes = + nav.Select( + "//" + helper.Query(helper.QueryConstraint(XMLNames.ExternalResource, XMLNames.ExtResource_File_Attr, null)), + manager); + if (refNodes.Count > 0) { + throw new VectoException("XML input data with file references can not be read via stream!"); + } + + InitializeComponentDataProvider(verifyXml); + } + + + private void ReadXMLDocument(Stream inputData, bool verifyXml) + { + XmlReaderSettings settings = null; + if (verifyXml) { + settings = new XmlReaderSettings { + ValidationType = ValidationType.Schema, + ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema | + //XmlSchemaValidationFlags.ProcessSchemaLocation | + XmlSchemaValidationFlags.ReportValidationWarnings + }; + settings.ValidationEventHandler += ValidationCallBack; + settings.Schemas.Add(GetXMLSchema("")); + } + try { + Document = new XPathDocument(XmlReader.Create(inputData, settings)); + } catch (XmlSchemaValidationException validationException) { + throw new VectoException("Validation of input data failed", validationException); + } + } + + private void InitializeComponentDataProvider(bool verifyXml) + { + Settings = null; + if (verifyXml) { + Settings = new XmlReaderSettings { + ValidationType = ValidationType.Schema, + ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema | + //XmlSchemaValidationFlags.ProcessSchemaLocation | + XmlSchemaValidationFlags.ReportValidationWarnings + }; + Settings.Schemas.Add(GetXMLSchema("")); + } + + var helper = new XPathHelper(ExecutionMode.Engineering); + XMLEngineeringJobData = new XMLEngineeringJobInputDataProvider(this, Document, + helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix)), + Path.GetDirectoryName(Path.GetFullPath(FileName))); + if (XMLEngineeringJobData.EngineOnlyMode) { + EngineOnlyInputData = new XMLEngineeringEngineDataProvider(this, Document, + helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), + XMLNames.Component_Engine, + XMLNames.ComponentDataWrapper), Path.GetDirectoryName(Path.GetFullPath(FileName))); + return; + } + ReadVehicle(Settings); + + XMLEngineeringDriverData = XMLEngineeringJobData.GetDriverData(); + } + + private static void ValidationCallBack(object sender, ValidationEventArgs args) + { + if (args.Severity == XmlSeverityType.Error) { + throw new VectoException("Validation error: {0}", args.Message); + } + } + + private void ReadVehicle(XmlReaderSettings settings) + { + var helper = new XPathHelper(ExecutionMode.Engineering); + + + var nav = Document.CreateNavigator(); + var vehiclePath = helper.QueryAbs(helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), + XMLNames.Component_Vehicle); + var manager = new XmlNamespaceManager(nav.NameTable); + helper.AddNamespaces(manager); + var vehicle = nav.SelectSingleNode(vehiclePath, manager); + if (vehicle != null) { + VehicleData = new XMLEngineeringVehicleDataProvider(this, Document, vehiclePath, + Path.GetDirectoryName(Path.GetFullPath(FileName))); + return; + } + + var extVehilePath = helper.QueryAbs( + helper.NSPrefix(XMLNames.VectoInputEngineering, Constants.XML.RootNSPrefix), + helper.QueryConstraint(XMLNames.ExternalResource, "@component='Vehicle' and @type='xml'", null, "")); + var extVehicle = nav.SelectSingleNode(extVehilePath, manager); + if (extVehicle != null) { + try { + var vehicleFile = extVehicle.GetAttribute(XMLNames.ExtResource_File_Attr, ""); + var vehicleDocument = new XPathDocument( + XmlReader.Create(Path.Combine(Path.GetDirectoryName(FileName) ?? "./", vehicleFile), + settings)); + var vehicleCompPath = + helper.QueryAbs( + helper.NSPrefix("VectoComponentEngineering", Constants.XML.RootNSPrefix), + XMLNames.Component_Vehicle); + VehicleData = new XMLEngineeringVehicleDataProvider(this, vehicleDocument, vehicleCompPath, + Path.GetDirectoryName(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(FileName) ?? "./", vehicleFile)))); + return; + } catch (XmlSchemaValidationException validationException) { + throw new VectoException("Validation of XML-file for Vehicle failed", validationException); + } + } + throw new VectoException("No Vehicle found"); + } + + private static XmlSchemaSet GetXMLSchema(string version) + { + var resource = RessourceHelper.LoadResourceAsStream(RessourceHelper.ResourceType.XMLSchema, + "VectoEngineeringInput.xsd"); + var xset = new XmlSchemaSet() { XmlResolver = new XmlResourceResolver() }; + var reader = XmlReader.Create(resource, new XmlReaderSettings(), XmlResourceResolver.BaseUri); + xset.Add(XmlSchema.Read(reader, null)); + xset.Compile(); + return xset; + } + + public IEngineeringJobInputData JobInputData + { + get { return XMLEngineeringJobData; } + } + + public IVehicleEngineeringInputData VehicleInputData + { + get { return VehicleData; } + } + + public IEngineEngineeringInputData EngineOnlyInputData { get; private set; } + + public IDriverEngineeringInputData DriverInputData + { + get { return XMLEngineeringDriverData; } + } + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs index 50d44c5e76a300a9df74e5c2b42d21ad16baf2c9..324054616a2a41207b09eaf43bb792a195a8c119 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs @@ -29,232 +29,237 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.Collections.Generic; -using System.IO; -using System.Xml; -using System.Xml.XPath; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.InputData.Impl; -using TUGraz.VectoCore.Models.Declaration; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering -{ - // ReSharper disable once InconsistentNaming - public class XMLEngineeringJobInputDataProvider : AbstractEngineeringXMLComponentDataProvider, IEngineeringJobInputData - { - public XMLEngineeringJobInputDataProvider(XMLEngineeringInputDataProvider xmlEngineeringJobInputDataProvider, - XPathDocument jobDocument, string xmlBasePath, string fsBasePath) - : base(xmlEngineeringJobInputDataProvider, jobDocument, xmlBasePath, fsBasePath) {} - - - public IVehicleDeclarationInputData Vehicle - { - get { return InputData.VehicleInputData; } - } - - IVehicleEngineeringInputData IEngineeringJobInputData.Vehicle - { - get { return InputData.VehicleInputData; } - } - - //IEngineEngineeringInputData EngineInputData - //{ - // get { return new XMLEngineeringEngineDataProvider(InputData, XMLDocument, Helper.Query(XBasePath, XMLNames.Component_Engine, XMLNames.ComponentDataWrapper) ,FSBasePath); } - //} - - public IList<ICycleData> Cycles - { - get { - var retVal = new List<ICycleData>(); - var cycles = Navigator.Select(Helper.Query(XBasePath, XMLNames.VectoJob_MissionCycles, - Helper.QueryConstraint(XMLNames.Missions_Cycle, XMLNames.ExtResource_Type_Attr, - XMLNames.ExtResource_Type_Value_CSV)), Manager); - while (cycles.MoveNext()) { - var file = cycles.Current.GetAttribute(XMLNames.ExtResource_File_Attr, ""); - var fileFull = Path.Combine(FSBasePath ?? "", file); - if (File.Exists(fileFull)) { - retVal.Add(new CycleInputData() { - Name = Path.GetFileNameWithoutExtension(fileFull), - CycleData = VectoCSVFile.Read(fileFull) - }); - } else { - try { - var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + file + - Constants.FileExtensions.CycleFile; - retVal.Add(new CycleInputData() { - Name = Path.GetFileNameWithoutExtension(file), - CycleData = VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), source: resourceName), - }); - } catch { - //Log.Debug("Driving Cycle could not be read: " + cycleFile); - throw new VectoException("Driving Cycle could not be read: " + file); - } - } - } - return retVal; - } - } - - public bool EngineOnlyMode - { - get { - return ElementExists(XMLNames.VectoJob_EngineOnlyMode) && - XmlConvert.ToBoolean(GetElementValue(XMLNames.VectoJob_EngineOnlyMode)); - } - } - - protected internal Second DownshiftAfterUpshiftDelay - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "DownshiftAfterUpshiftDelay")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "DownshiftAfterUpshiftDelay")).SI<Second>() - : DeclarationData.Gearbox.DownshiftAfterUpshiftDelay; - } - } - - protected internal Second UpshiftAfterDownshiftDelay - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "UpshiftAfterDownshiftDelay")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "UpshiftAfterDownshiftDelay")).SI<Second>() - : DeclarationData.Gearbox.UpshiftAfterDownshiftDelay; - } - } - - protected internal MeterPerSquareSecond UpshiftMinAcceleration - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "UpshiftMinAcceleration")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "UpshiftMinAcceleration")) - .SI<MeterPerSquareSecond>() - : DeclarationData.Gearbox.UpshiftMinAcceleration; - } - } - - - public string JobName - { - get { - return InputData.JobInputData().EngineOnlyMode - ? InputData.EngineInputData.Model - : InputData.VehicleData.GetVehicleID; - } - } - - public double TorqueReserve - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_TorqueReserve)) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_TorqueReserve)) - : DeclarationData.Gearbox.TorqueReserve; - } - } - - public Second MinTimeBetweenGearshift - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_TimeBetweenGearshift)) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_TimeBetweenGearshift)).SI<Second>() - : DeclarationData.Gearbox.MinTimeBetweenGearshifts; - } - } - - public MeterPerSecond StartSpeed - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartSpeed)) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartSpeed)).SI<MeterPerSecond>() - : DeclarationData.Gearbox.StartSpeed; - } - } - - public MeterPerSquareSecond StartAcceleration - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartAcceleration)) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartAcceleration)).SI<MeterPerSquareSecond>() - : DeclarationData.Gearbox.StartAcceleration; - } - } - - public double StartTorqueReserve - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartTorqueReserve)) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - XMLNames.DriverModel_ShiftStrategyParameters_StartTorqueReserve)) - : DeclarationData.Gearbox.TorqueReserveStart; - } - } - - - public Second PowershiftShiftTime - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "PowershiftShiftTime")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "PowershiftShiftTime")).SI<Second>() - : 0.8.SI<Second>(); - } - } - - public MeterPerSquareSecond CCUpshiftMinAcceleration - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "CCUpshiftMinAcceleration")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "CCUpshiftMinAcceleration")).SI<MeterPerSquareSecond>() - : DeclarationData.Gearbox.UpshiftMinAcceleration; - } - } - - public MeterPerSquareSecond CLUpshiftMinAcceleration - { - get { - return - ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "CLUpshiftMinAcceleration")) - ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, - "CLUpshiftMinAcceleration")).SI<MeterPerSquareSecond>() - : DeclarationData.Gearbox.UpshiftMinAcceleration; - } - } - - public XMLEngineeringDriverDataProvider GetDriverData() - { - return new XMLEngineeringDriverDataProvider(InputData, XMLDocument, XBasePath, FSBasePath); - } - } -} \ No newline at end of file +using System.Collections.Generic; +using System.IO; +using System.Xml; +using System.Xml.XPath; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.Impl; +using TUGraz.VectoCore.Models.Declaration; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering +{ + // ReSharper disable once InconsistentNaming + public class XMLEngineeringJobInputDataProvider : AbstractEngineeringXMLComponentDataProvider, IEngineeringJobInputData + { + public XMLEngineeringJobInputDataProvider(XMLEngineeringInputDataProvider xmlEngineeringJobInputDataProvider, + XPathDocument jobDocument, string xmlBasePath, string fsBasePath) + : base(xmlEngineeringJobInputDataProvider, jobDocument, xmlBasePath, fsBasePath) {} + + + public IVehicleDeclarationInputData Vehicle + { + get { return InputData.VehicleInputData; } + } + + IVehicleEngineeringInputData IEngineeringJobInputData.Vehicle + { + get { return InputData.VehicleInputData; } + } + + //IEngineEngineeringInputData EngineInputData + //{ + // get { return new XMLEngineeringEngineDataProvider(InputData, XMLDocument, Helper.Query(XBasePath, XMLNames.Component_Engine, XMLNames.ComponentDataWrapper) ,FSBasePath); } + //} + + public IList<ICycleData> Cycles + { + get { + var retVal = new List<ICycleData>(); + var cycles = Navigator.Select(Helper.Query(XBasePath, XMLNames.VectoJob_MissionCycles, + Helper.QueryConstraint(XMLNames.Missions_Cycle, XMLNames.ExtResource_Type_Attr, + XMLNames.ExtResource_Type_Value_CSV)), Manager); + while (cycles.MoveNext()) { + var file = cycles.Current.GetAttribute(XMLNames.ExtResource_File_Attr, ""); + var fileFull = Path.Combine(FSBasePath ?? "", file); + if (File.Exists(fileFull)) { + retVal.Add(new CycleInputData() { + Name = Path.GetFileNameWithoutExtension(fileFull), + CycleData = VectoCSVFile.Read(fileFull) + }); + } else { + try { + var resourceName = DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + file + + Constants.FileExtensions.CycleFile; + retVal.Add(new CycleInputData() { + Name = Path.GetFileNameWithoutExtension(file), + CycleData = VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceName), source: resourceName), + }); + } catch { + //Log.Debug("Driving Cycle could not be read: " + cycleFile); + throw new VectoException("Driving Cycle could not be read: " + file); + } + } + } + return retVal; + } + } + + public bool EngineOnlyMode + { + get { + return ElementExists(XMLNames.VectoJob_EngineOnlyMode) && + XmlConvert.ToBoolean(GetElementValue(XMLNames.VectoJob_EngineOnlyMode)); + } + } + + public IEngineEngineeringInputData EngineOnly + { + get { return InputData.EngineOnlyInputData; } + } + + protected internal Second DownshiftAfterUpshiftDelay + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "DownshiftAfterUpshiftDelay")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "DownshiftAfterUpshiftDelay")).SI<Second>() + : DeclarationData.Gearbox.DownshiftAfterUpshiftDelay; + } + } + + protected internal Second UpshiftAfterDownshiftDelay + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "UpshiftAfterDownshiftDelay")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "UpshiftAfterDownshiftDelay")).SI<Second>() + : DeclarationData.Gearbox.UpshiftAfterDownshiftDelay; + } + } + + protected internal MeterPerSquareSecond UpshiftMinAcceleration + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "UpshiftMinAcceleration")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "UpshiftMinAcceleration")) + .SI<MeterPerSquareSecond>() + : DeclarationData.Gearbox.UpshiftMinAcceleration; + } + } + + + public string JobName + { + get { + return InputData.JobInputData.EngineOnlyMode + ? InputData.JobInputData.EngineOnly.Model + : InputData.VehicleData.GetVehicleID; + } + } + + public double TorqueReserve + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_TorqueReserve)) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_TorqueReserve)) + : DeclarationData.Gearbox.TorqueReserve; + } + } + + public Second MinTimeBetweenGearshift + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_TimeBetweenGearshift)) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_TimeBetweenGearshift)).SI<Second>() + : DeclarationData.Gearbox.MinTimeBetweenGearshifts; + } + } + + public MeterPerSecond StartSpeed + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartSpeed)) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartSpeed)).SI<MeterPerSecond>() + : DeclarationData.Gearbox.StartSpeed; + } + } + + public MeterPerSquareSecond StartAcceleration + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartAcceleration)) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartAcceleration)).SI<MeterPerSquareSecond>() + : DeclarationData.Gearbox.StartAcceleration; + } + } + + public double StartTorqueReserve + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartTorqueReserve)) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + XMLNames.DriverModel_ShiftStrategyParameters_StartTorqueReserve)) + : DeclarationData.Gearbox.TorqueReserveStart; + } + } + + + public Second PowershiftShiftTime + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "PowershiftShiftTime")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "PowershiftShiftTime")).SI<Second>() + : 0.8.SI<Second>(); + } + } + + public MeterPerSquareSecond CCUpshiftMinAcceleration + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "CCUpshiftMinAcceleration")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "CCUpshiftMinAcceleration")).SI<MeterPerSquareSecond>() + : DeclarationData.Gearbox.UpshiftMinAcceleration; + } + } + + public MeterPerSquareSecond CLUpshiftMinAcceleration + { + get { + return + ElementExists(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "CLUpshiftMinAcceleration")) + ? GetDoubleElementValue(Helper.Query(XMLNames.Component_DriverModel, XMLNames.DriverModel_ShiftStrategyParameters, + "CLUpshiftMinAcceleration")).SI<MeterPerSquareSecond>() + : DeclarationData.Gearbox.UpshiftMinAcceleration; + } + } + + public XMLEngineeringDriverDataProvider GetDriverData() + { + return new XMLEngineeringDriverDataProvider(InputData, XMLDocument, XBasePath, FSBasePath); + } + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringVehicleDataProvider.cs index bc02bb6a76f1af3664189268ef24d7ce7a6cdc48..a0bc6cb48c0b61e2edb3d7768048515148972d08 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringVehicleDataProvider.cs @@ -51,9 +51,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering IVehicleEngineeringInputData, IPTOTransmissionInputData { - public XMLEngineeringVehicleDataProvider(XMLEngineeringInputDataProvider xmlEngineeringJobInputDataProvider, + protected internal XMLEngineeringAuxiliaryDataProvider XMLEngineeringAuxiliaryData; + protected internal XMLEngineeringAxlegearDataProvider AxlegearData; + + public XMLEngineeringVehicleDataProvider(XMLEngineeringInputDataProvider jobProvider, XPathDocument vehicleDocument, string xmlBasePath, string fsBasePath) - : base(xmlEngineeringJobInputDataProvider, vehicleDocument, xmlBasePath, fsBasePath) {} + : base(jobProvider, vehicleDocument, xmlBasePath, fsBasePath) + { + AxlegearData = GetAxleGearInputData(jobProvider.Settings); + AngledriveInputData = GetAngularGearInputData(); + EngineInputData = GetEngineInputData(jobProvider.Settings); + RetarderInputData = GetRetarderInputData(jobProvider.Settings); + XMLEngineeringAuxiliaryData = GetAuxiliaryData(jobProvider.Settings); + GearboxInputData = GetGearboxData(jobProvider.Settings); + TorqueConverterInputData = GearboxInputData.TorqueConverter; + PTOTransmissionInputData = GetPTOData(); + AirdragInputData = GetAirdragInputData(jobProvider.Settings); + } public string GetVehicleID { @@ -224,25 +238,76 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering get { return GetElementValue(XMLNames.Vehicle_AngledriveType).ParseEnum<AngledriveType>(); } } - public IAirdragEngineeringInputData GetAirdragInputData(XmlReaderSettings settings) + public IAirdragEngineeringInputData AirdragInputData { get; private set; } + + IAirdragDeclarationInputData IVehicleDeclarationInputData.AirdragInputData + { + get { return AirdragInputData; } + } + + IGearboxDeclarationInputData IVehicleDeclarationInputData.GearboxInputData + { + get { return GearboxInputData; } + } + + ITorqueConverterDeclarationInputData IVehicleDeclarationInputData.TorqueConverterInputData + { + get { return TorqueConverterInputData; } + } + + public IGearboxEngineeringInputData GearboxInputData { get; private set; } + + public ITorqueConverterEngineeringInputData TorqueConverterInputData { get; private set; } + + public IAxleGearInputData AxleGearInputData + { + get { return AxlegearData; } + } + + public IAngledriveInputData AngledriveInputData { get; private set; } + + IEngineDeclarationInputData IVehicleDeclarationInputData.EngineInputData + { + get { return EngineInputData; } + } + + public IEngineEngineeringInputData EngineInputData { get; private set; } + + public IAuxiliariesEngineeringInputData AuxiliaryInputData() + { + return XMLEngineeringAuxiliaryData; + } + + IAuxiliariesDeclarationInputData IVehicleDeclarationInputData.AuxiliaryInputData() + { + throw new NotImplementedException(); + } + + public IRetarderInputData RetarderInputData { get; private set; } + + public IPTOTransmissionInputData PTOTransmissionInputData { get; private set; } + + #region "FactoryMethods" + + private IAirdragEngineeringInputData GetAirdragInputData(XmlReaderSettings settings) { return CreateComponentInput(XMLNames.Component_AirDrag, settings, (a, b, c, d) => new XMLEngineeringAirdragDataProvider(a, b, c, d)); } - public XMLEngineeringAxlegearDataProvider GetAxleGearInputData(XmlReaderSettings settings) + private XMLEngineeringAxlegearDataProvider GetAxleGearInputData(XmlReaderSettings settings) { return CreateComponentInput(XMLNames.Component_Axlegear, settings, (a, b, c, d) => new XMLEngineeringAxlegearDataProvider(a, b, c, d)); } - public XMLEngineeringEngineDataProvider GetEngineInputData(XmlReaderSettings settings) + private XMLEngineeringEngineDataProvider GetEngineInputData(XmlReaderSettings settings) { return CreateComponentInput(XMLNames.Component_Engine, settings, (a, b, c, d) => new XMLEngineeringEngineDataProvider(a, b, c, d)); } - public XMLEngineeringRetarderDataProvider GetRetarderInputData(XmlReaderSettings settings) + private XMLEngineeringRetarderDataProvider GetRetarderInputData(XmlReaderSettings settings) { if (!RetarderType.IsDedicatedComponent()) { return new XMLEngineeringRetarderDataProvider(InputData, XMLDocument, @@ -254,20 +319,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering (a, b, c, d) => new XMLEngineeringRetarderDataProvider(a, b, c, d)); } - public XMLEngineeringGearboxDataProvider GetGearboxData(XmlReaderSettings settings) + private XMLEngineeringGearboxDataProvider GetGearboxData(XmlReaderSettings settings) { return CreateComponentInput(XMLNames.Component_Gearbox, settings, (a, b, c, d) => new XMLEngineeringGearboxDataProvider(a, b, c, d)); } - public XMLEngineeringAuxiliaryDataProvider GetAuxiliaryData(XmlReaderSettings settings) + private XMLEngineeringAuxiliaryDataProvider GetAuxiliaryData(XmlReaderSettings settings) { return CreateComponentInput(XMLNames.Component_Auxiliaries, settings, (a, b, c, d) => new XMLEngineeringAuxiliaryDataProvider(a, b, c, d)); } - protected T CreateComponentInput<T>(string componentName, XmlReaderSettings settings, + private T CreateComponentInput<T>(string componentName, XmlReaderSettings settings, Func<XMLEngineeringInputDataProvider, XPathDocument, string, string, T> creator) { if (ElementExists(Helper.Query(XMLNames.Vehicle_Components, componentName))) { @@ -297,6 +362,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering throw new VectoException("Component {0} not found!", componentName); } + #endregion + public XMLEngineeringAngledriveDataProvider GetAngularGearInputData() { return new XMLEngineeringAngledriveDataProvider(InputData, XMLDocument, @@ -346,4 +413,4 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering #endregion } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs index c3696d9f0b8b3647e7a5ee848732e9513792f562..08d226acfd4aba8319adbdfa0b5443d112628d0a 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs @@ -50,11 +50,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter { public class DeclarationDataAdapter : AbstractSimulationDataAdapter { - public DriverData CreateDriverData(IDriverDeclarationInputData data) + public DriverData CreateDriverData() { - if (!data.SavedInDeclarationMode) { - WarnDeclarationMode("DriverData"); - } var lookAheadData = new DriverData.LACData { Enabled = DeclarationData.Driver.LookAhead.Enabled, //Deceleration = DeclarationData.Driver.LookAhead.Deceleration, @@ -63,7 +60,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter LookAheadDistanceFactor = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor, }; var overspeedData = new DriverData.OverSpeedEcoRollData { - Mode = data.OverSpeedEcoRoll.Mode, + Mode = DriverMode.Overspeed, MinSpeed = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed, OverSpeed = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed, UnderSpeed = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed diff --git a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs index 3accb760c98acd54efaa483b0ff545fb039cc816..454f2f7fb33e0ee5500543bc8d507a013bcee7e0 100644 --- a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs @@ -74,6 +74,9 @@ namespace TUGraz.VectoCore.InputData.Reader if (DistanceBasedCycleDataParser.ValidateHeader(cols, false)) { return CycleType.DistanceBased; } + if (EPTPCycleDataParser.ValidateHeader(cols, false)) { + return CycleType.EPTP; + } throw new VectoException("CycleFile format is unknown."); } @@ -92,7 +95,10 @@ namespace TUGraz.VectoCore.InputData.Reader return new MeasuredSpeedDataParser(); case CycleType.PTO: return new PTOCycleDataParser(); - default: + case CycleType.EPTP: + return new EPTPCycleDataParser(); + + default: throw new ArgumentOutOfRangeException("Cycle Type", type.ToString()); } } @@ -311,6 +317,8 @@ namespace TUGraz.VectoCore.InputData.Reader public const string RoadGradient = "grad"; public const string StoppingTime = "stop"; public const string EngineSpeed = "n"; + public const string EngineSpeedSuffix = "n_eng"; + public const string FanSpeed = "n_fan"; public const string Gear = "gear"; public const string AdditionalAuxPowerDemand = "Padd"; public const string AirSpeedRelativeToVehicle = "vair_res"; @@ -698,7 +706,56 @@ namespace TUGraz.VectoCore.InputData.Reader return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux); } } - } + + /// <summary> + /// Parser for PTO Cycles. + /// </summary> + // <t>,<v> [km/h],<Pwheel> [kW],<n_eng> [rpm],<n_fan> [rpm], <Padd> [kW] + private class EPTPCycleDataParser : 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(); + + return entries; + } + + public static bool ValidateHeader(DataColumnCollection header, bool throwExceptions = true) + { + var requiredCols = new[] { + Fields.Time, + Fields.VehicleSpeed, + Fields.PWheel, + Fields.EngineSpeedSuffix, + Fields.FanSpeed + }; + + var allowedCols = new[] { + Fields.Time, + Fields.VehicleSpeed, + Fields.AdditionalAuxPowerDemand, + Fields.PWheel, + Fields.EngineSpeedSuffix, + Fields.FanSpeed + }; + + const bool allowAux = true; + + return CheckColumns(header, allowedCols, requiredCols, throwExceptions, allowAux) && + CheckComboColumns(header, new[] { Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle }, throwExceptions); + } + } + + } #endregion } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs index 232ac66901c97c98f95e948b3583dba45e074bb9..2fa122c79b7512692acf3b9967a8282363778d94 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs @@ -88,30 +88,33 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl private void Initialize() { _dao = new DeclarationDataAdapter(); - _segment = GetVehicleClassification(InputDataProvider.VehicleInputData.VehicleCategory, - InputDataProvider.VehicleInputData.AxleConfiguration, - InputDataProvider.VehicleInputData.GrossVehicleMassRating, InputDataProvider.VehicleInputData.CurbMassChassis); + _segment = GetVehicleClassification(InputDataProvider.JobInputData.Vehicle.VehicleCategory, + InputDataProvider.JobInputData.Vehicle.AxleConfiguration, + InputDataProvider.JobInputData.Vehicle.GrossVehicleMassRating, + InputDataProvider.JobInputData.Vehicle.CurbMassChassis); if (!_segment.Found) { throw new VectoException( "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, GVMR: {2}", - InputDataProvider.VehicleInputData.VehicleCategory, InputDataProvider.VehicleInputData.AxleConfiguration, - InputDataProvider.VehicleInputData.GrossVehicleMassRating); + InputDataProvider.JobInputData.Vehicle.VehicleCategory, InputDataProvider.JobInputData.Vehicle.AxleConfiguration, + InputDataProvider.JobInputData.Vehicle.GrossVehicleMassRating); } - _driverdata = _dao.CreateDriverData(InputDataProvider.DriverInputData); + _driverdata = _dao.CreateDriverData(); _driverdata.AccelerationCurve = AccelerationCurveReader.ReadFromStream(_segment.AccelerationFile); - var tempVehicle = _dao.CreateVehicleData(InputDataProvider.VehicleInputData, _segment.Missions.First(), + var tempVehicle = _dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, _segment.Missions.First(), _segment.Missions.First().Loadings.First().Value, _segment.MunicipalBodyWeight); - _airdragData = _dao.CreateAirdragData(InputDataProvider.AirdragInputData, _segment.Missions.First(), _segment); - _engineData = _dao.CreateEngineData(InputDataProvider.EngineInputData, - InputDataProvider.VehicleInputData.EngineIdleSpeed, - InputDataProvider.GearboxInputData, InputDataProvider.VehicleInputData.TorqueLimits); - _axlegearData = _dao.CreateAxleGearData(InputDataProvider.AxleGearInputData, false); - _angledriveData = _dao.CreateAngledriveData(InputDataProvider.AngledriveInputData, false); - _gearboxData = _dao.CreateGearboxData(InputDataProvider.GearboxInputData, _engineData, _axlegearData.AxleGear.Ratio, + _airdragData = _dao.CreateAirdragData(InputDataProvider.JobInputData.Vehicle.AirdragInputData, + _segment.Missions.First(), _segment); + _engineData = _dao.CreateEngineData(InputDataProvider.JobInputData.Vehicle.EngineInputData, + InputDataProvider.JobInputData.Vehicle.EngineIdleSpeed, + InputDataProvider.JobInputData.Vehicle.GearboxInputData, InputDataProvider.JobInputData.Vehicle.TorqueLimits); + _axlegearData = _dao.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.AxleGearInputData, false); + _angledriveData = _dao.CreateAngledriveData(InputDataProvider.JobInputData.Vehicle.AngledriveInputData, false); + _gearboxData = _dao.CreateGearboxData(InputDataProvider.JobInputData.Vehicle.GearboxInputData, _engineData, + _axlegearData.AxleGear.Ratio, tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, false); - _retarderData = _dao.CreateRetarderData(InputDataProvider.RetarderInputData); + _retarderData = _dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData); - _ptoTransmissionData = _dao.CreatePTOTransmissionData(InputDataProvider.PTOTransmissionInputData); + _ptoTransmissionData = _dao.CreatePTOTransmissionData(InputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData); _municipalPtoTransmissionData = CreateDefaultPTOData(); } @@ -120,15 +123,17 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { var powertrainConfig = new VectoRunData() { VehicleData = - _dao.CreateVehicleData(InputDataProvider.VehicleInputData, _segment.Missions.First(), + _dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, _segment.Missions.First(), _segment.Missions.First().Loadings.First().Value, _segment.MunicipalBodyWeight), AirdragData = _airdragData, EngineData = _engineData, GearboxData = _gearboxData, AxleGearData = _axlegearData, Retarder = _retarderData, - Aux = _dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData(), _segment.Missions.First().MissionType, - _segment.VehicleClass), + Aux = + _dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), + _segment.Missions.First().MissionType, + _segment.VehicleClass), InputDataHash = InputDataProvider.XMLHash }; powertrainConfig.VehicleData.VehicleClass = _segment.VehicleClass; @@ -159,19 +164,20 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl var simulationRunData = new VectoRunData { Loading = loading.Key, VehicleData = - _dao.CreateVehicleData(InputDataProvider.VehicleInputData, mission, loading.Value, _segment.MunicipalBodyWeight), - AirdragData = _dao.CreateAirdragData(InputDataProvider.AirdragInputData, mission, _segment), + _dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, mission, loading.Value, + _segment.MunicipalBodyWeight), + AirdragData = _dao.CreateAirdragData(InputDataProvider.JobInputData.Vehicle.AirdragInputData, mission, _segment), EngineData = _engineData.Copy(), GearboxData = _gearboxData, AxleGearData = _axlegearData, AngledriveData = _angledriveData, - Aux = _dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData(), mission.MissionType, + Aux = _dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(), mission.MissionType, _segment.VehicleClass), Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()), Retarder = _retarderData, DriverData = _driverdata, ExecutionMode = ExecutionMode.Declaration, - JobName = InputDataProvider.JobInputData().JobName, + JobName = InputDataProvider.JobInputData.JobName, ModFileSuffix = loading.Key.ToString(), Report = Report, Mission = mission, diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs index 6b0e0fe5f8909d62f7466d997f2195af0914d95b..40c0e2808647b65d9774a126345fa1806c4b9f6f 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs @@ -29,36 +29,36 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.Collections.Generic; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; - -namespace TUGraz.VectoCore.InputData.Reader.Impl -{ - public class EngineOnlyVectoRunDataFactory : EngineeringModeVectoRunDataFactory - { - internal EngineOnlyVectoRunDataFactory(IEngineeringInputDataProvider dataProvider) : base(dataProvider) {} - - public override IEnumerable<VectoRunData> NextRun() - { - if (InputDataProvider == null) { - Log.Warn("No valid data provider given"); - yield break; - } - var dao = new EngineeringDataAdapter(); - foreach (var cycle in InputDataProvider.JobInputData().Cycles) { - var simulationRunData = new VectoRunData { - JobName = InputDataProvider.JobInputData().JobName, - EngineData = dao.CreateEngineData(InputDataProvider.EngineInputData, null, new List<ITorqueLimitInputData>()), - Cycle = new DrivingCycleProxy( - DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, CycleType.EngineOnly, cycle.Name, false), cycle.Name), - ExecutionMode = ExecutionMode.Engineering - }; - yield return simulationRunData; - } - } - } -} \ No newline at end of file +using System.Collections.Generic; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data; + +namespace TUGraz.VectoCore.InputData.Reader.Impl +{ + public class EngineOnlyVectoRunDataFactory : EngineeringModeVectoRunDataFactory + { + internal EngineOnlyVectoRunDataFactory(IEngineeringInputDataProvider dataProvider) : base(dataProvider) {} + + public override IEnumerable<VectoRunData> NextRun() + { + if (InputDataProvider == null) { + Log.Warn("No valid data provider given"); + yield break; + } + var dao = new EngineeringDataAdapter(); + foreach (var cycle in InputDataProvider.JobInputData.Cycles) { + var simulationRunData = new VectoRunData { + JobName = InputDataProvider.JobInputData.JobName, + EngineData = dao.CreateEngineData(InputDataProvider.JobInputData.EngineOnly, null, new List<ITorqueLimitInputData>()), + Cycle = new DrivingCycleProxy( + DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, CycleType.EngineOnly, cycle.Name, false), cycle.Name), + ExecutionMode = ExecutionMode.Engineering + }; + yield return simulationRunData; + } + } + } +} diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf955d02426c3b1b2d49aa2dd68f7f6e2b551082 --- /dev/null +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringEPTPModeVectoRunDataFactory.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.Reader.ComponentData; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; +using TUGraz.VectoCore.Models.Declaration; +using TUGraz.VectoCore.Models.Simulation.Data; + +namespace TUGraz.VectoCore.InputData.Reader.Impl { + internal class EngineeringEPTPModeVectoRunDataFactory : IVectoRunDataFactory + { + protected IEPTPInputDataProvider InputDataProvider; + + public EngineeringEPTPModeVectoRunDataFactory(IEPTPInputDataProvider eptpProvider) + { + InputDataProvider = eptpProvider; + } + + public IEnumerable<VectoRunData> NextRun() + { + var dao = new DeclarationDataAdapter(); + var segment = DeclarationData.Segments.Lookup(InputDataProvider.JobInputData.Vehicle.VehicleCategory, + InputDataProvider.JobInputData.Vehicle.AxleConfiguration, + InputDataProvider.JobInputData.Vehicle.GrossVehicleMassRating, + InputDataProvider.JobInputData.Vehicle.CurbMassChassis); + var driverdata = dao.CreateDriverData(); + driverdata.AccelerationCurve = AccelerationCurveReader.ReadFromStream(segment.AccelerationFile); + var tempVehicle = dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, segment.Missions.First(), + segment.Missions.First().Loadings.First().Value, segment.MunicipalBodyWeight); + var airdragData = dao.CreateAirdragData(InputDataProvider.JobInputData.Vehicle.AirdragInputData, + segment.Missions.First(), segment); + var engineData = dao.CreateEngineData(InputDataProvider.JobInputData.Vehicle.EngineInputData, + InputDataProvider.JobInputData.Vehicle.EngineIdleSpeed, + InputDataProvider.JobInputData.Vehicle.GearboxInputData, InputDataProvider.JobInputData.Vehicle.TorqueLimits); + var axlegearData = dao.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.AxleGearInputData, false); + var angledriveData = dao.CreateAngledriveData(InputDataProvider.JobInputData.Vehicle.AngledriveInputData, false); + var gearboxData = dao.CreateGearboxData(InputDataProvider.JobInputData.Vehicle.GearboxInputData, engineData, + axlegearData.AxleGear.Ratio, + tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, false); + var retarderData = dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData); + + 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); + aux.Add(new VectoRunData.AuxData { + DemandType = AuxiliaryDemandType.Direct, + ID = DrivingCycleDataReader.Fields.AdditionalAuxPowerDemand + }); + + return InputDataProvider.JobInputData.Cycles.Select(cycle => { + var drivingCycle = DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, false); + return new VectoRunData { + JobName = InputDataProvider.JobInputData.Vehicle.VIN, + EngineData = engineData, + GearboxData = gearboxData, + AxleGearData = axlegearData, + AngledriveData = angledriveData, + VehicleData = dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, segment.Missions.First(), + 0.SI<Kilogram>(), segment.MunicipalBodyWeight), + AirdragData =airdragData, + DriverData = null, + Aux = aux, + AdvancedAux = null, + Retarder = dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData), + PTO = ptoTransmissionData, + Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), + ExecutionMode = ExecutionMode.Engineering + }; + }); + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs index dfcd0c3c747e29c04e293b8c6fff25400f979587..e4c0de271c4114b1b655a7694679ca9ade4e0fb4 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs @@ -61,35 +61,35 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { var dao = new EngineeringDataAdapter(); var driver = dao.CreateDriverData(InputDataProvider.DriverInputData); - var engineData = dao.CreateEngineData(InputDataProvider.EngineInputData, InputDataProvider.GearboxInputData, - InputDataProvider.VehicleInputData.TorqueLimits); + var engineData = dao.CreateEngineData(InputDataProvider.JobInputData.Vehicle.EngineInputData, InputDataProvider.JobInputData.Vehicle.GearboxInputData, + InputDataProvider.JobInputData.Vehicle.TorqueLimits); - var tempVehicle = dao.CreateVehicleData(InputDataProvider.VehicleInputData); + var tempVehicle = dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle); - var axlegearData = dao.CreateAxleGearData(InputDataProvider.AxleGearInputData, useEfficiencyFallback: true); - var gearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData, axlegearData.AxleGear.Ratio, + var axlegearData = dao.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.AxleGearInputData, useEfficiencyFallback: true); + var gearboxData = dao.CreateGearboxData(InputDataProvider.JobInputData.Vehicle.GearboxInputData, engineData, axlegearData.AxleGear.Ratio, tempVehicle.DynamicTyreRadius,tempVehicle.VehicleCategory, useEfficiencyFallback: true); - var crossWindRequired = InputDataProvider.AirdragInputData.CrossWindCorrectionMode == + var crossWindRequired = InputDataProvider.JobInputData.Vehicle.AirdragInputData.CrossWindCorrectionMode == CrossWindCorrectionMode.VAirBetaLookupTable; - var angledriveData = dao.CreateAngledriveData(InputDataProvider.AngledriveInputData, useEfficiencyFallback: true); - var ptoTransmissionData = dao.CreatePTOTransmissionData(InputDataProvider.PTOTransmissionInputData); + var angledriveData = dao.CreateAngledriveData(InputDataProvider.JobInputData.Vehicle.AngledriveInputData, useEfficiencyFallback: true); + var ptoTransmissionData = dao.CreatePTOTransmissionData(InputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData); - return InputDataProvider.JobInputData().Cycles.Select(cycle => { + return InputDataProvider.JobInputData.Cycles.Select(cycle => { var drivingCycle = CyclesCache.ContainsKey(cycle.CycleData.Source) ? CyclesCache[cycle.CycleData.Source] : DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, crossWindRequired); return new VectoRunData { - JobName = InputDataProvider.JobInputData().JobName, + JobName = InputDataProvider.JobInputData.JobName, EngineData = engineData, GearboxData = gearboxData, AxleGearData = axlegearData, AngledriveData = angledriveData, - VehicleData = dao.CreateVehicleData(InputDataProvider.VehicleInputData), - AirdragData = dao.CreateAirdragData(InputDataProvider.AirdragInputData, InputDataProvider.VehicleInputData), + VehicleData = dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle), + AirdragData = dao.CreateAirdragData(InputDataProvider.JobInputData.Vehicle.AirdragInputData, InputDataProvider.JobInputData.Vehicle), DriverData = driver, - Aux = dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData()), - AdvancedAux = dao.CreateAdvancedAuxData(InputDataProvider.AuxiliaryInputData()), - Retarder = dao.CreateRetarderData(InputDataProvider.RetarderInputData), + Aux = dao.CreateAuxiliaryData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData()), + AdvancedAux = dao.CreateAdvancedAuxData(InputDataProvider.JobInputData.Vehicle.AuxiliaryInputData()), + Retarder = dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData), PTO = ptoTransmissionData, Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), ExecutionMode = ExecutionMode.Engineering @@ -97,4 +97,4 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl }); } } -} \ 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 f677315e4e085472ae482fcf597976cf8ad75c4a..88a5c904a9d3ad9992fd4352416542f9d4b7dda6 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -33,6 +33,7 @@ using System; using System.Linq; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; @@ -69,6 +70,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return BuildEngineOnly(data); case CycleType.PWheel: return BuildPWheel(data); + case CycleType.EPTP: + return BuildEPTP(data); case CycleType.MeasuredSpeed: return BuildMeasuredSpeed(data); case CycleType.MeasuredSpeedGear: @@ -124,7 +127,40 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return container; } - private VehicleContainer BuildMeasuredSpeed(VectoRunData data) + private VehicleContainer BuildEPTP(VectoRunData data) + { + if (data.Cycle.CycleType != CycleType.PWheel) { + throw new VectoException("CycleType must be PWheel."); + } + + 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, + 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 CombustionEngine(container, data.EngineData, pt1Disabled: true); + + var aux = CreateAuxiliaries(data, container); + aux.AddCycle(Constants.Auxiliaries.IDs.Fan, cycleEntry => { + var fanSpeed = cycleEntry.FanSpeed.AsRPM; + return (c1 * Math.Pow(fanSpeed / c2, 3) * Math.Pow(fanSpeed / c3, 5)*1000).SI<Watt>(); + }); + + engine.Connect(aux.Port()); + var idleController = GetIdleController(data.PTO, engine, container); + + powertrain.AddComponent(engine, idleController); + //.AddAuxiliaries(container, data); + + return container; + } + + private VehicleContainer BuildMeasuredSpeed(VectoRunData data) { if (data.Cycle.CycleType != CycleType.MeasuredSpeed) { throw new VectoException("CycleType must be MeasuredSpeed."); @@ -272,7 +308,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.PTOConsumer, Constants.Auxiliaries.PowerPrefix + Constants.Auxiliaries.IDs.PTOConsumer); } - return aux; } diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs index 11c557e304aaee0106ab38126b6930bbddd7635e..be8a7420b9f384e57d2c2c54b820bf967dd71736 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs @@ -89,14 +89,23 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl private void CreateEngineeringDataReader(IInputDataProvider dataProvider) { - var engDataProvider = ToEngineeringInputDataProvider(dataProvider); - if (engDataProvider.JobInputData().EngineOnlyMode) { - DataReader = new EngineOnlyVectoRunDataFactory(engDataProvider); - _engineOnlyMode = true; - } else { - DataReader = new EngineeringModeVectoRunDataFactory(engDataProvider); - } - } + if (dataProvider is IEPTPInputDataProvider) { + var eptpProvider = dataProvider as IEPTPInputDataProvider; + DataReader = new EngineeringEPTPModeVectoRunDataFactory(eptpProvider); + return; + } + if (dataProvider is IEngineeringInputDataProvider) { + var engDataProvider = dataProvider as IEngineeringInputDataProvider; + if (engDataProvider.JobInputData.EngineOnlyMode) { + DataReader = new EngineOnlyVectoRunDataFactory(engDataProvider); + _engineOnlyMode = true; + } else { + DataReader = new EngineeringModeVectoRunDataFactory(engDataProvider); + } + return; + } + throw new VectoException("Unknown InputData for Engineering Mode!"); + } private static IDeclarationInputDataProvider ToDeclarationInputDataProvider(IInputDataProvider dataProvider) { @@ -107,15 +116,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return declDataProvider; } - private static IEngineeringInputDataProvider ToEngineeringInputDataProvider(IInputDataProvider dataProvider) - { - var engDataProvider = dataProvider as IEngineeringInputDataProvider; - if (engDataProvider == null) { - throw new VectoException("InputDataProvider does not implement Engineering interface"); - } - return engDataProvider; - } - public bool Validate { get; set; } public IVectoRunDataFactory DataReader { get; private set; } @@ -203,6 +203,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl break; case CycleType.EngineOnly: case CycleType.PWheel: + case CycleType.EPTP: case CycleType.MeasuredSpeed: case CycleType.MeasuredSpeedGear: run = new TimeRun(builder.Build(data)); @@ -228,4 +229,4 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return addReportResult; } } -} \ 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 97df6a5a1d3eef4a8dc2290df99cb75ff67781ba..e9ea12ac4d10d60d3f7234017607c8a842e1095d 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs @@ -29,208 +29,215 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Diagnostics; -using System.Linq; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Data -{ - public enum CycleType - { - EngineOnly, - DistanceBased, - PWheel, - MeasuredSpeed, - MeasuredSpeedGear, - PTO - } - - public static class CycleTypeHelper - { - public static bool IsDistanceBased(this CycleType type) - { - return type == CycleType.DistanceBased; - } - } - - public interface IDrivingCycleData - { - List<DrivingCycleData.DrivingCycleEntry> Entries { get; } - string Name { get; } - CycleType CycleType { get; } - void Finish(); - } - - [CustomValidation(typeof(DrivingCycleData), "ValidateCycleData")] - public class DrivingCycleData : SimulationComponentData, IDrivingCycleData - { - internal DrivingCycleData() {} - - public List<DrivingCycleEntry> Entries { get; internal set; } - - public string Name { get; internal set; } - - public CycleType CycleType { get; internal set; } - - public void Finish() {} - - // ReSharper disable once UnusedMember.Global -- used by Validation - public static ValidationResult ValidateCycleData(DrivingCycleData cycleData, ValidationContext validationContext) - { - var mode = GetExecutionMode(validationContext); - if (mode == ExecutionMode.Declaration) { - return ValidationResult.Success; - } - - var result = new List<string>(); - if (cycleData.CycleType.IsDistanceBased()) { - var cur = cycleData.Entries[0].Distance; - for (var i = 1; i < cycleData.Entries.Count; i++) { - if (cycleData.Entries[i].Distance < cur) { - result.Add( - string.Format("distance-based cycle is not increasing strictly monotonous. entry: {0}, s_{1}: {2} s_{0}: {3}", i, - i - 1, cycleData.Entries[i - 1].Distance, cycleData.Entries[i].Distance)); - } - cur = cycleData.Entries[i].Distance; - } - } else { - var cur = cycleData.Entries[0].Time; - for (var i = 1; i < cycleData.Entries.Count; i++) { - if (cycleData.Entries[i].Time < cur) { - result.Add( - string.Format("time-based cycle is not increasing strictly monotonous. entry: {0}, t_{1}: {2} t_{0}: {3}", i, - i - 1, cycleData.Entries[i - 1].Time, cycleData.Entries[i].Time)); - } - cur = cycleData.Entries[i].Time; - } - } - if (result.Any()) { - return new ValidationResult(string.Format("Validation of Cycle {0} failed", cycleData.Name), result); - } - return ValidationResult.Success; - } - - [DebuggerDisplay( - "s:{Distance}, t:{Time}, v:{VehicleTargetSpeed}, grad:{RoadGradient}, n:{AngularVelocity}, gear:{Gear}")] - public class DrivingCycleEntry - { - public DrivingCycleEntry() {} - - public DrivingCycleEntry(DrivingCycleEntry entry) - { - Distance = entry.Distance; - Time = entry.Time; - VehicleTargetSpeed = entry.VehicleTargetSpeed; - RoadGradient = entry.RoadGradient; - Altitude = entry.Altitude; - StoppingTime = entry.StoppingTime; - AngularVelocity = entry.AngularVelocity; - Gear = entry.Gear; - AdditionalAuxPowerDemand = entry.AdditionalAuxPowerDemand; - AirSpeedRelativeToVehicle = entry.AirSpeedRelativeToVehicle; - WindYawAngle = entry.WindYawAngle; - Torque = entry.Torque; - Drag = entry.Drag; - PTOActive = entry.PTOActive; - AuxiliarySupplyPower = new Dictionary<string, Watt>(entry.AuxiliarySupplyPower); - } - - /// <summary> - /// Travelled distance used for distance-based cycles. If "t" is also defined this column will be ignored. - /// </summary> - public Meter Distance; - - /// <summary> - /// Used for time-based cycles. If neither this nor the distance. "s" is defined the data will be interpreted as 1Hz. - /// </summary> - public Second Time; - - /// <summary> - /// Required except for Engine Only Mode calculations. - /// </summary> - public MeterPerSecond VehicleTargetSpeed; - - /// <summary> - /// Optional. - /// </summary> - public Radian RoadGradient; - - /// <summary> - /// [%] Optional. - /// </summary> - public Scalar RoadGradientPercent - { - get { return (Math.Tan(RoadGradient.Value()) * 100).SI<Scalar>(); } - } - - /// <summary> - /// relative altitude of the driving cycle over distance - /// </summary> - public Meter Altitude; - - /// <summary> - /// Required for distance-based cycles. Not used in time based cycles. "stop" defines the time the vehicle spends in stop phases. - /// </summary> - public Second StoppingTime; - - /// <summary> - /// Supply Power input for each auxiliary defined in the .vecto file where xxx matches the ID of the corresponding - /// Auxiliary. ID's are not case sensitive and must not contain space or special characters. - /// </summary> - public Dictionary<string, Watt> AuxiliarySupplyPower; - - /// <summary> - /// If "n_eng_avg" is defined VECTO uses that instead of the calculated engine speed value. - /// </summary> - public PerSecond AngularVelocity; - - /// <summary> - /// [-] Gear input. Overwrites the gear shift model. - /// </summary> - public uint Gear; - - /// <summary> - /// This power input will be directly added to the engine power in addition to possible other auxiliaries. Also used in Engine Only Mode. - /// </summary> - public Watt AdditionalAuxPowerDemand; - - /// <summary> - /// Only required if Cross Wind Correction is set to Vair and Beta Input. - /// </summary> - public MeterPerSecond AirSpeedRelativeToVehicle; - - /// <summary> - /// [°] Only required if Cross Wind Correction is set to Vair and Beta Input. - /// </summary> - public double WindYawAngle; - - /// <summary> - /// Effective engine torque at clutch. Only required in Engine Only Mode. Alternatively power "Pe" can be defined. Use "DRAG" to define motoring operation. - /// </summary> - public NewtonMeter Torque; - - public bool Drag; - - /// <summary> - /// Power on the Wheels (only used in PWheel Mode). - /// </summary> - public Watt PWheel; - - public bool? TorqueConverterActive { get; set; } - - /// <summary> - /// The angular velocity at the wheel. only used in PWheelCycle. - /// </summary> - public PerSecond WheelAngularVelocity; - - /// <summary> - /// Flag if PTO Cycle is active or not. - /// </summary> - public bool PTOActive; - } - } +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using System.Linq; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Data +{ + public enum CycleType + { + EngineOnly, + DistanceBased, + PWheel, + MeasuredSpeed, + MeasuredSpeedGear, + PTO, + EPTP + } + + public static class CycleTypeHelper + { + public static bool IsDistanceBased(this CycleType type) + { + return type == CycleType.DistanceBased; + } + } + + public interface IDrivingCycleData + { + List<DrivingCycleData.DrivingCycleEntry> Entries { get; } + string Name { get; } + CycleType CycleType { get; } + void Finish(); + } + + [CustomValidation(typeof(DrivingCycleData), "ValidateCycleData")] + public class DrivingCycleData : SimulationComponentData, IDrivingCycleData + { + internal DrivingCycleData() {} + + public List<DrivingCycleEntry> Entries { get; internal set; } + + public string Name { get; internal set; } + + public CycleType CycleType { get; internal set; } + + public void Finish() {} + + // ReSharper disable once UnusedMember.Global -- used by Validation + public static ValidationResult ValidateCycleData(DrivingCycleData cycleData, ValidationContext validationContext) + { + var mode = GetExecutionMode(validationContext); + if (mode == ExecutionMode.Declaration) { + return ValidationResult.Success; + } + + var result = new List<string>(); + if (cycleData.CycleType.IsDistanceBased()) { + var cur = cycleData.Entries[0].Distance; + for (var i = 1; i < cycleData.Entries.Count; i++) { + if (cycleData.Entries[i].Distance < cur) { + result.Add( + string.Format("distance-based cycle is not increasing strictly monotonous. entry: {0}, s_{1}: {2} s_{0}: {3}", i, + i - 1, cycleData.Entries[i - 1].Distance, cycleData.Entries[i].Distance)); + } + cur = cycleData.Entries[i].Distance; + } + } else { + var cur = cycleData.Entries[0].Time; + for (var i = 1; i < cycleData.Entries.Count; i++) { + if (cycleData.Entries[i].Time < cur) { + result.Add( + string.Format("time-based cycle is not increasing strictly monotonous. entry: {0}, t_{1}: {2} t_{0}: {3}", i, + i - 1, cycleData.Entries[i - 1].Time, cycleData.Entries[i].Time)); + } + cur = cycleData.Entries[i].Time; + } + } + if (result.Any()) { + return new ValidationResult(string.Format("Validation of Cycle {0} failed", cycleData.Name), result); + } + return ValidationResult.Success; + } + + [DebuggerDisplay( + "s:{Distance}, t:{Time}, v:{VehicleTargetSpeed}, grad:{RoadGradient}, n:{AngularVelocity}, gear:{Gear}")] + public class DrivingCycleEntry + { + public DrivingCycleEntry() {} + + public DrivingCycleEntry(DrivingCycleEntry entry) + { + Distance = entry.Distance; + Time = entry.Time; + VehicleTargetSpeed = entry.VehicleTargetSpeed; + RoadGradient = entry.RoadGradient; + Altitude = entry.Altitude; + StoppingTime = entry.StoppingTime; + AngularVelocity = entry.AngularVelocity; + Gear = entry.Gear; + AdditionalAuxPowerDemand = entry.AdditionalAuxPowerDemand; + AirSpeedRelativeToVehicle = entry.AirSpeedRelativeToVehicle; + WindYawAngle = entry.WindYawAngle; + Torque = entry.Torque; + Drag = entry.Drag; + PTOActive = entry.PTOActive; + AuxiliarySupplyPower = new Dictionary<string, Watt>(entry.AuxiliarySupplyPower); + EngineSpeed = entry.EngineSpeed; + FanSpeed = entry.FanSpeed; + } + + /// <summary> + /// Travelled distance used for distance-based cycles. If "t" is also defined this column will be ignored. + /// </summary> + public Meter Distance; + + /// <summary> + /// Used for time-based cycles. If neither this nor the distance. "s" is defined the data will be interpreted as 1Hz. + /// </summary> + public Second Time; + + /// <summary> + /// Required except for Engine Only Mode calculations. + /// </summary> + public MeterPerSecond VehicleTargetSpeed; + + /// <summary> + /// Optional. + /// </summary> + public Radian RoadGradient; + + /// <summary> + /// [%] Optional. + /// </summary> + public Scalar RoadGradientPercent + { + get { return (Math.Tan(RoadGradient.Value()) * 100).SI<Scalar>(); } + } + + /// <summary> + /// relative altitude of the driving cycle over distance + /// </summary> + public Meter Altitude; + + /// <summary> + /// Required for distance-based cycles. Not used in time based cycles. "stop" defines the time the vehicle spends in stop phases. + /// </summary> + public Second StoppingTime; + + /// <summary> + /// Supply Power input for each auxiliary defined in the .vecto file where xxx matches the ID of the corresponding + /// Auxiliary. ID's are not case sensitive and must not contain space or special characters. + /// </summary> + public Dictionary<string, Watt> AuxiliarySupplyPower; + + /// <summary> + /// If "n_eng_avg" is defined VECTO uses that instead of the calculated engine speed value. + /// </summary> + public PerSecond AngularVelocity; + + /// <summary> + /// [-] Gear input. Overwrites the gear shift model. + /// </summary> + public uint Gear; + + /// <summary> + /// This power input will be directly added to the engine power in addition to possible other auxiliaries. Also used in Engine Only Mode. + /// </summary> + public Watt AdditionalAuxPowerDemand; + + /// <summary> + /// Only required if Cross Wind Correction is set to Vair and Beta Input. + /// </summary> + public MeterPerSecond AirSpeedRelativeToVehicle; + + /// <summary> + /// [°] Only required if Cross Wind Correction is set to Vair and Beta Input. + /// </summary> + public double WindYawAngle; + + /// <summary> + /// Effective engine torque at clutch. Only required in Engine Only Mode. Alternatively power "Pe" can be defined. Use "DRAG" to define motoring operation. + /// </summary> + public NewtonMeter Torque; + + public bool Drag; + + /// <summary> + /// Power on the Wheels (only used in PWheel Mode). + /// </summary> + public Watt PWheel; + + public bool? TorqueConverterActive; + + /// <summary> + /// The angular velocity at the wheel. only used in PWheelCycle. + /// </summary> + public PerSecond WheelAngularVelocity; + + /// <summary> + /// Flag if PTO Cycle is active or not. + /// </summary> + public bool PTOActive; + + public PerSecond EngineSpeed; + + public PerSecond FanSpeed; + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineAuxiliary.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineAuxiliary.cs index 6d6af1d3906989bee915443e595190bd007aa70a..f3c84e2500f29d66c46e91b4548f9cdad5fb6fe9 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineAuxiliary.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineAuxiliary.cs @@ -29,163 +29,163 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System; -using System.Collections.Generic; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Configuration; -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 -{ - /// <summary> - /// Container Class for Auxiliaries which are connected to the Engine. - /// </summary> - public class EngineAuxiliary : StatefulVectoSimulationComponent<EngineAuxiliary.State>, IAuxInProvider, - IAuxPort - { - protected readonly Dictionary<string, Func<PerSecond, Watt>> Auxiliaries = - new Dictionary<string, Func<PerSecond, Watt>>(); - - public EngineAuxiliary(IVehicleContainer container) : base(container) {} - - public IAuxPort Port() - { - return this; - } - - /// <summary> - /// Adds a constant power demand auxiliary. - /// </summary> - /// <param name="auxId"></param> - /// <param name="powerDemand"></param> - public void AddConstant(string auxId, Watt powerDemand) - { - Add(auxId, _ => powerDemand); - } - - /// <summary> - /// Adds an auxiliary which gets its power demand from the driving cycle. - /// </summary> - /// <param name="auxId"></param> - public void AddCycle(string auxId) - { - Add(auxId, _ => DataBus.CycleData.LeftSample.AdditionalAuxPowerDemand); - } - - /// <summary> - /// Adds an auxiliary which calculates the demand based on a aux-map and the engine speed. - /// </summary> - /// <param name="auxId"></param> - /// <param name="data"></param> - public void AddMapping(string auxId, AuxiliaryData data) - { - if (!DataBus.CycleData.LeftSample.AuxiliarySupplyPower.ContainsKey(auxId)) { - var error = string.Format("driving cycle does not contain column for auxiliary: {0}", - Constants.Auxiliaries.Prefix + auxId); - Log.Error(error); - throw new VectoException(error); - } - - Add(auxId, speed => { - var powerSupply = DataBus.CycleData.LeftSample.AuxiliarySupplyPower[auxId]; - var nAuxiliary = speed * data.TransmissionRatio; - var powerAuxOut = powerSupply / data.EfficiencyToSupply; - var powerAuxIn = data.GetPowerDemand(nAuxiliary, powerAuxOut); - return powerAuxIn / data.EfficiencyToEngine; - }); - } - - /// <summary> - /// Adds an auxiliary with a function returning the power demand based on the engine speed. - /// </summary> - /// <param name="auxId"></param> - /// <param name="powerLossFunction"></param> - public void Add(string auxId, Func<PerSecond, Watt> powerLossFunction) - { - Auxiliaries[auxId] = powerLossFunction; - } - - public NewtonMeter Initialize(NewtonMeter torque, PerSecond angularSpeed) - { - PreviousState.AngularSpeed = angularSpeed; - if (angularSpeed.IsEqual(0)) { - return 0.SI<NewtonMeter>(); - } - - return ComputePowerDemand(angularSpeed, false) / angularSpeed; - } - - /// <summary> - /// Calculates the torque demand for all registered auxiliaries for the the current engine - /// </summary> - /// <param name="absTime"></param> - /// <param name="dt"></param> - /// <param name="torquePowerTrain"></param> - /// <param name="torqueEngine"></param> - /// <param name="angularSpeed"></param> - /// <param name="dryRun"></param> - /// <returns></returns> - public NewtonMeter TorqueDemand(Second absTime, Second dt, NewtonMeter torquePowerTrain, NewtonMeter torqueEngine, - PerSecond angularSpeed, bool dryRun = false) - { - var avgAngularSpeed = PreviousState.AngularSpeed != null - ? (angularSpeed + PreviousState.AngularSpeed) / 2.0 - : angularSpeed; - if (!dryRun) { - CurrentState.AngularSpeed = angularSpeed; - } - if (avgAngularSpeed.IsGreater(0)) { - return ComputePowerDemand(avgAngularSpeed, dryRun) / avgAngularSpeed; - } - return 0.SI<NewtonMeter>(); - } - - protected Watt ComputePowerDemand(PerSecond engineSpeed, bool dryRun) - { - var powerDemands = new Dictionary<string, Watt>(Auxiliaries.Count); - foreach (var item in Auxiliaries) { - var value = item.Value(engineSpeed); - if (value != null) { - powerDemands[item.Key] = value; - } - } - if (!dryRun) { - CurrentState.PowerDemands = powerDemands; - } - return powerDemands.Sum(kv => kv.Value); - } - - protected override void DoWriteModalResults(IModalDataContainer container) - { - var auxPowerDemand = 0.SI<Watt>(); - if (CurrentState.PowerDemands != null) { - foreach (var kv in CurrentState.PowerDemands) { - container[kv.Key] = kv.Value; - // mk 2016-10-11: pto's should not be counted in sum auxiliary power demand - if (kv.Key != Constants.Auxiliaries.IDs.PTOTransmission && kv.Key != Constants.Auxiliaries.IDs.PTOConsumer) { - auxPowerDemand += kv.Value; - } - } - } - if (container[ModalResultField.P_aux] == null || container[ModalResultField.P_aux] == DBNull.Value) { - // only overwrite if nobody else already wrote the total aux power - container[ModalResultField.P_aux] = auxPowerDemand; - } - } - - protected override void DoCommitSimulationStep() - { - AdvanceState(); - } - - public class State - { - public PerSecond AngularSpeed; - public Dictionary<string, Watt> PowerDemands; - } - } +using System; +using System.Collections.Generic; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Configuration; +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 +{ + /// <summary> + /// Container Class for Auxiliaries which are connected to the Engine. + /// </summary> + public class EngineAuxiliary : StatefulVectoSimulationComponent<EngineAuxiliary.State>, IAuxInProvider, + IAuxPort + { + protected readonly Dictionary<string, Func<PerSecond, Watt>> Auxiliaries = + new Dictionary<string, Func<PerSecond, Watt>>(); + + public EngineAuxiliary(IVehicleContainer container) : base(container) {} + + public IAuxPort Port() + { + return this; + } + + /// <summary> + /// Adds a constant power demand auxiliary. + /// </summary> + /// <param name="auxId"></param> + /// <param name="powerDemand"></param> + public void AddConstant(string auxId, Watt powerDemand) + { + Add(auxId, _ => powerDemand); + } + + /// <summary> + /// Adds an auxiliary which gets its power demand from the driving cycle. + /// </summary> + /// <param name="auxId"></param> + public void AddCycle(string auxId) + { + Add(auxId, _ => DataBus.CycleData.LeftSample.AdditionalAuxPowerDemand); + } + + /// <summary> + /// Adds an auxiliary which calculates the demand based on a aux-map and the engine speed. + /// </summary> + /// <param name="auxId"></param> + /// <param name="data"></param> + public void AddMapping(string auxId, AuxiliaryData data) + { + if (!DataBus.CycleData.LeftSample.AuxiliarySupplyPower.ContainsKey(auxId)) { + var error = string.Format("driving cycle does not contain column for auxiliary: {0}", + Constants.Auxiliaries.Prefix + auxId); + Log.Error(error); + throw new VectoException(error); + } + + Add(auxId, speed => { + var powerSupply = DataBus.CycleData.LeftSample.AuxiliarySupplyPower[auxId]; + var nAuxiliary = speed * data.TransmissionRatio; + var powerAuxOut = powerSupply / data.EfficiencyToSupply; + var powerAuxIn = data.GetPowerDemand(nAuxiliary, powerAuxOut); + return powerAuxIn / data.EfficiencyToEngine; + }); + } + + /// <summary> + /// Adds an auxiliary with a function returning the power demand based on the engine speed. + /// </summary> + /// <param name="auxId"></param> + /// <param name="powerLossFunction"></param> + public void Add(string auxId, Func<PerSecond, Watt> powerLossFunction) + { + Auxiliaries[auxId] = powerLossFunction; + } + + public NewtonMeter Initialize(NewtonMeter torque, PerSecond angularSpeed) + { + PreviousState.AngularSpeed = angularSpeed; + if (angularSpeed.IsEqual(0)) { + return 0.SI<NewtonMeter>(); + } + + return ComputePowerDemand(angularSpeed, false) / angularSpeed; + } + + /// <summary> + /// Calculates the torque demand for all registered auxiliaries for the the current engine + /// </summary> + /// <param name="absTime"></param> + /// <param name="dt"></param> + /// <param name="torquePowerTrain"></param> + /// <param name="torqueEngine"></param> + /// <param name="angularSpeed"></param> + /// <param name="dryRun"></param> + /// <returns></returns> + public NewtonMeter TorqueDemand(Second absTime, Second dt, NewtonMeter torquePowerTrain, NewtonMeter torqueEngine, + PerSecond angularSpeed, bool dryRun = false) + { + var avgAngularSpeed = PreviousState.AngularSpeed != null + ? (angularSpeed + PreviousState.AngularSpeed) / 2.0 + : angularSpeed; + if (!dryRun) { + CurrentState.AngularSpeed = angularSpeed; + } + if (avgAngularSpeed.IsGreater(0)) { + return ComputePowerDemand(avgAngularSpeed, dryRun) / avgAngularSpeed; + } + return 0.SI<NewtonMeter>(); + } + + protected Watt ComputePowerDemand(PerSecond engineSpeed, bool dryRun) + { + var powerDemands = new Dictionary<string, Watt>(Auxiliaries.Count); + foreach (var item in Auxiliaries) { + var value = item.Value(engineSpeed); + if (value != null) { + powerDemands[item.Key] = value; + } + } + if (!dryRun) { + CurrentState.PowerDemands = powerDemands; + } + return powerDemands.Sum(kv => kv.Value); + } + + protected override void DoWriteModalResults(IModalDataContainer container) + { + var auxPowerDemand = 0.SI<Watt>(); + if (CurrentState.PowerDemands != null) { + foreach (var kv in CurrentState.PowerDemands) { + container[kv.Key] = kv.Value; + // mk 2016-10-11: pto's should not be counted in sum auxiliary power demand + if (kv.Key != Constants.Auxiliaries.IDs.PTOTransmission && kv.Key != Constants.Auxiliaries.IDs.PTOConsumer) { + auxPowerDemand += kv.Value; + } + } + } + if (container[ModalResultField.P_aux] == null || container[ModalResultField.P_aux] == DBNull.Value) { + // only overwrite if nobody else already wrote the total aux power + container[ModalResultField.P_aux] = auxPowerDemand; + } + } + + protected override void DoCommitSimulationStep() + { + AdvanceState(); + } + + public class State + { + public PerSecond AngularSpeed; + public Dictionary<string, Watt> PowerDemands; + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs index 917ed39bcfb3848f5de3c247a1fffc0a87c0c8bb..2e04f525689a82178783f3351d2053fd4125560c 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs @@ -116,10 +116,11 @@ namespace TUGraz.VectoCore.OutputData.XML protected XElement CreateVehicle(IDeclarationInputDataProvider data) { - var retarder = data.RetarderInputData; - var gearbox = data.GearboxInputData; - var vehicle = data.VehicleInputData; - var angledrive = data.AngledriveInputData; + var retarder = data.JobInputData.Vehicle.RetarderInputData; + var gearbox = data.JobInputData.Vehicle.GearboxInputData; + var vehicle = data.JobInputData.Vehicle; + var engine = data.JobInputData.Vehicle.EngineInputData; + var angledrive = data.JobInputData.Vehicle.AngledriveInputData; var id = CreateIdString("VEH-" + vehicle.Model); @@ -135,7 +136,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Vehicle_IdlingSpeed, vehicle.EngineIdleSpeed != null ? vehicle.EngineIdleSpeed.AsRPM.ToXMLFormat(0) - : data.EngineInputData.IdleSpeed.AsRPM.ToXMLFormat(0)), + : engine.IdleSpeed.AsRPM.ToXMLFormat(0)), new XElement(tns + XMLNames.Vehicle_RetarderType, retarder.Type.ToXMLFormat()), retarder.Type.IsDedicatedComponent() ? new XElement(tns + XMLNames.Vehicle_RetarderRatio, retarder.Ratio.ToXMLFormat(3)) @@ -146,14 +147,14 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Vehicle_PTO_OtherElements, "none")), CreateTorqueLimits(vehicle), new XElement(tns + XMLNames.Vehicle_Components, - CreateEngine(data.EngineInputData), - CreateGearbox(gearbox, gearbox.Type.AutomaticTransmission() ? data.TorqueConverterInputData : null), + CreateEngine(engine), + CreateGearbox(gearbox, gearbox.Type.AutomaticTransmission() ? vehicle.TorqueConverterInputData : null), angledrive.Type == AngledriveType.SeparateAngledrive ? CreateAngleDrive(angledrive) : null, retarder.Type.IsDedicatedComponent() ? CreateRetarder(retarder) : null, - CreateAxlegear(data.AxleGearInputData), - CreateAxleWheels(data.VehicleInputData), - CreateAuxiliaries(data.AuxiliaryInputData()), - CreateAirdrag(data.AirdragInputData) + CreateAxlegear(vehicle.AxleGearInputData), + CreateAxleWheels(vehicle), + CreateAuxiliaries(vehicle.AuxiliaryInputData()), + CreateAirdrag(vehicle.AirdragInputData) ) ); } diff --git a/VectoCore/VectoCore/OutputData/XML/XMLEngineeringWriter.cs b/VectoCore/VectoCore/OutputData/XML/XMLEngineeringWriter.cs index 18771c538e1345b74bba4a68d7fa91250ef15441..acc2e46aea864f98a09417555c8ae41ecda5a42b 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLEngineeringWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLEngineeringWriter.cs @@ -77,7 +77,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XAttribute(XNamespace.Xmlns + "vdecdef", _declarationNamespace), new XAttribute(xsi + "schemaLocation", string.Format("{0} {1}VectoEngineeringInput.xsd", rootNamespace, SchemaLocationBaseUrl)), - data.JobInputData().EngineOnlyMode + data.JobInputData.EngineOnlyMode ? CreateEngineOnly(data) : CreateEngineeringJob(data)) ); @@ -117,8 +117,8 @@ namespace TUGraz.VectoCore.OutputData.XML { return new[] { new XElement(tns + XMLNames.VectoJob_EngineOnlyMode, true), - CreateEngine(data.EngineInputData, false), - CreateMissions(data.JobInputData().Cycles) + CreateEngine(data.JobInputData.EngineOnly, false), + CreateMissions(data.JobInputData.Cycles) }; } @@ -128,7 +128,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.VectoJob_EngineOnlyMode, false), CreateVehicle(data), CreateDriverModel(data), - CreateMissions(data.JobInputData().Cycles) + CreateMissions(data.JobInputData.Cycles) }; } @@ -153,7 +153,7 @@ namespace TUGraz.VectoCore.OutputData.XML private XElement CreateDriverModel(IEngineeringInputDataProvider engineering) { var driver = engineering.DriverInputData; - var gbx = engineering.GearboxInputData; + var gbx = engineering.JobInputData.Vehicle.GearboxInputData; var lookahead = driver.Lookahead; var overspeed = driver.OverSpeedEcoRoll; @@ -213,11 +213,11 @@ namespace TUGraz.VectoCore.OutputData.XML protected XElement CreateVehicle(IEngineeringInputDataProvider data) { - var retarder = data.RetarderInputData; - var gearbox = data.GearboxInputData; - var vehicle = data.VehicleInputData; - var angledrive = data.AngledriveInputData; - var pto = data.PTOTransmissionInputData; + var retarder = data.JobInputData.Vehicle.RetarderInputData; + var gearbox = data.JobInputData.Vehicle.GearboxInputData; + var vehicle = data.JobInputData.Vehicle; + var angledrive = data.JobInputData.Vehicle.AngledriveInputData; + var pto = data.JobInputData.Vehicle.PTOTransmissionInputData; return new XElement(tns + XMLNames.Component_Vehicle, new XAttribute(XMLNames.Component_ID_Attr, "VEH-" + vehicle.Model), @@ -238,14 +238,14 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Vehicle_CurbMassExtra, vehicle.CurbMassExtra.Value()), new XElement(tns + XMLNames.Vehicle_Loading, vehicle.Loading.Value()), new XElement(tns + XMLNames.Vehicle_Components, - CreateEngine(data.EngineInputData), + CreateEngine(vehicle.EngineInputData), CreateGearbox(gearbox, gearbox.TorqueConverter), angledrive.Type == AngledriveType.SeparateAngledrive ? CreateAngleDrive(angledrive) : null, retarder.Type.IsDedicatedComponent() ? CreateRetarder(retarder) : null, - CreateAxlegear(data.AxleGearInputData), - CreateAxleWheels(data.VehicleInputData), - CreateAuxiliaries(data.AuxiliaryInputData(), RemoveInvalidFileCharacters(data.VehicleInputData.Model)), - CreateAirdrag(data.AirdragInputData) + CreateAxlegear(vehicle.AxleGearInputData), + CreateAxleWheels(vehicle), + CreateAuxiliaries(vehicle.AuxiliaryInputData(), RemoveInvalidFileCharacters(vehicle.Model)), + CreateAirdrag(vehicle.AirdragInputData) ), new XElement(tns + XMLNames.Vehicle_AdvancedDriverAssist, new XElement(tns + XMLNames.Vehicle_AdvancedDriverAssist_EngineStartStop, @@ -599,4 +599,4 @@ namespace TUGraz.VectoCore.OutputData.XML }; } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCore/Utils/VectoCSVFile.cs b/VectoCore/VectoCore/Utils/VectoCSVFile.cs index 46331ecb98da0b2dbdbf14c6559b1642e6d6d01f..1c4e137fff97193b5ce4c57102a3191a14727f05 100644 --- a/VectoCore/VectoCore/Utils/VectoCSVFile.cs +++ b/VectoCore/VectoCore/Utils/VectoCSVFile.cs @@ -35,10 +35,8 @@ using System.Data; using System.Globalization; using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Text.RegularExpressions; -using DocumentFormat.OpenXml.Spreadsheet; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 734ddce0d1fc171013b28277750c6da4fcbdc9dc..271776d82b163049909a3997afe6efb881be211b 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -109,6 +109,7 @@ <ItemGroup> <Compile Include="Configuration\Constants.cs" /> <Compile Include="InputData\AuxiliaryFileHelper.cs" /> + <Compile Include="InputData\FileIO\JSON\IJSONVehicleComponents.cs" /> <Compile Include="InputData\FileIO\JSON\JSONComponentInputData.cs" /> <Compile Include="InputData\FileIO\JSON\JsonExtensionMethods.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\AbstractDeclarationXMLComponentDataProvider.cs" /> @@ -116,7 +117,6 @@ <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationAngledriveDataProvider.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationAuxiliaryDataProvider.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationAxlegearDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationDriverDataProvider.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationEngineDataProvider.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationGearboxDataProvider.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\XMLDeclarationJobInputDataProvider.cs" /> @@ -186,6 +186,7 @@ <Compile Include="Models\SimulationComponent\Impl\TorqueConverter.cs" /> <Compile Include="Models\SimulationComponent\Impl\IdleControllerSwitcher.cs" /> <Compile Include="Models\Simulation\Data\ModalResultField.cs" /> + <Compile Include="InputData\Reader\Impl\EngineeringEPTPModeVectoRunDataFactory.cs" /> <Compile Include="OutputData\ModFilter\ActualModalDataFilter.cs" /> <Compile Include="OutputData\ModFilter\ModalData1HzFilter.cs" /> <Compile Include="OutputData\XML\AbstractXMLWriter.cs" /> @@ -313,9 +314,7 @@ <Compile Include="Models\SimulationComponent\IWheels.cs" /> <Compile Include="Models\SimulationComponent\VectoSimulationComponent.cs" /> <Compile Include="Models\SimulationComponent\Impl\PowertrainDrivingCycle.cs" /> - <Compile Include="Models\Simulation\Data\ModalResult.cs"> - <SubType>Component</SubType> - </Compile> + <Compile Include="Models\Simulation\Data\ModalResult.cs" /> <Compile Include="Models\Simulation\IVectoRun.cs" /> <Compile Include="Models\Simulation\Impl\SimulatorFactory.cs" /> <Compile Include="Models\Simulation\Impl\VectoRun.cs" /> @@ -463,7 +462,6 @@ </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> @@ -471,6 +469,5 @@ <Target Name="AfterBuild"> </Target> --> - <Import Project="$(SolutionDir)Build\TextPreProcessing.targets" /> </Project> \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/FileIO/JsonTest.cs b/VectoCore/VectoCoreTest/FileIO/JsonTest.cs index 2947d9f5f6b0950dc04b65e206a0e4064930c287..1d5cc14530be0a4ee2921ee26023d2c846bebc0c 100644 --- a/VectoCore/VectoCoreTest/FileIO/JsonTest.cs +++ b/VectoCore/VectoCoreTest/FileIO/JsonTest.cs @@ -43,20 +43,19 @@ using TUGraz.VectoCore.Tests.Utils; namespace TUGraz.VectoCore.Tests.FileIO { - - [TestFixture] + [TestFixture] public class JsonTest { private const string TestJobFile = @"Testdata\Jobs\40t_Long_Haul_Truck.vecto"; private const string TestVehicleFile = @"Testdata\Components\24t Coach.vveh"; - [OneTimeSetUp] - public void RunBeforeAnyTests() - { - Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); - } + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } - [TestCase] + [TestCase] public void ReadJobTest() { var job = JSONInputDataFactory.ReadJsonJob(TestJobFile); @@ -112,7 +111,7 @@ namespace TUGraz.VectoCore.Tests.FileIO ((JObject)json["Body"]).Property("Aux").Remove(); // MK,2016-01-20: Changed for PWheel: aux entry may be missing, and that is ok. - var tmp = new JSONInputDataV2(json, TestJobFile).AuxiliaryInputData().Auxiliaries; + var tmp = new JSONInputDataV2(json, TestJobFile).JobInputData.Vehicle.AuxiliaryInputData().Auxiliaries; Assert.IsTrue(tmp.Count == 0); } @@ -156,7 +155,9 @@ namespace TUGraz.VectoCore.Tests.FileIO ((JObject)json["Body"]).Property("OverSpeedEcoRoll").Remove(); AssertHelper.Exception<VectoException>( - () => { var tmp = new JSONInputDataV2(json, TestJobFile).DriverInputData.OverSpeedEcoRoll; }, + () => { + var tmp = ((IEngineeringInputDataProvider)new JSONInputDataV2(json, TestJobFile)).DriverInputData.OverSpeedEcoRoll; + }, "Key OverSpeedEcoRoll not found"); } @@ -508,4 +509,4 @@ namespace TUGraz.VectoCore.Tests.FileIO // Assert.AreEqual(json, jsonCompare); // } // } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCoreTest/Integration/EPTP/EPTPTest.cs b/VectoCore/VectoCoreTest/Integration/EPTP/EPTPTest.cs new file mode 100644 index 0000000000000000000000000000000000000000..67f0d53702fa710de0b6a669f5bbdb89045552ff --- /dev/null +++ b/VectoCore/VectoCoreTest/Integration/EPTP/EPTPTest.cs @@ -0,0 +1,37 @@ +using NUnit.Framework; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCore.InputData.FileIO.JSON; +using TUGraz.VectoCore.Models.Simulation.Impl; +using TUGraz.VectoCore.OutputData; +using TUGraz.VectoCore.OutputData.FileIO; + +namespace TUGraz.VectoCore.Tests.Integration.EPTP +{ + [TestFixture] + public class EPTPTest + { + [TestCase()] + public void RunEPTP() + { + var jobFile = @"E:\QUAM\Workspace\VECTO_quam\EPTP\MAN_EPTP.vecto"; + + var fileWriter = new FileOutputWriter(jobFile); + var sumWriter = new SummaryDataContainer(fileWriter); + var jobContainer = new JobContainer(sumWriter); + var dataProvider = JSONInputDataFactory.ReadJsonJob(jobFile); + var runsFactory = new SimulatorFactory(ExecutionMode.Engineering, dataProvider, fileWriter) { + ModalResults1Hz = false, + WriteModalResults = true, + ActualModalData = false, + Validate = false, + }; + + jobContainer.AddRuns(runsFactory); + jobContainer.Execute(); + + Assert.AreEqual(true, jobContainer.AllCompleted); + + } + + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Integration/TestVehicleIdlingSpeed.cs b/VectoCore/VectoCoreTest/Integration/TestVehicleIdlingSpeed.cs index 827d160f8d687a38a50364faf842446532a6a86c..705fc50a30f85621202b8f2ecc9e1fd7fe33e5eb 100644 --- a/VectoCore/VectoCoreTest/Integration/TestVehicleIdlingSpeed.cs +++ b/VectoCore/VectoCoreTest/Integration/TestVehicleIdlingSpeed.cs @@ -29,70 +29,76 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.IO; -using System.Xml; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.Simulation.Impl; -using TUGraz.VectoCore.OutputData; -using TUGraz.VectoCore.OutputData.FileIO; -using TUGraz.VectoCore.Utils; +using System.IO; +using System.Xml; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Resources; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.Simulation.Impl; +using TUGraz.VectoCore.OutputData; +using TUGraz.VectoCore.OutputData.FileIO; +using TUGraz.VectoCore.Utils; using NUnit.Framework; -namespace TUGraz.VectoCore.Tests.Integration -{ - [TestFixture] - public class TestVehicleIdlingSpeed - { - const string SampleVehicleDecl = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample.xml"; - - [TestCase, Category("LongRunning")] - public void VehicleIdlingSpeedTest() - { - var VehicleEngineIdleSpeed = 900.RPMtoRad(); - - var reader = XmlReader.Create(SampleVehicleDecl); - - var doc = new XmlDocument(); - doc.Load(reader); - var nav = doc.CreateNavigator(); - var manager = new XmlNamespaceManager(nav.NameTable); - var helper = new XPathHelper(ExecutionMode.Declaration); - helper.AddNamespaces(manager); - - var idlingSpeed = nav.SelectSingleNode(helper.QueryAbs( - helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix), - XMLNames.Component_Vehicle, - XMLNames.Vehicle_IdlingSpeed), manager); - idlingSpeed.SetValue(VehicleEngineIdleSpeed.AsRPM.ToXMLFormat(0)); - - var modified = XmlReader.Create(new StringReader(nav.OuterXml)); - - var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - - var factory = new SimulatorFactory(ExecutionMode.Declaration, inputDataProvider, new FileOutputWriter("Idle900")); - //factory.WriteModalResults = true; - - var jobContainer = new JobContainer(null); - jobContainer.AddRuns(factory); - - var runIdx = 0; - var run = jobContainer.Runs[runIdx]; - var modContainer = (ModalDataContainer)run.Run.GetContainer().ModalData; - var modData = modContainer.Data; - - run.Run.Run(); - - modContainer.Data = modData; - Assert.IsTrue(modContainer.Min<PerSecond>(ModalResultField.n_eng_avg).IsGreaterOrEqual(VehicleEngineIdleSpeed)); - - - //jobContainer.Execute(); - //jobContainer.WaitFinished(); - } - } -} \ No newline at end of file +namespace TUGraz.VectoCore.Tests.Integration +{ + [TestFixture] + public class TestVehicleIdlingSpeed + { + const string SampleVehicleDecl = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample.xml"; + + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + + [TestCase, Category("LongRunning")] + public void VehicleIdlingSpeedTest() + { + var VehicleEngineIdleSpeed = 900.RPMtoRad(); + + var reader = XmlReader.Create(SampleVehicleDecl); + + var doc = new XmlDocument(); + doc.Load(reader); + var nav = doc.CreateNavigator(); + var manager = new XmlNamespaceManager(nav.NameTable); + var helper = new XPathHelper(ExecutionMode.Declaration); + helper.AddNamespaces(manager); + + var idlingSpeed = nav.SelectSingleNode(helper.QueryAbs( + helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix), + XMLNames.Component_Vehicle, + XMLNames.Vehicle_IdlingSpeed), manager); + idlingSpeed.SetValue(VehicleEngineIdleSpeed.AsRPM.ToXMLFormat(0)); + + var modified = XmlReader.Create(new StringReader(nav.OuterXml)); + + var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); + + var factory = new SimulatorFactory(ExecutionMode.Declaration, inputDataProvider, new FileOutputWriter("Idle900")); + //factory.WriteModalResults = true; + + var jobContainer = new JobContainer(null); + jobContainer.AddRuns(factory); + + var runIdx = 0; + var run = jobContainer.Runs[runIdx]; + var modContainer = (ModalDataContainer)run.Run.GetContainer().ModalData; + var modData = modContainer.Data; + + run.Run.Run(); + + modContainer.Data = modData; + Assert.IsTrue(modContainer.Min<PerSecond>(ModalResultField.n_eng_avg).IsGreaterOrEqual(VehicleEngineIdleSpeed)); + + + //jobContainer.Execute(); + //jobContainer.WaitFinished(); + } + } +} diff --git a/VectoCore/VectoCoreTest/Models/Declaration/AirdragDefaultValuesTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/AirdragDefaultValuesTest.cs index 9348277b6ac2d98382b7e1ec32c7b50c6f763838..8d4007feac44137f7af3ce8a9911ded511d5d491 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/AirdragDefaultValuesTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/AirdragDefaultValuesTest.cs @@ -29,61 +29,64 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.Linq; -using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.Reader.Impl; -using TUGraz.VectoCore.Tests.Models.Declaration.DataAdapter; +using System.IO; +using System.Linq; +using TUGraz.VectoCore.InputData.FileIO.JSON; +using TUGraz.VectoCore.InputData.Reader.Impl; +using TUGraz.VectoCore.Tests.Models.Declaration.DataAdapter; using NUnit.Framework; -namespace TUGraz.VectoCore.Tests.Models.Declaration -{ - [TestFixture] - public class AirdragDefaultValuesTest - { - [TestCase] - public void TestClass2() - { - var file = @"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto"; - var inputData = (JSONInputDataV3)JSONInputDataFactory.ReadJsonJob(file); - inputData.AirdragData = null; // force use of standard values - - var dataReader = new DeclarationModeVectoRunDataFactory(inputData, null); - var runData = dataReader.NextRun().ToArray(); - var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); - - Assert.AreEqual(4.83, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); - - Assert.AreEqual(7.2, runData[0].AirdragData.DeclaredAirdragArea.Value()); - } - - [TestCase] - public void TestClass5() - { - var file = @"TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_DECL.vecto"; - var inputData = (JSONInputDataV3)JSONInputDataFactory.ReadJsonJob(file); - inputData.AirdragData = null; // force use of standard values - - var dataReader = new DeclarationModeVectoRunDataFactory(inputData, null); - var runData = dataReader.NextRun().ToArray(); - var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); - - Assert.AreEqual(5.3, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); - Assert.AreEqual(8.7, runData[0].AirdragData.DeclaredAirdragArea.Value()); - } - - [TestCase] - public void TestClass9() - { - var file = @"TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_DECL.vecto"; - var inputData = (JSONInputDataV3)JSONInputDataFactory.ReadJsonJob(file); - inputData.AirdragData = null; // force use of standard values - - var dataReader = new DeclarationModeVectoRunDataFactory(inputData, null); - var runData = dataReader.NextRun().ToArray(); - var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); - - Assert.AreEqual(5.2, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); - Assert.AreEqual(8.5, runData[0].AirdragData.DeclaredAirdragArea.Value()); - } - } -} \ No newline at end of file +namespace TUGraz.VectoCore.Tests.Models.Declaration +{ + [TestFixture] + public class AirdragDefaultValuesTest + { + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + + [TestCase] + public void TestClass2() + { + var file = @"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto"; + var fileNoAirdrag = + @"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_NoAirdrag_DECL.vecto"; + + var runData = DeclarationAdapterTestHelper.CreateVectoRunData(fileNoAirdrag); + var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); + + Assert.AreEqual(4.83, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); + + Assert.AreEqual(7.2, runData[0].AirdragData.DeclaredAirdragArea.Value()); + } + + [TestCase] + public void TestClass5() + { + var file = @"TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_DECL.vecto"; + var fileNoAirdrag = @"TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_NoAirdrag_DECL.vecto"; + + var runData = DeclarationAdapterTestHelper.CreateVectoRunData(fileNoAirdrag); + var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); + + Assert.AreEqual(5.3, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); + Assert.AreEqual(8.7, runData[0].AirdragData.DeclaredAirdragArea.Value()); + } + + [TestCase] + public void TestClass9() + { + var file = @"TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_DECL.vecto"; + var fileNoAirdrag = + @"TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_NoAirdrag_DECL.vecto"; + + var runData = DeclarationAdapterTestHelper.CreateVectoRunData(fileNoAirdrag); + var runDataOrig = DeclarationAdapterTestHelper.CreateVectoRunData(file); + + Assert.AreEqual(5.2, runDataOrig[0].AirdragData.DeclaredAirdragArea.Value()); + Assert.AreEqual(8.5, runData[0].AirdragData.DeclaredAirdragArea.Value()); + } + } +} diff --git a/VectoCore/VectoCoreTest/Models/Simulation/DeclarationSimulationFactoryTest.cs b/VectoCore/VectoCoreTest/Models/Simulation/DeclarationSimulationFactoryTest.cs index 1c116da6e77979afe44c807131a38d893908c91d..5b92db6249a63ce9d641319f0029349b540a9613 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/DeclarationSimulationFactoryTest.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/DeclarationSimulationFactoryTest.cs @@ -47,6 +47,12 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation { const string SampleVehicleDecl = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample.xml"; + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + [TestCase("None", RetarderType.None), TestCase("Losses included in Gearbox", RetarderType.LossesIncludedInTransmission), TestCase("Engine Retarder", RetarderType.EngineRetarder), diff --git a/VectoCore/VectoCoreTest/Reports/ModDataTest.cs b/VectoCore/VectoCoreTest/Reports/ModDataTest.cs index f1e7981b69801f1f5d6b0f34278838b70cee9041..5b9852f05ce667107ffa6fd1cbecb57cd7f839e7 100644 --- a/VectoCore/VectoCoreTest/Reports/ModDataTest.cs +++ b/VectoCore/VectoCoreTest/Reports/ModDataTest.cs @@ -132,7 +132,7 @@ namespace TUGraz.VectoCore.Tests.Reports foreach (var modalResults in modData) { AssertModDataIntegrity(modalResults.Item1, auxKeys, modalResults.Item2, - FuelConsumptionMapReader.Create(((IEngineeringInputDataProvider)inputData).EngineInputData.FuelConsumptionMap)); + FuelConsumptionMapReader.Create(((IEngineeringInputDataProvider)inputData).JobInputData.Vehicle.EngineInputData.FuelConsumptionMap)); } AssertSumDataIntegrity(sumData, mode); @@ -392,7 +392,7 @@ namespace TUGraz.VectoCore.Tests.Reports foreach (var modalResults in modData) { AssertModDataIntegrityAT(modalResults.Item1, auxKeys, modalResults.Item2, - FuelConsumptionMapReader.Create(((IEngineeringInputDataProvider)inputData).EngineInputData.FuelConsumptionMap)); + FuelConsumptionMapReader.Create(((IEngineeringInputDataProvider)inputData).JobInputData.Vehicle.EngineInputData.FuelConsumptionMap)); } AssertSumDataIntegrity(sumData, ExecutionMode.Engineering); diff --git a/VectoCore/VectoCoreTest/Reports/SumWriterTest.cs b/VectoCore/VectoCoreTest/Reports/SumWriterTest.cs index 38e5a26c9ed17e376500c633be66328eee7c75e9..8f8b0ba57d69bf82a64d133c92614740391876f5 100644 --- a/VectoCore/VectoCoreTest/Reports/SumWriterTest.cs +++ b/VectoCore/VectoCoreTest/Reports/SumWriterTest.cs @@ -49,6 +49,12 @@ namespace TUGraz.VectoCore.Tests.Reports [TestFixture] public class SumWriterTest { + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + [TestCase] public void TestSumCalcFixedTime() { @@ -181,28 +187,37 @@ namespace TUGraz.VectoCore.Tests.Reports jobContainer.WaitFinished(); var sumRow = sumData.Table.Rows[1]; - Assert.AreEqual(dataProvider.VehicleInputData.Manufacturer, sumRow[SummaryDataContainer.VEHICLE_MANUFACTURER]); - Assert.AreEqual(dataProvider.VehicleInputData.Model, sumRow[SummaryDataContainer.VEHICLE_MODEL]); - Assert.AreEqual(dataProvider.VehicleInputData.VIN, sumRow[SummaryDataContainer.VIN_NUMBER]); - Assert.AreEqual(dataProvider.EngineInputData.Manufacturer, sumRow[SummaryDataContainer.ENGINE_MANUFACTURER]); - Assert.AreEqual(dataProvider.EngineInputData.Model, sumRow[SummaryDataContainer.ENGINE_MODEL]); - Assert.AreEqual(dataProvider.EngineInputData.FuelType.GetLabel(), sumRow[SummaryDataContainer.ENGINE_FUEL_TYPE]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.Manufacturer, sumRow[SummaryDataContainer.VEHICLE_MANUFACTURER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.Model, sumRow[SummaryDataContainer.VEHICLE_MODEL]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.VIN, sumRow[SummaryDataContainer.VIN_NUMBER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.Manufacturer, + sumRow[SummaryDataContainer.ENGINE_MANUFACTURER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.Model, sumRow[SummaryDataContainer.ENGINE_MODEL]); Assert.AreEqual(dataProvider.EngineInputData.RatedPowerDeclared.ConvertToKiloWatt(), + sumRow[SummaryDataContainer.ENGINE_FUEL_TYPE]); + Assert.AreEqual((dataProvider.JobInputData.Vehicle.EngineInputData.RatedPowerDeclared.ConvertTo().Kilo.Watt.Value()), ((SI)sumRow[SummaryDataContainer.ENGINE_RATED_POWER]).Value()); - Assert.AreEqual(dataProvider.EngineInputData.RatedSpeedDeclared.AsRPM, + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.RatedSpeedDeclared.AsRPM, ((SI)sumRow[SummaryDataContainer.ENGINE_RATED_SPEED]).Value()); Assert.AreEqual(dataProvider.EngineInputData.Displacement.ConvertToCubicCentiMeter(), ((SI)sumRow[SummaryDataContainer.ENGINE_DISPLACEMENT]).Value()); - Assert.AreEqual(dataProvider.GearboxInputData.Manufacturer, sumRow[SummaryDataContainer.GEARBOX_MANUFACTURER]); - Assert.AreEqual(dataProvider.GearboxInputData.Model, sumRow[SummaryDataContainer.GEARBOX_MODEL]); - Assert.AreEqual(dataProvider.AxleGearInputData.Manufacturer, sumRow[SummaryDataContainer.AXLE_MANUFACTURER]); - Assert.AreEqual(dataProvider.AxleGearInputData.Model, sumRow[SummaryDataContainer.AXLE_MODEL]); - - Assert.AreEqual(dataProvider.EngineInputData.ColdHotBalancingFactor, sumRow[SummaryDataContainer.ENGINE_BF_COLD_HOT]); - Assert.AreEqual(dataProvider.EngineInputData.CorrectionFactorRegPer, sumRow[SummaryDataContainer.ENGINE_CF_REG_PER]); - Assert.AreEqual(dataProvider.EngineInputData.WHTCRural, sumRow[SummaryDataContainer.ENGINE_WHTC_RURAL]); - Assert.AreEqual(dataProvider.EngineInputData.WHTCUrban, sumRow[SummaryDataContainer.ENGINE_WHTC_URBAN]); - Assert.AreEqual(dataProvider.EngineInputData.WHTCMotorway, sumRow[SummaryDataContainer.ENGINE_WHTC_MOTORWAY]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.GearboxInputData.Manufacturer, + sumRow[SummaryDataContainer.GEARBOX_MANUFACTURER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.GearboxInputData.Model, sumRow[SummaryDataContainer.GEARBOX_MODEL]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.AxleGearInputData.Manufacturer, + sumRow[SummaryDataContainer.AXLE_MANUFACTURER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.AxleGearInputData.Model, sumRow[SummaryDataContainer.AXLE_MODEL]); + + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.ColdHotBalancingFactor, + sumRow[SummaryDataContainer.ENGINE_BF_COLD_HOT]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.CorrectionFactorRegPer, + sumRow[SummaryDataContainer.ENGINE_CF_REG_PER]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.WHTCRural, + sumRow[SummaryDataContainer.ENGINE_WHTC_RURAL]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.WHTCUrban, + sumRow[SummaryDataContainer.ENGINE_WHTC_URBAN]); + Assert.AreEqual(dataProvider.JobInputData.Vehicle.EngineInputData.WHTCMotorway, + sumRow[SummaryDataContainer.ENGINE_WHTC_MOTORWAY]); } } } diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag.vveh b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag.vveh new file mode 100644 index 0000000000000000000000000000000000000000..e4417aadc5129ad5a6f0258acd4a08b748c7b7c6 --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag.vveh @@ -0,0 +1,55 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2016-10-13T10:06:43.0936564Z", + "AppVersion": "3", + "FileVersion": 7 + }, + "Body": { + "SavedInDeclMode": true, + "VehCat": "RigidTruck", + "CurbWeight": 4670.0, + "CurbWeightExtra": 0.0, + "Loading": 0.0, + "MassMax": 11.99, + "rdyn": 0.0, + "CdCorrMode": "CdofVdecl", + "CdCorrFile": "", + "Retarder": { + "Type": "None", + "Ratio": 0.0, + "File": "" + }, + "Angledrive": { + "Type": "None", + "Ratio": 0.0, + "LossMap": "" + }, + "PTO": { + "Type": "None", + "LossMap": "", + "Cycle": "" + }, + "AxleConfig": { + "Type": "4x2", + "Axles": [ + { + "Inertia": 6.5, + "Wheels": "265/70 R19.5", + "AxleWeightShare": 0.0, + "TwinTyres": false, + "RRCISO": 0.0065, + "FzISO": 20850.0 + }, + { + "Inertia": 6.5, + "Wheels": "265/70 R19.5", + "AxleWeightShare": 0.0, + "TwinTyres": true, + "RRCISO": 0.0075, + "FzISO": 20850.0 + } + ] + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag_DECL.vecto b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag_DECL.vecto new file mode 100644 index 0000000000000000000000000000000000000000..d4dcaa469fb0330e304f2f269f778718c8cabb35 --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class2_RigidTruck_4x2/Class2_RigidTruck_NoAirdrag_DECL.vecto @@ -0,0 +1,67 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2016-10-13T15:21:02.8206564Z", + "AppVersion": "3", + "FileVersion": 3 + }, + "Body": { + "SavedInDeclMode": true, + "EngineOnlyMode": false, + "VehicleFile": "Class2_RigidTruck_NoAirdrag.vveh", + "EngineFile": "Engine_175kW_6.8l.veng", + "GearboxFile": "MT_6.vgbx", + "AuxiliaryAssembly": "Classic", + "AuxiliaryVersion": "CLASSIC", + "AdvancedAuxiliaryFilePath": "", + "Aux": [ + { + "ID": "FAN", + "Type": "Fan", + "Technology": [ + "Belt driven or driven via transm. - Electronically controlled visco clutch" + ] + }, + { + "ID": "STP", + "Type": "Steering pump", + "Technology": [ + "Fixed displacement with elec. control" + ] + }, + { + "ID": "AC", + "Type": "HVAC", + "Technology": [ + "Default" + ] + }, + { + "ID": "ES", + "Type": "Electric System", + "Technology": [ + "Standard technology" + ] + }, + { + "ID": "PS", + "Type": "Pneumatic System", + "Technology": [ + "Medium Supply 1-stage + ESS + AMS" + ] + } + ], + "StartStop": { + "Enabled": false, + "MaxSpeed": 5.0, + "MinTime": 5.0, + "Delay": 5.0 + }, + "OverSpeedEcoRoll": { + "Mode": "Overspeed", + "MinSpeed": 50.0, + "OverSpeed": 5.0, + "UnderSpeed": 5.0 + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag.vveh b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag.vveh new file mode 100644 index 0000000000000000000000000000000000000000..64fccc70e26f7c7a54628d7e3ac8a98d9c557767 --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag.vveh @@ -0,0 +1,55 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2016-10-13T10:08:01.8366564Z", + "AppVersion": "3", + "FileVersion": 7 + }, + "Body": { + "SavedInDeclMode": true, + "VehCat": "Tractor", + "CurbWeight": 8229.0, + "CurbWeightExtra": 0.0, + "Loading": 0.0, + "MassMax": 18.0, + "rdyn": 0.0, + "CdCorrMode": "CdofVdecl", + "CdCorrFile": "", + "Retarder": { + "Type": "secondary", + "Ratio": 1.0, + "File": "Default.vrlm" + }, + "Angledrive": { + "Type": "None", + "Ratio": 0.0, + "LossMap": "" + }, + "PTO": { + "Type": "None", + "LossMap": "", + "Cycle": "" + }, + "AxleConfig": { + "Type": "4x2", + "Axles": [ + { + "Inertia": 14.9, + "Wheels": "315/70 R22.5", + "AxleWeightShare": 0.0, + "TwinTyres": false, + "RRCISO": 0.0055, + "FzISO": 33350.0 + }, + { + "Inertia": 14.9, + "Wheels": "315/70 R22.5", + "AxleWeightShare": 0.0, + "TwinTyres": true, + "RRCISO": 0.0065, + "FzISO": 33350.0 + } + ] + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag_DECL.vecto b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag_DECL.vecto new file mode 100644 index 0000000000000000000000000000000000000000..93db21f9470d29926de1951b0c7ba633485153d9 --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class5_Tractor_4x2/Class5_Tractor_NoAirdrag_DECL.vecto @@ -0,0 +1,67 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2016-10-13T10:08:21.7776564Z", + "AppVersion": "3", + "FileVersion": 3 + }, + "Body": { + "SavedInDeclMode": true, + "EngineOnlyMode": false, + "VehicleFile": "Class5_Tractor_NoAirdrag.vveh", + "EngineFile": "Engine_325kW_12.7l.veng", + "GearboxFile": "AMT_12.vgbx", + "AuxiliaryAssembly": "Classic", + "AuxiliaryVersion": "CLASSIC", + "AdvancedAuxiliaryFilePath": "", + "Aux": [ + { + "ID": "FAN", + "Type": "Fan", + "Technology": [ + "Belt driven or driven via transm. - Electronically controlled visco clutch" + ] + }, + { + "ID": "STP", + "Type": "Steering pump", + "Technology": [ + "Fixed displacement with elec. control" + ] + }, + { + "ID": "AC", + "Type": "HVAC", + "Technology": [ + "Default" + ] + }, + { + "ID": "ES", + "Type": "Electric System", + "Technology": [ + "Standard technology" + ] + }, + { + "ID": "PS", + "Type": "Pneumatic System", + "Technology": [ + "Medium Supply 2-stage + ESS + AMS" + ] + } + ], + "StartStop": { + "Enabled": false, + "MaxSpeed": 5.0, + "MinTime": 5.0, + "Delay": 5.0 + }, + "OverSpeedEcoRoll": { + "Mode": "Overspeed", + "MinSpeed": 50.0, + "OverSpeed": 5.0, + "UnderSpeed": 5.0 + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag.vveh b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag.vveh new file mode 100644 index 0000000000000000000000000000000000000000..846a9f48eb234064715f573abd782297d2cc518f --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag.vveh @@ -0,0 +1,64 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2017-05-19T08:36:54.5380903Z", + "AppVersion": "3", + "FileVersion": 7 + }, + "Body": { + "SavedInDeclMode": true, + "VehCat": "RigidTruck", + "CurbWeight": 9300.0, + "CurbWeightExtra": 0.0, + "Loading": 0.0, + "MassMax": 26.0, + "rdyn": 0.0, + "CdCorrMode": "CdofVdecl", + "CdCorrFile": "", + "Retarder": { + "Type": "secondary", + "Ratio": 1.0, + "File": "Retarder.vrlm" + }, + "Angledrive": { + "Type": "None", + "Ratio": "NaN", + "LossMap": "" + }, + "PTO": { + "Type": "drive shaft and/or more than 2 gear wheels - multi-disc clutch, oil pump", + "LossMap": "", + "Cycle": "" + }, + "TorqueLimits": {}, + "AxleConfig": { + "Type": "6x2", + "Axles": [ + { + "Inertia": 14.9, + "Wheels": "315/70 R22.5", + "AxleWeightShare": 0.0, + "TwinTyres": false, + "RRCISO": 0.0055, + "FzISO": 33350.0 + }, + { + "Inertia": 14.9, + "Wheels": "315/70 R22.5", + "AxleWeightShare": 0.0, + "TwinTyres": true, + "RRCISO": 0.0055, + "FzISO": 33350.0 + }, + { + "Inertia": 14.9, + "Wheels": "315/70 R22.5", + "AxleWeightShare": 0.0, + "TwinTyres": false, + "RRCISO": 0.0055, + "FzISO": 33350.0 + } + ] + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag_DECL.vecto b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag_DECL.vecto new file mode 100644 index 0000000000000000000000000000000000000000..f0721f236761c993cc383176902663513dc1a83c --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Integration/DeclarationMode/Class9_RigidTruck_6x2/Class9_RigidTruck_NoAirdrag_DECL.vecto @@ -0,0 +1,61 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2017-05-19T08:36:57.2458195Z", + "AppVersion": "3", + "FileVersion": 3 + }, + "Body": { + "SavedInDeclMode": true, + "EngineOnlyMode": false, + "VehicleFile": "Class9_RigidTruck_NoAirdrag.vveh", + "EngineFile": "Engine_324kW_12.7l.veng", + "GearboxFile": "AMT_12.vgbx", + "AuxiliaryAssembly": "Classic", + "AuxiliaryVersion": "CLASSIC", + "AdvancedAuxiliaryFilePath": "", + "Aux": [ + { + "ID": "FAN", + "Type": "Fan", + "Technology": [ + "Crankshaft mounted - On/off clutch" + ] + }, + { + "ID": "STP", + "Type": "Steering pump", + "Technology": [ + "Fixed displacement with elec. control" + ] + }, + { + "ID": "AC", + "Type": "HVAC", + "Technology": [ + "Default" + ] + }, + { + "ID": "ES", + "Type": "Electric System", + "Technology": [ + "Standard technology" + ] + }, + { + "ID": "PS", + "Type": "Pneumatic System", + "Technology": [ + "Medium Supply 2-stage + ESS + AMS" + ] + } + ], + "OverSpeedEcoRoll": { + "Mode": "Overspeed", + "MinSpeed": 50.0, + "OverSpeed": 5.0, + "UnderSpeed": 5.0 + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs index 675a82b958dfce5b28dde0ecebee4a215dafdce5..4d4e0df9feefcf8381834804fbead9e8a6ea778d 100644 --- a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs +++ b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs @@ -89,7 +89,7 @@ namespace TUGraz.VectoCore.Tests.Utils public static VehicleData CreateVehicleDataFromFile(string vehicleDataFile) { var dao = new EngineeringDataAdapter(); - var vehicleInput = JSONInputDataFactory.ReadJsonVehicle(vehicleDataFile); + var vehicleInput = JSONInputDataFactory.ReadJsonVehicle(vehicleDataFile, null); var airdragData = vehicleInput as IAirdragEngineeringInputData; return dao.CreateVehicleData(vehicleInput); } @@ -97,7 +97,7 @@ namespace TUGraz.VectoCore.Tests.Utils public static AirdragData CreateAirdragDataFromFile(string vehicleDataFile) { var dao = new EngineeringDataAdapter(); - var vehicleInput = JSONInputDataFactory.ReadJsonVehicle(vehicleDataFile); + var vehicleInput = JSONInputDataFactory.ReadJsonVehicle(vehicleDataFile, null); var airdragData = vehicleInput as IAirdragEngineeringInputData; return dao.CreateAirdragData(airdragData, vehicleInput); } @@ -113,4 +113,4 @@ namespace TUGraz.VectoCore.Tests.Utils return dao.CreateDriverData(engineeringJob.DriverInputData); } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index 7f997ee209a67ede57dd26814c5093c4327cd6ed..06dec001cf500345eda3504a0f7af0bb829ba469 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -83,6 +83,7 @@ <Compile Include="Integration\CoachAdvancedAuxPowertrain.cs" /> <Compile Include="Integration\CoachPowerTrain.cs" /> <Compile Include="Integration\DriverStrategy\SimpleCycles.cs" /> + <Compile Include="Integration\EPTP\EPTPTest.cs" /> <Compile Include="Integration\FuelTypesTest.cs" /> <Compile Include="Integration\FullCycleDeclarationTest.cs"> <SubType>Code</SubType> @@ -681,6 +682,12 @@ <None Include="TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Axle_4x2_orig.vtlm"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_NoAirdrag_DECL.vecto"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_NoAirdrag.vveh"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck.vveh"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> @@ -903,9 +910,15 @@ <None Include="TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Axle_4x2_Tractor.vtlm"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_NoAirdrag.vveh"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor.vveh"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_NoAirdrag_DECL.vecto"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Integration\DeclarationMode\Class5_Tractor_4x2\Class5_Tractor_DECL.vecto"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> @@ -1023,9 +1036,15 @@ <None Include="TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Axle_4x2.vtlm"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_NoAirdrag.vveh"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck.vveh"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_NoAirdrag_DECL.vecto"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Integration\DeclarationMode\Class9_RigidTruck_6x2\Class9_RigidTruck_DECL.vecto"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> diff --git a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs index e762e3fdc4edb7ec17b4aaced1e743ea1bd7fc2d..351fc7ce67a25c1b0d612ca1e918dcdc475cc1f9 100644 --- a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs @@ -61,6 +61,12 @@ namespace TUGraz.VectoCore.Tests.XML const string SampleVehicleFullDeclCertificationOptions = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample_certificationOptions.xml"; + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + [TestCase] public void TestXMLInputEng() { @@ -68,7 +74,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var engineDataProvider = inputDataProvider.EngineInputData; + var engineDataProvider = inputDataProvider.JobInputData.Vehicle.EngineInputData; Assert.IsTrue(engineDataProvider.SavedInDeclarationMode); @@ -102,7 +108,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var gearboxDataProvider = inputDataProvider.GearboxInputData; + var gearboxDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData; Assert.AreEqual("Generic 40t Long Haul Truck Gearbox", gearboxDataProvider.Model); Assert.AreEqual(GearboxType.AMT, gearboxDataProvider.Type); @@ -127,7 +133,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var axlegearDataProvider = inputDataProvider.AxleGearInputData; + var axlegearDataProvider = inputDataProvider.JobInputData.Vehicle.AxleGearInputData; Assert.AreEqual("Generic 40t Long Haul Truck AxleGear", axlegearDataProvider.Model); @@ -149,7 +155,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var retarderDataProvider = inputDataProvider.RetarderInputData; + var retarderDataProvider = inputDataProvider.JobInputData.Vehicle.RetarderInputData; Assert.AreEqual("Generic Retarder", retarderDataProvider.Model); @@ -170,7 +176,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var vehicleDataProvider = inputDataProvider.VehicleInputData; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; var axles = vehicleDataProvider.Axles; @@ -211,7 +217,7 @@ namespace TUGraz.VectoCore.Tests.XML var modified = XmlReader.Create(new StringReader(nav.OuterXml)); var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - var vehicleDataProvider = inputDataProvider.VehicleInputData; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; AssertHelper.Exception<VectoException>(() => { var axles = vehicleDataProvider.Axles; }); } @@ -275,7 +281,7 @@ namespace TUGraz.VectoCore.Tests.XML var modified = XmlReader.Create(new StringReader(nav.OuterXml)); var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - var vehicleDataProvider = inputDataProvider.VehicleInputData; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; AssertHelper.Exception<VectoException>(() => { var axles = vehicleDataProvider.Axles; }); } @@ -286,7 +292,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var auxDataProvider = inputDataProvider.AuxiliaryInputData(); + var auxDataProvider = inputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(); var aux = auxDataProvider.Auxiliaries; var aux1 = aux[0]; @@ -299,18 +305,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual("Standard technology - LED headlights, all", aux3.Technology.First()); } - [TestCase] - public void TestXMLInputADAS() - { - var reader = XmlReader.Create(SampleVehicleDecl); - - var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - - var adas = inputDataProvider.DriverInputData; - - Assert.AreEqual(DriverMode.Overspeed, adas.OverSpeedEcoRoll.Mode); - } - + [TestCase] public void TestVehicleInput() { @@ -318,16 +313,16 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var vehicleDataProvider = inputDataProvider.VehicleInputData; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; Assert.AreEqual(VehicleCategory.Tractor, vehicleDataProvider.VehicleCategory); Assert.AreEqual(AxleConfiguration.AxleConfig_4x2, vehicleDataProvider.AxleConfiguration); Assert.AreEqual(7100.0, vehicleDataProvider.CurbMassChassis.Value()); Assert.AreEqual(40000.0, vehicleDataProvider.GrossVehicleMassRating.Value()); - Assert.AreEqual(6.34, inputDataProvider.AirdragInputData.AirDragArea.Value()); + Assert.AreEqual(6.34, inputDataProvider.JobInputData.Vehicle.AirdragInputData.AirDragArea.Value()); - Assert.AreEqual(1.0, inputDataProvider.RetarderInputData.Ratio); + Assert.AreEqual(1.0, inputDataProvider.JobInputData.Vehicle.RetarderInputData.Ratio); } [TestCase] @@ -356,7 +351,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var tcDataProvider = inputDataProvider.TorqueConverterInputData; + var tcDataProvider = inputDataProvider.JobInputData.Vehicle.TorqueConverterInputData; Assert.AreEqual(3, tcDataProvider.TCData.Rows.Count); @@ -372,7 +367,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var angledriveDataProvider = inputDataProvider.AngledriveInputData; + var angledriveDataProvider = inputDataProvider.JobInputData.Vehicle.AngledriveInputData; Assert.AreEqual(2.345, angledriveDataProvider.Ratio); Assert.AreEqual(6, angledriveDataProvider.LossMap.Rows.Count); @@ -387,16 +382,16 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleFullDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var vehicleDataProvider = inputDataProvider.JobInputData().Vehicle; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; Assert.AreEqual(VehicleCategory.Tractor, vehicleDataProvider.VehicleCategory); Assert.AreEqual(AxleConfiguration.AxleConfig_4x2, vehicleDataProvider.AxleConfiguration); Assert.AreEqual(7100.0, vehicleDataProvider.CurbMassChassis.Value()); Assert.AreEqual(40000.0, vehicleDataProvider.GrossVehicleMassRating.Value()); - Assert.AreEqual(6.34, inputDataProvider.AirdragInputData.AirDragArea.Value()); + Assert.AreEqual(6.34, inputDataProvider.JobInputData.Vehicle.AirdragInputData.AirDragArea.Value()); - Assert.AreEqual(1.0, inputDataProvider.RetarderInputData.Ratio); + Assert.AreEqual(1.0, inputDataProvider.JobInputData.Vehicle.RetarderInputData.Ratio); } [TestCase] @@ -405,7 +400,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleFullDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var vehicleDataProvider = inputDataProvider.JobInputData().Vehicle; + var vehicleDataProvider = inputDataProvider.JobInputData.Vehicle; var torqueLimits = vehicleDataProvider.TorqueLimits.OrderBy(x => x.Gear).ToList(); Assert.AreEqual(3, torqueLimits.Count); @@ -420,7 +415,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleFullDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var gearboxDataProvider = inputDataProvider.GearboxInputData; + var gearboxDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData; var gears = gearboxDataProvider.Gears; Assert.AreEqual(12, gears.Count); @@ -435,7 +430,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleFullDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var gearboxDataProvider = inputDataProvider.GearboxInputData; + var gearboxDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData; var gears = gearboxDataProvider.Gears; Assert.AreEqual(12, gears.Count); @@ -466,7 +461,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - AssertHelper.Exception<VectoException>(() => { var tmp = inputDataProvider.RetarderInputData.Ratio; }); + AssertHelper.Exception<VectoException>(() => { var tmp = inputDataProvider.JobInputData.Vehicle.RetarderInputData.Ratio; }); } [TestCase] @@ -535,7 +530,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - Assert.AreEqual(retarderType.Value, inputDataProvider.RetarderInputData.Type); + Assert.AreEqual(retarderType.Value, inputDataProvider.JobInputData.Vehicle.RetarderInputData.Type); } } @@ -573,7 +568,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - Assert.AreEqual(axleConfiguration.Value, inputDataProvider.VehicleInputData.AxleConfiguration); + Assert.AreEqual(axleConfiguration.Value, inputDataProvider.JobInputData.Vehicle.AxleConfiguration); } } @@ -607,7 +602,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - Assert.AreEqual(vehicleCategory.Value, inputDataProvider.VehicleInputData.VehicleCategory); + Assert.AreEqual(vehicleCategory.Value, inputDataProvider.JobInputData.Vehicle.VehicleCategory); } } @@ -640,7 +635,7 @@ namespace TUGraz.VectoCore.Tests.XML true); Assert.AreEqual(retarderType.Value, - inputDataProvider.RetarderInputData.Type); + inputDataProvider.JobInputData.Vehicle.RetarderInputData.Type); } } @@ -694,15 +689,15 @@ namespace TUGraz.VectoCore.Tests.XML if (ptoType[0] == "none") { Assert.AreEqual("None", - inputDataProvider.PTOTransmissionInputData.PTOTransmissionType); + inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData.PTOTransmissionType); } else if (ptoType[0] == "only one engaged gearwheel above oil level") { Assert.AreEqual(ptoType[0], - inputDataProvider.PTOTransmissionInputData.PTOTransmissionType); + inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData.PTOTransmissionType); } else { Assert.AreEqual(string.Format("{0} - {1}", ptoType[0], ptoType[1]), - inputDataProvider.PTOTransmissionInputData.PTOTransmissionType); + inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData.PTOTransmissionType); } - DeclarationData.PTOTransmission.Lookup(inputDataProvider.PTOTransmissionInputData.PTOTransmissionType); + DeclarationData.PTOTransmission.Lookup(inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData.PTOTransmissionType); } } @@ -737,7 +732,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - Assert.AreEqual(angleDrive.Value, inputDataProvider.AngledriveInputData.Type); + Assert.AreEqual(angleDrive.Value, inputDataProvider.JobInputData.Vehicle.AngledriveInputData.Type); } } @@ -776,7 +771,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(modified, true); - Assert.AreEqual(gearboxType.Value, inputDataProvider.GearboxInputData.Type); + Assert.AreEqual(gearboxType.Value, inputDataProvider.JobInputData.Vehicle.GearboxInputData.Type); } } @@ -786,7 +781,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var ptoDataProvider = inputDataProvider.PTOTransmissionInputData; + var ptoDataProvider = inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData; Assert.AreEqual("None", ptoDataProvider.PTOTransmissionType); } @@ -797,7 +792,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = XmlReader.Create(SampleVehicleFullDecl); var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - var ptoDataProvider = inputDataProvider.PTOTransmissionInputData; + var ptoDataProvider = inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData; var lookup = DeclarationData.PTOTransmission.Lookup(ptoDataProvider.PTOTransmissionType); Assert.AreEqual("only the drive shaft of the PTO - multi-disc clutch", ptoDataProvider.PTOTransmissionType); @@ -811,10 +806,10 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true); - Assert.AreEqual(CertificationMethod.Option2, inputDataProvider.GearboxInputData.CertificationMethod); - Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.AxleGearInputData.CertificationMethod); - Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.RetarderInputData.CertificationMethod); - Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.AirdragInputData.CertificationMethod); + Assert.AreEqual(CertificationMethod.Option2, inputDataProvider.JobInputData.Vehicle.GearboxInputData.CertificationMethod); + Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.JobInputData.Vehicle.AxleGearInputData.CertificationMethod); + Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.JobInputData.Vehicle.RetarderInputData.CertificationMethod); + Assert.AreEqual(CertificationMethod.Measured, inputDataProvider.JobInputData.Vehicle.AirdragInputData.CertificationMethod); } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCoreTest/XML/XMLEngineeringInputRefTest.cs b/VectoCore/VectoCoreTest/XML/XMLEngineeringInputRefTest.cs index ceebc6e69131d4e15ba9d4691706a5caac0efd51..fa5fac683ec0150b0cf8fa956d902bd25a49e5bf 100644 --- a/VectoCore/VectoCoreTest/XML/XMLEngineeringInputRefTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLEngineeringInputRefTest.cs @@ -52,6 +52,12 @@ namespace TUGraz.VectoCore.Tests.XML { public const string EngineeringSampleFile = "TestData/XML/XMLReaderEngineering/engineering_job-sample_ref.xml"; + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + [TestCase] public void TestXMLInputEngineeringReferencedFileAsStream() { @@ -66,7 +72,7 @@ namespace TUGraz.VectoCore.Tests.XML { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var engineDataProvider = inputDataProvider.EngineInputData; + var engineDataProvider = inputDataProvider.JobInputData.Vehicle.EngineInputData; Assert.IsFalse(engineDataProvider.SavedInDeclarationMode); @@ -101,7 +107,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputGbxReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var gearboxDataProvider = inputDataProvider.GearboxInputData; + var gearboxDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData; Assert.AreEqual("Generic 40t Long Haul Truck Gearbox", gearboxDataProvider.Model); Assert.AreEqual(GearboxType.AMT, gearboxDataProvider.Type); @@ -131,7 +137,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputGbxTCReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var tcInputDataProvider = inputDataProvider.GearboxInputData.TorqueConverter; + var tcInputDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData.TorqueConverter; Assert.AreEqual("GBX_ShiftPolygons.vgbs", Path.GetFileName(tcInputDataProvider.ShiftPolygon.Source)); @@ -149,7 +155,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputAngledriveReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var angledriveInputData = inputDataProvider.AngledriveInputData; + var angledriveInputData = inputDataProvider.JobInputData.Vehicle.AngledriveInputData; Assert.AreEqual("Generic Angledrive", angledriveInputData.Model); @@ -166,7 +172,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputAxlGReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var axlegearDataProvider = inputDataProvider.AxleGearInputData; + var axlegearDataProvider = inputDataProvider.JobInputData.Vehicle.AxleGearInputData; Assert.AreEqual("Generic 40t Long Haul Truck AxleGear", axlegearDataProvider.Model); @@ -183,7 +189,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputRetarderReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var retarderDataProvider = inputDataProvider.RetarderInputData; + var retarderDataProvider = inputDataProvider.JobInputData.Vehicle.RetarderInputData; Assert.AreEqual("Generic Retarder", retarderDataProvider.Model); @@ -221,7 +227,7 @@ namespace TUGraz.VectoCore.Tests.XML public void TestXMLInputAuxiliariesReferencedFile() { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var auxDataProvider = inputDataProvider.AuxiliaryInputData(); + var auxDataProvider = inputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(); var aux = auxDataProvider.Auxiliaries; var aux1 = aux[0]; @@ -262,12 +268,12 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual(7100.0, vehicleDataProvider.CurbMassChassis.Value()); Assert.AreEqual(18000.0, vehicleDataProvider.GrossVehicleMassRating.Value()); - Assert.AreEqual(6.29, inputDataProvider.AirdragInputData.AirDragArea.Value()); + Assert.AreEqual(6.29, inputDataProvider.JobInputData.Vehicle.AirdragInputData.AirDragArea.Value()); Assert.AreEqual(1500, vehicleDataProvider.Loading.Value()); Assert.AreEqual(500, vehicleDataProvider.CurbMassExtra.Value()); - Assert.AreEqual(1.0, inputDataProvider.RetarderInputData.Ratio); + Assert.AreEqual(1.0, inputDataProvider.JobInputData.Vehicle.RetarderInputData.Ratio); } [TestCase] @@ -307,7 +313,7 @@ namespace TUGraz.VectoCore.Tests.XML { var inputDataProvider = new XMLEngineeringInputDataProvider(EngineeringSampleFile, true); - var ptoData = inputDataProvider.PTOTransmissionInputData; + var ptoData = inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData; //Assert.AreEqual("only the drive shaft of the PTO - multi-disc clutch", ptoData.PTOTransmissionType); Assert.AreEqual(2, ptoData.PTOLossMap.Rows.Count); @@ -320,4 +326,4 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual("100", ptoData.PTOCycle.Rows[3][2]); } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCoreTest/XML/XMLEngineeringInputSingleTest.cs b/VectoCore/VectoCoreTest/XML/XMLEngineeringInputSingleTest.cs index 5b225a8a4628aae93a7fb5be8f2f0a87f4a5a714..638c9999d512f1ade37a8aa64cef12c84fb2a09a 100644 --- a/VectoCore/VectoCoreTest/XML/XMLEngineeringInputSingleTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLEngineeringInputSingleTest.cs @@ -49,8 +49,8 @@ using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.OutputData.FileIO; using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; -using NUnit.Framework; - +using NUnit.Framework; + namespace TUGraz.VectoCore.Tests.XML { [TestFixture] @@ -60,6 +60,11 @@ namespace TUGraz.VectoCore.Tests.XML public const string EngineeringSampleFileFull = "TestData/XML/XMLReaderEngineering/engineering_job-sample_FULL.xml"; + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } [TestCase] public void TestXMLInputEngSingleFile() @@ -68,7 +73,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var engineDataProvider = inputDataProvider.EngineInputData; + var engineDataProvider = inputDataProvider.JobInputData.Vehicle.EngineInputData; Assert.IsFalse(engineDataProvider.SavedInDeclarationMode); @@ -87,10 +92,10 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual("fuel consumption", fcMapTable.Columns[2].Caption); Assert.AreEqual("560.00", fcMapTable.Rows[0][0]); - var fcMap = FuelConsumptionMapReader.Create(fcMapTable); + var fcMap = FuelConsumptionMapReader.Create(fcMapTable); Assert.AreEqual(1256.SI(Unit.SI.Gramm.Per.Hour).Value(), - fcMap.GetFuelConsumption(0.SI<NewtonMeter>(), 560.RPMtoRad()).Value.Value()); - + fcMap.GetFuelConsumption(0.SI<NewtonMeter>(), 560.RPMtoRad()).Value.Value()); + var fldTable = engineDataProvider.FullLoadCurve; Assert.AreEqual(10, fldTable.Rows.Count); Assert.AreEqual("engine speed", fldTable.Columns[0].Caption); @@ -105,7 +110,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = File.OpenRead(EngineeringSampleFile); var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var gearboxDataProvider = inputDataProvider.GearboxInputData; + var gearboxDataProvider = inputDataProvider.JobInputData.Vehicle.GearboxInputData; Assert.AreEqual("Generic 40t Long Haul Truck Gearbox", gearboxDataProvider.Model); Assert.AreEqual(GearboxType.AMT, gearboxDataProvider.Type); @@ -134,7 +139,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = File.OpenRead(EngineeringSampleFile); var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var axlegearDataProvider = inputDataProvider.AxleGearInputData; + var axlegearDataProvider = inputDataProvider.JobInputData.Vehicle.AxleGearInputData; Assert.AreEqual("Generic 40t Long Haul Truck AxleGear", axlegearDataProvider.Model); @@ -177,7 +182,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(stream, true); - var axleGear = inputDataProvider.AxleGearInputData; + var axleGear = inputDataProvider.JobInputData.Vehicle.AxleGearInputData; Assert.AreEqual(0.9123, axleGear.Efficiency); } @@ -187,7 +192,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = File.OpenRead(EngineeringSampleFile); var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var retarderDataProvider = inputDataProvider.RetarderInputData; + var retarderDataProvider = inputDataProvider.JobInputData.Vehicle.RetarderInputData; Assert.AreEqual("Generic Retarder", retarderDataProvider.Model); @@ -342,7 +347,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = File.OpenRead(EngineeringSampleFile); var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var auxDataProvider = inputDataProvider.AuxiliaryInputData(); + var auxDataProvider = inputDataProvider.JobInputData.Vehicle.AuxiliaryInputData(); var aux = auxDataProvider.Auxiliaries; var aux1 = aux[0]; @@ -383,12 +388,12 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual(7100.0, vehicleDataProvider.CurbMassChassis.Value()); Assert.AreEqual(40000.0, vehicleDataProvider.GrossVehicleMassRating.Value()); - Assert.AreEqual(6.29, inputDataProvider.AirdragInputData.AirDragArea.Value()); + Assert.AreEqual(6.29, inputDataProvider.JobInputData.Vehicle.AirdragInputData.AirDragArea.Value()); Assert.AreEqual(1500, vehicleDataProvider.Loading.Value()); Assert.AreEqual(500, vehicleDataProvider.CurbMassExtra.Value()); - Assert.AreEqual(1.0, inputDataProvider.RetarderInputData.Ratio); + Assert.AreEqual(1.0, inputDataProvider.JobInputData.Vehicle.RetarderInputData.Ratio); } [TestCase] @@ -418,9 +423,8 @@ namespace TUGraz.VectoCore.Tests.XML var declarationDriverDataProvider = (IDriverDeclarationInputData)inputDataProvider.DriverInputData; - Assert.AreEqual(DriverMode.Overspeed, declarationDriverDataProvider.OverSpeedEcoRoll.Mode); - var shiftStrategy = inputDataProvider.GearboxInputData; + var shiftStrategy = inputDataProvider.JobInputData.Vehicle.GearboxInputData; Assert.AreEqual(DeclarationData.Gearbox.UpshiftMinAcceleration.Value(), shiftStrategy.UpshiftMinAcceleration.Value(), 1e-6); @@ -438,7 +442,7 @@ namespace TUGraz.VectoCore.Tests.XML AssertHelper.AreRelativeEqual(Constants.DefaultPowerShiftTime, shiftStrategy.PowershiftShiftTime); - var tcShiftStrategy = inputDataProvider.GearboxInputData.TorqueConverter; + var tcShiftStrategy = inputDataProvider.JobInputData.Vehicle.GearboxInputData.TorqueConverter; AssertHelper.AreRelativeEqual(DeclarationData.TorqueConverter.CCUpshiftMinAcceleration, tcShiftStrategy.CCUpshiftMinAcceleration); @@ -506,7 +510,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var tcDataProvider = inputDataProvider.TorqueConverterInputData; + var tcDataProvider = inputDataProvider.JobInputData.Vehicle.TorqueConverterInputData; Assert.AreEqual(1000, tcDataProvider.ReferenceRPM.AsRPM, 1e-6); Assert.AreEqual(1.1, tcDataProvider.Inertia.Value()); @@ -529,7 +533,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var angledriveDataProvider = inputDataProvider.AngledriveInputData; + var angledriveDataProvider = inputDataProvider.JobInputData.Vehicle.AngledriveInputData; Assert.AreEqual(1.2, angledriveDataProvider.Ratio); Assert.AreEqual(6, angledriveDataProvider.LossMap.Rows.Count); @@ -569,11 +573,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual("1", driverAcc.Rows[1][1]); Assert.AreEqual("-1", driverAcc.Rows[1][2]); - var declarationDriverDataProvider = (IDriverDeclarationInputData)inputDataProvider.DriverInputData; - - Assert.AreEqual(DriverMode.Overspeed, declarationDriverDataProvider.OverSpeedEcoRoll.Mode); - - var shiftStrategy = inputDataProvider.GearboxInputData; + var shiftStrategy = inputDataProvider.JobInputData.Vehicle.GearboxInputData; Assert.AreEqual(0.133, shiftStrategy.UpshiftMinAcceleration.Value(), 1e-6); Assert.AreEqual(12, shiftStrategy.DownshiftAfterUpshiftDelay.Value(), 1e-6); @@ -587,7 +587,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual(0.811, shiftStrategy.PowershiftShiftTime.Value(), 1e-6); - var tcShiftStrategy = inputDataProvider.GearboxInputData.TorqueConverter; + var tcShiftStrategy = inputDataProvider.JobInputData.Vehicle.GearboxInputData.TorqueConverter; Assert.AreEqual(0.134, tcShiftStrategy.CCUpshiftMinAcceleration.Value(), 1e-6); Assert.AreEqual(0.133, tcShiftStrategy.CLUpshiftMinAcceleration.Value(), 1e-6); @@ -600,7 +600,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var airdragData = inputDataProvider.AirdragInputData; + var airdragData = inputDataProvider.JobInputData.Vehicle.AirdragInputData; Assert.AreEqual(CrossWindCorrectionMode.SpeedDependentCorrectionFactor, airdragData.CrossWindCorrectionMode); Assert.AreEqual(2, airdragData.CrosswindCorrectionMap.Rows.Count); Assert.AreEqual("100", airdragData.CrosswindCorrectionMap.Rows[1][0]); @@ -614,7 +614,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var ptoData = inputDataProvider.PTOTransmissionInputData; + var ptoData = inputDataProvider.JobInputData.Vehicle.PTOTransmissionInputData; Assert.AreEqual("only the drive shaft of the PTO - multi-disc clutch", ptoData.PTOTransmissionType); Assert.AreEqual(2, ptoData.PTOLossMap.Rows.Count); @@ -634,7 +634,7 @@ namespace TUGraz.VectoCore.Tests.XML var reader = File.OpenRead(EngineeringSampleFileFull); var inputDataProvider = new XMLEngineeringInputDataProvider(reader, true); - var angledriveInputData = inputDataProvider.AngledriveInputData; + var angledriveInputData = inputDataProvider.JobInputData.Vehicle.AngledriveInputData; Assert.AreEqual("Generic Angledrive", angledriveInputData.Model); @@ -677,7 +677,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(stream, true); - var angledrive = inputDataProvider.AngledriveInputData; + var angledrive = inputDataProvider.JobInputData.Vehicle.AngledriveInputData; Assert.AreEqual(0.9124, angledrive.Efficiency); } @@ -713,7 +713,7 @@ namespace TUGraz.VectoCore.Tests.XML var inputDataProvider = new XMLEngineeringInputDataProvider(stream, true); - var auxInput = inputDataProvider.AuxiliaryInputData().Auxiliaries; + var auxInput = inputDataProvider.JobInputData.Vehicle.AuxiliaryInputData().Auxiliaries; Assert.AreEqual(1, auxInput.Count); Assert.AreEqual(AuxiliaryDemandType.Constant, auxInput[0].AuxiliaryType); @@ -837,7 +837,7 @@ namespace TUGraz.VectoCore.Tests.XML AssertHelper.Exception<VectoException>( () => { var inputDataProvider = new XMLEngineeringInputDataProvider(stream, true); - var cyclesList = inputDataProvider.JobInputData().Cycles; + var cyclesList = inputDataProvider.JobInputData.Cycles; }); } @@ -911,8 +911,8 @@ namespace TUGraz.VectoCore.Tests.XML AssertHelper.Exception<VectoException>( () => { var inputDataProvider = new XMLEngineeringInputDataProvider(stream, false); - var lossmap = inputDataProvider.AxleGearInputData.LossMap; + var lossmap = inputDataProvider.JobInputData.Vehicle.AxleGearInputData.LossMap; }, "Failed to read TorqueLossMap resource"); } } -} \ No newline at end of file +} diff --git a/VectoCore/VectoCoreTest/XML/XMLWritingTest.cs b/VectoCore/VectoCoreTest/XML/XMLWritingTest.cs index 402bebd9a09aa76ef10abd7cc18385d99a150113..cc55997cb1b769b5eeff7a3fc4f7d4333193df30 100644 --- a/VectoCore/VectoCoreTest/XML/XMLWritingTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLWritingTest.cs @@ -55,6 +55,12 @@ namespace TUGraz.VectoCore.Tests.XML @"TestData\XML\XMLWriter\DeclarationJob\Class5_Tractor_4x2\Class5_Tractor_DECL-FULL.vecto"; + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + [TestCase] public void TestWriteEngineOnlySingleFile() { @@ -73,7 +79,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLEngineeringInputDataProvider(outFile, true); Assert.IsNotNull(xml); - Assert.AreEqual("175kW 6.8l Engine", xml.JobInputData().JobName); + Assert.AreEqual("175kW 6.8l Engine", xml.JobInputData.JobName); } [TestCase] @@ -89,7 +95,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLEngineeringInputDataProvider(outFile, true); Assert.IsNotNull(xml); - Assert.AreEqual("VEH-N.A.", xml.JobInputData().JobName); + Assert.AreEqual("VEH-N.A.", xml.JobInputData.JobName); } [TestCase] @@ -105,7 +111,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLEngineeringInputDataProvider(outFile, true); Assert.IsNotNull(xml); - Assert.AreEqual("VEH-N.A.", xml.JobInputData().JobName); + Assert.AreEqual("VEH-N.A.", xml.JobInputData.JobName); } [TestCase] @@ -123,7 +129,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLEngineeringInputDataProvider(Path.Combine(outDir, outFile), true); Assert.IsNotNull(xml); - Assert.AreEqual("VEH-N.A.", xml.JobInputData().JobName); + Assert.AreEqual("VEH-N.A.", xml.JobInputData.JobName); } [TestCase] @@ -161,7 +167,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLDeclarationInputDataProvider(reader, true); Assert.IsNotNull(xml); - Assert.AreEqual("VEH-N.A.", xml.JobInputData().JobName); + Assert.AreEqual("VEH-N.A.", xml.JobInputData.JobName); } [TestCase] @@ -183,7 +189,7 @@ namespace TUGraz.VectoCore.Tests.XML var xml = new XMLDeclarationInputDataProvider(reader, true); Assert.IsNotNull(xml); - Assert.AreEqual("VEH-N.A.", xml.JobInputData().JobName); + Assert.AreEqual("VEH-N.A.", xml.JobInputData.JobName); } } -} \ No newline at end of file +}