diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationIEPCDataProviderV2101.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationIEPCDataProviderV2101.cs deleted file mode 100644 index c188c697b9f9327510990da19330d04547d57b58..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationIEPCDataProviderV2101.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; -using System.Xml.Linq; -using Castle.Core.Internal; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider -{ - public class XMLDeclarationIEPCDataProviderV2101 : AbstractCommonComponentType, IXMLIEPCInputData, IElectricMotorVoltageLevel, IGearEntry - { - public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V2101_JOBS; - public const string XSD_TYPE = "IEPCMeasuredDataDeclarationType"; - public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - private IXMLDeclarationVehicleData _vehicle; - private IList<IElectricMotorVoltageLevel> _voltageLevels; - private IList<IGearEntry> _gears; - - public XMLDeclarationIEPCDataProviderV2101(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) - : base(componentNode, sourceFile) - { - _vehicle = vehicle; - SourceType = DataSourceType.XMLEmbedded; - } - - #region Overrides of AbstractCommonComponentType - - public override CertificationMethod CertificationMethod - { - get - { - var certMethod = GetString(XMLNames.Component_Gearbox_CertificationMethod, required: false) ?? - GetString(XMLNames.Component_CertificationMethod, required: false); - - if(certMethod != null && certMethod == "Measured for complete component") - return CertificationMethod.Measured; - - return certMethod != null - ? EnumHelper.ParseEnum<CertificationMethod>(certMethod) - : CertificationMethod.Measured; - } - } - - #endregion - - - #region Implementation of IPowerRatingInputData - - public virtual ElectricMachineType ElectricMachineType => - GetString(XMLNames.ElectricMachine_ElectricMachineType).ParseEnum<ElectricMachineType>(); - - public virtual Watt R85RatedPower => - GetDouble(XMLNames.ElectricMachine_R85RatedPower).SI<Watt>(); - - public virtual KilogramSquareMeter Inertia => - GetDouble(XMLNames.ElectricMachine_RotationalInertia).SI<KilogramSquareMeter>(); - - public virtual NewtonMeter ContinuousTorque => - GetDouble(XMLNames.ElectricMachine_ContinuousTorque).SI<NewtonMeter>(); - - public virtual PerSecond ContinuousTorqueSpeed => - GetDouble(XMLNames.ElectricMachine_TestSpeedContinuousTorque).SI<PerSecond>(); - - public virtual NewtonMeter OverloadTorque => - GetDouble(XMLNames.ElectricMachine_OverloadTorque).SI<NewtonMeter>(); - - public virtual PerSecond OverloadTestSpeed => - GetDouble(XMLNames.ElectricMachine_TestSpeedOverloadTorque).SI<PerSecond>(); - - public virtual Second OverloadTime => - GetDouble(XMLNames.ElectricMachine_OverloadDuration).SI<Second>(); - - #endregion - - #region Implementation of IIEPCDeclarationInputData - - public virtual Volt TestVoltageOverload => - GetDouble(XMLNames.ElectricMachine_TestVoltageOverload).SI<Volt>(); - - public virtual bool DifferentialIncluded => GetBool(XMLNames.IEPC_DifferentialIncluded); - - public virtual bool DesignTypeWheelMotor => GetBool(XMLNames.IEPC_DesignTypeWheelMotor); - - public virtual int? NrOfDesignTypeWheelMotorMeasured => ElementExists(XMLNames.IEPC_NrOfDesignTypeWheelMotorMeasured) ? - (int?) Convert.ToInt32(GetString(XMLNames.IEPC_NrOfDesignTypeWheelMotorMeasured)) : null; - - public IList<IGearEntry> Gears => - _gears ?? (_gears = GetGearEntries()); - - - public virtual IList<IElectricMotorVoltageLevel> VoltageLevels => - _voltageLevels ?? (_voltageLevels = GetVoltageLevels()); - - public TableData DragCurve => - ReadTableData(XMLNames.DragCurve, XMLNames.DragCurve_Entry, new Dictionary<string, string> - { - {XMLNames.DragCurve_OutShaftSpeed, XMLNames.DragCurve_OutShaftSpeed}, - {XMLNames.DragCurve_DragTorque, XMLNames.DragCurve_DragTorque} - }); - - #endregion - - #region Implementation of IElectricMotorVoltageLevel - - public Volt VoltageLevel => GetDouble(XMLNames.VoltageLevel_Voltage).SI<Volt>(); - - public TableData FullLoadCurve => ReadTableData(XMLNames.MaxTorqueCurve, XMLNames.MaxTorqueCurve_Entry, new Dictionary<string, string> { - {XMLNames.MaxTorqueCurve_OutShaftSpeed, XMLNames.MaxTorqueCurve_OutShaftSpeed}, - {XMLNames.MaxTorqueCurve_MaxTorque, XMLNames.MaxTorqueCurve_MaxTorque}, - {XMLNames.MaxTorqueCurve_MinTorque, XMLNames.MaxTorqueCurve_MinTorque} - }); - - public TableData EfficiencyMap => ReadTableData(XMLNames.PowerMap, XMLNames.PowerMap_Entry, new Dictionary<string, string> { - { XMLNames.PowerMap_OutShaftSpeed, XMLNames.PowerMap_OutShaftSpeed }, - { XMLNames.PowerMap_Torque, XMLNames.PowerMap_Torque }, - { XMLNames.PowerMap_ElectricPower, XMLNames.PowerMap_ElectricPower } - }); - - #endregion - - private IList<IElectricMotorVoltageLevel> GetVoltageLevels() - { - var voltageLevelNodes = GetNodes(XMLNames.ElectricMachine_VoltageLevel); - if (voltageLevelNodes.IsNullOrEmpty()) - return null; - - var voltageLevels = new List<IElectricMotorVoltageLevel>(); - - foreach (XmlNode voltageLevelNode in voltageLevelNodes) - { - voltageLevels.Add(new XMLDeclarationIEPCDataProviderV2101(null, voltageLevelNode, null)); - } - - return voltageLevels; - } - - #region Implementation of IGearEntry - - public int GearNumber => Convert.ToInt32(GetAttribute(BaseNode, XMLNames.Gear_GearNumber_Attr)); - - public double Ratio => GetDouble(XMLNames.Gear_Ratio); - - public NewtonMeter MaxOutputShaftTorque => ElementExists(XMLNames.Gear_MaxOutputShaftTorque) - ? GetDouble(XMLNames.Gear_MaxOutputShaftTorque).SI<NewtonMeter>() - : null; - - public PerSecond MaxOutputShaftSpeed => ElementExists(XMLNames.Gear_MaxOutputShaftSpeed) - ? GetDouble(XMLNames.Gear_MaxOutputShaftSpeed).SI<PerSecond>() - : null; - - #endregion - - private IList<IGearEntry> GetGearEntries() - { - var gearNodes = GetNodes(XMLNames.Gear_EntryName); - if (gearNodes.IsNullOrEmpty()) - return null; - - var gears = new List<IGearEntry>(); - foreach (XmlNode gearNode in gearNodes) { - gears.Add(new XMLDeclarationIEPCDataProviderV2101(null, gearNode, null)); - } - - return gears; - } - - #region Overrides of AbstractXMLResource - - protected override XNamespace SchemaNamespace => NAMESPACE_URI; - protected override DataSourceType SourceType { get; } - - #endregion - - - - } -} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationGearboxDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationGearboxDataProvider.cs deleted file mode 100644 index ce4199a75acff542a177d1c05d825319338fd46e..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationGearboxDataProvider.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 System; -using System.Collections.Generic; -using System.Xml; -using TUGraz.IVT.VectoXML; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Resources; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.InputData.Impl; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration -{ - public class XMLDeclarationGearboxDataProvider : AbstractDeclarationXMLComponentDataProvider, - IGearboxDeclarationInputData - { - public XMLDeclarationGearboxDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) - : base(xmlInputDataProvider) - { - XBasePath = Helper.Query(VehiclePath, - XMLNames.Vehicle_Components, - XMLNames.Component_Gearbox, - XMLNames.ComponentDataWrapper); - } - - public new CertificationMethod CertificationMethod - { - get { return GetElementValue(XMLNames.Component_Gearbox_CertificationMethod).ParseEnum<CertificationMethod>(); } - } - - public GearboxType Type - { - get { - var value = GetElementValue(XMLNames.Gearbox_TransmissionType); - switch (value) { - case "MT": - case "SMT": - return GearboxType.MT; - case "AMT": - return GearboxType.AMT; - case "APT-S": - case "AT - Serial": - return GearboxType.ATSerial; - case "APT-P": - case "AT - PowerSplit": - return GearboxType.ATPowerSplit; - } - throw new ArgumentOutOfRangeException("GearboxType", value); - } - } - - public IList<ITransmissionInputData> Gears - { - get { - var retVal = new List<ITransmissionInputData>(); - var gears = Navigator.Select( - Helper.Query(XBasePath, XMLNames.Gearbox_Gears, XMLNames.Gearbox_Gears_Gear), - Manager); - while (gears.MoveNext()) { - var gear = gears.Current.GetAttribute(XMLNames.Gearbox_Gear_GearNumber_Attr, ""); - retVal.Add(ReadGear(gear)); - } - return retVal; - } - } - - public ITorqueConverterDeclarationInputData TorqueConverter - { - get { - return new XMLDeclarationTorqueConverterDataProvider(InputData); - } - } - - protected ITransmissionInputData ReadGear(string gearNr) - { - var retVal = new TransmissionInputData(); - var gearPath = Helper.Query(XMLNames.Gearbox_Gears, - Helper.QueryConstraint(XMLNames.Gearbox_Gears_Gear, XMLNames.Gearbox_Gear_GearNumber_Attr, gearNr)); - retVal.Ratio = GetDoubleElementValue(Helper.Query(gearPath, XMLNames.Gearbox_Gear_Ratio)); - retVal.Gear = XmlConvert.ToUInt16(gearNr); - retVal.LossMap = ReadTableData(AttributeMappings.TransmissionLossmapMapping, - Helper.Query(gearPath, XMLNames.Gearbox_Gear_TorqueLossMap, XMLNames.Gearbox_Gear_TorqueLossMap_Entry)); - - if (ElementExists(Helper.Query(gearPath, XMLNames.Gearbox_Gears_MaxTorque))) { - retVal.MaxTorque = GetDoubleElementValue(Helper.Query(gearPath, XMLNames.Gearbox_Gears_MaxTorque)).SI<NewtonMeter>(); - } - if (ElementExists(Helper.Query(gearPath, XMLNames.Gearbox_Gear_MaxSpeed))) { - retVal.MaxInputSpeed = GetDoubleElementValue(Helper.Query(gearPath, XMLNames.Gearbox_Gear_MaxSpeed)).RPMtoRad(); - } - return retVal; - } - } -} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs deleted file mode 100644 index 4f64a7a626bae274a2692b59c542ef46cc65981d..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/XMLDeclarationJobInputDataProvider.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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.Resources; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration -{ - // ReSharper disable once InconsistentNaming - public class XMLDeclarationJobInputDataProvider : AbstractDeclarationXMLComponentDataProvider, IDeclarationJobInputData - { - private readonly XMLDeclarationVehicleDataProvider _vehicle; - - public XMLDeclarationJobInputDataProvider(XMLDeclarationInputDataProvider xmlInputDataProvider) - : base(xmlInputDataProvider) - { - XBasePath = VehiclePath; - _vehicle = new XMLDeclarationVehicleDataProvider(xmlInputDataProvider); - } - - - public IVehicleDeclarationInputData Vehicle - { - get { return _vehicle; } - } - - public XMLDeclarationVehicleDataProvider XMLVehicle - { - get { return _vehicle; } - } - - public string JobName - { - get { return GetAttributeValue("", XMLNames.Component_ID_Attr); } - } - - public string ShiftStrategy { get { return ""; } } - } -} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs deleted file mode 100644 index 0a16feb9b1ed5b5ed0add75db18ccbf99e75db85..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringInputDataProvider.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 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 XmlDocument Document; - - protected internal XMLEngineeringJobInputDataProvider XMLEngineeringJobData; - - protected internal XMLEngineeringVehicleDataProvider VehicleData; - protected internal XMLEngineeringDriverDataProvider XMLEngineeringDriverData; - - public bool VerifyXml { get; protected set; } - - public XMLEngineeringInputDataProvider(string filename, bool verifyXml) - { - VerifyXml = verifyXml; - FileName = filename; - ReadXMLDocument(File.OpenRead(filename)); - - InitializeComponentDataProvider(); - } - - - public XMLEngineeringInputDataProvider(Stream inputData, bool verifyXml) - { - FileName = "."; - VerifyXml = verifyXml; - ReadXMLDocument(inputData); - - 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(); - } - - - private void ReadXMLDocument(Stream inputData) - { - - var xmldoc = new XmlDocument(); - xmldoc.Load(inputData); - if (VerifyXml) { - new XMLValidator(xmldoc, null, ValidationCallBack).ValidateXML(XMLValidator.XmlDocumentType.EngineeringData); - } - Document = xmldoc; - } - - private void InitializeComponentDataProvider() - { - 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(); - - XMLEngineeringDriverData = XMLEngineeringJobData.GetDriverData(); - } - - internal static void ValidationCallBack(XmlSeverityType severity, ValidationEvent evt) - { - if (severity == XmlSeverityType.Error) { - throw new VectoException("Validation error: {0}", evt.ValidationEventArgs.Message); - } - } - - private void ReadVehicle() - { - 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 XmlDocument(); - vehicleDocument.Load(XmlReader.Create(Path.Combine(Path.GetDirectoryName(FileName) ?? "./", vehicleFile))); - if (VerifyXml) { - new XMLValidator(vehicleDocument, null, ValidationCallBack).ValidateXML(XMLValidator.XmlDocumentType - .EngineeringData); - } - 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; } - } - - public IGearshiftEngineeringInputData GearshiftInputData { get { return null; } } - } -} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs deleted file mode 100644 index 0d7e74e54a8a984b06605549b0cdf5f9ea6812dc..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/XMLEngineeringJobInputDataProvider.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 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, - XmlDocument jobDocument, string xmlBasePath, string fsBasePath) - : base(xmlEngineeringJobInputDataProvider, jobDocument, xmlBasePath, fsBasePath) {} - - - public IVehicleDeclarationInputData Vehicle - { - get { return InputData.VehicleInputData; } - } - - IVehicleEngineeringInputData IEngineeringJobInputData.Vehicle - { - get { return InputData.VehicleInputData; } - } - - 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 string ShiftStrategy { get { return ""; } } - - 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/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs deleted file mode 100644 index 4549cbf8e08575bc6c1b106e7dd7890555774964..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs +++ /dev/null @@ -1,534 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 System; -using System.Collections.Generic; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -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.Models.Declaration; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; -using TUGraz.VectoCore.OutputData; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter -{ - public class DeclarationDataAdapter : AbstractSimulationDataAdapter - { - public static readonly GearboxType[] SupportedGearboxTypes = {GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial}; - - public DriverData CreateDriverData() - { - var lookAheadData = new DriverData.LACData { - Enabled = DeclarationData.Driver.LookAhead.Enabled, - //Deceleration = DeclarationData.Driver.LookAhead.Deceleration, - MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed, - LookAheadDecisionFactor = new LACDecisionFactor(), - LookAheadDistanceFactor = DeclarationData.Driver.LookAhead.LookAheadDistanceFactor, - }; - var overspeedData = new DriverData.OverSpeedEcoRollData { - Mode = DriverMode.Overspeed, - MinSpeed = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed, - OverSpeed = DeclarationData.Driver.OverSpeedEcoRoll.OverSpeed, - UnderSpeed = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed - }; - if (!DeclarationData.Driver.OverSpeedEcoRoll.AllowedModes.Contains(overspeedData.Mode)) { - throw new VectoSimulationException( - "Specified Overspeed/EcoRoll Mode not allowed in declaration mode! {0}", - overspeedData.Mode); - } - var retVal = new DriverData { - LookAheadCoasting = lookAheadData, - OverSpeedEcoRoll = overspeedData, - }; - return retVal; - } - - internal VehicleData CreateVehicleData(IVehicleDeclarationInputData data, Mission mission, Kilogram loading, bool allowVocational) - { - if (!data.SavedInDeclarationMode) { - WarnDeclarationMode("VehicleData"); - } - return data.ExemptedVehicle - ? CreateExemptedVehicleData(data) - : CreateNonExemptedVehicleData(data, mission, loading, allowVocational); - } - - private VehicleData CreateNonExemptedVehicleData( - IVehicleDeclarationInputData data, Mission mission, Kilogram loading, bool allowVocational) - { - var retVal = SetCommonVehicleData(data); - retVal.AxleConfiguration = data.AxleConfiguration; - retVal.AirDensity = DeclarationData.AirDensity; - retVal.VIN = data.VIN; - retVal.ManufacturerAddress = data.ManufacturerAddress; - retVal.LegislativeClass = data.LegislativeClass; - retVal.ZeroEmissionVehicle = data.ZeroEmissionVehicle; - retVal.SleeperCab = data.SleeperCab; - retVal.TrailerGrossVehicleWeight = mission.Trailer.Sum(t => t.TrailerGrossVehicleWeight).DefaultIfNull(0); - - retVal.BodyAndTrailerWeight = mission.BodyCurbWeight + mission.Trailer.Sum(t => t.TrailerCurbWeight).DefaultIfNull(0); - - retVal.Loading = loading; - retVal.DynamicTyreRadius = - data.Components.AxleWheels.AxlesDeclaration.Where(axle => axle.AxleType == AxleType.VehicleDriven) - .Select(da => DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) - .Average(); - retVal.CargoVolume = mission.MissionType != MissionType.Construction ? mission.TotalCargoVolume : 0.SI<CubicMeter>(); - - retVal.VocationalVehicle = allowVocational && data.VocationalVehicle; - retVal.ADAS = CreateADAS(data.ADAS); - - var axles = data.Components.AxleWheels.AxlesDeclaration; - if (axles.Count < mission.AxleWeightDistribution.Length) { - throw new VectoException( - "Vehicle does not contain sufficient axles. {0} axles defined, {1} axles required", - axles.Count, mission.AxleWeightDistribution.Length); - } - - var axleData = new List<Axle>(); - for (var i = 0; i < mission.AxleWeightDistribution.Length; i++) { - var axleInput = axles[i]; - var axle = new Axle { - WheelsDimension = axleInput.Tyre.Dimension, - AxleType = axleInput.AxleType, - AxleWeightShare = mission.AxleWeightDistribution[i], - TwinTyres = axleInput.TwinTyres, - RollResistanceCoefficient = axleInput.Tyre.RollResistanceCoefficient, - TyreTestLoad = axleInput.Tyre.TyreTestLoad, - Inertia = DeclarationData.Wheels.Lookup(axleInput.Tyre.Dimension.RemoveWhitespace()).Inertia, - CertificationNumber = axleInput.Tyre.CertificationNumber, - DigestValueInput = axleInput.Tyre.DigestValue == null ? "" : axleInput.Tyre.DigestValue.DigestValue, - }; - axleData.Add(axle); - } - - foreach (var trailer in mission.Trailer) { - axleData.AddRange( - trailer.TrailerWheels.Select( - trailerWheel => new Axle { - AxleType = AxleType.Trailer, - AxleWeightShare = trailer.TrailerAxleWeightShare / trailer.TrailerWheels.Count, - TwinTyres = DeclarationData.Trailer.TwinTyres, - RollResistanceCoefficient = DeclarationData.Trailer.RollResistanceCoefficient, - TyreTestLoad = DeclarationData.Trailer.TyreTestLoad.SI<Newton>(), - Inertia = trailerWheel.Inertia, - WheelsDimension = trailerWheel.WheelType - })); - } - - retVal.AxleData = axleData; - return retVal; - } - - private VehicleData.ADASData CreateADAS(IAdvancedDriverAssistantSystemDeclarationInputData adas) - { - return new VehicleData.ADASData { - EngineStopStart = adas.EngineStopStart, - EcoRoll = adas.EcoRoll, - PredictiveCruiseControl = adas.PredictiveCruiseControl - }; - } - - private VehicleData CreateExemptedVehicleData(IVehicleDeclarationInputData data) - { - var exempted = SetCommonVehicleData(data); - exempted.VIN = data.VIN; - exempted.ManufacturerAddress = data.ManufacturerAddress; - exempted.LegislativeClass = data.LegislativeClass; - exempted.ZeroEmissionVehicle = data.ZeroEmissionVehicle; - exempted.HybridElectricHDV = data.HybridElectricHDV; - exempted.DualFuelVehicle = data.DualFuelVehicle; - exempted.MaxNetPower1 = data.MaxNetPower1; - exempted.MaxNetPower2 = data.MaxNetPower2; - exempted.SleeperCab = data.SleeperCab; - exempted.AxleConfiguration = data.AxleConfiguration; - - return exempted; - } - - - internal CombustionEngineData CreateEngineData(IEngineDeclarationInputData engine, PerSecond vehicleEngineIdleSpeed, - IGearboxDeclarationInputData gearbox, IEnumerable<ITorqueLimitInputData> torqueLimits, TankSystem? tankSystem = null) - { - if (!engine.SavedInDeclarationMode) { - WarnDeclarationMode("EngineData"); - } - - var retVal = SetCommonCombustionEngineData(engine, tankSystem); - retVal.IdleSpeed = VectoMath.Max(engine.IdleSpeed, vehicleEngineIdleSpeed); - retVal.WHTCUrban = engine.WHTCUrban; - retVal.WHTCMotorway = engine.WHTCMotorway; - retVal.WHTCRural = engine.WHTCRural; - retVal.ColdHotCorrectionFactor = engine.ColdHotBalancingFactor; - retVal.CorrectionFactorRegPer = engine.CorrectionFactorRegPer; - retVal.Inertia = DeclarationData.Engine.EngineInertia(retVal.Displacement, gearbox.Type); - var limits = torqueLimits.ToDictionary(e => e.Gear); - var numGears = gearbox.Gears.Count; - var fullLoadCurves = new Dictionary<uint, EngineFullLoadCurve>(numGears + 1); - fullLoadCurves[0] = FullLoadCurveReader.Create(engine.FullLoadCurve, true); - fullLoadCurves[0].EngineData = retVal; - foreach (var gear in gearbox.Gears) { - var maxTorque = VectoMath.Min( - GbxMaxTorque(gear, numGears, fullLoadCurves[0].MaxTorque), - VehMaxTorque(gear, numGears, limits, fullLoadCurves[0].MaxTorque)); - fullLoadCurves[(uint)gear.Gear] = IntersectFullLoadCurves(fullLoadCurves[0], maxTorque); - } - retVal.FullLoadCurves = fullLoadCurves; - return retVal; - } - - private static NewtonMeter VehMaxTorque(ITransmissionInputData gear, int numGears, - Dictionary<int, ITorqueLimitInputData> limits, - NewtonMeter maxEngineTorque) - { - if (gear.Gear - 1 >= numGears / 2) { - // only upper half of gears can limit if max-torque <= 0.95 of engine max torque - if (limits.ContainsKey(gear.Gear) && - limits[gear.Gear].MaxTorque <= DeclarationData.Engine.TorqueLimitVehicleFactor * maxEngineTorque) { - return limits[gear.Gear].MaxTorque; - } - } - return null; - } - - private static NewtonMeter GbxMaxTorque(ITransmissionInputData gear, int numGears, NewtonMeter maxEngineTorque - ) - { - if (gear.Gear - 1 < numGears / 2) { - // gears count from 1 to n, -> n entries, lower half can always limit - if (gear.MaxTorque != null) { - return gear.MaxTorque; - } - } else { - // upper half can only limit if max-torque <= 90% of engine max torque - if (gear.MaxTorque != null && gear.MaxTorque <= DeclarationData.Engine.TorqueLimitGearboxFactor * maxEngineTorque) { - return gear.MaxTorque; - } - } - return null; - } - - internal GearboxData CreateGearboxData(IGearboxDeclarationInputData gearbox, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, ITorqueConverterDeclarationInputData torqueConverter) - { - if (!gearbox.SavedInDeclarationMode) { - WarnDeclarationMode("GearboxData"); - } - var retVal = SetCommonGearboxData(gearbox); - - if (!SupportedGearboxTypes.Contains(gearbox.Type)) { - throw new VectoSimulationException("Unsupported gearbox type: {0}!", retVal.Type); - } - var gearsInput = gearbox.Gears; - if (gearsInput.Count < 1) { - throw new VectoSimulationException( - "At least one Gear-Entry must be defined in Gearbox!"); - } - - SetDeclarationData(retVal); - - var gearDifferenceRatio = gearbox.Type.AutomaticTransmission() && gearbox.Gears.Count > 2 - ? gearbox.Gears[0].Ratio / gearbox.Gears[1].Ratio - : 1.0; - - var gears = new Dictionary<uint, GearData>(); - var tcShiftPolygon = DeclarationData.TorqueConverter.ComputeShiftPolygon(engine.FullLoadCurves[0]); - for (uint i = 0; i < gearsInput.Count; i++) { - var gear = gearsInput[(int)i]; - var lossMap = CreateGearLossMap(gear, i, false); - - var shiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(gearbox.Type, (int)i, engine.FullLoadCurves[i + 1], - gearsInput, engine, - axlegearRatio, dynamicTyreRadius); - - var gearData = new GearData { - ShiftPolygon = shiftPolygon, - MaxSpeed = gear.MaxInputSpeed, - Ratio = gear.Ratio, - LossMap = lossMap, - }; - - CreateATGearData(gearbox, i, gearData, tcShiftPolygon, gearDifferenceRatio, gears, vehicleCategory); - gears.Add(i + 1, gearData); - } - retVal.Gears = gears; - if (retVal.Type.AutomaticTransmission()) { - var ratio = double.IsNaN(retVal.Gears[1].Ratio) ? 1 : retVal.Gears[1].TorqueConverterRatio / retVal.Gears[1].Ratio; - retVal.PowershiftShiftTime = DeclarationData.Gearbox.PowershiftShiftTime; - retVal.TorqueConverterData = TorqueConverterDataReader.Create(torqueConverter.TCData, - DeclarationData.TorqueConverter.ReferenceRPM, DeclarationData.TorqueConverter.MaxInputSpeed, - ExecutionMode.Declaration, ratio, - DeclarationData.TorqueConverter.CLUpshiftMinAcceleration, DeclarationData.TorqueConverter.CCUpshiftMinAcceleration); - retVal.TorqueConverterData.ModelName = torqueConverter.Model; - retVal.TorqueConverterData.DigestValueInput = torqueConverter.DigestValue?.DigestValue; - retVal.TorqueConverterData.CertificationMethod = torqueConverter.CertificationMethod; - retVal.TorqueConverterData.CertificationNumber = torqueConverter.CertificationNumber; - } - - return retVal; - } - - private static void CreateATGearData(IGearboxDeclarationInputData gearbox, uint i, GearData gearData, - ShiftPolygon tcShiftPolygon, double gearDifferenceRatio, Dictionary<uint, GearData> gears, - VehicleCategory vehicleCategory) - { - if (gearbox.Type == GearboxType.ATPowerSplit && i == 0) { - // powersplit transmission: torque converter already contains ratio and losses - CretateTCFirstGearATPowerSplit(gearData, i, tcShiftPolygon); - } - if (gearbox.Type == GearboxType.ATSerial) { - if (i == 0) { - // torqueconverter is active in first gear - duplicate ratio and lossmap for torque converter mode - CreateTCFirstGearATSerial(gearData, tcShiftPolygon); - } - if (i == 1 && gearDifferenceRatio >= DeclarationData.Gearbox.TorqueConverterSecondGearThreshold(vehicleCategory)) { - // ratio between first and second gear is above threshold, torqueconverter is active in second gear as well - // -> duplicate ratio and lossmap for torque converter mode, remove locked transmission for previous gear - CreateTCSecondGearATSerial(gearData, tcShiftPolygon); - // NOTE: the lower gear in 'gears' dictionary has index i !! - gears[i].Ratio = double.NaN; - gears[i].LossMap = null; - } - } - } - - private static void SetDeclarationData(GearboxData retVal) - { - retVal.Inertia = DeclarationData.Gearbox.Inertia; - retVal.TractionInterruption = retVal.Type.TractionInterruption(); - retVal.TorqueReserve = DeclarationData.Gearbox.TorqueReserve; - retVal.StartTorqueReserve = DeclarationData.Gearbox.TorqueReserveStart; - retVal.ShiftTime = DeclarationData.Gearbox.MinTimeBetweenGearshifts; - retVal.StartSpeed = DeclarationData.Gearbox.StartSpeed; - retVal.StartAcceleration = DeclarationData.Gearbox.StartAcceleration; - retVal.DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay; - retVal.UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay; - retVal.UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration; - } - - public AxleGearData CreateAxleGearData(IAxleGearInputData data) - { - var retVal = SetCommonAxleGearData(data); - retVal.AxleGear.LossMap = ReadAxleLossMap(data, false); - return retVal; - } - - public AngledriveData CreateAngledriveData(IAngledriveInputData data) - { - return DoCreateAngledriveData(data, false); - } - - - public IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData, - MissionType mission, VehicleClass hvdClass) - { - if (!auxInputData.SavedInDeclarationMode) { - WarnDeclarationMode("AuxiliariesData"); - } - var retVal = new List<VectoRunData.AuxData>(); - - if (auxInputData.Auxiliaries.Count != 5) { - Log.Error( - "In Declaration Mode exactly 5 Auxiliaries must be defined: Fan, Steering pump, HVAC, Electric System, Pneumatic System."); - throw new VectoException( - "In Declaration Mode exactly 5 Auxiliaries must be defined: Fan, Steering pump, HVAC, Electric System, Pneumatic System."); - } - - foreach (var auxType in EnumHelper.GetValues<AuxiliaryType>()) { - var auxData = auxInputData.Auxiliaries.FirstOrDefault(a => a.Type == auxType); - if (auxData == null) { - throw new VectoException("Auxiliary {0} not found.", auxType); - } - var aux = new VectoRunData.AuxData { - DemandType = AuxiliaryDemandType.Constant, - Technology = auxData.Technology - }; - - mission = mission.GetNonEMSMissionType(); - switch (auxType) { - case AuxiliaryType.Fan: - aux.PowerDemand = DeclarationData.Fan.Lookup(mission, auxData.Technology.FirstOrDefault()).PowerDemand; - aux.ID = Constants.Auxiliaries.IDs.Fan; - break; - case AuxiliaryType.SteeringPump: - aux.PowerDemand = DeclarationData.SteeringPump.Lookup(mission, hvdClass, auxData.Technology); - aux.ID = Constants.Auxiliaries.IDs.SteeringPump; - break; - case AuxiliaryType.HVAC: - aux.PowerDemand = DeclarationData.HeatingVentilationAirConditioning.Lookup(mission, - auxData.Technology.FirstOrDefault(), hvdClass).PowerDemand; - aux.ID = Constants.Auxiliaries.IDs.HeatingVentilationAirCondition; - break; - case AuxiliaryType.PneumaticSystem: - aux.PowerDemand = DeclarationData.PneumaticSystem.Lookup(mission, auxData.Technology.FirstOrDefault()).PowerDemand; - aux.ID = Constants.Auxiliaries.IDs.PneumaticSystem; - break; - case AuxiliaryType.ElectricSystem: - aux.PowerDemand = DeclarationData.ElectricSystem.Lookup(mission, auxData.Technology.FirstOrDefault()).PowerDemand; - aux.ID = Constants.Auxiliaries.IDs.ElectricSystem; - break; - default: - continue; - } - retVal.Add(aux); - } - return retVal; - } - - private void WarnDeclarationMode(string inputData) - { - Log.Warn("{0} not in Declaration Mode!", inputData); - } - - public RetarderData CreateRetarderData(IRetarderInputData retarder) - { - return SetCommonRetarderData(retarder); - } - - public static List<CrossWindCorrectionCurveReader.CrossWindCorrectionEntry> GetDeclarationAirResistanceCurve( - string crosswindCorrectionParameters, SquareMeter aerodynamicDragAera, Meter vehicleHeight) - { - const int startSpeed = 60; - const int maxSpeed = 130; - const int speedStep = 5; - - const int maxAlpha = 180; - const int alphaStep = 10; - - const int startHeightPercent = 5; - const int maxHeightPercent = 100; - const int heightPercentStep = 10; - const double heightShare = (double)heightPercentStep / maxHeightPercent; - - var values = DeclarationData.AirDrag.Lookup(crosswindCorrectionParameters); - - // first entry (0m/s) will get CdxA of second entry. - var points = new List<CrossWindCorrectionCurveReader.CrossWindCorrectionEntry> { - new CrossWindCorrectionCurveReader.CrossWindCorrectionEntry { - Velocity = 0.SI<MeterPerSecond>(), - EffectiveCrossSectionArea = 0.SI<SquareMeter>() - } - }; - - for (var speed = startSpeed; speed <= maxSpeed; speed += speedStep) { - var vVeh = speed.KMPHtoMeterPerSecond(); - - var cdASum = 0.SI<SquareMeter>(); - - for (var heightPercent = startHeightPercent; heightPercent < maxHeightPercent; heightPercent += heightPercentStep) { - var height = heightPercent / 100.0 * vehicleHeight; - var vWind = Physics.BaseWindSpeed * Math.Pow(height / Physics.BaseWindHeight, Physics.HellmannExponent); - - for (var alpha = 0; alpha <= maxAlpha; alpha += alphaStep) { - var vAirX = vVeh + vWind * Math.Cos(alpha.ToRadian()); - var vAirY = vWind * Math.Sin(alpha.ToRadian()); - - var beta = Math.Atan(vAirY / vAirX).ToDegree(); - - // ΔCdxA = A1β + A2β² + A3β³ - var deltaCdA = values.A1 * beta + values.A2 * beta * beta + values.A3 * beta * beta * beta; - - // CdxA(β) = CdxA(0) + ΔCdxA(β) - var cdA = aerodynamicDragAera + deltaCdA; - - var share = (alpha == 0 || alpha == maxAlpha ? alphaStep / 2.0 : alphaStep) / maxAlpha; - - // v_air = sqrt(v_airX²+vAirY²) - // cdASum = CdxA(β) * v_air²/v_veh² - cdASum += heightShare * share * cdA * (vAirX * vAirX + vAirY * vAirY) / (vVeh * vVeh); - } - } - points.Add(new CrossWindCorrectionCurveReader.CrossWindCorrectionEntry { - Velocity = vVeh, - EffectiveCrossSectionArea = cdASum - }); - } - - points[0].EffectiveCrossSectionArea = points[1].EffectiveCrossSectionArea; - return points; - } - - public PTOData CreatePTOTransmissionData(IPTOTransmissionInputData pto) - { - if (pto.PTOTransmissionType != "None") { - return new PTOData { - TransmissionType = pto.PTOTransmissionType, - LossMap = PTOIdleLossMapReader.GetZeroLossMap(), - }; - } - - return null; - } - - public AirdragData CreateAirdragData(IAirdragDeclarationInputData airdragInputData, Mission mission, - Segment segment) - { - if (airdragInputData == null || airdragInputData.AirDragArea == null) { - return DefaultAirdragData(mission, segment); - } - - var retVal = SetCommonAirdragData(airdragInputData); - - retVal.DeclaredAirdragArea = mission.MissionType == MissionType.Construction ? mission.DefaultCDxA : airdragInputData.AirDragArea; - retVal.DeclaredAirdragAreaInput = airdragInputData.AirDragArea; - - var aerodynamicDragArea = retVal.DeclaredAirdragArea + mission.Trailer.Sum(t => t.DeltaCdA).DefaultIfNull(0); - - retVal.CrossWindCorrectionCurve = - new CrosswindCorrectionCdxALookup(aerodynamicDragArea, - GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight), - CrossWindCorrectionMode.DeclarationModeCorrection); - return retVal; - } - - private AirdragData DefaultAirdragData(Mission mission, Segment segment) - { - var aerodynamicDragArea = mission.DefaultCDxA + mission.Trailer.Sum(t => t.DeltaCdA).DefaultIfNull(0); - - return new AirdragData() { - CertificationMethod = CertificationMethod.StandardValues, - DeclaredAirdragArea = mission.DefaultCDxA, - DeclaredAirdragAreaInput = mission.DefaultCDxA, - - CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(aerodynamicDragArea, - GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight), - CrossWindCorrectionMode.DeclarationModeCorrection) - }; - } - } -} diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs deleted file mode 100644 index b9b30caeb0321434cfede0471d1b9620a936ea74..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 System; -using System.Collections.Generic; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.InputData.Reader.ComponentData; -using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; -using TUGraz.VectoCore.Models.Declaration; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.OutputData; -using TUGraz.VectoCore.Utils; - - -namespace TUGraz.VectoCore.InputData.Reader.Impl -{ - public class DeclarationModeVectoRunDataFactory : LoggingObject, IVectoRunDataFactory - { - private static readonly object CyclesCacheLock = new object(); - - private static readonly Dictionary<MissionType, DrivingCycleData> CyclesCache = - new Dictionary<MissionType, DrivingCycleData>(); - - protected readonly IDeclarationInputDataProvider InputDataProvider; - - protected IDeclarationReport Report; - private DeclarationDataAdapter _dao; - private Segment _segment; - private bool allowVocational; - private DriverData _driverdata; - private AirdragData _airdragData; - private CombustionEngineData _engineData; - private AxleGearData _axlegearData; - private AngledriveData _angledriveData; - private GearboxData _gearboxData; - private RetarderData _retarderData; - private PTOData _ptoTransmissionData; - private PTOData _municipalPtoTransmissionData; - private Exception InitException; - - internal DeclarationModeVectoRunDataFactory(IDeclarationInputDataProvider dataProvider, IDeclarationReport report) - { - InputDataProvider = dataProvider; - Report = report; - allowVocational = true; - try { - Initialize(); - if (Report != null) { - InitializeReport(); - } - } catch (Exception e) { - InitException = e; - } - } - - private void Initialize() - { - _dao = new DeclarationDataAdapter(); - var vehicle = InputDataProvider.JobInputData.Vehicle; - if (vehicle.ExemptedVehicle) { - if (vehicle.AxleConfiguration != AxleConfiguration.AxleConfig_Undefined) { - _segment = GetVehicleClassification(vehicle.VehicleCategory, - vehicle.AxleConfiguration, vehicle.GrossVehicleMassRating, vehicle.CurbMassChassis, false); - } - return; - } - - try { - _segment = GetVehicleClassification( - vehicle.VehicleCategory, - vehicle.AxleConfiguration, - vehicle.GrossVehicleMassRating, - vehicle.CurbMassChassis, - vehicle.VocationalVehicle); - } catch (VectoException) { - allowVocational = false; - _segment = GetVehicleClassification( - vehicle.VehicleCategory, - vehicle.AxleConfiguration, - vehicle.GrossVehicleMassRating, - vehicle.CurbMassChassis, - false); - } - if (!_segment.Found) { - throw new VectoException( - "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, GVMR: {2}", - vehicle.VehicleCategory, vehicle.AxleConfiguration, - vehicle.GrossVehicleMassRating); - } - _driverdata = _dao.CreateDriverData(); - _driverdata.AccelerationCurve = AccelerationCurveReader.ReadFromStream(_segment.AccelerationFile); - var tempVehicle = _dao.CreateVehicleData(vehicle, _segment.Missions.First(), - _segment.Missions.First().Loadings.First().Value, allowVocational); - _airdragData = _dao.CreateAirdragData(vehicle.Components.AirdragInputData, - _segment.Missions.First(), _segment); - _engineData = _dao.CreateEngineData(vehicle.Components.EngineInputData, - vehicle.EngineIdleSpeed, - vehicle.Components.GearboxInputData, vehicle.TorqueLimits, vehicle.TankSystem); - _axlegearData = _dao.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.Components.AxleGearInputData); - _angledriveData = _dao.CreateAngledriveData(InputDataProvider.JobInputData.Vehicle.Components.AngledriveInputData); - _gearboxData = _dao.CreateGearboxData(vehicle.Components.GearboxInputData, _engineData, - _axlegearData.AxleGear.Ratio, - tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData); - _retarderData = _dao.CreateRetarderData(vehicle.Components.RetarderInputData); - - _ptoTransmissionData = _dao.CreatePTOTransmissionData(vehicle.Components.PTOTransmissionInputData); - - _municipalPtoTransmissionData = CreateDefaultPTOData(); - } - - private void InitializeReport() - { - VectoRunData powertrainConfig; - if (InputDataProvider.JobInputData.Vehicle.ExemptedVehicle) { - powertrainConfig = new VectoRunData() { - Exempted = true, - VehicleData = _dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, null, null, allowVocational), - InputDataHash = InputDataProvider.XMLHash - }; - powertrainConfig.VehicleData.VehicleClass = _segment.Found ? _segment.VehicleClass : VehicleClass.Class0; - } else { - powertrainConfig = new VectoRunData() { - VehicleData = - _dao.CreateVehicleData( - InputDataProvider.JobInputData.Vehicle, _segment.Missions.First(), - _segment.Missions.First().Loadings.First().Value, allowVocational), - AirdragData = _airdragData, - EngineData = _engineData, - GearboxData = _gearboxData, - AxleGearData = _axlegearData, - Retarder = _retarderData, - Aux = - _dao.CreateAuxiliaryData( - InputDataProvider.JobInputData.Vehicle.Components.AuxiliaryInputData, - _segment.Missions.First().MissionType, - _segment.VehicleClass), - PTO = _ptoTransmissionData, - InputDataHash = InputDataProvider.XMLHash - }; - powertrainConfig.VehicleData.VehicleClass = _segment.VehicleClass; - } - Report.InitializeReport(powertrainConfig); - } - - public IEnumerable<VectoRunData> NextRun() - { - if (InitException != null) { - throw InitException; - } - - if (InputDataProvider.JobInputData.Vehicle.ExemptedVehicle) { - yield return new VectoRunData { - Exempted = true, - Report = Report, - Mission = new Mission() { MissionType = MissionType.ExemptedMission}, - VehicleData = _dao.CreateVehicleData(InputDataProvider.JobInputData.Vehicle, null, null, allowVocational), - InputDataHash = InputDataProvider.XMLHash - }; - } else { - foreach (var vectoRunData in VectoRunDataNonExempted()) - yield return vectoRunData; - } - } - - private IEnumerable<VectoRunData> VectoRunDataNonExempted() - { - - var vehicle = InputDataProvider.JobInputData.Vehicle; - var adasCombination = DeclarationData.ADASCombinations.Lookup(vehicle.ADAS); - foreach (var mission in _segment.Missions) { - if (mission.MissionType.IsEMS() && - _engineData.RatedPowerDeclared.IsSmaller(DeclarationData.MinEnginePowerForEMS)) { - continue; - } - - DrivingCycleData cycle; - lock (CyclesCacheLock) { - if (CyclesCache.ContainsKey(mission.MissionType)) { - cycle = CyclesCache[mission.MissionType]; - } else { - cycle = DrivingCycleDataReader.ReadFromStream(mission.CycleFile, CycleType.DistanceBased, "", false); - CyclesCache.Add(mission.MissionType, cycle); - } - } - foreach (var loading in mission.Loadings) { - var simulationRunData = new VectoRunData { - Loading = loading.Key, - VehicleDesignSpeed = _segment.DesignSpeed, - VehicleData = _dao.CreateVehicleData(vehicle, mission, loading.Value, allowVocational), - AirdragData = _dao.CreateAirdragData(vehicle.Components.AirdragInputData, mission, _segment), - EngineData = _engineData.Copy(), // a copy is necessary because every run has a different correction factor! - GearboxData = _gearboxData, - AxleGearData = _axlegearData, - AngledriveData = _angledriveData, - Aux = _dao.CreateAuxiliaryData(vehicle.Components.AuxiliaryInputData, mission.MissionType, - _segment.VehicleClass), - Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()), - Retarder = _retarderData, - DriverData = _driverdata, - ExecutionMode = ExecutionMode.Declaration, - JobName = InputDataProvider.JobInputData.JobName, - ModFileSuffix = loading.Key.ToString(), - Report = Report, - Mission = mission, - PTO = mission.MissionType == MissionType.MunicipalUtility - ? _municipalPtoTransmissionData - : _ptoTransmissionData, - InputDataHash = InputDataProvider.XMLHash, - SimulationType = SimulationType.DistanceCycle - }; - simulationRunData.EngineData.FuelConsumptionCorrectionFactor = DeclarationData.WHTCCorrection.Lookup( - mission.MissionType.GetNonEMSMissionType(), _engineData.WHTCRural, _engineData.WHTCUrban, - _engineData.WHTCMotorway) * - _engineData.ColdHotCorrectionFactor * _engineData.CorrectionFactorRegPer; - simulationRunData.EngineData.ADASCorrectionFactor = DeclarationData.ADASBenefits.Lookup( - _segment.VehicleClass, adasCombination, mission.MissionType, loading.Key); - simulationRunData.VehicleData.VehicleClass = _segment.VehicleClass; - yield return simulationRunData; - } - } - } - - private PTOData CreateDefaultPTOData() - { - return new PTOData() { - TransmissionType = DeclarationData.PTO.DefaultPTOTechnology, - LossMap = PTOIdleLossMapReader.ReadFromStream(RessourceHelper.ReadStream(DeclarationData.PTO.DefaultPTOIdleLosses)), - PTOCycle = - DrivingCycleDataReader.ReadFromStream(RessourceHelper.ReadStream(DeclarationData.PTO.DefaultPTOActivationCycle), - CycleType.PTO, "PTO", false) - }; - } - - internal Segment GetVehicleClassification(VehicleCategory category, AxleConfiguration axles, Kilogram grossMassRating, - Kilogram curbWeight, bool vocational) - { - return DeclarationData.Segments.Lookup(category, axles, grossMassRating, curbWeight, vocational); - } - } -} diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs deleted file mode 100644 index 82cf10c0feac4245aaee4e064817d8bc7239c5b2..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs +++ /dev/null @@ -1,297 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 System; -using System.Collections.Generic; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -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; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.OutputData; - -namespace TUGraz.VectoCore.InputData.Reader.Impl -{ - internal class DeclarationVTPModeVectoRunDataFactory : IVectoRunDataFactory - { - protected IVTPDeclarationJobInputData JobInputData; - protected DriverData Driverdata; - protected AirdragData AirdragData; - protected CombustionEngineData EngineData; - protected AxleGearData AxlegearData; - protected AngledriveData AngledriveData; - protected GearboxData GearboxData; - protected RetarderData RetarderData; - protected PTOData PTOTransmissionData; - protected List<VectoRunData.AuxData> AuxVTP; - protected Segment Segment; - protected bool allowVocational; - protected DeclarationDataAdapter Dao; - protected Exception InitException; - - public IVTPReport Report; - - public DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationInputDataProvider ivtpProvider, IVTPReport report) : this( - ivtpProvider.JobInputData, report) { } - - protected DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationJobInputData job, IVTPReport report) - { - JobInputData = job; - Report = report; - allowVocational = true; - try { - Initialize(); - if (Report != null) { - InitializeReport(); - } - } catch (Exception e) { - InitException = e; - } - } - - private void InitializeReport() - { - var powertrainConfig = new VectoRunData() { - VehicleData = - Dao.CreateVehicleData( - JobInputData.Vehicle, Segment.Missions.First(), - Segment.Missions.First().Loadings.First().Value, allowVocational), - AirdragData = AirdragData, - EngineData = EngineData, - GearboxData = GearboxData, - AxleGearData = AxlegearData, - Retarder = RetarderData, - Aux = - Dao.CreateAuxiliaryData( - JobInputData.Vehicle.Components.AuxiliaryInputData, - Segment.Missions.First().MissionType, - Segment.VehicleClass), - }; - powertrainConfig.VehicleData.VehicleClass = Segment.VehicleClass; - Report.InputDataHash = JobInputData.VectoJobHash; - Report.ManufacturerRecord = JobInputData.ManufacturerReportInputData; - Report.ManufacturerRecordHash = JobInputData.VectoManufacturerReportHash; - Report.InitializeReport(powertrainConfig); - } - - - protected void Initialize() - { - Dao = new DeclarationDataAdapter(); - var vehicle = JobInputData.Vehicle; - try { - Segment = DeclarationData.Segments.Lookup( - vehicle.VehicleCategory, - vehicle.AxleConfiguration, - vehicle.GrossVehicleMassRating, - vehicle.CurbMassChassis, - vehicle.VocationalVehicle); - } catch (VectoException) { - allowVocational = false; - Segment = DeclarationData.Segments.Lookup( - vehicle.VehicleCategory, - vehicle.AxleConfiguration, - vehicle.GrossVehicleMassRating, - vehicle.CurbMassChassis, - false); - } - Driverdata = Dao.CreateDriverData(); - Driverdata.AccelerationCurve = AccelerationCurveReader.ReadFromStream(Segment.AccelerationFile); - var tempVehicle = Dao.CreateVehicleData( - vehicle, Segment.Missions.First(), - Segment.Missions.First().Loadings.First().Value, allowVocational); - AirdragData = Dao.CreateAirdragData( - vehicle.Components.AirdragInputData, - Segment.Missions.First(), Segment); - EngineData = Dao.CreateEngineData( - vehicle.Components.EngineInputData, - vehicle.EngineIdleSpeed, - vehicle.Components.GearboxInputData, vehicle.TorqueLimits, vehicle.TankSystem); - AxlegearData = Dao.CreateAxleGearData(vehicle.Components.AxleGearInputData); - AngledriveData = Dao.CreateAngledriveData(vehicle.Components.AngledriveInputData); - GearboxData = Dao.CreateGearboxData( - vehicle.Components.GearboxInputData, EngineData, - AxlegearData.AxleGear.Ratio, - tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData); - RetarderData = Dao.CreateRetarderData(vehicle.Components.RetarderInputData); - - PTOTransmissionData = - Dao.CreatePTOTransmissionData(vehicle.Components.PTOTransmissionInputData); - - AuxVTP = CreateVTPAuxData(vehicle); - } - - #region Implementation of IVectoRunDataFactory - - public virtual IEnumerable<VectoRunData> NextRun() - { - if (InitException != null) { - throw InitException; - } - - // simulate the LongHaul cycle with RefLoad - var mission = Segment.Missions.FirstOrDefault(); - if (mission == null) { - throw new VectoException("No Mission found in segmentation matrix"); - } - var loading = mission.Loadings.FirstOrDefault(l => l.Key == DeclarationData.VTPMode.SelectedLoading); - var runData = CreateVectoRunData(Segment, mission, loading.Value); - runData.EngineData.FuelConsumptionCorrectionFactor = DeclarationData.WHTCCorrection.Lookup( - mission.MissionType.GetNonEMSMissionType(), runData.EngineData.WHTCRural, runData.EngineData.WHTCUrban, - runData.EngineData.WHTCMotorway) * - runData.EngineData.ColdHotCorrectionFactor * runData.EngineData.CorrectionFactorRegPer; - var adasCombination = DeclarationData.ADASCombinations.Lookup(JobInputData.Vehicle.ADAS); - runData.EngineData.ADASCorrectionFactor = DeclarationData.ADASBenefits.Lookup( - Segment.VehicleClass, adasCombination, mission.MissionType, loading.Key); - runData.ModFileSuffix = loading.Key.ToString(); - var cycle = DrivingCycleDataReader.ReadFromStream(mission.CycleFile, CycleType.DistanceBased, "", false); - runData.Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()); - runData.DriverData = Driverdata; - runData.Aux = Dao.CreateAuxiliaryData( - JobInputData.Vehicle.Components.AuxiliaryInputData, mission.MissionType, Segment.VehicleClass); - runData.ExecutionMode = ExecutionMode.Declaration; - runData.SimulationType = SimulationType.DistanceCycle; - runData.Mission = mission; - runData.Loading = loading.Key; - yield return runData; - - - // simulate the Measured cycle - var vtpCycle = JobInputData.Cycles.FirstOrDefault(); - if (vtpCycle == null) { - throw new VectoException("no VTP-Cycle provided!"); - } - var drivingCycle = DrivingCycleDataReader.ReadFromDataTable(vtpCycle.CycleData, vtpCycle.Name, false); - - // Loading is not relevant as we use P_wheel - var vtpRunData = CreateVectoRunData(Segment, Segment.Missions.First(), 0.SI<Kilogram>()); - vtpRunData.Cycle = new DrivingCycleProxy(drivingCycle, vtpCycle.Name); - vtpRunData.Aux = AuxVTP; - vtpRunData.FanData = GetFanData(); - vtpRunData.ExecutionMode = ExecutionMode.Declaration; - vtpRunData.SimulationType = SimulationType.VerificationTest; - vtpRunData.Mission = new Mission() { - MissionType = MissionType.VerificationTest - }; - //var ncvStd = DeclarationData.FuelData.Lookup(JobInputData.Vehicle.Components.EngineInputData.FuelType).LowerHeatingValueVecto; - //var ncvCorrection = ncvStd / JobInputData.NetCalorificValueTestFuel; - var mileageCorrection = GetMileagecorrectionFactor(JobInputData.Mileage); - vtpRunData.VTPData = new VTPData() { - CorrectionFactor = mileageCorrection, - }; - yield return vtpRunData; - - } - - protected virtual AuxFanData GetFanData() - { - return new AuxFanData() { - FanCoefficients = DeclarationData.VTPMode.FanParameters, - FanDiameter = JobInputData.FanDiameter, - }; - } - - private double GetMileagecorrectionFactor(Meter mileage) - { - if (mileage > DeclarationData.VTPMode.RunInThreshold) { - return 1; - } - - return DeclarationData.VTPMode.EvolutionCoefficient + (1 - DeclarationData.VTPMode.EvolutionCoefficient) * mileage / - DeclarationData.VTPMode.RunInThreshold; - } - - protected VectoRunData CreateVectoRunData(Segment segment, Mission mission, Kilogram loading) - { - return new VectoRunData { - JobName = JobInputData.Vehicle.VIN, - EngineData = EngineData, - GearboxData = GearboxData, - AxleGearData = AxlegearData, - AngledriveData = AngledriveData, - VehicleData = Dao.CreateVehicleData( - JobInputData.Vehicle, mission, - loading, allowVocational), - AirdragData = AirdragData, - DriverData = null, - AdvancedAux = null, - Retarder = RetarderData, - PTO = PTOTransmissionData, - Report = Report, - }; - } - - protected virtual List<VectoRunData.AuxData> CreateVTPAuxData(IVehicleDeclarationInputData vehicle) - { - var auxRD = Dao.CreateAuxiliaryData( - vehicle.Components.AuxiliaryInputData, MissionType.RegionalDelivery, Segment.VehicleClass) - .ToList(); - foreach (var entry in auxRD) { - entry.MissionType = MissionType.RegionalDelivery; - } - - var auxLH = Dao.CreateAuxiliaryData( - vehicle.Components.AuxiliaryInputData, MissionType.LongHaul, Segment.VehicleClass) - .ToList(); - foreach (var entry in auxLH) { - entry.MissionType = MissionType.LongHaul; - } - - var auxUD = Dao.CreateAuxiliaryData( - vehicle.Components.AuxiliaryInputData, MissionType.UrbanDelivery, Segment.VehicleClass) - .ToList(); - foreach (var entry in auxUD) { - entry.MissionType = MissionType.UrbanDelivery; - } - - var aux = new List<VectoRunData.AuxData>(); - aux.AddRange(auxRD); - aux.AddRange(auxLH); - aux.AddRange(auxUD); - - aux.RemoveAll(x => x.ID == Constants.Auxiliaries.IDs.Fan); - aux.Add( - new VectoRunData.AuxData { - DemandType = AuxiliaryDemandType.Direct, - ID = DrivingCycleDataReader.Fields.AdditionalAuxPowerDemand - }); - return aux; - } - - #endregion - } -} diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs deleted file mode 100644 index 8f305dd2149c61ee9f1af5a61d9ac8f8a8aaff0a..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyACEA.cs +++ /dev/null @@ -1,757 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.Models.Connector.Ports.Impl; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.Simulation.DataBus; -using TUGraz.VectoCore.Models.Simulation.Impl; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; -using TUGraz.VectoCore.OutputData; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl -{ - public class AMTShiftStrategyACEA : ShiftStrategy - { - private GearshiftPosition _nextGear; - protected readonly MaxGradabilityLookup MaxGradability; - protected readonly VelocityRollingLookup VelocityDropData; - protected readonly VectoRunData PowertrainConfig; - protected readonly ShiftStrategyParameters ShiftStrategyParameters; - protected Dictionary<uint, PerSecond> EngineSpeedAtDriveOff; - protected SimplePowertrainContainer TestContainer; - protected Dictionary<Second, HistoryEntry> HistoryBuffer = new Dictionary<Second, HistoryEntry>(); - protected Dictionary<Second, AccelerationEntry> AccelerationBuffer = new Dictionary<Second, AccelerationEntry>(); - protected AverageAccelerationTorqueLookup AverageAccelerationTorqueLookup; - protected MaxCardanTorqueLookup MaxCardanTorqueLookup; - - protected DebugData DebugData = new DebugData(); - private Dictionary<uint, GearRating> GearRatings = new Dictionary<uint, GearRating>(); - private MeterPerSquareSecond accRsv = 0.SI<MeterPerSquareSecond>(); - private MeterPerSecond demandedSpeed = 0.SI<MeterPerSecond>(); - private MeterPerSquareSecond driverAccelerationAvg; - private Radian gradient = 0.SI<Radian>(); - private Gearbox TestContainerGbx; - - public struct HistoryEntry - { - public Second dt; - public MeterPerSecond AvgSpeed; - public Watt AvgCardanPower; - } - - [DebuggerDisplay("dt: {dt}, acc: {Acceleration}")] - public struct AccelerationEntry - { - public Second dt; - public MeterPerSquareSecond Acceleration; - - public override string ToString() - { - return string.Format("dt: {0} acc: {1}", dt, Acceleration); - } - } - - public AMTShiftStrategyACEA(IVehicleContainer dataBus) : base(dataBus) - { - var data = dataBus.RunData; - if (data.EngineData == null) { - return; - } - - if (data.EngineData.Fuels.Count > 1) { - throw new VectoException("ACEA TCU only supports single-fuel engines"); - } - - PowertrainConfig = data; - ShiftStrategyParameters = data.GearshiftParameters; - if (ShiftStrategyParameters == null) { - throw new VectoException("Parameters for shift strategy missing!"); - } - - // create a dummy powertrain for pre-processing and estimatins - var modData = new ModalDataContainer(data, null, null); - var builder = new PowertrainBuilder(modData); - TestContainer = new SimplePowertrainContainer(data); - builder.BuildSimplePowertrain(data, TestContainer); - TestContainerGbx = TestContainer.GearboxCtl as Gearbox; - if (TestContainerGbx == null) { - throw new VectoException("Unknown gearboxtype: {0}", TestContainer.GearboxCtl.GetType().FullName); - } - - // register pre-processors - var maxG = data.Cycle.Entries.Max(x => Math.Abs(x.RoadGradientPercent.Value())) + 1; - var grad = Convert.ToInt32(maxG / 2) * 2; - - VelocityDropData = new VelocityRollingLookup(); - dataBus.AddPreprocessor( - new VelocitySpeedGearshiftPreprocessor(VelocityDropData, data.GearboxData.TractionInterruption, TestContainer, -grad, grad, 2)); - - MaxGradability = new MaxGradabilityLookup(); - dataBus.AddPreprocessor(new MaxGradabilityPreprocessor(MaxGradability, data, TestContainer)); - - EngineSpeedAtDriveOff = new Dictionary<uint, PerSecond>(GearboxModelData.Gears.Count); - dataBus.AddPreprocessor(new EngineSpeedDriveOffPreprocessor(EngineSpeedAtDriveOff, data, TestContainer)); - - AverageAccelerationTorqueLookup = new AverageAccelerationTorqueLookup(); - dataBus.AddPreprocessor( - new AverageAccelerationTorquePreprocessor(AverageAccelerationTorqueLookup, data, GetEngineSpeedLimitHighMin())); - - MaxCardanTorqueLookup = new MaxCardanTorqueLookup(); - dataBus.AddPreprocessor(new MaxCardanTorquePreprocessor(MaxCardanTorqueLookup, data, TestContainer)); - } - - private bool SpeedTooLowForEngine(GearshiftPosition gear, PerSecond outAngularSpeed) - { - return (outAngularSpeed * GearboxModelData.Gears[gear.Gear].Ratio).IsSmaller(DataBus.EngineInfo.EngineIdleSpeed); - } - - private bool SpeedTooHighForEngine(GearshiftPosition gear, PerSecond outAngularSpeed) - { - return - (outAngularSpeed * GearboxModelData.Gears[gear.Gear].Ratio).IsGreaterOrEqual( - VectoMath.Min( - GearboxModelData.Gears[gear.Gear].MaxSpeed, - DataBus.EngineInfo.EngineN95hSpeed)); - } - - #region Overrides of BaseShiftStrategy - - public override void Request(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) - { - // update own history - var velocity = DataBus.VehicleInfo.VehicleSpeed + DataBus.DriverInfo.DriverAcceleration * dt / 2.0; - var cardanDemand = DataBus.AxlegearInfo.CurrentAxleDemand; - var currentCardanPower = cardanDemand.Item1 * cardanDemand.Item2; - - UpdateHistoryBuffer(absTime, dt, currentCardanPower, velocity); - - var currentVelocity = DataBus.VehicleInfo.VehicleSpeed; - accRsv = CalcAccelerationReserve(currentVelocity, absTime + dt); - - driverAccelerationAvg = GetAverageAcceleration(absTime + dt); - - gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - - } - - - protected override bool DoCheckShiftRequired(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, PerSecond inAngularVelocity, GearshiftPosition gear, Second lastShiftTime, IResponse response) - { - var cardanDemand = DataBus.AxlegearInfo.CurrentAxleDemand; - var currentCardanPower = cardanDemand.Item1 * cardanDemand.Item2; - - // no shift when vehicle stands - if (DataBus.VehicleInfo.VehicleStopped) { - return false; - } - - // emergency shift to not stall the engine ------------------------ - if (gear.Equals(Gears.First()) && SpeedTooLowForEngine(_nextGear, inAngularVelocity / GearboxModelData.Gears[gear.Gear].Ratio)) { - return true; - } - - _nextGear = gear; - while (Gears.HasPredecessor(_nextGear) && SpeedTooLowForEngine(_nextGear, inAngularVelocity / GearboxModelData.Gears[gear.Gear].Ratio)) { - _nextGear = Gears.Predecessor(_nextGear); - } - while (Gears.HasSuccessor(_nextGear) && - SpeedTooHighForEngine(_nextGear, inAngularVelocity / GearboxModelData.Gears[gear.Gear].Ratio)) { - _nextGear = Gears.Successor(_nextGear); - } - - if (_nextGear != gear) { - return true; - } - - // TEST - var currentVelocity = DataBus.VehicleInfo.VehicleSpeed; - accRsv = CalcAccelerationReserve(currentVelocity, absTime + dt); - - var minimumShiftTimePassed = (lastShiftTime + GearshiftParams.TimeBetweenGearshifts).IsSmallerOrEqual(absTime); - if (!minimumShiftTimePassed) { - return false; - } - - var averageCardanPower = CalcAverageCardanPower(); - - var propulsion = HistoryBuffer.Min(x => x.Value.AvgSpeed).IsEqual(0) || - averageCardanPower > ShiftStrategyParameters.AverageCardanPowerThresholdPropulsion || - currentCardanPower > ShiftStrategyParameters.CurrentCardanPowerThresholdPropulsion; - - return propulsion - ? PropulsionShiftDecision( - absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime) - : CoastingBrakingShiftDecision( - absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime); - } - - private Watt CalcAverageCardanPower() - { - var sumCardanPower = 0.SI<WattSecond>(); - var sumDt = 0.SI<Second>(); - foreach (var entry in HistoryBuffer) { - sumDt += entry.Value.dt; - sumCardanPower += entry.Value.AvgCardanPower * entry.Value.dt; - } - - return sumCardanPower / sumDt; - } - - private bool PropulsionShiftDecision( - Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, - PerSecond inAngularVelocity, GearshiftPosition gear, Second lastShiftTime) - { - var lookAheadDistance = - DataBus.VehicleInfo.VehicleSpeed * GearboxModelData.TractionInterruption; //ShiftStrategyParameters.GearResidenceTime; - var roadGradient = DataBus.DrivingCycleInfo.CycleLookAhead(lookAheadDistance).RoadGradient; - - var currentVelocity = DataBus.VehicleInfo.VehicleSpeed; - gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - var estimatedVelocityPostShift = VelocityDropData.Interpolate(currentVelocity, gradient); - var predictionVelocity = CalcPredictionVelocity(currentVelocity, estimatedVelocityPostShift); - - if (driverAccelerationAvg <= ShiftStrategyParameters.DriverAccelerationThresholdLow) { - driverAccelerationAvg = 0.SI<MeterPerSquareSecond>(); - } - - - var gearLimitHigh = Math.Min(GearboxModelData.Gears.Count, gear.Gear + ShiftStrategyParameters.AllowedGearRangeUp); - - GearRatings.Clear(); - - // calc rating for current gear - var ratingCurrentGear = CalcGearRating(absTime, outAngularVelocity, gear, gear, roadGradient, predictionVelocity, estimatedVelocityPostShift); - if (ratingCurrentGear.RatingCase == GearRatingCase.A) { - ratingCurrentGear = new GearRating( - GearRatingCase.A, ratingCurrentGear.Rating * ShiftStrategyParameters.RatingFactorCurrentGear, ratingCurrentGear.MaxEngineSpeed); - } - GearRatings[gear.Gear] = ratingCurrentGear; - - // calc rating for lower gears (down to gear limit or rating exceeds engine speed) - - var loop = true; - var gearLimitLow = (uint)Math.Max(1, gear.Gear - ShiftStrategyParameters.AllowedGearRangeDown); - for (var i = gear.Gear - 1; loop && i >= gearLimitLow; i--) { - var rating = CalcGearRating(absTime, outAngularVelocity, gear, new GearshiftPosition(i), roadGradient, predictionVelocity, estimatedVelocityPostShift); - - if (rating.RatingCase == GearRatingCase.E) { - loop = false; - } - - GearRatings[i] = rating; - } - - // calc rating for higher gears (up to gear limit or rating exceeds engine speed) - - loop = true; - for (var i = gear.Gear + 1; loop && i <= gearLimitHigh; i++) { - var rating = CalcGearRating(absTime, outAngularVelocity, gear, new GearshiftPosition(i), roadGradient, predictionVelocity, estimatedVelocityPostShift); - - if (rating.RatingCase == GearRatingCase.E) { - loop = false; - } - - GearRatings[i] = rating; - } - - var selectedGear = GearRatings.OrderBy(x => x.Value).First().Key; - - if (selectedGear < gear.Gear && (DownshiftAllowed(absTime) || inAngularVelocity < GetEngineSpeedLimitLow(false))) { - _nextGear = new GearshiftPosition(selectedGear); - } - if (selectedGear > gear.Gear && (UpshiftAllowed(absTime) || inAngularVelocity > GearRatings[gear.Gear].MaxEngineSpeed)) { - _nextGear = new GearshiftPosition(selectedGear); - } - - return _nextGear != gear; - } - - private GearRating CalcGearRating( - Second absTime, PerSecond outAngularVelocity, GearshiftPosition gear, GearshiftPosition nextGear, Radian roadGradient, - MeterPerSecond predictionVelocity, MeterPerSecond estimatedVelocityPostShift) - { - var gradientBelowMaxGrad = roadGradient < MaxGradability.GradabilityLimitedTorque(nextGear.Gear); - var engineSpeedAboveMin = - outAngularVelocity * GearboxModelData.Gears[nextGear.Gear].Ratio > PowertrainConfig.EngineData.IdleSpeed; - - var engineSpeedBelowMax = outAngularVelocity * GearboxModelData.Gears[nextGear.Gear].Ratio < - PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed; - - if (!(gradientBelowMaxGrad && engineSpeedAboveMin && engineSpeedBelowMax)) { - return new GearRating(GearRatingCase.E, 0, null); - } - - return RatingGear( - false, nextGear, gear, gradient, predictionVelocity, estimatedVelocityPostShift, accRsv, driverAccelerationAvg); - } - - private MeterPerSquareSecond GetAverageAcceleration(Second absTime) - { - if (!AccelerationBuffer.Any()) { - return 0.SI<MeterPerSquareSecond>(); - } - - var sumTime = 0.SI<Second>(); - var sumAcc = 0.SI<MeterPerSecond>(); - var start = absTime - ShiftStrategyParameters.DriverAccelerationLookBackInterval; - - foreach (var entry in AccelerationBuffer) { - var time = VectoMath.Max(VectoMath.Min(entry.Key - start, 0.SI<Second>()) + entry.Value.dt, 0.SI<Second>()); - var acc = entry.Value.Acceleration * time; - sumTime += time; - sumAcc += acc; - } - - var avgAcc = sumAcc / VectoMath.Max(sumTime, 10.SI<Second>()); - - return avgAcc > 0.1.SI<MeterPerSquareSecond>() ? avgAcc : 0.SI<MeterPerSquareSecond>(); - } - - private bool UpshiftAllowed(Second absTime) - { - return (absTime - _gearbox.LastDownshift).IsGreaterOrEqual(GearshiftParams.UpshiftAfterDownshiftDelay); - } - - private bool DownshiftAllowed(Second absTime) - { - return (absTime - _gearbox.LastUpshift).IsGreaterOrEqual(GearshiftParams.DownshiftAfterUpshiftDelay); - } - - private GearRating RatingGear( - bool driveOff, GearshiftPosition gear, GearshiftPosition currentGear, Radian gradient, MeterPerSecond predictionVelocity, - MeterPerSecond velocityAfterGearshift, MeterPerSquareSecond accRsv, MeterPerSquareSecond driverAccelerationAvg) - { - TestContainerGbx.Gear = gear; - TestContainer.VehiclePort.Initialize(predictionVelocity, gradient); - - var respAccRsv = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, - accRsv, gradient, true); - - if (respAccRsv.Engine.EngineSpeed < PowertrainConfig.EngineData.IdleSpeed || - respAccRsv.Engine.EngineSpeed > PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed) { - return new GearRating(GearRatingCase.E, 0, 0.RPMtoRad()); - } - - GearRating? retVal; - var engineSpeedLowThreshold = GetEngineSpeedLimitLow(driveOff); - - var respConstVel = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, - 0.SI<MeterPerSquareSecond>(), gradient, true); - var engineSpeedHighThreshold = GetEngineSpeedLimitHigh( - driveOff, gear, respAccRsv.Engine.EngineSpeed, respConstVel.Axlegear.CardanTorque); - if (respAccRsv.Engine.EngineSpeed < engineSpeedLowThreshold) { - return new GearRating( - GearRatingCase.D, - (engineSpeedLowThreshold - respAccRsv.Engine.EngineSpeed).AsRPM, engineSpeedHighThreshold); - } - - if (respAccRsv.Engine.EngineSpeed > engineSpeedHighThreshold) { - return new GearRating( - GearRatingCase.D, - (respAccRsv.Engine.EngineSpeed - engineSpeedHighThreshold).AsRPM, engineSpeedHighThreshold); - } - - ResponseDryRun respDriverDemand = null; - if (respAccRsv.Engine.TotalTorqueDemand <= respAccRsv.Engine.DynamicFullLoadTorque) { - respDriverDemand = DriverDemandResponse(gradient, driverAccelerationAvg); - - var fc = PowertrainConfig.EngineData.Fuels.First().ConsumptionMap.GetFuelConsumption( - respDriverDemand.Engine.TotalTorqueDemand.LimitTo( - PowertrainConfig.EngineData.FullLoadCurves[0].DragLoadStationaryTorque(respAccRsv.Engine.EngineSpeed), - PowertrainConfig.EngineData.FullLoadCurves[0].FullLoadStationaryTorque(respAccRsv.Engine.EngineSpeed)), - respAccRsv.Engine.EngineSpeed); - retVal = new GearRating( - GearRatingCase.A, - (fc.Value.ConvertToGrammPerHour().Value / VectoMath.Max(respDriverDemand.Axlegear.PowerRequest, 1.SI<Watt>())).Value() * - 1e3, - engineSpeedHighThreshold); - } else { - retVal = new GearRating( - GearRatingCase.B, (respAccRsv.Engine.PowerRequest - respAccRsv.Engine.DynamicFullLoadPower).Value(), - engineSpeedHighThreshold); - } - - if (gear.Gear > currentGear.Gear) { - respDriverDemand = respDriverDemand ?? DriverDemandResponse(gradient, driverAccelerationAvg); - var estimatedResidenceTime = - EstimateResidenceTimeInGear( - gear, respDriverDemand, engineSpeedHighThreshold, velocityAfterGearshift, gradient, engineSpeedLowThreshold); - if (estimatedResidenceTime != null && estimatedResidenceTime < ShiftStrategyParameters.GearResidenceTime) { - retVal = new GearRating( - GearRatingCase.C, (ShiftStrategyParameters.GearResidenceTime - estimatedResidenceTime).Value(), - engineSpeedHighThreshold); - } - } - return retVal.Value; - } - - private ResponseDryRun DriverDemandResponse(Radian gradient, MeterPerSquareSecond driverAccelerationAvg) - { - var respDriverDemand = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, driverAccelerationAvg, gradient, - true); - - if (respDriverDemand.DeltaFullLoad.IsGreater(0)) { - driverAccelerationAvg = SearchAlgorithm.Search( - driverAccelerationAvg, respDriverDemand.DeltaFullLoad, - Constants.SimulationSettings.OperatingPointInitialSearchIntervalAccelerating, - getYValue: response => { - var r = (ResponseDryRun)response; - return r.DeltaFullLoad; - }, - evaluateFunction: - acc => { - var response = TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, acc, gradient, true); - return response; - }, - criterion: response => { - var r = (ResponseDryRun)response; - return r.DeltaFullLoad.Value() / 1e5; - }); - respDriverDemand = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, driverAccelerationAvg, gradient, - true); - } - return respDriverDemand; - } - - private Radian CalcGradientDuringGearshift(bool driveOff, Second dt, MeterPerSecond currentVelocity) - { - var lookaheadMidShift = driveOff - ? ShiftStrategyParameters.StartVelocity / - ShiftStrategyParameters.StartAcceleration / 2.0 * ShiftStrategyParameters.StartVelocity - : currentVelocity * dt / 2.0; - if (lookaheadMidShift.IsEqual(0)) { - return DataBus.DrivingCycleInfo.RoadGradient; - } - var currentAltitude = DataBus.DrivingCycleInfo.Altitude; - var lookAheadPos = DataBus.DrivingCycleInfo.CycleLookAhead(lookaheadMidShift); - var gradient = VectoMath.InclinationToAngle((lookAheadPos.Altitude - currentAltitude) / lookaheadMidShift); - return lookAheadPos.RoadGradient; - } - - private MeterPerSquareSecond CalcAccelerationReserve(MeterPerSecond currentVelocity, Second absTime) - { - var lastTargetspeedChange = DataBus.DrivingCycleInfo.LastTargetspeedChange; - demandedSpeed = ComputeDemandedSpeed(lastTargetspeedChange, absTime); - var accRsvLow = ShiftStrategyParameters.AccelerationReserveLookup.LookupLow(currentVelocity); - var accRsvHigh = ShiftStrategyParameters.AccelerationReserveLookup.LookupHigh(currentVelocity); - var targetSpeedDeviationLim = (demandedSpeed - currentVelocity).LimitTo( - 0.KMPHtoMeterPerSecond(), demandedSpeed * ShiftStrategyParameters.TargetSpeedDeviationFactor); - var accr = VectoMath.Interpolate( - 0.KMPHtoMeterPerSecond(), - VectoMath.Max(demandedSpeed * ShiftStrategyParameters.TargetSpeedDeviationFactor, 0.001.SI<MeterPerSecond>()), - accRsvLow, accRsvHigh, - targetSpeedDeviationLim); - return accr; - } - - protected MeterPerSecond ComputeDemandedSpeed(SpeedChangeEntry lastTargetspeedChange, Second absTime) - { - var accelerationTime = absTime - lastTargetspeedChange.AbsTime; - return VectoMath.Min( - PowertrainConfig.DriverData.AccelerationCurve.ComputeEndVelocityAccelerate( - lastTargetspeedChange.PreviousTargetSpeed, accelerationTime), - DataBus.DrivingCycleInfo.CycleData.LeftSample.VehicleTargetSpeed); - } - - private MeterPerSecond CalcPredictionVelocity( - MeterPerSecond currentVelocity, MeterPerSecond estimatedVelocityPostShift) - { - var ratioSpeedDrop = estimatedVelocityPostShift / VectoMath.Max(currentVelocity, 0.1.SI<MeterPerSecond>()); - var predictionIntervalRatio = ShiftStrategyParameters.PredictionDurationLookup.Lookup(ratioSpeedDrop.Value()); - var speedChange = estimatedVelocityPostShift - currentVelocity; - return currentVelocity + speedChange * predictionIntervalRatio; - } - - private PerSecond GetEngineSpeedLimitHigh(bool driveOff, GearshiftPosition gear, PerSecond engineSpeed, NewtonMeter cardanTorque) - { - if (driveOff) { - return ShiftStrategyParameters.EngineSpeedHighDriveOffFactor * - PowertrainConfig.EngineData.FullLoadCurves[0].NTq99hSpeed; - } - - var maxCardanTorque = MaxCardanTorqueLookup.Lookup(gear.Gear, engineSpeed); - var ratioTorqueCardan = cardanTorque / maxCardanTorque; - var engineSpeedHighMin = GetEngineSpeedLimitHighMin(); - var ratioEngineSpeedCurrMax = ShiftStrategyParameters.ShareEngineHigh.Lookup(ratioTorqueCardan); - return engineSpeedHighMin + ratioEngineSpeedCurrMax * - (PowertrainConfig.EngineData.FullLoadCurves[0].NP99hSpeed - engineSpeedHighMin); - } - - private bool CoastingBrakingShiftDecision( - Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, - PerSecond inAngularVelocity, GearshiftPosition gear, Second lastShiftTime) - { - var upperEngineSpeedLimit = (PowertrainConfig.EngineData.FullLoadCurves[0].NTq99lSpeed + - PowertrainConfig.EngineData.FullLoadCurves[0].NTq99hSpeed) / 2.0; - - var currentVelocity = DataBus.VehicleInfo.VehicleSpeed; - var gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - var estimatedVelocityPostShift = VelocityDropData.Interpolate(currentVelocity, gradient); - var predictedVelocity = DataBus.DriverInfo.DriverBehavior == DrivingBehavior.Braking - ? currentVelocity + PowertrainConfig.DriverData.AccelerationCurve.Lookup(currentVelocity).Deceleration * - GearboxModelData.TractionInterruption - : CalcPredictionVelocity(currentVelocity, estimatedVelocityPostShift); - - if (inAngularVelocity < GetEngineSpeedLimitLow(false)) { - for (var i = Math.Max(1, gear.Gear - ShiftStrategyParameters.AllowedGearRangeDown); - i <= Math.Min(GearboxModelData.Gears.Count, gear.Gear + ShiftStrategyParameters.AllowedGearRangeUp); - i++) { - var nextGear = new GearshiftPosition((uint)i); - TestContainerGbx.Gear = nextGear; - var init = TestContainer.VehiclePort.Initialize(predictedVelocity, gradient); - if (init.Engine.EngineSpeed > GetEngineSpeedLimitLow(false) && - init.Engine.EngineSpeed < upperEngineSpeedLimit) { - _nextGear = nextGear; - return true; - } - } - } - - if (inAngularVelocity >= upperEngineSpeedLimit) { - for (var i = Math.Min(GearboxModelData.Gears.Count, gear.Gear + ShiftStrategyParameters.AllowedGearRangeUp); - i >= Math.Max(1, gear.Gear + ShiftStrategyParameters.AllowedGearRangeDown); - i--) { - var nextGear = new GearshiftPosition((uint)i); - TestContainerGbx.Gear = nextGear; - var init = TestContainer.VehiclePort.Initialize(predictedVelocity, gradient); - if (init.Engine.EngineSpeed > GetEngineSpeedLimitLow(false) && - init.Engine.EngineSpeed < upperEngineSpeedLimit) { - _nextGear = nextGear; - return true; - } - } - } - - return false; - } - - - private void UpdateHistoryBuffer(Second absTime, Second dt, Watt currentCardanPower, MeterPerSecond velocity) - { - HistoryBuffer[absTime] = new HistoryEntry() { - dt = dt, - AvgCardanPower = currentCardanPower, - AvgSpeed = velocity, - }; - var oldEntries = HistoryBuffer.Keys.Where(x => x < absTime + dt - ShiftStrategyParameters.LookBackInterval) - .ToArray(); - foreach (var entry in oldEntries) { - HistoryBuffer.Remove(entry); - } - - //MeterPerSquareSecond aDemanded; - //var aLimit = PowertrainConfig.DriverData.AccelerationCurve.Lookup(DataBus.VehicleSpeed); - //if (DataBus.DriverBehavior == DrivingBehavior.Braking) { - // aDemanded = aLimit.Deceleration; - //} else if (DataBus.DriverBehavior == DrivingBehavior.Coasting) { - // aDemanded = 0.SI<MeterPerSquareSecond>(); - //} else { - // var lastTargetspeedChange = DataBus.LastTargetspeedChange; - // var vDemanded = ComputeDemandedSpeed(lastTargetspeedChange, absTime); - // aDemanded = ((vDemanded - DataBus.VehicleSpeed) / dt).LimitTo(aLimit.Deceleration, aLimit.Acceleration); - //} - AccelerationBuffer[absTime] = new AccelerationEntry() { - dt = dt, - //Acceleration = VectoMath.Max(aDemanded, 0.SI<MeterPerSquareSecond>()) - Acceleration = DataBus.DriverInfo.DriverAcceleration - }; - - var outdated = AccelerationBuffer - .Where(x => x.Key + x.Value.dt < absTime - ShiftStrategyParameters.DriverAccelerationLookBackInterval) - .Select(x => x.Key).ToArray(); - - foreach (var entry in outdated) { - AccelerationBuffer.Remove(entry); - } - } - - public override GearshiftPosition InitGear(Second absTime, Second dt, NewtonMeter torque, PerSecond outAngularVelocity) - { - if (DataBus.VehicleInfo.VehicleSpeed.IsEqual(0)) { - return InitStartGear(torque, outAngularVelocity); - } - - for (var gear = (uint)GearboxModelData.Gears.Count; gear > 1; gear--) { - var inAngularVelocity = outAngularVelocity * GearboxModelData.Gears[gear].Ratio; - if (DataBus.EngineInfo.EngineSpeed < inAngularVelocity && inAngularVelocity < DataBus.EngineInfo.EngineRatedSpeed) { - _nextGear = new GearshiftPosition(gear); - return _nextGear; - } - } - - return Gears.First(); - } - - private GearshiftPosition InitStartGear(NewtonMeter outTorque, PerSecond outAngularVelocity) - { - var maxStartGear = (int)Math.Round(GearboxModelData.Gears.Count / 2.0, MidpointRounding.AwayFromZero); - - var currentVelocity = DataBus.VehicleInfo.VehicleSpeed; - var gradient = CalcGradientDuringGearshift(true, null, null); - var estimatedVelocityPostShift = VelocityDropData.Interpolate(currentVelocity, gradient); - var predictionVelocity = ShiftStrategyParameters.StartVelocity; - accRsv = ShiftStrategyParameters.StartAcceleration; - - var startGear = Gears.First(); - var minRating = new GearRating(GearRatingCase.E, double.MaxValue, 0.RPMtoRad()); - var roadGradient = DataBus.DrivingCycleInfo.CycleData.LeftSample.RoadGradient; //CycleLookAhead(0.SI<Meter>()).RoadGradient; - GearRatings.Clear(); - for (var i = (uint)maxStartGear; i > 0; i--) { - var gradientBelowMaxGrad = roadGradient < MaxGradability.GradabilityLimitedTorque(i); - var engineSpeedLimitLow = GetEngineSpeedLimitLow(true); - var engineSpeed = GetEngineSpeed(i); - var engineSpeedAboveMin = engineSpeed > engineSpeedLimitLow; - var engineSpeedBelowN95h = engineSpeed < PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed; - if (gradientBelowMaxGrad && engineSpeedAboveMin && engineSpeedBelowN95h) { - var rating = RatingGear(true, new GearshiftPosition(i), new GearshiftPosition(0), roadGradient, predictionVelocity, estimatedVelocityPostShift, accRsv, accRsv); - GearRatings[i] = rating; - if (rating < minRating) { - minRating = rating; - startGear = new GearshiftPosition(i); - } - } - } - - _nextGear = startGear; - return startGear; - } - - private PerSecond GetEngineSpeed(uint gear) - { - return EngineSpeedAtDriveOff[gear]; - } - - private PerSecond GetEngineSpeedLimitLow(bool driveOff) - { - var shareIdleLowMax = driveOff - ? ShiftStrategyParameters.ShareIdleLow.MaxValue - : ShiftStrategyParameters.ShareIdleLow.Lookup(DataBus.VehicleInfo.VehicleSpeed); - return PowertrainConfig.EngineData.IdleSpeed + shareIdleLowMax * - (PowertrainConfig.EngineData.FullLoadCurves[0].NP99hSpeed - PowertrainConfig.EngineData.IdleSpeed); - } - - - private Second EstimateResidenceTimeInGear( - GearshiftPosition gear, ResponseDryRun responseDriverDemand, PerSecond engineSpeedHighThreshold, - MeterPerSecond velocityAfterGearshift, Radian estimatedGradient, PerSecond engineSpeedLowThreshold) - { - // get total 'transmission ratio' of powertrain - var engineSpeed = responseDriverDemand.Engine.EngineSpeed; - var vehicleSpeed = responseDriverDemand.Vehicle.VehicleSpeed; - var ratio = (vehicleSpeed / engineSpeed).Cast<Meter>(); - - var estimatedEngineSpeed = velocityAfterGearshift / ratio; - if (estimatedEngineSpeed < engineSpeedLowThreshold || estimatedEngineSpeed > engineSpeedHighThreshold) { - return null; - } - - var averageAccelerationTorque = AverageAccelerationTorqueLookup.Interpolate( - responseDriverDemand.Engine.EngineSpeed, responseDriverDemand.Engine.TorqueOutDemand); - - TestContainerGbx.Gear = gear; - var initResponse = TestContainer.VehiclePort.Initialize(vehicleSpeed, estimatedGradient); - var delta = initResponse.Engine.TorqueOutDemand - averageAccelerationTorque; - var acceleration = SearchAlgorithm.Search( - 0.SI<MeterPerSquareSecond>(), delta, 0.1.SI<MeterPerSquareSecond>(), - getYValue: r => { return (r as AbstractResponse).Engine.TorqueOutDemand - averageAccelerationTorque; }, - evaluateFunction: a => { - return TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, a, estimatedGradient, true); - }, - criterion: r => { return ((r as AbstractResponse).Engine.TorqueOutDemand - averageAccelerationTorque).Value(); } - ); - - var engineAcceleration = (acceleration / ratio).Cast<PerSquareSecond>(); - var deltaEngineSpeed = engineSpeedHighThreshold - engineSpeed; - if (engineAcceleration.IsGreater(0) && deltaEngineSpeed > 0) { - return (deltaEngineSpeed / engineAcceleration).Cast<Second>(); - } - - return null; - } - - private PerSecond GetEngineSpeedLimitHighDriveOff(uint gear) - { - return ShiftStrategyParameters.EngineSpeedHighDriveOffFactor * - PowertrainConfig.EngineData.FullLoadCurves[0].NTq99hSpeed; - } - - private PerSecond GetEngineSpeedLimitHighMin() - { - var fld = PowertrainConfig.EngineData.FullLoadCurves[0]; - var wT99l = fld.NTq99lSpeed; - var wT99h = fld.NTq99hSpeed; - var wP99h = fld.NP99hSpeed; - var max1 = wT99l + ShiftStrategyParameters.DnT99L_highMin1 * (wP99h - wT99l); - var max2 = wT99l + ShiftStrategyParameters.DnT99L_highMin2 * (wP99h - wT99l); - - return VectoMath.Max(max1, VectoMath.Min(max2, wT99h)); - } - - - public override GearshiftPosition Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) - { - //_nextGear = gear; - while (_nextGear.Gear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) { - _nextGear = Gears.Predecessor(_nextGear); - } - while (_nextGear.Gear < GearboxModelData.Gears.Count && - SpeedTooHighForEngine(_nextGear, outAngularVelocity)) { - _nextGear = Gears.Successor(_nextGear); - } - - return _nextGear; - } - - public override void Disengage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) { } - - public override GearshiftPosition NextGear - { - get { return _nextGear; } - } - - public static string Name { get { return "AMT - ACEA TCU"; } } - - #endregion - - public override void WriteModalResults(IModalDataContainer container) - { - foreach (var gear in GearboxModelData.Gears.Keys) { - container.SetDataValue( - string.Format("Gear{0}-Rating", gear), - GearRatings.ContainsKey(gear) - ? GearRatings[gear].NumericValue - : new GearRating(GearRatingCase.Z, 0, null).NumericValue); - } - - container.SetDataValue("acc_rsv", accRsv?.Value() ?? 0); - container.SetDataValue("v_dem", demandedSpeed?.AsKmph ?? 0); - container.SetDataValue("acc_driver_avg", driverAccelerationAvg?.Value() ?? 0); - container.SetDataValue("grad_shift", Math.Tan(gradient.Value()) * 100); - GearRatings.Clear(); - accRsv = null; - } - - public override ShiftPolygon ComputeDeclarationShiftPolygon( - GearboxType gearboxType, int i, EngineFullLoadCurve engineDataFullLoadCurve, IList<ITransmissionInputData> gearboxGears, - CombustionEngineData engineData, double axlegearRatio, Meter dynamicTyreRadius, ElectricMotorData electricMotorData = null) - { - return null; - } - } -} diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyV2.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyV2.cs deleted file mode 100644 index 6d661be837bdb2af12ad2da32043c375342b12b7..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategyV2.cs +++ /dev/null @@ -1,795 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.Models.Connector.Ports.Impl; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.Simulation.DataBus; -using TUGraz.VectoCore.Models.Simulation.Impl; -using TUGraz.VectoCore.OutputData; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl -{ - public class ATShiftStrategyV2 : BaseShiftStrategy - { - - private ATGearbox _gearbox; - - protected Dictionary<Second, HistoryEntry> HistoryBuffer = new Dictionary<Second, HistoryEntry>(); - protected Dictionary<Second, AccelerationEntry> AccelerationBuffer = new Dictionary<Second, AccelerationEntry>(); - - private MeterPerSecond demandedSpeed = 0.SI<MeterPerSecond>(); - private MeterPerSquareSecond accRsv = 0.SI<MeterPerSquareSecond>(); - private MeterPerSquareSecond driverAccelerationAvg; - private Radian gradient = 0.SI<Radian>(); - - protected readonly VectoRunData PowertrainConfig; - protected readonly ShiftStrategyParameters ShiftStrategyParameters; - - protected SimplePowertrainContainer TestContainer; - protected readonly MaxGradabilityLookup MaxGradability; - protected MaxCardanTorqueLookup MaxCardanTorqueLookup; - protected AverageAccelerationTorqueLookup AverageAccelerationTorqueLookup; - - private Dictionary<int, GearRating> GearRatings = new Dictionary<int, GearRating>(); - - - private readonly NextGearState _nextGear = new NextGearState(); - - public ATShiftStrategyV2(VectoRunData data, IVehicleContainer dataBus) : base(data.GearboxData, dataBus) - { - PowertrainConfig = data; - ShiftStrategyParameters = data.GearshiftParameters; - - //GearShiftSequence = gearList.ToArray(); - - // create a dummy powertrain for pre-processing and estimatins - var modData = new ModalDataContainer(data, null, null, false); - var builder = new PowertrainBuilder(modData); - TestContainer = new SimplePowertrainContainer(data); - TestContainer.AbsTime = -double.MaxValue.SI<Second>(); - builder.BuildSimplePowertrain(data, TestContainer); - - - MaxGradability = new MaxGradabilityLookup(); - dataBus.AddPreprocessor(new MaxGradabilityPreprocessor(MaxGradability, data, TestContainer)); - - MaxCardanTorqueLookup = new MaxCardanTorqueLookup(); - dataBus.AddPreprocessor(new MaxCardanTorquePreprocessor(MaxCardanTorqueLookup, data, TestContainer)); - - AverageAccelerationTorqueLookup = new AverageAccelerationTorqueLookup(); - dataBus.AddPreprocessor( - new AverageAccelerationTorquePreprocessor(AverageAccelerationTorqueLookup, data, GetEngineSpeedLimitHighMin())); - - } - - - public override IGearbox Gearbox - { - get { return _gearbox; } - set { - _gearbox = value as ATGearbox; - if (_gearbox == null) { - throw new VectoException("AT Shift strategy can only handle AT gearboxes, given: {0}", value.GetType()); - } - } - } - - #region Overrides of BaseShiftStrategy - - public override void Request(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) - { - // update own history - var velocity = DataBus.VehicleSpeed + DataBus.DriverAcceleration * dt / 2.0; - var cardanDemand = DataBus.CurrentAxleDemand; - var currentCardanPower = cardanDemand.Item1 * cardanDemand.Item2; - - UpdateHistoryBuffer(absTime, dt, currentCardanPower, velocity); - - var currentVelocity = DataBus.VehicleSpeed; - accRsv = CalcAccelerationReserve(currentVelocity, absTime + dt); - - driverAccelerationAvg = GetAverageAcceleration(absTime + dt); - - gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - - } - - public override bool ShiftRequired( - Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, - PerSecond inAngularVelocity, uint gear, Second lastShiftTime) - { - var cardanDemand = DataBus.CurrentAxleDemand; - var currentCardanPower = cardanDemand.Item1 * cardanDemand.Item2; - - // no shift when vehicle stands - if (DataBus.VehicleStopped) { - return false; - } - - // EMERGENCY SHIFTS --------------------------------------- - if (CheckEmergencyShift(absTime, outTorque, outAngularVelocity, inAngularVelocity, gear)) { - return true; - } - - - // TEST - var currentVelocity = DataBus.VehicleSpeed; - accRsv = CalcAccelerationReserve(currentVelocity, absTime + dt); - - var minimumShiftTimePassed = (lastShiftTime + ModelData.ShiftTime).IsSmallerOrEqual(absTime); - if (!minimumShiftTimePassed) { - return false; - } - - var averageCardanPower = CalcAverageCardanPower(); - - var propulsion = HistoryBuffer.Min(x => x.Value.AvgSpeed).IsEqual(0) || - averageCardanPower > ShiftStrategyParameters.AverageCardanPowerThresholdPropulsion || - currentCardanPower > ShiftStrategyParameters.CurrentCardanPowerThresholdPropulsion; - - return propulsion - ? PropulsionShiftDecision( - absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime) - : CoastingBrakingShiftDecision( - absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime); - - } - - private bool PropulsionShiftDecision( - Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, - PerSecond inAngularVelocity, uint gearboxGear, Second lastShiftTime) - { - var lookAheadDistance = - DataBus.VehicleSpeed * ModelData.TractionInterruption; //ShiftStrategyParameters.GearResidenceTime; - var roadGradient = DataBus.CycleLookAhead(lookAheadDistance).RoadGradient; - - var currentVelocity = DataBus.VehicleSpeed; - gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - //var estimatedVelocityPostShift = DataBus.VehicleSpeed; //VelocityDropData.Interpolate(currentVelocity, gradient); - //var predictionVelocity = DataBus.VehicleSpeed; //CalcPredictionVelocity(currentVelocity, estimatedVelocityPostShift); - - if (driverAccelerationAvg <= ShiftStrategyParameters.DriverAccelerationThresholdLow) { - driverAccelerationAvg = 0.SI<MeterPerSquareSecond>(); - } - - var gear = Gearbox.Gears.ToList().FindIndex(x => x.Gear == gearboxGear && x.TorqueConverterLocked == _gearbox.TCLocked); - var gearLimitHigh = Math.Min(Gearbox.Gears.Count, gear + ShiftStrategyParameters.AllowedGearRangeUp); - - GearRatings.Clear(); - - // calc rating for current gear - var ratingCurrentGear = CalcGearRating(absTime, outAngularVelocity, gear, gear, roadGradient); - if (ratingCurrentGear.RatingCase == GearRatingCase.A) { - ratingCurrentGear = new GearRating( - GearRatingCase.A, ratingCurrentGear.Rating * ShiftStrategyParameters.RatingFactorCurrentGear, ratingCurrentGear.MaxEngineSpeed); - } - GearRatings[gear] = ratingCurrentGear; - - // calc rating for lower gears (down to gear limit or rating exceeds engine speed) - - var loop = true; - var gearLimitLow = (uint)Math.Max(0, gear - ShiftStrategyParameters.AllowedGearRangeDown); - for (var i = gear - 1; loop && i >= gearLimitLow; i--) { - var rating = CalcGearRating(absTime, outAngularVelocity, gear, i, roadGradient); - - if (rating.RatingCase == GearRatingCase.E) { - loop = false; - } - - GearRatings[i] = rating; - } - - // calc rating for higher gears (up to gear limit or rating exceeds engine speed) - - loop = true; - for (var i = gear + 1; loop && i < gearLimitHigh; i++) { - var rating = CalcGearRating(absTime, outAngularVelocity, gear, i, roadGradient); - - if (rating.RatingCase == GearRatingCase.E) { - loop = false; - } - - GearRatings[i] = rating; - } - - var selectedGear = GearRatings.OrderBy(x => x.Value).First().Key; - - var retVal = false; - if (selectedGear < gear && (DownshiftAllowed(absTime, lastShiftTime) || inAngularVelocity < GetEngineSpeedLimitLow(false))) { - _nextGear.SetState(Gearbox.Gears[selectedGear], absTime); - retVal = true; - } - if (selectedGear > gear && (UpshiftAllowed(absTime, lastShiftTime) || inAngularVelocity > GearRatings[gear].MaxEngineSpeed)) { - _nextGear.SetState(Gearbox.Gears[selectedGear], absTime); - retVal = true; - } - - return retVal; - } - - private bool UpshiftAllowed(Second absTime, Second lastShiftTime) - { - return (absTime - lastShiftTime).IsGreaterOrEqual(ModelData.ShiftTime); - } - - private bool DownshiftAllowed(Second absTime, Second lastShiftTime) - { - return (absTime - lastShiftTime).IsGreaterOrEqual(ModelData.ShiftTime); - } - - private GearRating CalcGearRating( - Second absTime, PerSecond outAngularVelocity, int gearIdx, int nextGearIdx, Radian roadGradient) - { - var nextGear = Gearbox.Gears[nextGearIdx].Gear; - var gradientBelowMaxGrad = roadGradient < MaxGradability.GradabilityLimitedTorque(Gearbox.Gears[nextGearIdx]); - var engineSpeedAboveMin = - outAngularVelocity * ModelData.GearRatio(Gearbox.Gears[nextGearIdx]) > PowertrainConfig.EngineData.IdleSpeed; - - var engineSpeedBelowMax = outAngularVelocity * ModelData.GearRatio(Gearbox.Gears[nextGearIdx]) < - PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed; - - if (!(gradientBelowMaxGrad && engineSpeedAboveMin && engineSpeedBelowMax)) { - return new GearRating(GearRatingCase.E, 0, null); - } - - return RatingGear( - false, nextGearIdx, gearIdx, gradient, accRsv, driverAccelerationAvg); - } - - - private GearRating RatingGear( - bool driveOff, int gearIdx, int currentGearIdx, Radian roadGradient, MeterPerSquareSecond accReserve, MeterPerSquareSecond driverAccelerationAvg) - { - var gear = Gearbox.Gears[gearIdx]; - TestContainer.GearboxCtl.SetGear = new GearshiftPosition(gear.Gear, gear.TorqueConverterLocked); - TestContainer.VehiclePort.Initialize(DataBus.VehicleSpeed, roadGradient); - - var respAccRsv = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, - accReserve, roadGradient, true); - - if (respAccRsv.EngineSpeed < PowertrainConfig.EngineData.IdleSpeed || - respAccRsv.EngineSpeed > PowertrainConfig.EngineData.FullLoadCurves[0].N95hSpeed) { - return new GearRating(GearRatingCase.E, 0, 0.RPMtoRad()); - } - - GearRating? retVal; - var engineSpeedLowThreshold = GetEngineSpeedLimitLow(driveOff); - - var respConstVel = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, - 0.SI<MeterPerSquareSecond>(), roadGradient, true); - var engineSpeedHighThreshold = GetEngineSpeedLimitHigh( - driveOff, gear, respAccRsv.EngineSpeed, respConstVel.CardanTorque); - if (respAccRsv.EngineSpeed < engineSpeedLowThreshold) { - return new GearRating( - GearRatingCase.D, - (engineSpeedLowThreshold - respAccRsv.EngineSpeed).AsRPM, engineSpeedHighThreshold); - } - - if (respAccRsv.EngineSpeed > engineSpeedHighThreshold) { - return new GearRating( - GearRatingCase.D, - (respAccRsv.EngineSpeed - engineSpeedHighThreshold).AsRPM, engineSpeedHighThreshold); - } - - ResponseDryRun respDriverDemand = null; - if (respAccRsv.EngineTorqueDemandTotal <= respAccRsv.EngineDynamicFullLoadTorque) { - respDriverDemand = DriverDemandResponse(roadGradient, driverAccelerationAvg); - - var fc = PowertrainConfig.EngineData.ConsumptionMap.GetFuelConsumption( - respDriverDemand.EngineTorqueDemandTotal.LimitTo( - PowertrainConfig.EngineData.FullLoadCurves[0].DragLoadStationaryTorque(respAccRsv.EngineSpeed), - PowertrainConfig.EngineData.FullLoadCurves[0].FullLoadStationaryTorque(respAccRsv.EngineSpeed)), - respAccRsv.EngineSpeed); - retVal = new GearRating( - GearRatingCase.A, - (fc.Value.ConvertToGrammPerHour().Value / VectoMath.Max(respDriverDemand.AxlegearPowerRequest, 1.SI<Watt>())).Value() * - 1e3, - engineSpeedHighThreshold); - } else { - retVal = new GearRating( - GearRatingCase.B, (respAccRsv.EnginePowerRequest - respAccRsv.DynamicFullLoadPower).Value(), - engineSpeedHighThreshold); - } - - if (gearIdx > currentGearIdx) { - respDriverDemand = respDriverDemand ?? DriverDemandResponse(roadGradient, driverAccelerationAvg); - var estimatedResidenceTime = - EstimateResidenceTimeInGear( - gear, respDriverDemand, engineSpeedHighThreshold, DataBus.VehicleSpeed, roadGradient, engineSpeedLowThreshold); - if (estimatedResidenceTime != null && estimatedResidenceTime < ShiftStrategyParameters.GearResidenceTime) { - retVal = new GearRating( - GearRatingCase.C, (ShiftStrategyParameters.GearResidenceTime - estimatedResidenceTime).Value(), - engineSpeedHighThreshold); - } - } - return retVal.Value; - } - - private ResponseDryRun DriverDemandResponse(Radian gradient, MeterPerSquareSecond driverAccelerationAvg) - { - var respDriverDemand = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, driverAccelerationAvg, gradient, - true); - - if (respDriverDemand.DeltaFullLoad.IsGreater(0)) { - driverAccelerationAvg = SearchAlgorithm.Search( - driverAccelerationAvg, respDriverDemand.DeltaFullLoad, - Constants.SimulationSettings.OperatingPointInitialSearchIntervalAccelerating, - getYValue: response => { - var r = (ResponseDryRun)response; - return r.DeltaFullLoad; - }, - evaluateFunction: - acc => { - var response = TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, acc, gradient, true); - return response; - }, - criterion: response => { - var r = (ResponseDryRun)response; - return r.DeltaFullLoad.Value() / 1e5; - }); - respDriverDemand = (ResponseDryRun)TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, driverAccelerationAvg, gradient, - true); - } - return respDriverDemand; - } - - private Second EstimateResidenceTimeInGear( - GearshiftPosition gear, ResponseDryRun responseDriverDemand, PerSecond engineSpeedHighThreshold, - MeterPerSecond velocityAfterGearshift, Radian estimatedGradient, PerSecond engineSpeedLowThreshold) - { - // get total 'transmission ratio' of powertrain - var engineSpeed = responseDriverDemand.EngineSpeed; - var vehicleSpeed = responseDriverDemand.VehicleSpeed; - var ratio = (vehicleSpeed / engineSpeed).Cast<Meter>(); - - var estimatedEngineSpeed = velocityAfterGearshift / ratio; - if (estimatedEngineSpeed < engineSpeedLowThreshold || estimatedEngineSpeed > engineSpeedHighThreshold) { - return null; - } - - var averageAccelerationTorque = AverageAccelerationTorqueLookup.Interpolate( - responseDriverDemand.EngineSpeed, responseDriverDemand.EngineTorqueDemand); - - TestContainer.GearboxCtl.SetGear = new GearshiftPosition(gear.Gear, gear.TorqueConverterLocked); - - var initResponse = TestContainer.VehiclePort.Initialize(vehicleSpeed, estimatedGradient); - var delta = initResponse.EngineTorqueDemand - averageAccelerationTorque; - var acceleration = SearchAlgorithm.Search( - 0.SI<MeterPerSquareSecond>(), delta, 0.1.SI<MeterPerSquareSecond>(), - getYValue: r => { return (r as AbstractResponse).EngineTorqueDemand - averageAccelerationTorque; }, - evaluateFunction: a => { - return TestContainer.VehiclePort.Request( - 0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, a, estimatedGradient, true); - }, - criterion: r => { return ((r as AbstractResponse).EngineTorqueDemand - averageAccelerationTorque).Value(); } - ); - - var engineAcceleration = (acceleration / ratio).Cast<PerSquareSecond>(); - var deltaEngineSpeed = engineSpeedHighThreshold - engineSpeed; - if (engineAcceleration.IsGreater(0) && deltaEngineSpeed > 0) { - return (deltaEngineSpeed / engineAcceleration).Cast<Second>(); - } - - return null; - } - - private PerSecond GetEngineSpeedLimitHigh(bool driveOff, GearshiftPosition gear, PerSecond engineSpeed, NewtonMeter cardanTorque) - { - if (driveOff) { - return ShiftStrategyParameters.EngineSpeedHighDriveOffFactor * - PowertrainConfig.EngineData.FullLoadCurves[0].NTq99hSpeed; - } - - var maxCardanTorque = MaxCardanTorqueLookup.Lookup(gear, engineSpeed); - var ratioTorqueCardan = cardanTorque / maxCardanTorque; - var engineSpeedHighMin = GetEngineSpeedLimitHighMin(); - var ratioEngineSpeedCurrMax = ShiftStrategyParameters.ShareEngineHigh.Lookup(ratioTorqueCardan); - return engineSpeedHighMin + ratioEngineSpeedCurrMax * - (PowertrainConfig.EngineData.FullLoadCurves[0].NP99hSpeed - engineSpeedHighMin); - } - - private PerSecond GetEngineSpeedLimitHighMin() - { - var fld = PowertrainConfig.EngineData.FullLoadCurves[0]; - var wT99l = fld.NTq99lSpeed; - var wT99h = fld.NTq99hSpeed; - var wP99h = fld.NP99hSpeed; - var max1 = wT99l + ShiftStrategyParameters.DnT99L_highMin1 * (wP99h - wT99l); - var max2 = wT99l + ShiftStrategyParameters.DnT99L_highMin2 * (wP99h - wT99l); - - return VectoMath.Max(max1, VectoMath.Min(max2, wT99h)); - } - - private PerSecond GetEngineSpeedLimitLow(bool driveOff) - { - var shareIdleLowMax = driveOff - ? ShiftStrategyParameters.ShareIdleLow.MaxValue - : ShiftStrategyParameters.ShareIdleLow.Lookup(DataBus.VehicleSpeed); - return PowertrainConfig.EngineData.IdleSpeed + shareIdleLowMax * - (PowertrainConfig.EngineData.FullLoadCurves[0].NP99hSpeed - PowertrainConfig.EngineData.IdleSpeed); - } - - private bool CheckEmergencyShift(Second absTime, NewtonMeter outTorque, PerSecond outAngularVelocity, PerSecond inAngularVelocity, uint gear) - { - // Emergency Downshift: if lower than engine idle speed - if (inAngularVelocity.IsSmaller(DataBus.EngineIdleSpeed)) { - Log.Debug("engine speed would fall below idle speed - shift down"); - Downshift(absTime, gear); - return true; - } - // Emergency Upshift: if higher than engine rated speed - if (inAngularVelocity.IsGreaterOrEqual(VectoMath.Min(ModelData.Gears[gear].MaxSpeed, DataBus.EngineRatedSpeed))) { - // check if upshift is possible - if (!ModelData.Gears.ContainsKey(gear + 1)) { - return false; - } - - PerSecond nextInAngularSpeed; - NewtonMeter nextInTorque; - if (ModelData.Gears[gear].HasLockedGear) { - nextInAngularSpeed = outAngularVelocity * ModelData.Gears[gear].Ratio; - nextInTorque = outTorque / ModelData.Gears[gear].Ratio; - } else { - nextInAngularSpeed = outAngularVelocity * ModelData.Gears[gear + 1].Ratio; - nextInTorque = outTorque / ModelData.Gears[gear + 1].Ratio; - } - //if (!IsBelowDownShiftCurve(gear + 1, nextInTorque, nextInAngularSpeed)) { - if (nextInAngularSpeed.IsGreater(DataBus.EngineRatedSpeed)) { - Log.Debug("engine speed would be above max speed / rated speed - shift up"); - Upshift(absTime, gear); - return true; - } - } - return false; - } - - private Watt CalcAverageCardanPower() - { - var sumCardanPower = 0.SI<WattSecond>(); - var sumDt = 0.SI<Second>(); - foreach (var entry in HistoryBuffer) { - sumDt += entry.Value.dt; - sumCardanPower += entry.Value.AvgCardanPower * entry.Value.dt; - } - - return sumCardanPower / sumDt; - } - - private void Downshift(Second absTime, uint gear) - { - // L -> C - if (_gearbox.TCLocked && ModelData.Gears[gear].HasTorqueConverter) { - _nextGear.SetState(absTime, disengaged: false, gear: gear, tcLocked: false); - return; - } - - // L -> L-1 - // C -> C-1 - if (ModelData.Gears.ContainsKey(gear - 1)) { - _nextGear.SetState(absTime, disengaged: false, gear: gear - 1, tcLocked: _gearbox.TCLocked); - return; - } - - // L -> 0 -- not allowed!! - throw new VectoSimulationException( - "ShiftStrategy wanted to shift down but current gear is locked (L) and has no torque converter (C) and disenganging directly from (L) is not allowed."); - } - - private void Upshift(Second absTime, uint gear) - { - // C -> L: switch from torque converter to locked gear - if (!_gearbox.TCLocked && ModelData.Gears[gear].HasLockedGear) { - _nextGear.SetState(absTime, disengaged: false, gear: gear, tcLocked: true); - return; - } - - // L -> L+1 - // C -> C+1 - if (ModelData.Gears.ContainsKey(gear + 1)) { - _nextGear.SetState(absTime, disengaged: false, gear: gear + 1, tcLocked: _gearbox.TCLocked); - return; - } - - // C -> L+1 -- not allowed!! - throw new VectoSimulationException( - "ShiftStrategy wanted to shift up, but current gear has active torque converter (C) but no locked gear (no L) and shifting directly to (L) is not allowed."); - } - - - private bool CoastingBrakingShiftDecision( - Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, - PerSecond inAngularVelocity, uint gearboxGear, Second lastShiftTime) - { - var upperEngineSpeedLimit = (PowertrainConfig.EngineData.FullLoadCurves[0].NTq99lSpeed + - PowertrainConfig.EngineData.FullLoadCurves[0].NTq99hSpeed) / 2.0; - - var currentVelocity = DataBus.VehicleSpeed; - var gradient = CalcGradientDuringGearshift(false, dt, currentVelocity); - //var estimatedVelocityPostShift = VelocityDropData.Interpolate(currentVelocity, gradient); - var predictedVelocity = DataBus.DriverBehavior == DrivingBehavior.Braking - ? currentVelocity + PowertrainConfig.DriverData.AccelerationCurve.Lookup(currentVelocity).Deceleration * - ModelData.TractionInterruption - : DataBus.VehicleSpeed; - - var gearIdx = Gearbox.Gears.ToList() - .FindIndex(x => x.Gear == gearboxGear && x.TorqueConverterLocked == _gearbox.TCLocked); - var gear = Gearbox.Gears[gearIdx]; - - if (inAngularVelocity < GetEngineSpeedLimitLow(false)) { - for (var i = Math.Max(0, gearIdx - ShiftStrategyParameters.AllowedGearRangeDown); - i < Math.Min(ModelData.Gears.Count, gearIdx + ShiftStrategyParameters.AllowedGearRangeUp); - i++) { - var nextGear = Gearbox.Gears[i]; - TestContainer.GearboxCtl.SetGear = new GearshiftPosition(nextGear.Gear, nextGear.TorqueConverterLocked); - var init = TestContainer.VehiclePort.Initialize(predictedVelocity, gradient); - if (init.EngineSpeed > GetEngineSpeedLimitLow(false) && - init.EngineSpeed < upperEngineSpeedLimit) { - _nextGear.SetState(nextGear, absTime); - return true; - } - } - } - - if (inAngularVelocity >= upperEngineSpeedLimit) { - for (var i = Math.Min(Gearbox.Gears.Count, gearIdx + ShiftStrategyParameters.AllowedGearRangeUp); - i >= Math.Max(0, gearIdx + ShiftStrategyParameters.AllowedGearRangeDown); - i--) { - var nextGear = Gearbox.Gears[i]; - TestContainer.GearboxCtl.SetGear = new GearshiftPosition(nextGear.Gear, nextGear.TorqueConverterLocked); - var init = TestContainer.VehiclePort.Initialize(predictedVelocity, gradient); - if (init.EngineSpeed > GetEngineSpeedLimitLow(false) && - init.EngineSpeed < upperEngineSpeedLimit) { - _nextGear.SetState(nextGear, absTime); - return true; - } - } - } - - return false; - } - - public override uint InitGear(Second absTime, Second dt, NewtonMeter torque, PerSecond outAngularVelocity) - { - if (DataBus.VehicleSpeed.IsEqual(0)) { - // AT always starts in first gear and TC active! - _gearbox.TCLocked = false; - _gearbox.Disengaged = true; - return 1; - } - - for (var gearIdx = Gearbox.Gears.Count - 1; gearIdx >= 0; gearIdx--) { - var gear = Gearbox.Gears[gearIdx]; - var inAngularVelocity = outAngularVelocity * ModelData.Gears[gear.Gear].Ratio; - if (DataBus.EngineSpeed < inAngularVelocity && inAngularVelocity < DataBus.EngineRatedSpeed) { - _nextGear.SetState(gear, absTime); - return _nextGear.Gear; - } - } - // fallback: start with first gear; - _gearbox.TCLocked = false; - _gearbox.Disengaged = false; - return 1; - } - - public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) - { - if (_nextGear.AbsTime != null && _nextGear.AbsTime.IsEqual(absTime)) { - _gearbox.TCLocked = _nextGear.TorqueConverterLocked; - _gearbox.Disengaged = _nextGear.Disengaged; - _nextGear.AbsTime = null; - return _nextGear.Gear; - } - _nextGear.AbsTime = null; - return _gearbox.Gear; - } - - public override void Disengage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outEngineSpeed) - { - throw new System.NotImplementedException("AT Shift Strategy does not support disengaging."); - } - - public override GearshiftPosition NextGear - { - get { return new GearshiftPosition(_nextGear.Gear, _nextGear.TorqueConverterLocked); } - } - - - #endregion - - private void UpdateHistoryBuffer(Second absTime, Second dt, Watt currentCardanPower, MeterPerSecond velocity) - { - HistoryBuffer[absTime] = new HistoryEntry() { - dt = dt, - AvgCardanPower = currentCardanPower, - AvgSpeed = velocity, - }; - var oldEntries = HistoryBuffer.Keys.Where(x => x < absTime + dt - ShiftStrategyParameters.LookBackInterval) - .ToArray(); - foreach (var entry in oldEntries) { - HistoryBuffer.Remove(entry); - } - - //MeterPerSquareSecond aDemanded; - //var aLimit = PowertrainConfig.DriverData.AccelerationCurve.Lookup(DataBus.VehicleSpeed); - //if (DataBus.DriverBehavior == DrivingBehavior.Braking) { - // aDemanded = aLimit.Deceleration; - //} else if (DataBus.DriverBehavior == DrivingBehavior.Coasting) { - // aDemanded = 0.SI<MeterPerSquareSecond>(); - //} else { - // var lastTargetspeedChange = DataBus.LastTargetspeedChange; - // var vDemanded = ComputeDemandedSpeed(lastTargetspeedChange, absTime); - // aDemanded = ((vDemanded - DataBus.VehicleSpeed) / dt).LimitTo(aLimit.Deceleration, aLimit.Acceleration); - //} - AccelerationBuffer[absTime] = new AccelerationEntry() { - dt = dt, - //Acceleration = VectoMath.Max(aDemanded, 0.SI<MeterPerSquareSecond>()) - Acceleration = DataBus.DriverAcceleration - }; - - var outdated = AccelerationBuffer - .Where(x => x.Key + x.Value.dt < absTime - ShiftStrategyParameters.DriverAccelerationLookBackInterval) - .Select(x => x.Key).ToArray(); - - foreach (var entry in outdated) { - AccelerationBuffer.Remove(entry); - } - } - - private MeterPerSquareSecond CalcAccelerationReserve(MeterPerSecond currentVelocity, Second absTime) - { - var lastTargetspeedChange = DataBus.LastTargetspeedChange; - demandedSpeed = ComputeDemandedSpeed(lastTargetspeedChange, absTime); - var accRsvLow = ShiftStrategyParameters.AccelerationReserveLookup.LookupLow(currentVelocity); - var accRsvHigh = ShiftStrategyParameters.AccelerationReserveLookup.LookupHigh(currentVelocity); - var targetSpeedDeviationLim = (demandedSpeed - currentVelocity).LimitTo( - 0.KMPHtoMeterPerSecond(), demandedSpeed * ShiftStrategyParameters.TargetSpeedDeviationFactor); - var accr = VectoMath.Interpolate( - 0.KMPHtoMeterPerSecond(), - VectoMath.Max(demandedSpeed * ShiftStrategyParameters.TargetSpeedDeviationFactor, 0.001.SI<MeterPerSecond>()), - accRsvLow, accRsvHigh, - targetSpeedDeviationLim); - return accr; - } - - protected MeterPerSecond ComputeDemandedSpeed(SpeedChangeEntry lastTargetspeedChange, Second absTime) - { - var accelerationTime = absTime - lastTargetspeedChange.AbsTime; - return VectoMath.Min( - PowertrainConfig.DriverData.AccelerationCurve.ComputeEndVelocityAccelerate( - lastTargetspeedChange.PreviousTargetSpeed, accelerationTime), - DataBus.CycleData.LeftSample.VehicleTargetSpeed); - } - - private MeterPerSquareSecond GetAverageAcceleration(Second absTime) - { - if (!AccelerationBuffer.Any()) { - return 0.SI<MeterPerSquareSecond>(); - } - - var sumTime = 0.SI<Second>(); - var sumAcc = 0.SI<MeterPerSecond>(); - var start = absTime - ShiftStrategyParameters.DriverAccelerationLookBackInterval; - - foreach (var entry in AccelerationBuffer) { - var time = VectoMath.Max(VectoMath.Min(entry.Key - start, 0.SI<Second>()) + entry.Value.dt, 0.SI<Second>()); - var acc = entry.Value.Acceleration * time; - sumTime += time; - sumAcc += acc; - } - - var avgAcc = sumAcc / VectoMath.Max(sumTime, 10.SI<Second>()); - - return avgAcc > 0.1.SI<MeterPerSquareSecond>() ? avgAcc : 0.SI<MeterPerSquareSecond>(); - } - - private Radian CalcGradientDuringGearshift(bool driveOff, Second dt, MeterPerSecond currentVelocity) - { - var lookaheadMidShift = driveOff - ? ShiftStrategyParameters.StartVelocity / - ShiftStrategyParameters.StartAcceleration / 2.0 * ShiftStrategyParameters.StartVelocity - : currentVelocity * dt / 2.0; - if (lookaheadMidShift.IsEqual(0)) { - return DataBus.RoadGradient; - } - var currentAltitude = DataBus.Altitude; - var lookAheadPos = DataBus.CycleLookAhead(lookaheadMidShift); - var gradient = VectoMath.InclinationToAngle((lookAheadPos.Altitude - currentAltitude) / lookaheadMidShift); - return lookAheadPos.RoadGradient; - } - - - - - - public struct HistoryEntry - { - public Second dt; - public MeterPerSecond AvgSpeed; - public Watt AvgCardanPower; - } - - [DebuggerDisplay("dt: {dt}, acc: {Acceleration}")] - public struct AccelerationEntry - { - public Second dt; - public MeterPerSquareSecond Acceleration; - - public override string ToString() - { - return string.Format("dt: {0} acc: {1}", dt, Acceleration); - } - } - - - private class NextGearState - { - public Second AbsTime; - public bool Disengaged; - public uint Gear; - public bool TorqueConverterLocked; - - public NextGearState() { } - - private NextGearState(NextGearState nextGearState) - { - AbsTime = nextGearState.AbsTime; - Disengaged = nextGearState.Disengaged; - Gear = nextGearState.Gear; - TorqueConverterLocked = nextGearState.TorqueConverterLocked; - } - - public NextGearState(Second absTime, ATGearbox gearbox) - { - SetState(absTime, gearbox); - } - - public void SetState(Second absTime, bool disengaged, uint gear, bool tcLocked) - { - AbsTime = absTime; - Disengaged = disengaged; - Gear = gear; - TorqueConverterLocked = tcLocked; - } - - public void SetState(NextGearState state) - { - AbsTime = state.AbsTime; - Disengaged = state.Disengaged; - Gear = state.Gear; - TorqueConverterLocked = state.TorqueConverterLocked; - } - - public void SetState(Second absTime, ATGearbox gearbox) - { - AbsTime = absTime; - Disengaged = gearbox.Disengaged; - Gear = gearbox.Gear; - TorqueConverterLocked = gearbox.TCLocked; - } - - public NextGearState Clone() - { - return new NextGearState(this); - } - - internal void SetState(GearshiftPosition gearshiftPosition, Second absTime) - { - AbsTime = absTime; - Disengaged = false; - Gear = gearshiftPosition.Gear; - TorqueConverterLocked = gearshiftPosition.TorqueConverterLocked.Value; - } - } - } -} diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineSpeedDriveOffPreprocessor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineSpeedDriveOffPreprocessor.cs deleted file mode 100644 index 18599681ac007ff5e232cfc26996fff18442c4b5..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineSpeedDriveOffPreprocessor.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - public class EngineSpeedDriveOffPreprocessor : ISimulationPreprocessor - { - protected VectoRunData Data; - protected SimplePowertrainContainer Container; - protected Dictionary<uint, PerSecond> engineSpeeds; - - public EngineSpeedDriveOffPreprocessor(Dictionary<uint, PerSecond> engineSpeedAtDriveOff, VectoRunData runData, SimplePowertrainContainer testContainer) - { - Data = runData; - Container = testContainer; - engineSpeeds = engineSpeedAtDriveOff; - } - - #region Implementation of ISimulationPreprocessor - - public void RunPreprocessing() - { - var vehicle = Container.VehicleInfo as Vehicle; - - if (vehicle == null) { - throw new VectoException("no vehicle found..."); - } - - var gearbox = Container.GearboxInfo as Gearbox; - if (gearbox == null) { - throw new VectoException("no gearbox found..."); - } - - // issue a initialize and request call in order to avoid a slipping clutch when looping over all gears - gearbox.Disengaged = false; - gearbox.Gear = 1; - vehicle.Initialize(Data.GearshiftParameters.StartVelocity, VectoMath.InclinationToAngle(0)); - vehicle.Request(0.SI<Second>(), 0.5.SI<Second>(), 0.SI<MeterPerSquareSecond>(), 0.SI<Radian>()); - foreach (var gearData in Data.GearboxData.Gears) { - gearbox.Gear = gearData.Key; - gearbox.Disengaged = false; - var response = vehicle.Initialize(Data.GearshiftParameters.StartVelocity, VectoMath.InclinationToAngle(0)); - engineSpeeds[gearData.Key] = response.Engine.EngineSpeed; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxCardanTorquePreprocessor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxCardanTorquePreprocessor.cs deleted file mode 100644 index 0c5b2ec46f74314a32d5a456f5b7d80c9b52fd10..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxCardanTorquePreprocessor.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System.Collections.Generic; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Models.Connector.Ports.Impl; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - public class MaxCardanTorquePreprocessor : ISimulationPreprocessor - { - protected readonly MaxCardanTorqueLookup MaxCardanTorqueLookup; - protected readonly VectoRunData Data; - protected readonly SimplePowertrainContainer TestContainer; - - public MaxCardanTorquePreprocessor(MaxCardanTorqueLookup maxCardanTorqueLookup, VectoRunData data, SimplePowertrainContainer testContainer) - { - MaxCardanTorqueLookup = maxCardanTorqueLookup; - Data = data; - TestContainer = testContainer; - } - - #region Implementation of ISimulationPreprocessor - - public void RunPreprocessing() - { - var retVal = new Dictionary<uint, List<KeyValuePair<PerSecond, NewtonMeter>>>(Data.GearboxData.Gears.Count); - - var testContainerGbx = TestContainer.GearboxCtl as Gearbox; - if (testContainerGbx == null) { - throw new VectoException("Unknown gearboxtype: {0}", TestContainer.GearboxCtl.GetType().FullName); - } - - testContainerGbx.Gear = 1; - var init = TestContainer.VehiclePort.Initialize(Data.GearshiftParameters.StartVelocity, 0.SI<Radian>()); - var powertrainRatioWOGearbox = (Data.GearshiftParameters.StartVelocity / init.Engine.EngineSpeed * Data.GearboxData.Gears[1].Ratio).Cast<Meter>(); - - var engineSpeedSteps = (Data.EngineData.FullLoadCurves[0].N95hSpeed - Data.EngineData.IdleSpeed) / 100; - - foreach (var gearData in Data.GearboxData.Gears) { - retVal[gearData.Key] = new List<KeyValuePair<PerSecond, NewtonMeter>>(); - testContainerGbx.Gear = gearData.Key; - for (var engineSpeed = Data.EngineData.IdleSpeed; - engineSpeed < Data.EngineData.FullLoadCurves[0].N95hSpeed; - engineSpeed += engineSpeedSteps) { - - var maxTorque = Data.EngineData.FullLoadCurves[gearData.Key].FullLoadStationaryTorque(engineSpeed); - var vehicleSpeed = engineSpeed * powertrainRatioWOGearbox / gearData.Value.Ratio; - - var grad = VectoMath.InclinationToAngle(1); - var max = TestContainer.VehiclePort.Initialize(vehicleSpeed, grad); - if ((max.Engine.TotalTorqueDemand - maxTorque).IsGreater(0)) { - - var first = TestContainer.VehiclePort.Initialize(vehicleSpeed, 0.SI<Radian>()); - var delta = first.Engine.TotalTorqueDemand - maxTorque; - grad = SearchAlgorithm.Search( - 0.SI<Radian>(), delta, 0.1.SI<Radian>(), - getYValue: r => { - return ((r as AbstractResponse).Engine.TotalTorqueDemand - maxTorque); - }, - evaluateFunction: g => { - return TestContainer.VehiclePort.Initialize(vehicleSpeed, g); - }, - criterion: r => { - return ((r as AbstractResponse).Engine.TotalTorqueDemand - maxTorque).Value() / 1e5; - } - ); - max = TestContainer.VehiclePort.Initialize(vehicleSpeed, grad); - } - retVal[gearData.Key].Add(new KeyValuePair<PerSecond, NewtonMeter>(max.Engine.EngineSpeed, max.Axlegear.CardanTorque)); - } - } - - MaxCardanTorqueLookup.Data = retVal; - } - - #endregion - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxGradabilityPreprocessor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxGradabilityPreprocessor.cs deleted file mode 100644 index ed40c84ee4968a2f8354acb69ca48da97b59fcf6..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/MaxGradabilityPreprocessor.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.Collections.Generic; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Models.Connector.Ports.Impl; -using TUGraz.VectoCore.Models.Simulation; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { - public class MaxGradabilityPreprocessor : ISimulationPreprocessor - { - protected readonly MaxGradabilityLookup GradabilityLookup; - protected readonly VectoRunData ModelData; - protected SimplePowertrainContainer Container; - - public MaxGradabilityPreprocessor(MaxGradabilityLookup maxGradability, VectoRunData modelData, SimplePowertrainContainer simpleContainer) - { - GradabilityLookup = maxGradability; - ModelData = modelData; - - Container = simpleContainer; - } - - - #region Implementation of ISimulationPreprocessor - - public void RunPreprocessing() - { - GradabilityLookup.Data = SearchMaxRoadGradient(); - } - - private Dictionary<uint, Tuple<Radian, Radian>> SearchMaxRoadGradient() - { - var vehicle = Container?.VehicleInfo as Vehicle; - if (vehicle == null) { - throw new VectoException("no vehicle found..."); - } - - var gearbox = Container.GearboxInfo as Gearbox; - if (gearbox == null) { - throw new VectoException("no gearbox found..."); - } - - //var driver = container.Driver as Driver; - //if (driver == null) { - // throw new VectoException("no driver found..."); - //} - //driver.DriverBehavior = DrivingBehavior.Driving; - - gearbox.Disengaged = false; - var retVal = new Dictionary<uint, Tuple<Radian, Radian>>(); - foreach (var gearData in ModelData.GearboxData.Gears) { - var engineSpeed = ModelData.EngineData.FullLoadCurves[0].NTq99lSpeed; - var vehicleSpeed = CalcVehicleSpeed(engineSpeed, gearData); - gearbox.Gear = gearData.Key; - var gradMaxTorque = SearchGradient(vehicle, vehicleSpeed, ModelData.EngineData.FullLoadCurves[0].MaxTorque * 0.99); - - engineSpeed = (ModelData.EngineData.FullLoadCurves[0].NTq99lSpeed + - ModelData.EngineData.FullLoadCurves[0].NTq99hSpeed) / 2.0; - vehicleSpeed = CalcVehicleSpeed(engineSpeed, gearData); - var torqueFactor = ModelData.GearshiftParameters.ShareTorque99L.Lookup(vehicleSpeed); - var gradRedTorque = SearchGradient(vehicle, vehicleSpeed, ModelData.EngineData.FullLoadCurves[0].FullLoadStationaryTorque(engineSpeed) * torqueFactor); - - retVal.Add(gearData.Key, Tuple.Create(gradMaxTorque, gradRedTorque)); - } - - return retVal; - } - - private Radian SearchGradient(Vehicle vehicle, MeterPerSecond vehicleSpeed, NewtonMeter maxTorque) - { - var gradientMax = VectoMath.InclinationToAngle(1); - var responseMax = vehicle.Initialize(vehicleSpeed, gradientMax); - var deltaMax = responseMax.Engine.PowerRequest / responseMax.Engine.EngineSpeed - maxTorque; - if (deltaMax.IsSmaller(0)) { - return gradientMax; - } - - var gradient = VectoMath.InclinationToAngle(0); - var response = vehicle.Initialize(vehicleSpeed, gradient); - - var delta = response.Engine.PowerRequest / response.Engine.EngineSpeed - maxTorque; - gradient = SearchAlgorithm.Search( - gradient, delta, VectoMath.InclinationToAngle(1), - getYValue: r => { - var rs = r as ResponseSuccess; - if (rs != null) { - return rs.Engine.PowerRequest / rs.Engine.EngineSpeed - maxTorque; - } - - return 0.SI<NewtonMeter>(); - }, - evaluateFunction: g => { - return vehicle.Initialize(vehicleSpeed, g); - }, - criterion: r => { - var rs = r as ResponseSuccess; - if (rs != null) { - return (rs.Engine.PowerRequest / rs.Engine.EngineSpeed - maxTorque).Value(); - } - return 0; - } - - ); - - return gradient; - } - - private MeterPerSecond CalcVehicleSpeed(PerSecond engineSpeed, KeyValuePair<uint, GearData> gearData) - { - return engineSpeed / gearData.Value.Ratio / ModelData.AxleGearData.AxleGear.Ratio / - (ModelData.AngledriveData?.Angledrive.Ratio ?? 1.0) * ModelData.VehicleData.DynamicTyreRadius; - } - - #endregion - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 7290975c8f5901800a5d5a3e8eb489f4a718be7d..05bbec9c661e1ea8c659d30ab8ba86691b097480 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -1,117 +1,11 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>TUGraz.VectoCore</RootNamespace> <AssemblyName>VectoCore</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <CodeContractsAssemblyMode>1</CodeContractsAssemblyMode> - <NuGetPackageImportStamp>5f3566e7</NuGetPackageImportStamp> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> - <CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode> - <CodeContractsEnableRuntimeChecking>False</CodeContractsEnableRuntimeChecking> - <CodeContractsRuntimeOnlyPublicSurface>False</CodeContractsRuntimeOnlyPublicSurface> - <CodeContractsRuntimeThrowOnFailure>True</CodeContractsRuntimeThrowOnFailure> - <CodeContractsRuntimeCallSiteRequires>False</CodeContractsRuntimeCallSiteRequires> - <CodeContractsRuntimeSkipQuantifiers>False</CodeContractsRuntimeSkipQuantifiers> - <CodeContractsRunCodeAnalysis>False</CodeContractsRunCodeAnalysis> - <CodeContractsNonNullObligations>True</CodeContractsNonNullObligations> - <CodeContractsBoundsObligations>True</CodeContractsBoundsObligations> - <CodeContractsArithmeticObligations>True</CodeContractsArithmeticObligations> - <CodeContractsEnumObligations>True</CodeContractsEnumObligations> - <CodeContractsRedundantAssumptions>True</CodeContractsRedundantAssumptions> - <CodeContractsAssertsToContractsCheckBox>False</CodeContractsAssertsToContractsCheckBox> - <CodeContractsRedundantTests>True</CodeContractsRedundantTests> - <CodeContractsMissingPublicRequiresAsWarnings>True</CodeContractsMissingPublicRequiresAsWarnings> - <CodeContractsMissingPublicEnsuresAsWarnings>True</CodeContractsMissingPublicEnsuresAsWarnings> - <CodeContractsInferRequires>True</CodeContractsInferRequires> - <CodeContractsInferEnsures>True</CodeContractsInferEnsures> - <CodeContractsInferEnsuresAutoProperties>True</CodeContractsInferEnsuresAutoProperties> - <CodeContractsInferObjectInvariants>True</CodeContractsInferObjectInvariants> - <CodeContractsSuggestAssumptions>True</CodeContractsSuggestAssumptions> - <CodeContractsSuggestAssumptionsForCallees>False</CodeContractsSuggestAssumptionsForCallees> - <CodeContractsSuggestRequires>True</CodeContractsSuggestRequires> - <CodeContractsNecessaryEnsures>False</CodeContractsNecessaryEnsures> - <CodeContractsSuggestObjectInvariants>True</CodeContractsSuggestObjectInvariants> - <CodeContractsSuggestReadonly>False</CodeContractsSuggestReadonly> - <CodeContractsRunInBackground>True</CodeContractsRunInBackground> - <CodeContractsShowSquigglies>True</CodeContractsShowSquigglies> - <CodeContractsUseBaseLine>False</CodeContractsUseBaseLine> - <CodeContractsEmitXMLDocs>False</CodeContractsEmitXMLDocs> - <CodeContractsCustomRewriterAssembly /> - <CodeContractsCustomRewriterClass /> - <CodeContractsLibPaths /> - <CodeContractsExtraRewriteOptions /> - <CodeContractsExtraAnalysisOptions /> - <CodeContractsSQLServerOption /> - <CodeContractsBaseLineFile>baseline.xml</CodeContractsBaseLineFile> - <CodeContractsCacheAnalysisResults>True</CodeContractsCacheAnalysisResults> - <CodeContractsSkipAnalysisIfCannotConnectToCache>False</CodeContractsSkipAnalysisIfCannotConnectToCache> - <CodeContractsFailBuildOnWarnings>True</CodeContractsFailBuildOnWarnings> - <CodeContractsBeingOptimisticOnExternal>True</CodeContractsBeingOptimisticOnExternal> - <CodeContractsRuntimeCheckingLevel>Full</CodeContractsRuntimeCheckingLevel> - <CodeContractsReferenceAssembly>%28none%29</CodeContractsReferenceAssembly> - <CodeContractsAnalysisWarningLevel>3</CodeContractsAnalysisWarningLevel> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants> - </DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> + <ItemGroup> - <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> - <HintPath>..\..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath> - </Reference> - <Reference Include="JetBrains.Annotations, Version=2021.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL"> - <HintPath>..\..\packages\JetBrains.Annotations.2021.3.0\lib\net20\JetBrains.Annotations.dll</HintPath> - </Reference> - <Reference Include="Microsoft.VisualBasic" /> - <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> - <HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> - </Reference> - <Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL"> - <HintPath>..\..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Ninject.Extensions.Factory, Version=3.3.3.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL"> - <HintPath>..\..\packages\Ninject.Extensions.Factory.3.3.3\lib\net45\Ninject.Extensions.Factory.dll</HintPath> - </Reference> - <Reference Include="Ninject.Extensions.NamedScope, Version=3.3.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL"> - <HintPath>..\..\packages\Ninject.Extensions.NamedScope.3.3.0\lib\net45\Ninject.Extensions.NamedScope.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> - <HintPath>..\..\packages\NLog.4.7.13\lib\net45\NLog.dll</HintPath> - </Reference> - <Reference Include="Omu.ValueInjecter, Version=3.2.0.0, Culture=neutral, PublicKeyToken=5692a4ecdffbe736, processorArchitecture=MSIL"> - <HintPath>..\..\packages\ValueInjecter.3.2.0\lib\net45\Omu.ValueInjecter.dll</HintPath> - </Reference> - <Reference Include="System" /> <Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Configuration" /> @@ -122,9 +16,6 @@ <Reference Include="System.Runtime.Serialization" /> <Reference Include="System.ServiceModel" /> <Reference Include="System.Transactions" /> - <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> - <HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath> - </Reference> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms.DataVisualization" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -132,674 +23,56 @@ <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="System.Xml.Linq" /> + <Reference Include="Microsoft.VisualBasic" /> </ItemGroup> + <ItemGroup> - <Compile Include="Configuration\Constants.cs" /> - <Compile Include="InputData\FileIO\JSON\BusAuxiliaryInputData.cs" /> - <Compile Include="InputData\FileIO\JSON\IJSONVehicleComponents.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONBattery.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONBusAuxiliariesEngineeringData.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONComponentInputData.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONElectricMotor.cs" /> - <Compile Include="InputData\FileIO\JSON\JsonExtensionMethods.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONHybridStrategyParameters.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONSubComponent.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONTCUData.cs" /> - <Compile Include="InputData\FileIO\JSON\SSMInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\AbstractCommonComponentType.cs" /> - <Compile Include="InputData\FileIO\XML\Common\AbstractXMLResource.cs" /> - <Compile Include="InputData\FileIO\XML\Common\AbstractXMLType.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\v24\XMLDeclarationCompletedBusVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\v24\XMLDeclarationHeavyLorryVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\v24\XMLDeclarationMediumLorryVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\v24\XMLDeclarationPrimaryBusVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\v24\XMLDeclarationExemptedVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLAuxiliaryDeclarationDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLElectricMachinesDeclarationInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationMultistageInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationPrimaryVehicleBusApplicationInformationDataProviderV01.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationBusAuxiliariesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationADASDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAirdragDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAngledriveDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAuxiliariesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAxleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAxlegearDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationAxlesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationComponentsDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationEngineDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationGearboxDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationJobInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationPTODataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationRetarderDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationTorqueConverterDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationTyreDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLElectricMotorDeclarationInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLElectricStorageSystemDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLGearData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationPrimaryVehicleBusResultsInputDataProviderV01.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLADCDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAirdragDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAngledriveInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLApplicationInformationData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAuxiliariesDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAxleDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAxleGearInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLAxlesDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLBatteryPackDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLBusAuxiliariesDeclarationData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLElectricMachinesDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLDeclarationJobInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLElectricMotorDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLElectricStorageSystemDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLEngineDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLGearboxDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLGearData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLIEPCInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLPTOTransmissionInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLResultsInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLRetarderInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLSuperCapDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLTorqueConverterDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLTyreDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLVehicleComponentsDeclaration.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataMultistageV01InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV20InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV21InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV221InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV22InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV23InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV26InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV24InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\AbstractComponentReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLADASReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLComponentReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLDeclarationMultistageInputReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLPTOReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\IXMLADASReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\IXMLComponentReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLDeclarationInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Factory\IDeclarationInjectFactory.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Interfaces\IXMLDeclarationVehicleData.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV10InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLDeclarationInputReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLJobDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\IXMLJobDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\Reader\IXMLPTOReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\AbstractCommonComponentType.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\AbstractEngineeringXMLComponentDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\AbstractVehicleEngineeringType.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLCyclesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLDriverAcceleration.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringAirdragDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringAngledriveDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringAuxiliariesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringAxlegearDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringAxlesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringDriverDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringDriverLookAhead.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringEcoRollDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringEngineDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringEngineStopStartDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringGearboxDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringGearshiftData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringJobInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringOverspeed.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringPCCInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringRetarderDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringTorqueConverterDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringVehicleComponentsDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLEngineeringVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\DataProvider\XMLTyreEngineeringDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Factory\IEngineeringReaderInjectFactory.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAirdragData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAngledriveData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAuxiliairesData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAuxiliaryData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAxleEngineeringData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAxlegearData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLAxlesData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLCyclesDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLDriverAcceleration.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringDriverData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringEcoRollData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringGearshiftData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringJobInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringPCCInputData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringVehicleComponentsData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringVehicleData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLEngineeringEngineStopStartData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLGearboxData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLGearData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLLookaheadData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLOverspeedData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLRetarderData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLTorqueconverterData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Interfaces\IXMLTyreData.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\IXMLComponentsReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\IXMLDriverDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\IXMLEngineeringInputReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\IXMLJobDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\NinjectModules\XMLEngineeringReaderTestOverrides.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\NinjectModules\XMLEngineeringReaderV07InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\NinjectModules\XMLEngineeringReaderV10InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\Impl\AbstractExternalResourceReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\Impl\XMLComponentsEngineeringReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\Impl\XMLDriverDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\Impl\XMLEngineeringInputReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\Reader\Impl\XMLJobDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\Engineering\NinjectModules\XMLEngineeringReaderInjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\IXMLResource.cs" /> - <Compile Include="InputData\FileIO\XML\XMLInputDataFactory.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\IXMLDeclarationInputDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\IXMLInputDataReader.cs" /> - <Compile Include="InputData\FileIO\XML\XMLInputDataNinjectModule.cs" /> - <Compile Include="InputData\Reader\IVectoRunDataFactoryFactory.cs" /> - <Compile Include="InputData\Reader\ComponentData\BatteryInternalResistanceReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\BatteryMaxCurrentReader.cs" /> - <Compile Include="InputData\Reader\VectoRunDataFactoryFactory.cs" /> - <Compile Include="InputData\Reader\VectoRunDataFactoryNinjectModule.cs" /> - <Compile Include="Models\SimulationComponent\Impl\APTNGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\APTNShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\BatterySystem.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DummyAxleGearInfo.cs" /> - <Compile Include="Models\SimulationComponent\Impl\PEVGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\PTODriveAuxiliary.cs" /> - <Compile Include="Models\SimulationComponent\Impl\RoadSweeperAuxiliary.cs" /> - <Compile Include="InputData\Reader\ComponentData\ElectricMotorMapReader.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterMultistageBus.cs" /> - <Compile Include="InputData\Reader\ComponentData\MaxPropulsionTorqueReader.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterPrimaryBus.cs" /> - <Compile Include="InputData\Reader\ComponentData\ElectricFullLoadCurveReader.cs" /> - <Compile Include="InputData\Reader\Impl\AbstractDeclarationMultistageBusVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModeCompletedMultistageBusVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModeMultistageBusVectoRunDataFactory.cs" /> - <Compile Include="Models\Connector\Ports\Impl\BatteryResponse.cs" /> - <Compile Include="Models\Connector\Ports\IElectricEnergyStoragePort.cs" /> - <Compile Include="Models\SimulationComponent\Data\Battery\BatteryData.cs" /> - <Compile Include="InputData\Reader\ComponentData\BatterySOCReader.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterSingleBus.cs" /> - <Compile Include="InputData\Reader\Impl\AbstractVTPModeVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\CombinedBusAuxiliaries.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterCompletedBusSpecific.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModeCompletedBusVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationVTPModeVectoRunDataFactoryHeavyBusPrimary.cs" /> - <Compile Include="InputData\Reader\Impl\EngineeringVTPModeVectoRunDataFactoryHeavyBusPrimary.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\SimpleBattery.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\Electrics\ISimpleBattery.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\M05Impl_P0.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\SimpleAlternator.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\TechnologyBenefits.cs" /> - <Compile Include="Models\Declaration\ADASCombination.cs" /> - <Compile Include="InputData\Reader\ComponentData\AlternatorReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\CompressorMapReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\ElectricConsumerReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\EnvironmentalContidionsMapReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\SSMTechnologiesReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\ActuationsMapReader.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterCompletedBusGeneric.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\IDeclarationDataAdapter.cs" /> - <Compile Include="InputData\Reader\Impl\AbstractDeclarationVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModePrimaryBusVectoRunDataFactory.cs" /> - <Compile Include="Models\BusAuxiliaries\Actuations.cs" /> - <Compile Include="Models\BusAuxiliaries\BusAuxiliaries.cs" /> - <Compile Include="Models\BusAuxiliaries\AuxiliaryConfig.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\AbstractModule.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\AlternatorMap.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\Alternator.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\CombinedAlternator.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\CombinedAlternatorMapRow.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\ElectricalConsumer.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\ElectricalConsumerList.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\ElectricsUserInputsConfig.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\M00Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\M02Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\M05Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\M0_5Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Electrics\ResultCard.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\EnvironmentalConditionMapEntry.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\EnvironmentalConditionsMap.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\M01Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\SSMCalculate.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\SSMInputs.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\SSMRun.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\HVAC\SSMTOOL.cs" /> - <Compile Include="Models\Declaration\CompletedBusSegments.cs" /> - <Compile Include="Models\GenericModelData\GenericTorqueConverterData.cs" /> - <Compile Include="Models\GenericModelData\GenericTransmissionComponentData.cs" /> - <Compile Include="Models\GenericModelData\GenericBusEngineData.cs" /> - <Compile Include="Models\GenericModelData\GenericBusRetarderData.cs" /> - <Compile Include="Models\Declaration\SSMTechnology.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M06Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M07Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M08Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M09Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M10Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M11Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M12Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M13Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\M14Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\CompressorMap.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\M03Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\M04Impl.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\ActuationsMap.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\PneumaticsConsumersDemand.cs" /> - <Compile Include="Models\BusAuxiliaries\DownstreamModules\Impl\Pneumatics\PneumaticUserInputsConfig.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\Electrics\AltUserInput.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\Electrics\IAlternator.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\Electrics\ICombinedAlternator.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\HVAC\ISSMCalculate.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\HVAC\ISSMRun.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\HVAC\ISSMTOOL.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IAbstractModule.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM0_5_SmartAlternatorSetEfficiency.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM0_NonSmart_AlternatorsSetEfficiency.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM10.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM11.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM13.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM14.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM1_AverageHVACLoadDemand.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM2_AverageElectrialLoadDemand.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM3_AveragePneumaticLoadDemand.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM4_AirCompressor.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM5_SmartAlternatorSetGeneration.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM6.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM7.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM8.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\DownstreamModules\IM9.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\Enumerations.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\IBusAuxiliaries.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\IAuxiliaryEvent.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\IM12.cs" /> - <Compile Include="Models\BusAuxiliaries\Interfaces\Signals.cs" /> - <Compile Include="Models\BusAuxiliaries\Util\FilePathUtils.cs" /> - <Compile Include="Models\Declaration\BusAlternatorTechnologies.cs" /> - <Compile Include="Models\Declaration\PrimaryBusSegments.cs" /> - <Compile Include="Models\Declaration\HVACCoolingPower.cs" /> - <Compile Include="Models\Declaration\SteeringPumpBus.cs" /> - <Compile Include="Models\SimulationComponent\Data\ElectricMotor\DragCurve.cs" /> - <Compile Include="Models\SimulationComponent\Data\ElectricMotor\EfficiencyMap.cs" /> - <Compile Include="Models\SimulationComponent\Data\ElectricMotor\ElectricMotorFullLoadCurve.cs" /> - <Compile Include="Models\SimulationComponent\Data\ElectricMotor\ElectricMotorData.cs" /> - <Compile Include="Models\SimulationComponent\Data\VehicleMaxPropulsionTorque.cs" /> - <Compile Include="Models\SimulationComponent\Data\Engine\WHRPowerMap.cs" /> - <Compile Include="InputData\Reader\ComponentData\WHRPowerReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\HybridStrategyParameters.cs" /> - <Compile Include="Models\SimulationComponent\DCDCConverter.cs" /> - <Compile Include="Models\SimulationComponent\ElectricSystem.cs" /> - <Compile Include="Models\SimulationComponent\IElectricEnergyStorage.cs" /> - <Compile Include="Models\SimulationComponent\IElectricMotor.cs" /> - <Compile Include="Models\SimulationComponent\IElectricMotorControl.cs" /> - <Compile Include="Models\SimulationComponent\IHybridControlledGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\PEVAMTShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ShiftLineSet.cs" /> - <Compile Include="Models\Simulation\DataBus\IDCDCConverter.cs" /> - <Compile Include="Models\Simulation\DataBus\IHybridControllerInfo.cs" /> - <Compile Include="Models\SimulationComponent\IHybridControlStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Battery.cs" /> - <Compile Include="Models\SimulationComponent\Impl\BatteryElectricMotorController.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DummyGearboxInfo.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ElectricAuxiliary.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ElectricMotor.cs" /> - <Compile Include="Models\SimulationComponent\Impl\HybridController.cs" /> - <Compile Include="Models\SimulationComponent\IHybridController.cs" /> - <Compile Include="Models\SimulationComponent\Impl\SimpleHybridController.cs" /> - <Compile Include="Models\SimulationComponent\Impl\StopStartCombustionEngine.cs" /> - <Compile Include="Models\SimulationComponent\Impl\SuperCap.cs" /> - <Compile Include="Models\SimulationComponent\Strategies\DelegateParallelHybridStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Strategies\HybridStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Strategies\TestPowertrain.cs" /> - <Compile Include="Models\SimulationComponent\SwitchableClutch.cs" /> - <Compile Include="Models\Simulation\DataBus\IRESSInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IElectricMotorInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IEngineControl.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModeSingleBusVectoRunDataFactory.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ATClutchInfo.cs" /> - <Compile Include="Models\Simulation\Impl\PCCEcoRollEngineStopPreprocessor.cs" /> - <Compile Include="Models\Simulation\Impl\PCCSegmentPreprocessor.cs" /> - <Compile Include="Models\Simulation\Impl\SimulatorFactory\IFollowUpSimulatorFactoryCreator.cs" /> - <Compile Include="Models\Simulation\Impl\SimulatorFactory\SimulatorFactoryDeclaration.cs" /> - <Compile Include="Models\Simulation\Impl\SimulatorFactory\SimulatorFactoryEngineering.cs" /> - <Compile Include="Models\Simulation\ISimulationPreprocessor.cs" /> - <Compile Include="Models\Simulation\ISimulatorFactory.cs" /> - <Compile Include="Models\Simulation\ISimulatorFactoryFactory.cs" /> - <Compile Include="Models\Simulation\SimulationFactoryNinjectModule.cs" /> - <Compile Include="OutputData\FileIO\BusAuxWriter.cs" /> - <Compile Include="OutputData\FileIO\FileOutputVIFWriter.cs" /> - <Compile Include="OutputData\FileIO\JSONFileWriter.cs" /> - <Compile Include="OutputData\FileIO\TempFileOutputWriter.cs" /> - <Compile Include="OutputData\ModalDataPostprocessingCorrection.cs" /> - <Compile Include="OutputData\XML\ComponentWriter\ComponentWriter.cs" /> - <Compile Include="OutputData\XML\ComponentWriter\ComponentWriterNinjectModule.cs" /> - <Compile Include="OutputData\XML\ComponentWriter\Declaration\ADAS_Writer.cs" /> - <Compile Include="OutputData\XML\ComponentWriter\Declaration\Components_Conventional.cs" /> - <Compile Include="OutputData\XML\ComponentWriter\IComponentWriterFactory.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\IXMLCustomerReport.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\XMLCustomerReportExemptedCompletedBus.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\AbstractXMLManufacturerReport.cs" /> - <Compile Include="OutputData\XML\DeclarationJobs\XMLCompletedBusWriter.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\IXMLManufacturerReport.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportExemptedCompletedBus.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VehicleInformationFile\IXMLMultistageReport.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VehicleInformationFile\IXMLPrimaryVehicleReport.cs" /> - <Compile Include="OutputData\XML\Engineering\Factory\EngineeringWriterFactory.cs" /> - <Compile Include="OutputData\XML\Engineering\Factory\IEngineeringWriterInjectFactory.cs" /> - <Compile Include="OutputData\XML\Engineering\Interfaces\IXMLEngineeringComponentWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Interfaces\IXMLEngineeringEngineWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Interfaces\IXMLEngineeringJobWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Interfaces\IXMLEngineeringWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\NinjectModules\XMLEngineeringWriterTestOverrides.cs" /> - <Compile Include="OutputData\XML\Engineering\NinjectModules\XMLEngineeringWriterV10InjectModule.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\AbstractComponentWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\DriverData\XMLAccelerationDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\DriverData\XMLEngineeringLookaheadDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\DriverData\XMLEngineeringOverspeedDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\DriverData\XMLShiftParmeterDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringADASWriterV10.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAirdragWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAngledriveWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAuxiliariesWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAuxiliaryWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAxlegearWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAxlesWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringAxleWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringComponentsWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringDriverDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringEngineWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringGearboxWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringGearDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringJobWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringRetarderWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringTorqueconverterWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringTyreWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\Writer\XMLEngineeringVehicleDataWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\XMLEngineeringWriter.cs" /> - <Compile Include="OutputData\XML\Engineering\XMLEngineeringWriterInjectModule.cs" /> - <Compile Include="OutputData\XML\Engineering\XMLWriterMapping.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\XMLCustomerReportCompletedBus.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\IGroupWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\CompletedBus\CompletedBusDimensionsWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\CompletedBus\CompletedBusParametersWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\CompletedBus\CompletedBusGeneralParametersWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\CompletedBus\CompletedBusPassengerCountWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\Components\Auxiliaries\BusAuxElectricSystemSupplyGroupWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\Components\Auxiliaries\BusAuxElectricSystemLightsGroupWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\Components\Auxiliaries\BusAuxHVACConventionalGroupWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\Declaration\Vehicle\Components\Auxiliaries\BusAuxHVACHeatPumpWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\GroupNames.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>GroupNames.resx</DependentUpon> - </Compile> - <Compile Include="OutputData\XML\GroupWriter\GroupWriter.cs" /> - <Compile Include="OutputData\XML\GroupWriter\IGroupWriterFactory.cs" /> - <Compile Include="OutputData\XML\IXMLReportFactory.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationNamespaces.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReportCompletedVehicle.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReportFactory.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReportFactoryNinjectModule.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReportMultistageBusVehicle.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReportPrimaryVehicle.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportCompletedBus.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportExemptedTruck.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportExeptedPrimaryBus.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportPrimaryBus.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VehicleInformationFile\XMLExemptedPrimaryBusVehicleReport.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VehicleInformationFile\XMLMultistageBusReport.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VehicleInformationFile\XMLPrimaryBusVehicleReport.cs" /> - <Compile Include="OutputData\XML\GroupWriter\XMLGroupWriterNinjectModule.cs" /> - <Compile Include="Utils\Ninject\UseFirstArgumentAsInstanceProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationReaderInjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationVehicleDataProvider.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\DataProvider\XMLDeclarationInputDataProvider.cs" /> - <Compile Include="InputData\FileIO\XMLReports\XMLManufacturerReportReader.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONEngineData.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONGearboxData.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONInputData.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONInputDataFactory.cs" /> - <Compile Include="InputData\FileIO\JSON\JSONVehicleData.cs" /> - <Compile Include="InputData\Impl\InputData.cs" /> - <Compile Include="InputData\IVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\ComponentData\AccelerationCurveReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\CrossWindCorrectionCurveReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\PTOIdleLossMapReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\RetarderLossMapReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\TorqueConverterDataReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\TransmissionLossMapReader.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\AbstractSimulationDataAdapter.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\DeclarationDataAdapterHeavyLorry.cs" /> - <Compile Include="InputData\Reader\DataObjectAdapter\EngineeringDataAdapter.cs" /> - <Compile Include="InputData\Reader\ComponentData\DrivingCycleDataReader.cs" /> - <Compile Include="InputData\Reader\ComponentData\FullLoadCurveReader.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationModeHeavyLorryVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\DeclarationVTPModeVectoRunDataFactoryLorries.cs" /> - <Compile Include="InputData\Reader\Impl\DrivingCycleProxy.cs" /> - <Compile Include="InputData\Reader\Impl\EngineeringModeVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\Impl\EngineOnlyVectoRunDataFactory.cs" /> - <Compile Include="InputData\Reader\ComponentData\ShiftPolygonReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\ShiftStrategyInterfaces.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\ShareTorque99lLookup.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\ShareTorque99lLookupReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\AccelerationReserveLookup.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\AccelerationReserveLookupReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\EngineSpeedHighFactorLookup.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\EngineSpeedHighLookupReader.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\LookupDataReader.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\PredictionDurationLookupReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\ShareIdleLowLookup.cs" /> - <Compile Include="InputData\Reader\ShiftStrategy\ShareIdleLowReader.cs" /> - <Compile Include="Models\Declaration\AuxDemandEntry.cs" /> - <Compile Include="Models\Declaration\AuxiliaryTypeHelper.cs" /> - <Compile Include="Models\Connector\Ports\IDriverDemandPort.cs" /> - <Compile Include="Models\Connector\Ports\IDrivingCyclePort.cs" /> - <Compile Include="Models\Connector\Ports\Impl\Response.cs" /> - <Compile Include="Models\Connector\Ports\IFvPort.cs" /> - <Compile Include="Models\Connector\Ports\ITnPort.cs" /> - <Compile Include="Models\Declaration\FuelData.cs" /> - <Compile Include="Models\Declaration\PTOTransmission.cs" /> - <Compile Include="Models\Declaration\IDeclarationAuxiliaryTable.cs" /> - <Compile Include="Models\Declaration\TyreClass.cs" /> - <Compile Include="Models\Declaration\WeightingFactors.cs" /> - <Compile Include="Models\Declaration\WeightingGroups.cs" /> - <Compile Include="Models\SimulationComponent\Data\AngledriveData.cs" /> - <Compile Include="InputData\Reader\ComponentData\FuelConsumptionMapReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\PTOData.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\PredictionDurationLookup.cs" /> - <Compile Include="Models\SimulationComponent\ILossMap.cs" /> - <Compile Include="Models\SimulationComponent\Data\PTOLossMap.cs" /> - <Compile Include="Models\SimulationComponent\Impl\AbstractGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\AMTShiftStrategyOptimized.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ATGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ATShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Data\ShiftStrategy\AverageAccelerationTorqueLookup.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ATShiftStrategyOptimized.cs" /> - <Compile Include="Models\SimulationComponent\Impl\AverageAccelerationTorquePreprocessor.cs" /> - <Compile Include="Models\SimulationComponent\Impl\BaseShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\CycleTorqueConverter.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DrivingCycleEnumerator.cs" /> - <Compile Include="Models\SimulationComponent\Impl\EngineFanAuxiliary.cs" /> - <Compile Include="Models\SimulationComponent\Impl\GearRating.cs" /> - <Compile Include="Utils\Ninject\UseFirstTwoArgumentsAsInstanceProvider.cs" /> - <Compile Include="Utils\PathHelper.cs" /> - <Compile Include="Utils\SchmittTrigger.cs" /> - <Compile Include="Models\SimulationComponent\Impl\SimplePowertrainContainer.cs" /> - <Compile Include="Models\SimulationComponent\Impl\TorqueConverterWrapper.cs" /> - <Compile Include="Models\SimulationComponent\Impl\VelocityRollingLookup.cs" /> - <Compile Include="Models\SimulationComponent\Impl\VelocitySpeedGearshiftPreprocessor.cs" /> - <Compile Include="Models\SimulationComponent\Impl\VTPCombustionEngine.cs" /> - <Compile Include="Models\SimulationComponent\Impl\MeasuredSpeedDrivingCycle.cs" /> - <Compile Include="Models\SimulationComponent\Impl\PTOCycleController.cs" /> - <Compile Include="Models\SimulationComponent\Impl\PWheelCycle.cs" /> - <Compile Include="Models\SimulationComponent\Impl\TorqueConverter.cs" /> - <Compile Include="Models\SimulationComponent\Impl\IdleControllerSwitcher.cs" /> - <Compile Include="Models\SimulationComponent\Impl\VTPGearbox.cs" /> - <Compile Include="Models\Simulation\Data\ModalResultField.cs" /> - <Compile Include="InputData\Reader\Impl\EngineeringVTPModeVectoRunDataFactoryLorries.cs" /> - <Compile Include="Models\SimulationComponent\Impl\VTPCycle.cs" /> - <Compile Include="Models\Simulation\Data\ShiftStrategyParameters.cs" /> - <Compile Include="Models\Simulation\Impl\ExemptedRun.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\VTPReport\XMLVTPReport.cs" /> - <Compile Include="OutputData\VTPReport.cs" /> - <Compile Include="OutputData\ModFilter\ActualModalDataFilter.cs" /> - <Compile Include="OutputData\ModFilter\ModalData1HzFilter.cs" /> - <Compile Include="OutputData\XML\AbstractXMLWriter.cs" /> - <Compile Include="OutputData\XML\AttributeMappings.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\XMLCustomerReport.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationReport.cs" /> - <Compile Include="OutputData\XML\XMLDeclarationWriter.cs" /> - <Compile Include="OutputData\XML\DeclarationReports\ManufacturerReport\XMLManufacturerReportTruck.cs" /> - <Compile Include="Utils\Interpolate2D.cs" /> - <Compile Include="Utils\DataIntegrityHelper.cs" /> - <Compile Include="Utils\MeanShiftClustering.cs" /> - <Compile Include="Utils\ProviderExtensions.cs" /> - <Compile Include="Models\Declaration\AirDrag.cs" /> - <Compile Include="Models\Declaration\Fan.cs" /> - <Compile Include="Models\Declaration\HVAC.cs" /> - <Compile Include="Models\Declaration\LACDecisionFactor.cs" /> - <Compile Include="Models\Declaration\Payloads.cs" /> - <Compile Include="Models\Declaration\PneumaticSystem.cs" /> - <Compile Include="Models\Declaration\PT1.cs" /> - <Compile Include="Models\Declaration\TruckSegments.cs" /> - <Compile Include="Models\Declaration\StandardBodies.cs" /> - <Compile Include="Models\Declaration\SteeringPump.cs" /> - <Compile Include="Models\Declaration\Wheels.cs" /> - <Compile Include="Models\Declaration\WHTCCorrection.cs" /> - <Compile Include="Models\SimulationComponent\Data\CrosswindCorrectionCdxALookup.cs" /> - <Compile Include="Models\SimulationComponent\Data\AuxSupplyPowerReader.cs" /> - <Compile Include="Models\SimulationComponent\Data\AxleGearData.cs" /> - <Compile Include="Models\SimulationComponent\Data\CycleData.cs" /> - <Compile Include="Models\SimulationComponent\Data\AccelerationCurve.cs" /> - <Compile Include="Models\Declaration\DeclarationData.cs" /> - <Compile Include="Models\Declaration\ElectricSystem.cs" /> - <Compile Include="Models\Declaration\LookupData.cs" /> - <Compile Include="Models\Declaration\Mission.cs" /> - <Compile Include="Models\Declaration\MissionType.cs" /> - <Compile Include="Models\SimulationComponent\Data\DriverData.cs" /> - <Compile Include="Models\SimulationComponent\Data\ICrossWindCorrection.cs" /> - <Compile Include="Models\SimulationComponent\Data\CrosswindCorrectionVAirBeta.cs" /> - <Compile Include="Models\SimulationComponent\IAxlegear.cs" /> - <Compile Include="Models\SimulationComponent\IBrakes.cs" /> - <Compile Include="Models\SimulationComponent\IIdleController.cs" /> - <Compile Include="Models\SimulationComponent\IDriverActions.cs" /> - <Compile Include="Models\SimulationComponent\IDriverStrategy.cs" /> - <Compile Include="Models\SimulationComponent\IDrivingCycleInfo.cs" /> - <Compile Include="Models\SimulationComponent\IAuxPort.cs" /> - <Compile Include="Models\SimulationComponent\Impl\AMTShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Angledrive.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Brakes.cs" /> - <Compile Include="Models\SimulationComponent\Impl\BusAuxiliariesAdapter.cs" /> - <Compile Include="Models\SimulationComponent\Impl\CycleGearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DefaultDriverStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DummyRetarder.cs" /> - <Compile Include="Models\SimulationComponent\Impl\EngineAuxiliary.cs" /> - <Compile Include="Models\SimulationComponent\Impl\EngineOnlyCombustionEngine.cs" /> - <Compile Include="Models\SimulationComponent\Impl\MTShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\TransmissionComponent.cs" /> - <Compile Include="Models\SimulationComponent\IShiftStrategy.cs" /> - <Compile Include="Models\SimulationComponent\Impl\ShiftStrategy.cs" /> - <Compile Include="Models\Simulation\DataBus\IAxlegearInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IClutchInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IDriverInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IWheelsInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IMileageCounter.cs" /> - <Compile Include="Utils\DebugData.cs" /> - <Compile Include="Models\Simulation\Impl\DistanceRun.cs" /> - <Compile Include="Models\Simulation\Impl\PowertrainBuilder.cs" /> - <Compile Include="Models\Simulation\Impl\TimeRun.cs" /> - <Compile Include="OutputData\DeclarationReport.cs" /> - <Compile Include="OutputData\FileIO\FileOutputWriter.cs" /> - <Compile Include="OutputData\IModalDataContainer.cs" /> - <Compile Include="OutputData\IDataWriter.cs" /> - <Compile Include="OutputData\ModalDataContainer.cs" /> - <Compile Include="OutputData\SummaryDataContainer.cs" /> - <Compile Include="JsonKeys.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>JsonKeys.resx</DependentUpon> - </Compile> - <Compile Include="Utils\DataTableExtensionMethods.cs" /> - <Compile Include="Utils\DateTimeFallbackDeserializer.cs" /> - <Compile Include="Utils\DictionaryExtensionMethods.cs" /> - <Compile Include="Utils\IterationStatistics.cs" /> - <Compile Include="Utils\RessourceHelper.cs" /> - <Compile Include="Models\Declaration\Segment.cs" /> - <Compile Include="Models\Declaration\Axle.cs" /> - <Compile Include="Models\SimulationComponent\Data\CombustionEngineData.cs" /> - <Compile Include="Models\SimulationComponent\Data\DrivingCycleData.cs" /> - <Compile Include="Models\SimulationComponent\Data\Engine\FuelConsumptionMap.cs" /> - <Compile Include="Models\SimulationComponent\Data\Engine\EngineFullLoadCurve.cs" /> - <Compile Include="Models\SimulationComponent\Data\GearboxData.cs" /> - <Compile Include="Models\SimulationComponent\Data\Gearbox\GearData.cs" /> - <Compile Include="Models\SimulationComponent\Data\Gearbox\TransmissionLossMap.cs" /> - <Compile Include="Models\SimulationComponent\Data\Gearbox\ShiftPolygon.cs" /> - <Compile Include="Models\SimulationComponent\Data\Gearbox\TorqueConverterData.cs" /> - <Compile Include="Models\SimulationComponent\Data\RetarderData.cs" /> - <Compile Include="Models\SimulationComponent\Data\RetarderLossMap.cs" /> - <Compile Include="Models\SimulationComponent\Data\VehicleData.cs" /> - <Compile Include="Models\SimulationComponent\IClutch.cs" /> - <Compile Include="Models\SimulationComponent\IDrivingCycle.cs" /> - <Compile Include="Models\SimulationComponent\IDriver.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Vehicle.cs" /> - <Compile Include="Models\SimulationComponent\IVehicle.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Clutch.cs" /> - <Compile Include="Models\SimulationComponent\Impl\AxleGear.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Retarder.cs" /> - <Compile Include="Models\SimulationComponent\IPowerTrainComponent.cs" /> - <Compile Include="Models\Simulation\Data\VectoRunData.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Driver.cs" /> - <Compile Include="Utils\Formulas.cs" /> - <Compile Include="Utils\Physics.cs" /> - <Compile Include="Utils\SearchAlgorithm.cs" /> - <Compile Include="Models\SimulationComponent\Data\SimulationComponentData.cs" /> - <Compile Include="Models\SimulationComponent\ICombustionEngine.cs" /> - <Compile Include="Models\SimulationComponent\IGearbox.cs" /> - <Compile Include="Models\Connector\Ports\ISimulationPort.cs" /> - <Compile Include="Models\SimulationComponent\Impl\DistanceBasedDrivingCycle.cs" /> - <Compile Include="Models\SimulationComponent\Impl\CombustionEngine.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Gearbox.cs" /> - <Compile Include="Models\SimulationComponent\Impl\Wheels.cs" /> - <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" /> - <Compile Include="Models\Simulation\IVectoRun.cs" /> - <Compile Include="Models\Simulation\Impl\SimulatorFactory\SimulatorFactory.cs" /> - <Compile Include="Models\Simulation\Impl\VectoRun.cs" /> - <Compile Include="Models\Simulation\Impl\JobContainer.cs" /> - <Compile Include="Models\Simulation\Impl\VehicleContainer.cs" /> - <Compile Include="Models\Simulation\DataBus\IDataBus.cs" /> - <Compile Include="Models\Simulation\DataBus\IEngineInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IGearboxInfo.cs" /> - <Compile Include="Models\Simulation\DataBus\IVehicleInfo.cs" /> - <Compile Include="Models\Simulation\IVehicleContainer.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="OutputData\FileIO\ShiftPolygonExport.cs" /> - <Compile Include="Utils\VectoCSVFile.cs" /> - <Compile Include="Utils\DelaunayMap.cs" /> - <Compile Include="Utils\VectoVersionCore.cs" /> - <Compile Include="Utils\XAttributeEqualityComparer.cs" /> - <Compile Include="Utils\XMLDefinitions.cs" /> - <Compile Include="Utils\XMLHelper.cs" /> - <Compile Include="Utils\XmlResourceResolver.cs" /> - <Compile Include="Utils\XMLValidator.cs" /> - <Compile Include="Utils\XPathHelper.cs" /> - <Compile Include="Ninject\VectoNinjectModule.cs" /> + <PackageReference Include="Castle.Core" Version="4.4.1" /> + <PackageReference Include="JetBrains.Annotations" Version="2021.3.0" /> + <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> + <PackageReference Include="Ninject" Version="3.3.4" /> + <PackageReference Include="Ninject.Extensions.Factory" Version="3.3.3" /> + <PackageReference Include="Ninject.Extensions.NamedScope" Version="3.3.0" /> + <PackageReference Include="NLog" Version="4.7.13" /> + <PackageReference Include="System.ValueTuple" Version="4.5.0" /> + <PackageReference Include="ValueInjecter" Version="3.2.0" /> </ItemGroup> + + + + <ItemGroup> - <None Include="OutputData\FileIO\FileWriter.cd" /> - <EmbeddedResource Include="JsonKeys.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>JsonKeys.Designer.cs</LastGenOutput> + <ProjectReference Include="..\..\VectoCommon\VectoCommon\VectoCommon.csproj" /> + <ProjectReference Include="..\..\VectoCommon\VectoHashing\VectoHashing.csproj" /> + </ItemGroup> + + + + + + <ItemGroup> + <EmbeddedResource Include="Resources\XSD\ParameterDocumentation.xsd"> + <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\XSD\VectoEngineeringDefinitions.0.6.xsd"> <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> - <EmbeddedResource Include="OutputData\XML\GroupWriter\GroupNames.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>GroupNames.Designer.cs</LastGenOutput> + <EmbeddedResource Include="Resources\XSD\VectoEngineeringDefinitions.0.7.xsd"> <SubType>Designer</SubType> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> + <EmbeddedResource Include="Resources\XSD\VectoOutputManufacturer.xsd"> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Resources\XSD\xmldsig-core-schema.xsd"> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + + <ItemGroup> + <EmbeddedResource Include="Resources\Declaration\Wheels.csv" /> <EmbeddedResource Include="Resources\Declaration\SegmentTable.csv" /> <EmbeddedResource Include="Resources\Declaration\MissionCycles\HeavyUrban.vdri" /> @@ -832,27 +105,17 @@ <EmbeddedResource Include="Resources\Declaration\Payloads.csv" /> <EmbeddedResource Include="Resources\Declaration\VAUX\SP-Axles.csv" /> <EmbeddedResource Include="Resources\Declaration\VAUX\PTO-tech.csv" /> - <EmbeddedResource Include="Resources\XSD\ParameterDocumentation.xsd"> - <SubType>Designer</SubType> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\XSD\VectoEngineeringDefinitions.0.6.xsd"> - <SubType>Designer</SubType> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\XSD\VectoEngineeringDefinitions.0.7.xsd"> - <SubType>Designer</SubType> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\XSD\VectoOutputManufacturer.xsd"> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="Resources\XSD\xmldsig-core-schema.xsd"> - <SubType>Designer</SubType> - </EmbeddedResource> <EmbeddedResource Include="Resources\Declaration\MissionCycles\MunicipalUtility_PTO_generic.vptoc" /> <EmbeddedResource Include="Resources\Declaration\MissionCycles\MunicipalUtility_PTO_generic.vptol" /> <EmbeddedResource Include="Resources\Declaration\FuelTypes.csv" /> + <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\PredictionTimeLookup.csv" /> + <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\AccelerationReserveLookup.csv" /> + <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareEngineSpeedHigh.csv" /> + <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareIdleLow.csv" /> + <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareTq99L.csv" /> + <EmbeddedResource Include="Resources\Declaration\CO2Standards\MissionProfileWeights.csv" /> + <EmbeddedResource Include="Resources\Declaration\CO2Standards\WeightingGroups.csv" /> + <EmbeddedResource Include="Resources\Declaration\TyreLabeling.csv" /> <EmbeddedResource Include="Resources\XSD\VectoDeclarationDefinitions.1.0.xsd"> <SubType>Designer</SubType> </EmbeddedResource> @@ -883,20 +146,12 @@ <EmbeddedResource Include="Resources\XSD\VectoOutputManufacturer.0.6.xsd"> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\PredictionTimeLookup.csv" /> - <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\AccelerationReserveLookup.csv" /> - <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareEngineSpeedHigh.csv" /> - <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareIdleLow.csv" /> - <EmbeddedResource Include="Resources\Declaration\GearshiftParameters\ShareTq99L.csv" /> <EmbeddedResource Include="Resources\XSD\VectoOutputManufacturer.0.7.xsd"> <SubType>Designer</SubType> </EmbeddedResource> <EmbeddedResource Include="Resources\XSD\VectoOutputCustomer.0.7.xsd"> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Resources\Declaration\CO2Standards\MissionProfileWeights.csv" /> - <EmbeddedResource Include="Resources\Declaration\CO2Standards\WeightingGroups.csv" /> - <EmbeddedResource Include="Resources\Declaration\TyreLabeling.csv" /> <EmbeddedResource Include="Resources\XSD\VectoMonitoring.0.7.xsd"> <SubType>Designer</SubType> </EmbeddedResource> @@ -1024,6 +279,8 @@ <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> + + <ItemGroup> <EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" /> <EmbeddedResource Include="Resources\Declaration\Report\4x2rt.png" /> @@ -1033,31 +290,5 @@ <EmbeddedResource Include="Resources\Declaration\Report\6x2tt.png" /> <EmbeddedResource Include="Resources\Declaration\Report\Undef.png" /> </ItemGroup> - <ItemGroup> - <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\VectoCommon\VectoCommon\VectoCommon.csproj"> - <Project>{79a066ad-69a9-4223-90f6-6ed5d2d084f4}</Project> - <Name>VectoCommon</Name> - </ProjectReference> - <ProjectReference Include="..\..\VectoCommon\VectoHashing\VectoHashing.csproj"> - <Project>{b673e12f-d323-4c4c-8805-9915b2c72d3d}</Project> - <Name>VectoHashing</Name> - </ProjectReference> - </ItemGroup> - <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"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <Import Project="$(SolutionDir)Build\TextPreProcessing.targets" /> - <PropertyGroup Condition="'$(SolutionDir)' == '' or '$(SolutionDir)' == '*undefined*'"> - <SolutionDir>..\..\</SolutionDir> - </PropertyGroup> - <Import Project="$(SolutionDir)Build\CommonSettings.targets" /> + </Project> \ No newline at end of file