diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs deleted file mode 100644 index ac348d3c4682e61697ffab4f1aa04c5d3b15be50..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2016 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 TUGraz.VectoCore.Models.Simulation.Data; - -namespace TUGraz.VectoCore.InputData.Reader.Impl -{ - public abstract class AbstractVectoRunDataFactory : IVectoRunDataFactory - { - public abstract IEnumerable<VectoRunData> NextRun(); - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs index a86221ca2d5d55dcedd6677890cec86f6bc3fb16..8b46f81891aeaebfda5070c47525b859cdbde03d 100644 --- a/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs +++ b/VectoCore/VectoCore/Models/Connector/Ports/Impl/Response.cs @@ -85,9 +85,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl /// </summary> public class ResponseOverload : AbstractResponse { - public ResponseOverload() {} public Watt Delta { get; set; } - public double Gradient { get; set; } } /// <summary> @@ -95,10 +93,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl /// </summary> public class ResponseUnderload : AbstractResponse { - public ResponseUnderload() {} - public Watt Delta { get; set; } - public double Gradient { get; set; } } /// <summary> @@ -127,11 +122,11 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl } internal class ResponseGearShift : AbstractResponse - { - public ResponseGearShift() {} - } + {} +/* internal class ResponseEngineSpeedTooLow : ResponseDryRun {} +*/ internal class ResponseEngineSpeedTooHigh : AbstractResponse { diff --git a/VectoCore/VectoCore/Models/Declaration/FuelData.cs b/VectoCore/VectoCore/Models/Declaration/FuelData.cs index 5496d4d55c046b81735c06ced836514af6c18c07..14fe60f51f3d945e7b3548ab4b9bfcf6b890738c 100644 --- a/VectoCore/VectoCore/Models/Declaration/FuelData.cs +++ b/VectoCore/VectoCore/Models/Declaration/FuelData.cs @@ -47,7 +47,7 @@ namespace TUGraz.VectoCore.Models.Declaration return _instance ?? (_instance = new FuelData()); } - private FuelData() : base() {} + private FuelData() {} protected override string ResourceId { diff --git a/VectoCore/VectoCore/Models/Declaration/Mission.cs b/VectoCore/VectoCore/Models/Declaration/Mission.cs index 06b7a485dd12bcf9c4edc7d4b79ca229a79187e0..d8bee12f5012ffe31e68e02bf6f90a04acb7fb52 100644 --- a/VectoCore/VectoCore/Models/Declaration/Mission.cs +++ b/VectoCore/VectoCore/Models/Declaration/Mission.cs @@ -44,25 +44,6 @@ namespace TUGraz.VectoCore.Models.Declaration EmptyLoading, } - public static class LoadingTypeHelper - { - public static string GetShortName(this LoadingType loadingType) - { - switch (loadingType) { - case LoadingType.FullLoading: - return "F"; - case LoadingType.ReferenceLoad: - return "R"; - case LoadingType.LowLoading: - return "L"; - case LoadingType.EmptyLoading: - return "E"; - default: - throw new ArgumentOutOfRangeException("loadingType", loadingType, null); - } - } - } - public class Mission { public MissionType MissionType; diff --git a/VectoCore/VectoCore/Models/Declaration/Payloads.cs b/VectoCore/VectoCore/Models/Declaration/Payloads.cs index d2debbf27d6d14020faa531fcd562594afb67f03..da05124dc1501aa1d6ad572d937d97fd52c2f8ec 100644 --- a/VectoCore/VectoCore/Models/Declaration/Payloads.cs +++ b/VectoCore/VectoCore/Models/Declaration/Payloads.cs @@ -49,15 +49,6 @@ namespace TUGraz.VectoCore.Models.Declaration get { throw new InvalidOperationException("ErrorMessage not applicable."); } } - /// <summary> - /// Obsolete. Call Lookup50Percent, Lookup75Percent or LookupTrailer instead! - /// </summary> - [Obsolete("Call Lookup10Percent, Lookup50Percent, Lookup75Percent or LookupTrailer!", true)] - private new PayloadEntry Lookup(Kilogram grossVehicleWeight) - { - throw new InvalidOperationException("Call Lookup50Percent, Lookup75Percent or LookupTrailer!"); - } - public Kilogram Lookup10Percent(Kilogram grossVehicleWeight) { var section = Data.GetSection(d => d.Key > grossVehicleWeight); diff --git a/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs b/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs index a2b1a6299400fd5986725e97c93e785791a1e27f..4e2d69db51240f3f03e71c4a6e2479cc9b69bbdf 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs @@ -33,9 +33,7 @@ using System; using System.ComponentModel; using System.Data; using System.Runtime.Serialization; -using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Utils; // ReSharper disable InconsistentNaming @@ -64,45 +62,5 @@ namespace TUGraz.VectoCore.Models.Simulation.Data Columns.Add(col); } } - - public static ModalResults ReadFromFile(string fileName) - { - var modalResults = new ModalResults(); - var data = VectoCSVFile.Read(fileName); - - foreach (DataRow row in data.Rows) { - try { - var newRow = modalResults.NewRow(); - foreach (DataColumn col in row.Table.Columns) { - // In cols FC-AUXc and FC-WHTCc can be a "-" - if (row.Field<string>(col) == "-" - && (col.ColumnName == ModalResultField.FCAUXc.GetName() || col.ColumnName == ModalResultField.FCWHTCc.GetName())) { - continue; - } - - // In col FC can sometimes be a "ERROR" - if (row.Field<string>(col) == "ERROR" && col.ColumnName == ModalResultField.FCMap.GetName()) { - continue; - } - - if (col.ColumnName.StartsWith(ModalResultField.P_aux_.ToString()) && - !modalResults.Columns.Contains(col.ColumnName)) { - modalResults.Columns.Add(col.ColumnName, typeof(SI)); - } - - if (typeof(SI).IsAssignableFrom(modalResults.Columns[col.ColumnName].DataType)) { - newRow.SetField(col.ColumnName, row.ParseDoubleOrGetDefault(col.ColumnName).SI()); - } else { - newRow.SetField(col.ColumnName, row.ParseDoubleOrGetDefault(col.ColumnName)); - } - } - modalResults.Rows.Add(newRow); - } catch (VectoException ex) { - throw new VectoException(string.Format("Row {0}: {1}", data.Rows.IndexOf(row), ex.Message), ex); - } - } - - return modalResults; - } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/JobContainer.cs b/VectoCore/VectoCore/Models/Simulation/Impl/JobContainer.cs index 377dc8bc8e47ab1412dd0021d94d3fc95391e4fb..18457f1e613782a0392e5daa9e51d6b16bbc5d99 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/JobContainer.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/JobContainer.cs @@ -190,9 +190,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl { public IVectoRun Run; public JobContainer JobContainer; - public double Progress; public bool Done; - public bool Started; public bool Success; public bool Canceled; public double ExecTime; @@ -202,7 +200,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl public RunEntry() { RunTask = new Task(() => { - Started = true; var stopWatch = Stopwatch.StartNew(); try { Run.Run(); diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs index be9f0e9d2aad8d6acf1432a90a0d86feb18c6359..a939ad939e050a61deba4d067f0aa97eb6d4bcfd 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs @@ -162,7 +162,7 @@ namespace TUGraz.VectoCore.OutputData.XML protected XElement CreateEngine(IEngineDeclarationInputData data, XNamespace ns = null) { var id = string.Format("ENG-{0}", data.Model.RemoveWhitespace()); - var fld = EngineFullLoadCurve.Create(data.FullLoadCurve, true); + var fld = FullLoadCurveReader.Create(data.FullLoadCurve, true); return new XElement((ns ?? tns) + XMLNames.Component_Engine, //new XAttribute(XMLNames.Component_CertificationNumber_Attr, string.Format("ENG-{0}", data.Model)), new XElement(tns + XMLNames.ComponentDataWrapper, diff --git a/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs b/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs index 9527cbd03c9500669c6811c4610387f1d26bd065..9c18eb85f09fb3b1e2dcaa55d6076af76ad654c9 100644 --- a/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs +++ b/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs @@ -33,6 +33,7 @@ using System.Collections.Generic; using NUnit.Framework; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.Simulation.Impl; @@ -125,7 +126,7 @@ namespace TUGraz.VectoCore.Tests.Integration.BusAuxiliaries var vehicle = new VehicleContainer(ExecutionMode.Engineering, new MockModalDataContainer()); var fcMap = FuelConsumptionMapReader.ReadFromFile(engineFCMapFilePath); - var fld = EngineFullLoadCurve.ReadFromFile(engineFLDFilePath); + var fld = FullLoadCurveReader.ReadFromFile(engineFLDFilePath); var modelData = new CombustionEngineData() { ConsumptionMap = fcMap, FullLoadCurves = new Dictionary<uint, EngineFullLoadCurve>() { { 0, fld }, { 1, fld } },