From 6da4b89b3737c0d07af214922133c0562d9524b9 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Thu, 5 Nov 2015 13:09:16 +0100
Subject: [PATCH] checked and removed some todo's in source

---
 VECTO/GUI/F_MAINForm.vb                                |  9 ++++-----
 VectoCore/FileIO/Reader/DrivingCycleDataReader.cs      |  1 -
 VectoCore/Models/Simulation/Data/SummaryFileWriter.cs  |  1 -
 VectoCore/Models/Simulation/Impl/JobContainer.cs       |  5 -----
 VectoCore/Models/Simulation/Impl/SimulatorFactory.cs   |  2 --
 .../Data/Engine/FuelConsumptionMap.cs                  |  1 -
 .../Models/SimulationComponent/Data/Engine/PT1Curve.cs |  1 -
 .../Models/SimulationComponent/Data/FullLoadCurve.cs   |  2 --
 VectoCore/Models/SimulationComponent/Impl/Driver.cs    | 10 ----------
 .../Models/SimulationComponent/Impl/ShiftStrategy.cs   |  1 -
 .../SimulationComponent/Impl/TimeBasedDrivingCycle.cs  |  2 +-
 VectoCore/Models/SimulationComponent/Impl/Vehicle.cs   |  1 -
 12 files changed, 5 insertions(+), 31 deletions(-)

diff --git a/VECTO/GUI/F_MAINForm.vb b/VECTO/GUI/F_MAINForm.vb
index 087c869ccd..acaa0197c8 100644
--- a/VECTO/GUI/F_MAINForm.vb
+++ b/VECTO/GUI/F_MAINForm.vb
@@ -501,8 +501,7 @@ Imports TUGraz.VectoCore.Models.Simulation
 		ModeUpdate()
 
 		'License check
-		'TODO uncomment license check
-		If False And Not Lic.LICcheck() Then
+		If Not Lic.LICcheck() Then
 			MsgBox("License File invalid!" & vbCrLf & vbCrLf & Lic.FailMsg)
 			If Lic.CreateActFile(MyAppPath & "ActivationCode.dat") Then
 				MsgBox("Activation File created.")
@@ -1588,7 +1587,7 @@ Imports TUGraz.VectoCore.Models.Simulation
 				start = DateTime.Now()
 			End If
 
-			Dim sumPercent As Integer = Int(sumProgress / NumLines * 100)
+			Dim sumPercent As Integer = Int(sumProgress/NumLines*100)
 
 			Dim progString As String = String.Join(", ", progress.Select(Function(pair) String.Format("{0,4:P}", pair.Value)))
 
@@ -1596,7 +1595,7 @@ Imports TUGraz.VectoCore.Models.Simulation
 			Dim remainingDuration As Double = 0
 			If start > DateTime.MinValue Then
 				duration = (DateTime.Now() - start).TotalSeconds
-				remainingDuration = duration / (sumProgress / NumLines) - duration
+				remainingDuration = duration/(sumProgress/NumLines) - duration
 			End If
 
 
@@ -1604,7 +1603,7 @@ Imports TUGraz.VectoCore.Models.Simulation
 								New _
 									With {.Target = "Status",
 									.Message = String.Format("Time: {0:0}s, Remaining: {1:0}s, Current Progress: {2:P} ({3})",
-															duration, remainingDuration, sumPercent / 100, progString)
+															duration, remainingDuration, sumPercent/100, progString)
 									})
 			Thread.Sleep(1000)
 		End While
diff --git a/VectoCore/FileIO/Reader/DrivingCycleDataReader.cs b/VectoCore/FileIO/Reader/DrivingCycleDataReader.cs
index a038741817..85ec7998cf 100644
--- a/VectoCore/FileIO/Reader/DrivingCycleDataReader.cs
+++ b/VectoCore/FileIO/Reader/DrivingCycleDataReader.cs
@@ -187,7 +187,6 @@ namespace TUGraz.VectoCore.FileIO.Reader
 			///     [kW]	"Aux_xxx" Supply Power input for each auxiliary defined in the .vecto file , where xxx matches the ID of the
 			///     corresponding Auxiliary. ID's are not case sensitive and must not contain space or special characters.
 			/// </summary>
-			// todo: implement additional aux as dictionary!
 			public const string AuxiliarySupplyPower = "Aux_";
 
 			/// <summary>
diff --git a/VectoCore/Models/Simulation/Data/SummaryFileWriter.cs b/VectoCore/Models/Simulation/Data/SummaryFileWriter.cs
index a712fdb818..8da02e5767 100644
--- a/VectoCore/Models/Simulation/Data/SummaryFileWriter.cs
+++ b/VectoCore/Models/Simulation/Data/SummaryFileWriter.cs
@@ -174,7 +174,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
 
 			WriteAuxiliaries(data, row);
 
-			//todo get data from vehicle file
 			if (vehicleMass != null) {
 				row[MASS] = vehicleMass;
 			}
diff --git a/VectoCore/Models/Simulation/Impl/JobContainer.cs b/VectoCore/Models/Simulation/Impl/JobContainer.cs
index 532c9f459d..0a15709a6c 100644
--- a/VectoCore/Models/Simulation/Impl/JobContainer.cs
+++ b/VectoCore/Models/Simulation/Impl/JobContainer.cs
@@ -4,15 +4,10 @@ using System.ComponentModel;
 using System.Diagnostics;
 using System.Linq;
 using System.Threading;
-using System.Threading.Tasks;
 using TUGraz.VectoCore.Models.Simulation.Data;
 
 namespace TUGraz.VectoCore.Models.Simulation.Impl
 {
-	//todo: add job tracking (state of jobs, ...)
-	//todo: add job control (pause, stop)
-
-
 	/// <summary>
 	/// Container for simulation jobs.
 	/// </summary>
diff --git a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs
index 393b5693d5..405dc75a44 100644
--- a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs
+++ b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs
@@ -11,8 +11,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 {
 	public class SimulatorFactory
 	{
-		//private IModalDataWriter _dataWriter;
-
 		public enum FactoryMode
 		{
 			EngineeringMode,
diff --git a/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs b/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs
index 7043b40b3c..88d514a42a 100644
--- a/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs
+++ b/VectoCore/Models/SimulationComponent/Data/Engine/FuelConsumptionMap.cs
@@ -32,7 +32,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
 								row.ParseDouble(Fields.FuelConsumption).SI().Gramm.Per.Hour.ConvertTo().Kilo.Gramm.Per.Second
 						};
 
-						// todo Contract.Assert
 						if (entry.FuelConsumption < 0) {
 							throw new ArgumentOutOfRangeException("FuelConsumption", "FuelConsumption < 0 not allowed.");
 						}
diff --git a/VectoCore/Models/SimulationComponent/Data/Engine/PT1Curve.cs b/VectoCore/Models/SimulationComponent/Data/Engine/PT1Curve.cs
index cd7ebfc165..a08fa4bfa5 100644
--- a/VectoCore/Models/SimulationComponent/Data/Engine/PT1Curve.cs
+++ b/VectoCore/Models/SimulationComponent/Data/Engine/PT1Curve.cs
@@ -28,7 +28,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
 				throw new VectoException("FullLoadCurve/PT1 Data File must consist of at least 4 columns.");
 			}
 
-			//todo Contract.Requires<VectoException>(data.Rows.Count < 2, "FullLoadCurve must consist of at least two lines with numeric values (below file header)");
 			if (data.Rows.Count < 2) {
 				throw new VectoException(
 					"FullLoadCurve/PT1 must consist of at least two lines with numeric values (below file header)");
diff --git a/VectoCore/Models/SimulationComponent/Data/FullLoadCurve.cs b/VectoCore/Models/SimulationComponent/Data/FullLoadCurve.cs
index a5fc727b83..585cd4a813 100644
--- a/VectoCore/Models/SimulationComponent/Data/FullLoadCurve.cs
+++ b/VectoCore/Models/SimulationComponent/Data/FullLoadCurve.cs
@@ -22,12 +22,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
 		{
 			var data = VectoCSVFile.Read(fileName);
 
-			//todo Contract.Requires<VectoException>(data.Columns.Count != 4, "FullLoadCurve Data File must consist of 4 columns.");
 			if (data.Columns.Count < 3) {
 				throw new VectoException("FullLoadCurve Data File must consist of at least 3 columns.");
 			}
 
-			//todo Contract.Requires<VectoException>(data.Rows.Count < 2, "FullLoadCurve must consist of at least two lines with numeric values (below file header)");
 			if (data.Rows.Count < 2) {
 				throw new VectoException(
 					"FullLoadCurve must consist of at least two lines with numeric values (below file header)");
diff --git a/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/Models/SimulationComponent/Impl/Driver.cs
index 876fb23016..05dbb1cef8 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Driver.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Driver.cs
@@ -606,18 +606,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 					LogManager.EnableLogging();
 					Log.Warn("Operating Point outside driver acceleration limits: a: {0}", retVal.Acceleration);
 					LogManager.DisableLogging();
-					//throw new VectoSimulationException(
-					//	"Could not find an operating point: operating point outside of driver acceleration limits. a: {0}",
-					//	retVal.Acceleration);
 				}
 
-				// TODO: move to driving mode
-				// check for minimum acceleration, add some safety margin due to search
-				//if (!coasting && retVal.Acceleration.Abs() < Constants.SimulationSettings.MinimumAcceleration / 5.0
-				//	&& searchInterval.Abs() < Constants.SimulationSettings.MinimumAcceleration / 20.0) {
-				//	throw new VectoSimulationException("Could not achieve minimum acceleration");
-				//}
-
 				var tmp = ComputeTimeInterval(retVal.Acceleration, ds);
 				retVal.SimulationInterval = tmp.SimulationInterval;
 				retVal.SimulationDistance = tmp.SimulationDistance;
diff --git a/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs b/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs
index 04cac44461..dcc8ad8015 100644
--- a/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs
@@ -326,7 +326,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 	{
 		public MTShiftStrategy(GearboxData data, IDataBus bus) : base(data, bus)
 		{
-			// todo: move to settings
 			Data.EarlyShiftUp = false;
 			Data.SkipGears = true;
 		}
diff --git a/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs
index e22232b233..fe36885fee 100644
--- a/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/TimeBasedDrivingCycle.cs
@@ -56,7 +56,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 				return new ResponseCycleFinished();
 			}
 
-			// TODO!!
+			// TODO: implement request and response handling!!
 			var dx = 0.SI<Meter>();
 			return NextComponent.Request(absTime, dt, Data.Entries[index].VehicleTargetSpeed,
 				Data.Entries[index].RoadGradient);
diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
index 53c96d445b..ffe6c85633 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
@@ -157,7 +157,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 											_currentState.SlopeResistance * _currentState.Velocity) / 2;
 			writer[ModalResultField.Proll] = (_previousState.RollingResistance * _previousState.Velocity +
 											_currentState.RollingResistance * _currentState.Velocity) / 2;
-			// TODO: comptuation of AirResistancePower is wrong!
 
 			writer[ModalResultField.Pair] = ComputeAirDragPowerLoss(_previousState.Velocity, _currentState.Velocity,
 				_currentState.dt);
-- 
GitLab