Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9179a936 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

remove dead code

parent 089b5831
No related branches found
No related tags found
No related merge requests found
/*
* 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
......@@ -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
{
......
......@@ -47,7 +47,7 @@ namespace TUGraz.VectoCore.Models.Declaration
return _instance ?? (_instance = new FuelData());
}
private FuelData() : base() {}
private FuelData() {}
protected override string ResourceId
{
......
......@@ -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;
......
......@@ -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);
......
......@@ -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
......@@ -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();
......
......@@ -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,
......
......@@ -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 } },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment