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

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

Merge pull request #787 in VECTO/vecto-sim from...

Merge pull request #787 in VECTO/vecto-sim from ~EMBRANDST/vecto-sim:feature/VECTO-1064-add-weighting-factors-for-vehicle-groups-1-2-3-11-12-16 to develop

* commit '18d6db0f':
  Fixed testcases by using independent formatting of decimal numbers
parents 6a7d4fed 18d6db0f
No related branches found
No related tags found
No related merge requests found
...@@ -863,6 +863,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration ...@@ -863,6 +863,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
[TestCase(@"E:\QUAM\Workspace\VECTO-Bugreports\BugReportTests\Bugreport Jobs\20190307_VECTO-904_Extrapolation\OM-18173493.xml")] [TestCase(@"E:\QUAM\Workspace\VECTO-Bugreports\BugReportTests\Bugreport Jobs\20190307_VECTO-904_Extrapolation\OM-18173493.xml")]
[Ignore("Confidential data")]
public void ComputeShiftPolygonXML(string xmlJob) public void ComputeShiftPolygonXML(string xmlJob)
{ {
var inputData = xmlInputReader.CreateDeclaration(xmlJob); var inputData = xmlInputReader.CreateDeclaration(xmlJob);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NLog.Config; using NLog.Config;
...@@ -129,7 +130,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -129,7 +130,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
0.5 , 0, 600, 400, 200, 200, {0}, {0} , 100, 3 0.5 , 0, 600, 400, 200, 200, {0}, {0} , 100, 3
1 , 0, 600, 400, 200, 200, {1}, {0} , 100, 3 1 , 0, 600, 400, 200, 200, {1}, {0} , 100, 3
1.5 , 0, 600, 400, 200, 200, {1}, {1} , 100, 3 1.5 , 0, 600, 400, 200, 200, {1}, {1} , 100, 3
", wheelSpeed, wheelSpeed + DeclarationData.VTPMode.MaxWheelSpeedDifferenceStandstill.AsRPM * 1.1); ", wheelSpeed.ToString(CultureInfo.InvariantCulture), (wheelSpeed + DeclarationData.VTPMode.MaxWheelSpeedDifferenceStandstill.AsRPM * 1.1).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -157,7 +158,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -157,7 +158,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
0.5 , 0, 600, 400, 200, 200, {0}, {0} , 100, 3 0.5 , 0, 600, 400, 200, 200, {0}, {0} , 100, 3
1 , 0, 600, 400, 200, 200, {0}, {1} , 100, 3 1 , 0, 600, 400, 200, 200, {0}, {1} , 100, 3
1.5 , 0, 600, 400, 200, 200, {1}, {1} , 100, 3 1.5 , 0, 600, 400, 200, 200, {1}, {1} , 100, 3
", wheelSpeed, wheelSpeed + DeclarationData.VTPMode.MaxWheelSpeedDifferenceStandstill.AsRPM * 1.1); ", wheelSpeed.ToString(CultureInfo.InvariantCulture), (wheelSpeed + DeclarationData.VTPMode.MaxWheelSpeedDifferenceStandstill.AsRPM * 1.1).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -187,7 +188,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -187,7 +188,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
0.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3 0.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3
1 , 0, 600, {1}, 300 , 290 , 50 , 50 , 100, 3 1 , 0, 600, {1}, 300 , 290 , 50 , 50 , 100, 3
1.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3 1.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3
", fanSpeed, fanSpeed * 0.9); ", fanSpeed.ToString(CultureInfo.InvariantCulture), (fanSpeed * 0.9).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -254,7 +255,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -254,7 +255,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
0.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3 0.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3
1 , 0, 600, {1}, 300 , 290 , 50 , 50 , 100, 3 1 , 0, 600, {1}, 300 , 290 , 50 , 50 , 100, 3
1.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3 1.5 , 0, 600, {0}, 300 , 290 , 50 , 50 , 100, 3
", fanSpeed, fanSpeed * 0.9); ", fanSpeed.ToString(CultureInfo.InvariantCulture), (fanSpeed * 0.9).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -319,7 +320,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -319,7 +320,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var cycleEntries = ""; var cycleEntries = "";
for (var i = 0; i < 2000; i++) for (var i = 0; i < 2000; i++)
cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", i / 2.0, (fcLimit * 1.01 * (1 - i/100000.0)).ConvertToGrammPerHour().Value); cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", (i / 2.0).ToString(CultureInfo.InvariantCulture), ((fcLimit * 1.01 * (1 - i/100000.0)).ConvertToGrammPerHour().Value).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -349,7 +350,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -349,7 +350,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var cycleEntries = ""; var cycleEntries = "";
for (var i = 0; i < 2000; i++) for (var i = 0; i < 2000; i++)
cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", i / 2.0, (fcLimit * 1.0001).ConvertToGrammPerHour().Value); cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", (i / 2.0).ToString(CultureInfo.InvariantCulture), ((fcLimit * 1.0001).ConvertToGrammPerHour().Value).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -378,7 +379,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -378,7 +379,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var cycleEntries = ""; var cycleEntries = "";
for (var i = 0; i < 2000; i++) for (var i = 0; i < 2000; i++)
cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", i / 2.0, (fcLimit * 0.99 * (1 + i / 100000.0)).ConvertToGrammPerHour().Value); cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", (i / 2.0).ToString(CultureInfo.InvariantCulture), ((fcLimit * 0.99 * (1 + i / 100000.0)).ConvertToGrammPerHour().Value).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
...@@ -407,7 +408,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent ...@@ -407,7 +408,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var cycleEntries = ""; var cycleEntries = "";
for (var i = 0; i < 2000; i++) for (var i = 0; i < 2000; i++)
cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", i / 2.0, (fcLimit * 0.9999).ConvertToGrammPerHour().Value); cycleEntries += string.Format(" {0} , 0, 600, 400, 500 , 500 , 100 , 100 , {1}, 3 \n", (i / 2.0).ToString(CultureInfo.InvariantCulture), ((fcLimit * 0.9999).ConvertToGrammPerHour().Value).ToString(CultureInfo.InvariantCulture));
var container = new VehicleContainer(ExecutionMode.Declaration) { var container = new VehicleContainer(ExecutionMode.Declaration) {
RunData = new VectoRunData() { RunData = new VectoRunData() {
......
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