From 4b22f5090cf010b88652cc680d35cc98c498c1b2 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Tue, 27 Sep 2016 16:05:47 +0200
Subject: [PATCH] Adding P_add input to GUI and JSON format

---
 VECTO/GUI/GearboxForm.vb                      |  19 +-
 VECTO/GUI/VectoJobForm.Designer.vb            | 408 ++++++++++--------
 VECTO/GUI/VectoJobForm.resx                   |   6 +-
 VECTO/GUI/VectoJobForm.vb                     |  23 +-
 VECTO/Input Files/Gearbox.vb                  |   4 +-
 VECTO/Input Files/VectoJob.vb                 |   6 +
 .../InputData/FileIO/JSON/JSONGearboxData.cs  |   2 +-
 .../InputData/FileIO/JSON/JSONInputData.cs    |   9 +-
 8 files changed, 273 insertions(+), 204 deletions(-)

diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb
index 851ee73589..25b5f15f87 100644
--- a/VECTO/GUI/GearboxForm.vb
+++ b/VECTO/GUI/GearboxForm.vb
@@ -244,13 +244,24 @@ Public Class GearboxForm
 
 		LvGears.Items.Clear()
 
-		LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio,
-											If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(),
-												GetRelativePath(axlegear.LossMap.Source, basePath)), "", ""))
+		Dim lossmap As String = ""
+		Try
+			lossmap = If(axlegear.LossMap Is Nothing, axlegear.Efficiency.ToGUIFormat(),
+						GetRelativePath(axlegear.LossMap.Source, basePath))
+		Catch ex As Exception
+		End Try
+
+		LvGears.Items.Add(CreateListviewItem("Axle", axlegear.Ratio, lossmap, "", ""))
 
 		For Each gear As ITransmissionInputData In gearbox.Gears
+			lossmap = ""
+			Try
+				lossmap = If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), GetRelativePath(gear.LossMap.Source, basePath))
+			Catch ex As Exception
+
+			End Try
 			LvGears.Items.Add(CreateListviewItem(gear.Gear.ToString("00"), gear.Ratio,
-												If(gear.LossMap Is Nothing, gear.Efficiency.ToGUIFormat(), gear.LossMap.Source),
+												lossmap,
 												If(gear.ShiftPolygon Is Nothing, "", GetRelativePath(gear.ShiftPolygon.Source, basePath)),
 												If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.ToGUIFormat())))
 		Next
diff --git a/VECTO/GUI/VectoJobForm.Designer.vb b/VECTO/GUI/VectoJobForm.Designer.vb
index 0970652f01..e71d2036e9 100644
--- a/VECTO/GUI/VectoJobForm.Designer.vb
+++ b/VECTO/GUI/VectoJobForm.Designer.vb
@@ -65,6 +65,23 @@ Partial Class VectoJobForm
 		Me.BtDesMaxBr = New System.Windows.Forms.Button()
 		Me.BtAccOpen = New System.Windows.Forms.Button()
 		Me.GrLAC = New System.Windows.Forms.GroupBox()
+		Me.pnLookAheadCoasting = New System.Windows.Forms.Panel()
+		Me.Label7 = New System.Windows.Forms.Label()
+		Me.Label6 = New System.Windows.Forms.Label()
+		Me.tbLacMinSpeed = New System.Windows.Forms.TextBox()
+		Me.btnDfVelocityDrop = New System.Windows.Forms.Button()
+		Me.Label12 = New System.Windows.Forms.Label()
+		Me.tbDfCoastingScale = New System.Windows.Forms.TextBox()
+		Me.Label11 = New System.Windows.Forms.Label()
+		Me.Label3 = New System.Windows.Forms.Label()
+		Me.tbDfCoastingOffset = New System.Windows.Forms.TextBox()
+		Me.tbLacDfTargetSpeedFile = New System.Windows.Forms.TextBox()
+		Me.Label10 = New System.Windows.Forms.Label()
+		Me.Label4 = New System.Windows.Forms.Label()
+		Me.Label5 = New System.Windows.Forms.Label()
+		Me.btnDfTargetSpeed = New System.Windows.Forms.Button()
+		Me.tbLacPreviewFactor = New System.Windows.Forms.TextBox()
+		Me.tbLacDfVelocityDropFile = New System.Windows.Forms.TextBox()
 		Me.CbLookAhead = New System.Windows.Forms.CheckBox()
 		Me.GroupBox1 = New System.Windows.Forms.GroupBox()
 		Me.PnEcoRoll = New System.Windows.Forms.Panel()
@@ -119,23 +136,9 @@ Partial Class VectoJobForm
 		Me.TbGbxTxt = New System.Windows.Forms.TextBox()
 		Me.TbMass = New System.Windows.Forms.TextBox()
 		Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
-		Me.pnLookAheadCoasting = New System.Windows.Forms.Panel()
-		Me.btnDfVelocityDrop = New System.Windows.Forms.Button()
-		Me.Label12 = New System.Windows.Forms.Label()
-		Me.tbDfCoastingScale = New System.Windows.Forms.TextBox()
-		Me.Label11 = New System.Windows.Forms.Label()
-		Me.Label3 = New System.Windows.Forms.Label()
-		Me.tbDfCoastingOffset = New System.Windows.Forms.TextBox()
-		Me.tbLacDfTargetSpeedFile = New System.Windows.Forms.TextBox()
-		Me.Label10 = New System.Windows.Forms.Label()
-		Me.Label4 = New System.Windows.Forms.Label()
-		Me.Label5 = New System.Windows.Forms.Label()
-		Me.btnDfTargetSpeed = New System.Windows.Forms.Button()
-		Me.tbLacPreviewFactor = New System.Windows.Forms.TextBox()
-		Me.tbLacDfVelocityDropFile = New System.Windows.Forms.TextBox()
-		Me.Label6 = New System.Windows.Forms.Label()
-		Me.tbLacMinSpeed = New System.Windows.Forms.TextBox()
-		Me.Label7 = New System.Windows.Forms.Label()
+		Me.Label8 = New System.Windows.Forms.Label()
+		Me.TbAuxPAdd = New System.Windows.Forms.TextBox()
+		Me.Label9 = New System.Windows.Forms.Label()
 		Me.TabPgGen.SuspendLayout()
 		Me.GrCycles.SuspendLayout()
 		Me.GrAux.SuspendLayout()
@@ -144,6 +147,7 @@ Partial Class VectoJobForm
 		Me.TabPgDriver.SuspendLayout()
 		Me.GrVACC.SuspendLayout()
 		Me.GrLAC.SuspendLayout()
+		Me.pnLookAheadCoasting.SuspendLayout()
 		Me.GroupBox1.SuspendLayout()
 		Me.PnEcoRoll.SuspendLayout()
 		Me.GrStartStop.SuspendLayout()
@@ -154,7 +158,6 @@ Partial Class VectoJobForm
 		Me.CmOpenFile.SuspendLayout()
 		CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).BeginInit()
 		CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit()
-		Me.pnLookAheadCoasting.SuspendLayout()
 		Me.SuspendLayout()
 		'
 		'TabPgGen
@@ -187,7 +190,7 @@ Partial Class VectoJobForm
 		Me.GrCycles.Controls.Add(Me.LvCycles)
 		Me.GrCycles.Controls.Add(Me.BtDRIrem)
 		Me.GrCycles.Controls.Add(Me.BtDRIadd)
-		Me.GrCycles.Location = New System.Drawing.Point(9, 314)
+		Me.GrCycles.Location = New System.Drawing.Point(9, 344)
 		Me.GrCycles.Name = "GrCycles"
 		Me.GrCycles.Size = New System.Drawing.Size(515, 184)
 		Me.GrCycles.TabIndex = 10
@@ -253,6 +256,9 @@ Partial Class VectoJobForm
 		Me.GrAux.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
 			Or System.Windows.Forms.AnchorStyles.Left) _
 			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.GrAux.Controls.Add(Me.Label9)
+		Me.GrAux.Controls.Add(Me.TbAuxPAdd)
+		Me.GrAux.Controls.Add(Me.Label8)
 		Me.GrAux.Controls.Add(Me.btnAAUXOpen)
 		Me.GrAux.Controls.Add(Me.Label1)
 		Me.GrAux.Controls.Add(Me.btnBrowseAAUXFile)
@@ -266,7 +272,7 @@ Partial Class VectoJobForm
 		Me.GrAux.Controls.Add(Me.ButAuxAdd)
 		Me.GrAux.Location = New System.Drawing.Point(6, 87)
 		Me.GrAux.Name = "GrAux"
-		Me.GrAux.Size = New System.Drawing.Size(515, 221)
+		Me.GrAux.Size = New System.Drawing.Size(515, 251)
 		Me.GrAux.TabIndex = 9
 		Me.GrAux.TabStop = False
 		Me.GrAux.Text = "Auxiliaries"
@@ -338,7 +344,7 @@ Partial Class VectoJobForm
 		'
 		Me.Label32.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
 		Me.Label32.AutoSize = True
-		Me.Label32.Location = New System.Drawing.Point(406, 189)
+		Me.Label32.Location = New System.Drawing.Point(406, 220)
 		Me.Label32.Name = "Label32"
 		Me.Label32.Size = New System.Drawing.Size(106, 13)
 		Me.Label32.TabIndex = 3
@@ -352,7 +358,7 @@ Partial Class VectoJobForm
 		Me.LvAux.FullRowSelect = True
 		Me.LvAux.GridLines = True
 		Me.LvAux.HideSelection = False
-		Me.LvAux.Location = New System.Drawing.Point(6, 72)
+		Me.LvAux.Location = New System.Drawing.Point(6, 103)
 		Me.LvAux.MultiSelect = False
 		Me.LvAux.Name = "LvAux"
 		Me.LvAux.Size = New System.Drawing.Size(503, 117)
@@ -379,7 +385,7 @@ Partial Class VectoJobForm
 		'ButAuxRem
 		'
 		Me.ButAuxRem.Image = Global.TUGraz.VECTO.My.Resources.Resources.minus_circle_icon
-		Me.ButAuxRem.Location = New System.Drawing.Point(29, 190)
+		Me.ButAuxRem.Location = New System.Drawing.Point(29, 221)
 		Me.ButAuxRem.Name = "ButAuxRem"
 		Me.ButAuxRem.Size = New System.Drawing.Size(24, 24)
 		Me.ButAuxRem.TabIndex = 2
@@ -388,7 +394,7 @@ Partial Class VectoJobForm
 		'ButAuxAdd
 		'
 		Me.ButAuxAdd.Image = Global.TUGraz.VECTO.My.Resources.Resources.plus_circle_icon
-		Me.ButAuxAdd.Location = New System.Drawing.Point(5, 190)
+		Me.ButAuxAdd.Location = New System.Drawing.Point(5, 221)
 		Me.ButAuxAdd.Name = "ButAuxAdd"
 		Me.ButAuxAdd.Size = New System.Drawing.Size(24, 24)
 		Me.ButAuxAdd.TabIndex = 1
@@ -564,6 +570,173 @@ Partial Class VectoJobForm
 		Me.GrLAC.TabStop = False
 		Me.GrLAC.Text = "Look-Ahead Coasting"
 		'
+		'pnLookAheadCoasting
+		'
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label7)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label6)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacMinSpeed)
+		Me.pnLookAheadCoasting.Controls.Add(Me.btnDfVelocityDrop)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label12)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingScale)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label11)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label3)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingOffset)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfTargetSpeedFile)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label10)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label4)
+		Me.pnLookAheadCoasting.Controls.Add(Me.Label5)
+		Me.pnLookAheadCoasting.Controls.Add(Me.btnDfTargetSpeed)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacPreviewFactor)
+		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfVelocityDropFile)
+		Me.pnLookAheadCoasting.Location = New System.Drawing.Point(16, 37)
+		Me.pnLookAheadCoasting.Name = "pnLookAheadCoasting"
+		Me.pnLookAheadCoasting.Size = New System.Drawing.Size(467, 129)
+		Me.pnLookAheadCoasting.TabIndex = 20
+		'
+		'Label7
+		'
+		Me.Label7.AutoSize = True
+		Me.Label7.Location = New System.Drawing.Point(234, 6)
+		Me.Label7.Name = "Label7"
+		Me.Label7.Size = New System.Drawing.Size(38, 13)
+		Me.Label7.TabIndex = 4
+		Me.Label7.Text = "[km/h]"
+		'
+		'Label6
+		'
+		Me.Label6.AutoSize = True
+		Me.Label6.Location = New System.Drawing.Point(91, 6)
+		Me.Label6.Name = "Label6"
+		Me.Label6.Size = New System.Drawing.Size(67, 13)
+		Me.Label6.TabIndex = 33
+		Me.Label6.Text = "Min. Velocity"
+		Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'tbLacMinSpeed
+		'
+		Me.tbLacMinSpeed.Location = New System.Drawing.Point(164, 3)
+		Me.tbLacMinSpeed.Name = "tbLacMinSpeed"
+		Me.tbLacMinSpeed.Size = New System.Drawing.Size(64, 20)
+		Me.tbLacMinSpeed.TabIndex = 34
+		'
+		'btnDfVelocityDrop
+		'
+		Me.btnDfVelocityDrop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.btnDfVelocityDrop.Image = CType(resources.GetObject("btnDfVelocityDrop.Image"), System.Drawing.Image)
+		Me.btnDfVelocityDrop.Location = New System.Drawing.Point(435, 78)
+		Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop"
+		Me.btnDfVelocityDrop.Size = New System.Drawing.Size(24, 24)
+		Me.btnDfVelocityDrop.TabIndex = 32
+		Me.btnDfVelocityDrop.TabStop = False
+		Me.btnDfVelocityDrop.UseVisualStyleBackColor = True
+		'
+		'Label12
+		'
+		Me.Label12.AutoSize = True
+		Me.Label12.Location = New System.Drawing.Point(269, 110)
+		Me.Label12.Name = "Label12"
+		Me.Label12.Size = New System.Drawing.Size(130, 13)
+		Me.Label12.TabIndex = 31
+		Me.Label12.Text = "* DF_vTarget * DF_vDrop"
+		'
+		'tbDfCoastingScale
+		'
+		Me.tbDfCoastingScale.Location = New System.Drawing.Point(226, 107)
+		Me.tbDfCoastingScale.Name = "tbDfCoastingScale"
+		Me.tbDfCoastingScale.Size = New System.Drawing.Size(37, 20)
+		Me.tbDfCoastingScale.TabIndex = 30
+		'
+		'Label11
+		'
+		Me.Label11.AutoSize = True
+		Me.Label11.Location = New System.Drawing.Point(209, 109)
+		Me.Label11.Name = "Label11"
+		Me.Label11.Size = New System.Drawing.Size(13, 13)
+		Me.Label11.TabIndex = 29
+		Me.Label11.Text = "- "
+		'
+		'Label3
+		'
+		Me.Label3.AutoSize = True
+		Me.Label3.Location = New System.Drawing.Point(40, 31)
+		Me.Label3.Name = "Label3"
+		Me.Label3.Size = New System.Drawing.Size(118, 13)
+		Me.Label3.TabIndex = 20
+		Me.Label3.Text = "Preview distance factor"
+		Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'tbDfCoastingOffset
+		'
+		Me.tbDfCoastingOffset.Location = New System.Drawing.Point(165, 107)
+		Me.tbDfCoastingOffset.Name = "tbDfCoastingOffset"
+		Me.tbDfCoastingOffset.Size = New System.Drawing.Size(37, 20)
+		Me.tbDfCoastingOffset.TabIndex = 28
+		'
+		'tbLacDfTargetSpeedFile
+		'
+		Me.tbLacDfTargetSpeedFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
+			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.tbLacDfTargetSpeedFile.Location = New System.Drawing.Point(164, 54)
+		Me.tbLacDfTargetSpeedFile.Name = "tbLacDfTargetSpeedFile"
+		Me.tbLacDfTargetSpeedFile.Size = New System.Drawing.Size(264, 20)
+		Me.tbLacDfTargetSpeedFile.TabIndex = 22
+		'
+		'Label10
+		'
+		Me.Label10.AutoSize = True
+		Me.Label10.Location = New System.Drawing.Point(79, 110)
+		Me.Label10.Name = "Label10"
+		Me.Label10.Size = New System.Drawing.Size(79, 13)
+		Me.Label10.TabIndex = 27
+		Me.Label10.Text = "DF_coasting = "
+		'
+		'Label4
+		'
+		Me.Label4.AutoSize = True
+		Me.Label4.Location = New System.Drawing.Point(3, 57)
+		Me.Label4.Name = "Label4"
+		Me.Label4.Size = New System.Drawing.Size(155, 13)
+		Me.Label4.TabIndex = 24
+		Me.Label4.Text = "Decision Factor - Target Speed"
+		Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'Label5
+		'
+		Me.Label5.AutoSize = True
+		Me.Label5.Location = New System.Drawing.Point(5, 84)
+		Me.Label5.Name = "Label5"
+		Me.Label5.Size = New System.Drawing.Size(153, 13)
+		Me.Label5.TabIndex = 26
+		Me.Label5.Text = "Decision Factor - Velocity Drop"
+		Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'btnDfTargetSpeed
+		'
+		Me.btnDfTargetSpeed.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.btnDfTargetSpeed.Image = CType(resources.GetObject("btnDfTargetSpeed.Image"), System.Drawing.Image)
+		Me.btnDfTargetSpeed.Location = New System.Drawing.Point(434, 54)
+		Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed"
+		Me.btnDfTargetSpeed.Size = New System.Drawing.Size(24, 24)
+		Me.btnDfTargetSpeed.TabIndex = 23
+		Me.btnDfTargetSpeed.TabStop = False
+		Me.btnDfTargetSpeed.UseVisualStyleBackColor = True
+		'
+		'tbLacPreviewFactor
+		'
+		Me.tbLacPreviewFactor.Location = New System.Drawing.Point(164, 28)
+		Me.tbLacPreviewFactor.Name = "tbLacPreviewFactor"
+		Me.tbLacPreviewFactor.Size = New System.Drawing.Size(64, 20)
+		Me.tbLacPreviewFactor.TabIndex = 21
+		'
+		'tbLacDfVelocityDropFile
+		'
+		Me.tbLacDfVelocityDropFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
+			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.tbLacDfVelocityDropFile.Location = New System.Drawing.Point(164, 81)
+		Me.tbLacDfVelocityDropFile.Name = "tbLacDfVelocityDropFile"
+		Me.tbLacDfVelocityDropFile.Size = New System.Drawing.Size(264, 20)
+		Me.tbLacDfVelocityDropFile.TabIndex = 25
+		'
 		'CbLookAhead
 		'
 		Me.CbLookAhead.AutoSize = True
@@ -1047,172 +1220,30 @@ Partial Class VectoJobForm
 		Me.TbMass.Size = New System.Drawing.Size(50, 20)
 		Me.TbMass.TabIndex = 3
 		'
-		'pnLookAheadCoasting
-		'
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label7)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label6)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacMinSpeed)
-		Me.pnLookAheadCoasting.Controls.Add(Me.btnDfVelocityDrop)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label12)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingScale)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label11)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label3)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbDfCoastingOffset)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfTargetSpeedFile)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label10)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label4)
-		Me.pnLookAheadCoasting.Controls.Add(Me.Label5)
-		Me.pnLookAheadCoasting.Controls.Add(Me.btnDfTargetSpeed)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacPreviewFactor)
-		Me.pnLookAheadCoasting.Controls.Add(Me.tbLacDfVelocityDropFile)
-		Me.pnLookAheadCoasting.Location = New System.Drawing.Point(16, 37)
-		Me.pnLookAheadCoasting.Name = "pnLookAheadCoasting"
-		Me.pnLookAheadCoasting.Size = New System.Drawing.Size(467, 129)
-		Me.pnLookAheadCoasting.TabIndex = 20
-		'
-		'btnDfVelocityDrop
-		'
-		Me.btnDfVelocityDrop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-		Me.btnDfVelocityDrop.Image = CType(resources.GetObject("btnDfVelocityDrop.Image"), System.Drawing.Image)
-		Me.btnDfVelocityDrop.Location = New System.Drawing.Point(435, 78)
-		Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop"
-		Me.btnDfVelocityDrop.Size = New System.Drawing.Size(24, 24)
-		Me.btnDfVelocityDrop.TabIndex = 32
-		Me.btnDfVelocityDrop.TabStop = False
-		Me.btnDfVelocityDrop.UseVisualStyleBackColor = True
-		'
-		'Label12
-		'
-		Me.Label12.AutoSize = True
-		Me.Label12.Location = New System.Drawing.Point(269, 110)
-		Me.Label12.Name = "Label12"
-		Me.Label12.Size = New System.Drawing.Size(130, 13)
-		Me.Label12.TabIndex = 31
-		Me.Label12.Text = "* DF_vTarget * DF_vDrop"
-		'
-		'tbDfCoastingScale
-		'
-		Me.tbDfCoastingScale.Location = New System.Drawing.Point(226, 107)
-		Me.tbDfCoastingScale.Name = "tbDfCoastingScale"
-		Me.tbDfCoastingScale.Size = New System.Drawing.Size(37, 20)
-		Me.tbDfCoastingScale.TabIndex = 30
-		'
-		'Label11
-		'
-		Me.Label11.AutoSize = True
-		Me.Label11.Location = New System.Drawing.Point(209, 109)
-		Me.Label11.Name = "Label11"
-		Me.Label11.Size = New System.Drawing.Size(13, 13)
-		Me.Label11.TabIndex = 29
-		Me.Label11.Text = "- "
-		'
-		'Label3
-		'
-		Me.Label3.AutoSize = True
-		Me.Label3.Location = New System.Drawing.Point(40, 31)
-		Me.Label3.Name = "Label3"
-		Me.Label3.Size = New System.Drawing.Size(118, 13)
-		Me.Label3.TabIndex = 20
-		Me.Label3.Text = "Preview distance factor"
-		Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
-		'
-		'tbDfCoastingOffset
-		'
-		Me.tbDfCoastingOffset.Location = New System.Drawing.Point(165, 107)
-		Me.tbDfCoastingOffset.Name = "tbDfCoastingOffset"
-		Me.tbDfCoastingOffset.Size = New System.Drawing.Size(37, 20)
-		Me.tbDfCoastingOffset.TabIndex = 28
-		'
-		'tbLacDfTargetSpeedFile
-		'
-		Me.tbLacDfTargetSpeedFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
-			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-		Me.tbLacDfTargetSpeedFile.Location = New System.Drawing.Point(164, 54)
-		Me.tbLacDfTargetSpeedFile.Name = "tbLacDfTargetSpeedFile"
-		Me.tbLacDfTargetSpeedFile.Size = New System.Drawing.Size(264, 20)
-		Me.tbLacDfTargetSpeedFile.TabIndex = 22
-		'
-		'Label10
-		'
-		Me.Label10.AutoSize = True
-		Me.Label10.Location = New System.Drawing.Point(79, 110)
-		Me.Label10.Name = "Label10"
-		Me.Label10.Size = New System.Drawing.Size(79, 13)
-		Me.Label10.TabIndex = 27
-		Me.Label10.Text = "DF_coasting = "
-		'
-		'Label4
-		'
-		Me.Label4.AutoSize = True
-		Me.Label4.Location = New System.Drawing.Point(3, 57)
-		Me.Label4.Name = "Label4"
-		Me.Label4.Size = New System.Drawing.Size(155, 13)
-		Me.Label4.TabIndex = 24
-		Me.Label4.Text = "Decision Factor - Target Speed"
-		Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
-		'
-		'Label5
-		'
-		Me.Label5.AutoSize = True
-		Me.Label5.Location = New System.Drawing.Point(5, 84)
-		Me.Label5.Name = "Label5"
-		Me.Label5.Size = New System.Drawing.Size(153, 13)
-		Me.Label5.TabIndex = 26
-		Me.Label5.Text = "Decision Factor - Velocity Drop"
-		Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
-		'
-		'btnDfTargetSpeed
-		'
-		Me.btnDfTargetSpeed.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-		Me.btnDfTargetSpeed.Image = CType(resources.GetObject("btnDfTargetSpeed.Image"), System.Drawing.Image)
-		Me.btnDfTargetSpeed.Location = New System.Drawing.Point(434, 54)
-		Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed"
-		Me.btnDfTargetSpeed.Size = New System.Drawing.Size(24, 24)
-		Me.btnDfTargetSpeed.TabIndex = 23
-		Me.btnDfTargetSpeed.TabStop = False
-		Me.btnDfTargetSpeed.UseVisualStyleBackColor = True
-		'
-		'tbLacPreviewFactor
-		'
-		Me.tbLacPreviewFactor.Location = New System.Drawing.Point(164, 28)
-		Me.tbLacPreviewFactor.Name = "tbLacPreviewFactor"
-		Me.tbLacPreviewFactor.Size = New System.Drawing.Size(64, 20)
-		Me.tbLacPreviewFactor.TabIndex = 21
-		'
-		'tbLacDfVelocityDropFile
-		'
-		Me.tbLacDfVelocityDropFile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
-			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-		Me.tbLacDfVelocityDropFile.Location = New System.Drawing.Point(164, 81)
-		Me.tbLacDfVelocityDropFile.Name = "tbLacDfVelocityDropFile"
-		Me.tbLacDfVelocityDropFile.Size = New System.Drawing.Size(264, 20)
-		Me.tbLacDfVelocityDropFile.TabIndex = 25
-		'
-		'Label6
+		'Label8
 		'
-		Me.Label6.AutoSize = True
-		Me.Label6.Location = New System.Drawing.Point(91, 6)
-		Me.Label6.Name = "Label6"
-		Me.Label6.Size = New System.Drawing.Size(67, 13)
-		Me.Label6.TabIndex = 33
-		Me.Label6.Text = "Min. Velocity"
-		Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		Me.Label8.AutoSize = True
+		Me.Label8.Location = New System.Drawing.Point(7, 76)
+		Me.Label8.Name = "Label8"
+		Me.Label8.Size = New System.Drawing.Size(97, 13)
+		Me.Label8.TabIndex = 42
+		Me.Label8.Text = "Constant Aux Load"
 		'
-		'tbLacMinSpeed
+		'TbAuxPAdd
 		'
-		Me.tbLacMinSpeed.Location = New System.Drawing.Point(164, 3)
-		Me.tbLacMinSpeed.Name = "tbLacMinSpeed"
-		Me.tbLacMinSpeed.Size = New System.Drawing.Size(64, 20)
-		Me.tbLacMinSpeed.TabIndex = 34
+		Me.TbAuxPAdd.Location = New System.Drawing.Point(119, 73)
+		Me.TbAuxPAdd.Name = "TbAuxPAdd"
+		Me.TbAuxPAdd.Size = New System.Drawing.Size(66, 20)
+		Me.TbAuxPAdd.TabIndex = 43
 		'
-		'Label7
+		'Label9
 		'
-		Me.Label7.AutoSize = True
-		Me.Label7.Location = New System.Drawing.Point(234, 6)
-		Me.Label7.Name = "Label7"
-		Me.Label7.Size = New System.Drawing.Size(38, 13)
-		Me.Label7.TabIndex = 4
-		Me.Label7.Text = "[km/h]"
+		Me.Label9.AutoSize = True
+		Me.Label9.Location = New System.Drawing.Point(191, 76)
+		Me.Label9.Name = "Label9"
+		Me.Label9.Size = New System.Drawing.Size(24, 13)
+		Me.Label9.TabIndex = 44
+		Me.Label9.Text = "[W]"
 		'
 		'VectoJobForm
 		'
@@ -1252,6 +1283,8 @@ Partial Class VectoJobForm
 		Me.GrVACC.PerformLayout()
 		Me.GrLAC.ResumeLayout(False)
 		Me.GrLAC.PerformLayout()
+		Me.pnLookAheadCoasting.ResumeLayout(False)
+		Me.pnLookAheadCoasting.PerformLayout()
 		Me.GroupBox1.ResumeLayout(False)
 		Me.GroupBox1.PerformLayout()
 		Me.PnEcoRoll.ResumeLayout(False)
@@ -1268,8 +1301,6 @@ Partial Class VectoJobForm
 		Me.CmOpenFile.ResumeLayout(False)
 		CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).EndInit()
 		CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit()
-		Me.pnLookAheadCoasting.ResumeLayout(False)
-		Me.pnLookAheadCoasting.PerformLayout()
 		Me.ResumeLayout(False)
 		Me.PerformLayout()
 
@@ -1383,4 +1414,7 @@ Partial Class VectoJobForm
 	Friend WithEvents Label6 As System.Windows.Forms.Label
 	Friend WithEvents tbLacMinSpeed As System.Windows.Forms.TextBox
 	Friend WithEvents Label7 As System.Windows.Forms.Label
+	Friend WithEvents Label9 As System.Windows.Forms.Label
+	Friend WithEvents TbAuxPAdd As System.Windows.Forms.TextBox
+	Friend WithEvents Label8 As System.Windows.Forms.Label
 End Class
diff --git a/VECTO/GUI/VectoJobForm.resx b/VECTO/GUI/VectoJobForm.resx
index e89a5da4d2..a0374993bd 100644
--- a/VECTO/GUI/VectoJobForm.resx
+++ b/VECTO/GUI/VectoJobForm.resx
@@ -124,7 +124,7 @@
   <data name="ButtonVEH.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADr4AAA6+AepCscAAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
+        YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
         0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/
         776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC
         AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5
@@ -142,7 +142,7 @@
   <data name="ButtonGBX.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADr4AAA6+AepCscAAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
+        YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
         0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/
         776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC
         AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5
@@ -160,7 +160,7 @@
   <data name="ButtonMAP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADr4AAA6+AepCscAAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
+        YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw
         0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/
         776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC
         AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5
diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb
index f04c2e0ab9..d2d6dcca69 100644
--- a/VECTO/GUI/VectoJobForm.vb
+++ b/VECTO/GUI/VectoJobForm.vb
@@ -72,6 +72,7 @@ Public Class VectoJobForm
 		Else
 			LvAux.Columns(2).Text = "Input File"
 		End If
+		TbAuxPAdd.Enabled = Not Cfg.DeclMode
 
 		CbEngOnly.Enabled = Not Cfg.DeclMode
 		GrCycles.Enabled = Not Cfg.DeclMode
@@ -119,7 +120,7 @@ Public Class VectoJobForm
 		TbUnderSpeed.Text = DeclarationData.Driver.OverSpeedEcoRoll.UnderSpeed.AsKmph.ToGUIFormat() _
 		' cDeclaration.Underspeed
 		TbVmin.Text = DeclarationData.Driver.OverSpeedEcoRoll.MinSpeed.AsKmph.ToGUIFormat()	 'cDeclaration.ECvmin
-
+		TbAuxPAdd.Text = ""
 		If _
 			LvAux.Items.Count <> 5 OrElse
 			(LvAux.Items(0).Text <> VectoCore.Configuration.Constants.Auxiliaries.IDs.Fan OrElse
@@ -412,11 +413,15 @@ Public Class VectoJobForm
 			LvAux.Items.Clear()
 			Dim entry As IAuxiliaryDeclarationInputData
 			For Each entry In auxInput.Auxiliaries
-				Dim lv0 As ListViewItem = New ListViewItem
-				lv0.SubItems(0).Text = AuxiliaryTypeHelper.GetAuxKey(entry.Type)
-				lv0.SubItems.Add(AuxiliaryTypeHelper.ToString(entry.Type))
-				lv0.SubItems.Add(String.Join(", ", entry.Technology))
-				LvAux.Items.Add(lv0)
+				'If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then Continue For
+				Try
+					Dim lv0 As ListViewItem = New ListViewItem
+					lv0.SubItems(0).Text = AuxiliaryTypeHelper.GetAuxKey(entry.Type)
+					lv0.SubItems.Add(AuxiliaryTypeHelper.ToString(entry.Type))
+					lv0.SubItems.Add(String.Join(", ", entry.Technology))
+					LvAux.Items.Add(lv0)
+				Catch ex As Exception
+				End Try
 			Next
 		Else
 			'VACC
@@ -440,6 +445,11 @@ Public Class VectoJobForm
 
 			LvAux.Items.Clear()
 			For Each entry As IAuxiliaryEngineeringInputData In auxInput.Auxiliaries
+				If entry.AuxiliaryType = AuxiliaryDemandType.Constant Then
+					TbAuxPAdd.Text = entry.ConstantPowerDemand.ToGUIFormat()
+					Continue For
+				End If
+
 				Dim lv0 As ListViewItem = New ListViewItem
 				lv0.SubItems(0).Text = entry.ID
 				lv0.SubItems.Add(entry.AuxiliaryType.ToString())
@@ -576,6 +586,7 @@ Public Class VectoJobForm
 			auxEntry.Type = lv0.SubItems(1).Text
 			vectoJob.AuxPaths.Add(lv0.SubItems(0).Text, auxEntry)
 		Next
+		vectoJob.AuxPAdd = TbAuxPAdd.Text.ToDouble(0)
 
 		vectoJob.EngineOnly = CbEngOnly.Checked
 
diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb
index 6f5deab068..2070b4bc1e 100644
--- a/VECTO/Input Files/Gearbox.vb	
+++ b/VECTO/Input Files/Gearbox.vb	
@@ -394,7 +394,7 @@ Public Class Gearbox
 						.Ratio = GearRatios(i)
 						}
 				If File.Exists(GearshiftFiles(i).OriginalPath) Then
-					gearDict.ShiftPolygon = VectoCSVFile.Read(GearshiftFiles(i).OriginalPath)
+					gearDict.ShiftPolygon = VectoCSVFile.Read(GearshiftFiles(i).FullPath)
 				End If
 				If Not String.IsNullOrWhiteSpace(MaxTorque(i)) AndAlso IsNumeric(MaxTorque(i)) Then
 					gearDict.MaxTorque = MaxTorque(i).ToDouble().SI(Of NewtonMeter)()
@@ -402,7 +402,7 @@ Public Class Gearbox
 				If IsNumeric(GearLossMap(i, True)) Then
 					gearDict.Efficiency = GearLossMap(i, True).ToDouble()
 				Else
-					gearDict.LossMap = VectoCSVFile.Read(GearLossmaps(i).PathOrDummy)
+					gearDict.LossMap = VectoCSVFile.Read(GearLossmaps(i).FullPath)
 				End If
 
 				ls.Add(gearDict)
diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb
index 326f511c81..deaeed50a9 100644
--- a/VECTO/Input Files/VectoJob.vb	
+++ b/VECTO/Input Files/VectoJob.vb	
@@ -156,6 +156,9 @@ Public Class VectoJob
 												}))
 		End If
 
+		If Not Cfg.DeclMode Then
+			body.Add("Padd", AuxPAdd)
+		End If
 		body.Add("VACC", _driverAccelerationFile.PathOrDummy)
 		body.Add("EngineOnlyMode", EngineOnly)
 		body.Add("StartStop", New Dictionary(Of String, Object) From {
@@ -895,6 +898,9 @@ Public Class VectoJob
 		End Get
 	End Property
 
+	Public Property AuxPAdd As Double
+
+
 #End Region
 End Class
 
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs
index 0ca3625a09..c040f5b264 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs
@@ -260,7 +260,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 				LossMap =
 					gear[JsonKeys.Gearbox_Gear_LossMapFile] != null
 						? ReadTableData(gear.GetEx<string>(JsonKeys.Gearbox_Gear_LossMapFile),
-							string.Format("Gear {0} LossMap", gearNumber))
+							string.Format("Gear {0} LossMap", gearNumber), false)
 						: null,
 				Efficiency = gear[JsonKeys.Gearbox_Gear_Efficiency] != null
 					? gear[JsonKeys.Gearbox_Gear_Efficiency].Value<double>()
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
index a33d148b64..32d0b55b22 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
@@ -84,7 +84,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 
 		protected TableData ReadTableData(string filename, string tableType, bool required = true)
 		{
-			if (!EmptyOrInvalidFileName(filename)) {
+			if (!EmptyOrInvalidFileName(filename) && File.Exists(Path.Combine(BasePath, filename))) {
 				try {
 					return VectoCSVFile.Read(Path.Combine(BasePath, filename), true);
 				} catch (Exception e) {
@@ -585,6 +585,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		protected override IList<AuxiliaryDataInputData> AuxData()
 		{
 			var retVal = new List<AuxiliaryDataInputData>();
+			if (Body["Padd"] != null) {
+				retVal.Add(new AuxiliaryDataInputData() {
+					ID = "ConstanntAux",
+					AuxiliaryType = AuxiliaryDemandType.Constant,
+					ConstantPowerDemand = Body.GetEx<double>("Padd").SI<Watt>()
+				});
+			}
 			foreach (var aux in Body["Aux"] ?? Enumerable.Empty<JToken>()) {
 				try {
 					aux.GetEx("Technology").ToObject<List<string>>();
-- 
GitLab