From 078765a07e97da06b9b2ff0359e4e4c6044ce014 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Thu, 9 Jun 2016 15:09:49 +0200
Subject: [PATCH] adapt Vecto GUI to have additional input parameters for
 coasting model

---
 VECTO/File Browser/FB_Global.vb |   59 +-
 VECTO/GUI/F_MAINForm.vb         |    4 +
 VECTO/GUI/F_VECTO.Designer.vb   |  782 ++++++++++-------
 VECTO/GUI/F_VECTO.resx          |    3 -
 VECTO/GUI/F_VECTO.vb            |   33 +-
 VECTO/Input Files/cVECTO.vb     | 1390 ++++++++++++++++---------------
 6 files changed, 1237 insertions(+), 1034 deletions(-)

diff --git a/VECTO/File Browser/FB_Global.vb b/VECTO/File Browser/FB_Global.vb
index be1c6977b5..741f01d03d 100644
--- a/VECTO/File Browser/FB_Global.vb	
+++ b/VECTO/File Browser/FB_Global.vb	
@@ -13,36 +13,33 @@
 ''' Global File Brower properties and cFilebrowser instances.
 ''' </summary>
 ''' <remarks></remarks>
-public Module FB_Global
-
-    Public FB_FolderHistory(19) As String
-    Public FB_Drives() As String
-    Public FB_Init As Boolean
-    Public FB_FilHisDir As String
-    '-----------------------------
-    Public fbFolder As cFileBrowser
-    Public fbVECTO As cFileBrowser
-    Public fbFileLists As cFileBrowser
-    Public fbVEH As cFileBrowser
-    Public fbDRI As cFileBrowser
-    Public fbMAP As cFileBrowser
-    Public fbFLD As cFileBrowser
-
-    Public fbENG As cFileBrowser
-    Public fbGBX As cFileBrowser
-    Public fbACC As cFileBrowser
-    Public fbAUX As cFileBrowser
-
-    Public fbGBS As cFileBrowser
-    Public fbTLM As cFileBrowser
-    Public fbRLM As cFileBrowser
-    Public fbTCC As cFileBrowser
-    Public fbCDx As cFileBrowser
-
-    Public fbVMOD As cFileBrowser
-
-
-
-
+Public Module FB_Global
+	Public FB_FolderHistory(19) As String
+	Public FB_Drives() As String
+	Public FB_Init As Boolean
+	Public FB_FilHisDir As String
+	'-----------------------------
+	Public fbFolder As cFileBrowser
+	Public fbVECTO As cFileBrowser
+	Public fbFileLists As cFileBrowser
+	Public fbVEH As cFileBrowser
+	Public fbDRI As cFileBrowser
+	Public fbMAP As cFileBrowser
+	Public fbFLD As cFileBrowser
+
+	Public fbENG As cFileBrowser
+	Public fbGBX As cFileBrowser
+	Public fbACC As cFileBrowser
+	Public fbDfTargetSpeed As cFileBrowser
+	Public fbDfVelocityDrop As cFileBrowser
+	Public fbAUX As cFileBrowser
+
+	Public fbGBS As cFileBrowser
+	Public fbTLM As cFileBrowser
+	Public fbRLM As cFileBrowser
+	Public fbTCC As cFileBrowser
+	Public fbCDx As cFileBrowser
+
+	Public fbVMOD As cFileBrowser
 End Module
 
diff --git a/VECTO/GUI/F_MAINForm.vb b/VECTO/GUI/F_MAINForm.vb
index 7384ad6a83..97c0332056 100644
--- a/VECTO/GUI/F_MAINForm.vb
+++ b/VECTO/GUI/F_MAINForm.vb
@@ -138,6 +138,10 @@ Public Class F_MAINForm
 		fbTLM = New cFileBrowser("vtlm")
 		fbTCC = New cFileBrowser("vtcc")
 		fbCDx = New cFileBrowser("vcdx")
+		fbDfVelocityDrop = New cFileBrowser("DfVelocityDrop")
+		fbDfTargetSpeed = New cFileBrowser("DfTargetSpeed")
+		fbDfVelocityDrop.Extensions = New String() {"csv"}
+		fbDfTargetSpeed.Extensions = New String() {"csv"}
 
 		fbVMOD = New cFileBrowser("vmod")
 
diff --git a/VECTO/GUI/F_VECTO.Designer.vb b/VECTO/GUI/F_VECTO.Designer.vb
index 251f0d3e10..491a00c7fb 100644
--- a/VECTO/GUI/F_VECTO.Designer.vb
+++ b/VECTO/GUI/F_VECTO.Designer.vb
@@ -28,21 +28,22 @@ Partial Class F_VECTO
 		Me.GrCycles = New System.Windows.Forms.GroupBox()
 		Me.Label2 = New System.Windows.Forms.Label()
 		Me.LvCycles = New System.Windows.Forms.ListView()
-		Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
+		Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader)
 		Me.BtDRIrem = New System.Windows.Forms.Button()
 		Me.BtDRIadd = New System.Windows.Forms.Button()
 		Me.GrAux = New System.Windows.Forms.GroupBox()
-        Me.Label1 = New System.Windows.Forms.Label()
-        Me.btnBrowseAAUXFile = New System.Windows.Forms.Button()
-        Me.txtAdvancedAuxiliaryFile = New System.Windows.Forms.TextBox()
-        Me.picAuxInfo = New System.Windows.Forms.PictureBox()
-        Me.cboAdvancedAuxiliaries = New System.Windows.Forms.ComboBox()
-        Me.lbAdvancedAuxiliaries = New System.Windows.Forms.Label()
+		Me.btnAAUXOpen = New System.Windows.Forms.Button()
+		Me.Label1 = New System.Windows.Forms.Label()
+		Me.btnBrowseAAUXFile = New System.Windows.Forms.Button()
+		Me.txtAdvancedAuxiliaryFile = New System.Windows.Forms.TextBox()
+		Me.picAuxInfo = New System.Windows.Forms.PictureBox()
+		Me.cboAdvancedAuxiliaries = New System.Windows.Forms.ComboBox()
+		Me.lbAdvancedAuxiliaries = New System.Windows.Forms.Label()
 		Me.Label32 = New System.Windows.Forms.Label()
 		Me.LvAux = New System.Windows.Forms.ListView()
-		Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
-		Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
-		Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
+		Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader)
+		Me.ColumnHeader5 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader)
+		Me.ColumnHeader6 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader)
 		Me.ButAuxRem = New System.Windows.Forms.Button()
 		Me.ButAuxAdd = New System.Windows.Forms.Button()
 		Me.TbGBX = New System.Windows.Forms.TextBox()
@@ -61,13 +62,22 @@ Partial Class F_VECTO
 		Me.BtDesMaxBr = New System.Windows.Forms.Button()
 		Me.BtAccOpen = New System.Windows.Forms.Button()
 		Me.GrLAC = New System.Windows.Forms.GroupBox()
+		Me.GroupBox2 = New System.Windows.Forms.GroupBox()
+		Me.Label5 = New System.Windows.Forms.Label()
+		Me.Label3 = New System.Windows.Forms.Label()
+		Me.tbLacDfVelocityDropFile = New System.Windows.Forms.TextBox()
+		Me.tbLacPreviewFactor = New System.Windows.Forms.TextBox()
+		Me.btnDfVelocityDrop = New System.Windows.Forms.Button()
+		Me.btnDfTargetSpeed = New System.Windows.Forms.Button()
+		Me.Label4 = New System.Windows.Forms.Label()
+		Me.tbLacDfTargetSpeedFile = New System.Windows.Forms.TextBox()
 		Me.PnLookAhead = New System.Windows.Forms.Panel()
-		Me.Label29 = New System.Windows.Forms.Label()
-		Me.Label25 = New System.Windows.Forms.Label()
+		Me.Label9 = New System.Windows.Forms.Label()
+		Me.Label8 = New System.Windows.Forms.Label()
 		Me.TbAlookahead = New System.Windows.Forms.TextBox()
-		Me.Label24 = New System.Windows.Forms.Label()
+		Me.Label7 = New System.Windows.Forms.Label()
 		Me.TbVminLA = New System.Windows.Forms.TextBox()
-		Me.Label28 = New System.Windows.Forms.Label()
+		Me.Label6 = New System.Windows.Forms.Label()
 		Me.CbLookAhead = New System.Windows.Forms.CheckBox()
 		Me.GroupBox1 = New System.Windows.Forms.GroupBox()
 		Me.PnEcoRoll = New System.Windows.Forms.Panel()
@@ -121,28 +131,33 @@ Partial Class F_VECTO
 		Me.TbHVCclass = New System.Windows.Forms.TextBox()
 		Me.TbGbxTxt = New System.Windows.Forms.TextBox()
 		Me.TbMass = New System.Windows.Forms.TextBox()
-        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
-        Me.btnAAUXOpen = New System.Windows.Forms.Button()
-        Me.TabPgGen.SuspendLayout
-        Me.GrCycles.SuspendLayout
-        Me.GrAux.SuspendLayout
-        CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).BeginInit
-        Me.TabControl1.SuspendLayout
-        Me.TabPgDriver.SuspendLayout
-        Me.GrVACC.SuspendLayout
-        Me.GrLAC.SuspendLayout
-        Me.PnLookAhead.SuspendLayout
-        Me.GroupBox1.SuspendLayout
-        Me.PnEcoRoll.SuspendLayout
-        Me.GrStartStop.SuspendLayout
-        Me.PnStartStop.SuspendLayout
-        Me.StatusStrip1.SuspendLayout
-        Me.ToolStrip1.SuspendLayout
-        CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit
-        Me.CmOpenFile.SuspendLayout
-        CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).BeginInit
-        CType(Me.PicBox,System.ComponentModel.ISupportInitialize).BeginInit
-        Me.SuspendLayout
+		Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
+		Me.Label10 = New System.Windows.Forms.Label()
+		Me.tbDfCoastingOffset = New System.Windows.Forms.TextBox()
+		Me.Label11 = New System.Windows.Forms.Label()
+		Me.tbDfCoastingScale = New System.Windows.Forms.TextBox()
+		Me.Label12 = New System.Windows.Forms.Label()
+		Me.TabPgGen.SuspendLayout()
+		Me.GrCycles.SuspendLayout()
+		Me.GrAux.SuspendLayout()
+		CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).BeginInit()
+		Me.TabControl1.SuspendLayout()
+		Me.TabPgDriver.SuspendLayout()
+		Me.GrVACC.SuspendLayout()
+		Me.GrLAC.SuspendLayout()
+		Me.GroupBox2.SuspendLayout()
+		Me.PnLookAhead.SuspendLayout()
+		Me.GroupBox1.SuspendLayout()
+		Me.PnEcoRoll.SuspendLayout()
+		Me.GrStartStop.SuspendLayout()
+		Me.PnStartStop.SuspendLayout()
+		Me.StatusStrip1.SuspendLayout()
+		Me.ToolStrip1.SuspendLayout()
+		CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
+		Me.CmOpenFile.SuspendLayout()
+		CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).BeginInit()
+		CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit()
+		Me.SuspendLayout()
 		'
 		'TabPgGen
 		'
@@ -160,7 +175,7 @@ Partial Class F_VECTO
 		Me.TabPgGen.Location = New System.Drawing.Point(4, 22)
 		Me.TabPgGen.Name = "TabPgGen"
 		Me.TabPgGen.Padding = New System.Windows.Forms.Padding(3)
-		Me.TabPgGen.Size = New System.Drawing.Size(527, 491)
+		Me.TabPgGen.Size = New System.Drawing.Size(527, 573)
 		Me.TabPgGen.TabIndex = 0
 		Me.TabPgGen.Text = "General"
 		Me.TabPgGen.UseVisualStyleBackColor = True
@@ -184,8 +199,8 @@ Partial Class F_VECTO
 		'Label2
 		'
 		Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-        Me.Label2.AutoSize = true
-        Me.Label2.Location = New System.Drawing.Point(387, 188)
+		Me.Label2.AutoSize = True
+		Me.Label2.Location = New System.Drawing.Point(387, 188)
 		Me.Label2.Name = "Label2"
 		Me.Label2.Size = New System.Drawing.Size(122, 13)
 		Me.Label2.TabIndex = 3
@@ -199,10 +214,10 @@ Partial Class F_VECTO
 		Me.LvCycles.FullRowSelect = True
 		Me.LvCycles.GridLines = True
 		Me.LvCycles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None
-        Me.LvCycles.HideSelection = false
-        Me.LvCycles.LabelEdit = true
-        Me.LvCycles.Location = New System.Drawing.Point(6, 25)
-        Me.LvCycles.MultiSelect = false
+		Me.LvCycles.HideSelection = False
+		Me.LvCycles.LabelEdit = True
+		Me.LvCycles.Location = New System.Drawing.Point(6, 25)
+		Me.LvCycles.MultiSelect = False
 		Me.LvCycles.Name = "LvCycles"
 		Me.LvCycles.Size = New System.Drawing.Size(503, 123)
 		Me.LvCycles.TabIndex = 0
@@ -219,7 +234,7 @@ Partial Class F_VECTO
 		'
 		Me.BtDRIrem.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
 		Me.BtDRIrem.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon
-        Me.BtDRIrem.Location = New System.Drawing.Point(41, 156)
+		Me.BtDRIrem.Location = New System.Drawing.Point(41, 156)
 		Me.BtDRIrem.Name = "BtDRIrem"
 		Me.BtDRIrem.Size = New System.Drawing.Size(29, 23)
 		Me.BtDRIrem.TabIndex = 2
@@ -229,7 +244,7 @@ Partial Class F_VECTO
 		'
 		Me.BtDRIadd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
 		Me.BtDRIadd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon
-        Me.BtDRIadd.Location = New System.Drawing.Point(6, 156)
+		Me.BtDRIadd.Location = New System.Drawing.Point(6, 156)
 		Me.BtDRIadd.Name = "BtDRIadd"
 		Me.BtDRIadd.Size = New System.Drawing.Size(29, 23)
 		Me.BtDRIadd.TabIndex = 1
@@ -240,83 +255,92 @@ Partial Class F_VECTO
 		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.btnAAUXOpen)
-        Me.GrAux.Controls.Add(Me.Label1)
-        Me.GrAux.Controls.Add(Me.btnBrowseAAUXFile)
-        Me.GrAux.Controls.Add(Me.txtAdvancedAuxiliaryFile)
-        Me.GrAux.Controls.Add(Me.picAuxInfo)
-        Me.GrAux.Controls.Add(Me.cboAdvancedAuxiliaries)
-        Me.GrAux.Controls.Add(Me.lbAdvancedAuxiliaries)
+		Me.GrAux.Controls.Add(Me.btnAAUXOpen)
+		Me.GrAux.Controls.Add(Me.Label1)
+		Me.GrAux.Controls.Add(Me.btnBrowseAAUXFile)
+		Me.GrAux.Controls.Add(Me.txtAdvancedAuxiliaryFile)
+		Me.GrAux.Controls.Add(Me.picAuxInfo)
+		Me.GrAux.Controls.Add(Me.cboAdvancedAuxiliaries)
+		Me.GrAux.Controls.Add(Me.lbAdvancedAuxiliaries)
 		Me.GrAux.Controls.Add(Me.Label32)
 		Me.GrAux.Controls.Add(Me.LvAux)
 		Me.GrAux.Controls.Add(Me.ButAuxRem)
 		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, 260)
+		Me.GrAux.Size = New System.Drawing.Size(515, 260)
 		Me.GrAux.TabIndex = 9
 		Me.GrAux.TabStop = False
 		Me.GrAux.Text = "Auxiliaries"
 		'
-        'Label1
-        '
-        Me.Label1.AutoSize = true
-        Me.Label1.Location = New System.Drawing.Point(7, 52)
-        Me.Label1.Name = "Label1"
-        Me.Label1.Size = New System.Drawing.Size(96, 13)
-        Me.Label1.TabIndex = 40
-        Me.Label1.Text = "Advanced Aux File"
-        '
-        'btnBrowseAAUXFile
-        '
-        Me.btnBrowseAAUXFile.Location = New System.Drawing.Point(447, 45)
-        Me.btnBrowseAAUXFile.Name = "btnBrowseAAUXFile"
-        Me.btnBrowseAAUXFile.Size = New System.Drawing.Size(36, 23)
-        Me.btnBrowseAAUXFile.TabIndex = 39
-        Me.btnBrowseAAUXFile.Text = ". . ."
-        Me.ToolTip1.SetToolTip(Me.btnBrowseAAUXFile, "Configure/Browser  Advanced Auxiliary Files")
-        Me.btnBrowseAAUXFile.UseVisualStyleBackColor = true
-        '
-        'txtAdvancedAuxiliaryFile
-        '
-        Me.txtAdvancedAuxiliaryFile.Location = New System.Drawing.Point(119, 47)
-        Me.txtAdvancedAuxiliaryFile.Name = "txtAdvancedAuxiliaryFile"
-        Me.txtAdvancedAuxiliaryFile.Size = New System.Drawing.Size(321, 20)
-        Me.txtAdvancedAuxiliaryFile.TabIndex = 38
-        '
-        'picAuxInfo
-        '
-        Me.picAuxInfo.Image = Global.VECTO.My.Resources.Resources.Information_icon
-        Me.picAuxInfo.InitialImage = Global.VECTO.My.Resources.Resources.Information_icon
-        Me.picAuxInfo.Location = New System.Drawing.Point(451, 19)
-        Me.picAuxInfo.Name = "picAuxInfo"
-        Me.picAuxInfo.Size = New System.Drawing.Size(16, 16)
-        Me.picAuxInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
-        Me.picAuxInfo.TabIndex = 37
-        Me.picAuxInfo.TabStop = false
-        '
-        'cboAdvancedAuxiliaries
-        '
-        Me.cboAdvancedAuxiliaries.FormattingEnabled = true
-        Me.cboAdvancedAuxiliaries.Location = New System.Drawing.Point(119, 18)
-        Me.cboAdvancedAuxiliaries.Name = "cboAdvancedAuxiliaries"
-        Me.cboAdvancedAuxiliaries.Size = New System.Drawing.Size(321, 21)
-        Me.cboAdvancedAuxiliaries.TabIndex = 36
-        '
-        'lbAdvancedAuxiliaries
-        '
-        Me.lbAdvancedAuxiliaries.AutoSize = true
-        Me.lbAdvancedAuxiliaries.Location = New System.Drawing.Point(7, 21)
-        Me.lbAdvancedAuxiliaries.Name = "lbAdvancedAuxiliaries"
-        Me.lbAdvancedAuxiliaries.Size = New System.Drawing.Size(72, 13)
-        Me.lbAdvancedAuxiliaries.TabIndex = 35
-        Me.lbAdvancedAuxiliaries.Text = "Auxiliary Type"
-        '
+		'btnAAUXOpen
+		'
+		Me.btnAAUXOpen.Image = Global.VECTO.My.Resources.Resources.application_export_icon_small
+		Me.btnAAUXOpen.Location = New System.Drawing.Point(486, 45)
+		Me.btnAAUXOpen.Name = "btnAAUXOpen"
+		Me.btnAAUXOpen.Size = New System.Drawing.Size(26, 23)
+		Me.btnAAUXOpen.TabIndex = 41
+		Me.btnAAUXOpen.UseVisualStyleBackColor = True
+		'
+		'Label1
+		'
+		Me.Label1.AutoSize = True
+		Me.Label1.Location = New System.Drawing.Point(7, 52)
+		Me.Label1.Name = "Label1"
+		Me.Label1.Size = New System.Drawing.Size(96, 13)
+		Me.Label1.TabIndex = 40
+		Me.Label1.Text = "Advanced Aux File"
+		'
+		'btnBrowseAAUXFile
+		'
+		Me.btnBrowseAAUXFile.Location = New System.Drawing.Point(447, 45)
+		Me.btnBrowseAAUXFile.Name = "btnBrowseAAUXFile"
+		Me.btnBrowseAAUXFile.Size = New System.Drawing.Size(36, 23)
+		Me.btnBrowseAAUXFile.TabIndex = 39
+		Me.btnBrowseAAUXFile.Text = ". . ."
+		Me.ToolTip1.SetToolTip(Me.btnBrowseAAUXFile, "Configure/Browser  Advanced Auxiliary Files")
+		Me.btnBrowseAAUXFile.UseVisualStyleBackColor = True
+		'
+		'txtAdvancedAuxiliaryFile
+		'
+		Me.txtAdvancedAuxiliaryFile.Location = New System.Drawing.Point(119, 47)
+		Me.txtAdvancedAuxiliaryFile.Name = "txtAdvancedAuxiliaryFile"
+		Me.txtAdvancedAuxiliaryFile.Size = New System.Drawing.Size(321, 20)
+		Me.txtAdvancedAuxiliaryFile.TabIndex = 38
+		'
+		'picAuxInfo
+		'
+		Me.picAuxInfo.Image = Global.VECTO.My.Resources.Resources.Information_icon
+		Me.picAuxInfo.InitialImage = Global.VECTO.My.Resources.Resources.Information_icon
+		Me.picAuxInfo.Location = New System.Drawing.Point(451, 19)
+		Me.picAuxInfo.Name = "picAuxInfo"
+		Me.picAuxInfo.Size = New System.Drawing.Size(16, 16)
+		Me.picAuxInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
+		Me.picAuxInfo.TabIndex = 37
+		Me.picAuxInfo.TabStop = False
+		'
+		'cboAdvancedAuxiliaries
+		'
+		Me.cboAdvancedAuxiliaries.FormattingEnabled = True
+		Me.cboAdvancedAuxiliaries.Location = New System.Drawing.Point(119, 18)
+		Me.cboAdvancedAuxiliaries.Name = "cboAdvancedAuxiliaries"
+		Me.cboAdvancedAuxiliaries.Size = New System.Drawing.Size(321, 21)
+		Me.cboAdvancedAuxiliaries.TabIndex = 36
+		'
+		'lbAdvancedAuxiliaries
+		'
+		Me.lbAdvancedAuxiliaries.AutoSize = True
+		Me.lbAdvancedAuxiliaries.Location = New System.Drawing.Point(7, 21)
+		Me.lbAdvancedAuxiliaries.Name = "lbAdvancedAuxiliaries"
+		Me.lbAdvancedAuxiliaries.Size = New System.Drawing.Size(72, 13)
+		Me.lbAdvancedAuxiliaries.TabIndex = 35
+		Me.lbAdvancedAuxiliaries.Text = "Auxiliary Type"
+		'
 		'Label32
 		'
 		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(369, 200)
+		Me.Label32.AutoSize = True
+		Me.Label32.Location = New System.Drawing.Point(369, 200)
 		Me.Label32.Name = "Label32"
 		Me.Label32.Size = New System.Drawing.Size(139, 13)
 		Me.Label32.TabIndex = 3
@@ -327,11 +351,11 @@ Partial Class F_VECTO
 		Me.LvAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
 			Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
 		Me.LvAux.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6})
-        Me.LvAux.FullRowSelect = true
-        Me.LvAux.GridLines = true
-        Me.LvAux.HideSelection = false
-        Me.LvAux.Location = New System.Drawing.Point(6, 72)
-        Me.LvAux.MultiSelect = false
+		Me.LvAux.FullRowSelect = True
+		Me.LvAux.GridLines = True
+		Me.LvAux.HideSelection = False
+		Me.LvAux.Location = New System.Drawing.Point(6, 72)
+		Me.LvAux.MultiSelect = False
 		Me.LvAux.Name = "LvAux"
 		Me.LvAux.Size = New System.Drawing.Size(503, 117)
 		Me.LvAux.TabIndex = 0
@@ -357,7 +381,7 @@ Partial Class F_VECTO
 		'ButAuxRem
 		'
 		Me.ButAuxRem.Image = Global.VECTO.My.Resources.Resources.minus_circle_icon
-        Me.ButAuxRem.Location = New System.Drawing.Point(42, 195)
+		Me.ButAuxRem.Location = New System.Drawing.Point(42, 195)
 		Me.ButAuxRem.Name = "ButAuxRem"
 		Me.ButAuxRem.Size = New System.Drawing.Size(29, 23)
 		Me.ButAuxRem.TabIndex = 2
@@ -366,7 +390,7 @@ Partial Class F_VECTO
 		'ButAuxAdd
 		'
 		Me.ButAuxAdd.Image = Global.VECTO.My.Resources.Resources.plus_circle_icon
-        Me.ButAuxAdd.Location = New System.Drawing.Point(7, 195)
+		Me.ButAuxAdd.Location = New System.Drawing.Point(7, 195)
 		Me.ButAuxAdd.Name = "ButAuxAdd"
 		Me.ButAuxAdd.Size = New System.Drawing.Size(29, 23)
 		Me.ButAuxAdd.TabIndex = 1
@@ -471,7 +495,7 @@ Partial Class F_VECTO
 		Me.TabControl1.Location = New System.Drawing.Point(1, 107)
 		Me.TabControl1.Name = "TabControl1"
 		Me.TabControl1.SelectedIndex = 0
-        Me.TabControl1.Size = New System.Drawing.Size(535, 568)
+		Me.TabControl1.Size = New System.Drawing.Size(535, 599)
 		Me.TabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed
 		Me.TabControl1.TabIndex = 0
 		'
@@ -484,7 +508,7 @@ Partial Class F_VECTO
 		Me.TabPgDriver.Location = New System.Drawing.Point(4, 22)
 		Me.TabPgDriver.Name = "TabPgDriver"
 		Me.TabPgDriver.Padding = New System.Windows.Forms.Padding(3)
-        Me.TabPgDriver.Size = New System.Drawing.Size(527, 542)
+		Me.TabPgDriver.Size = New System.Drawing.Size(527, 573)
 		Me.TabPgDriver.TabIndex = 7
 		Me.TabPgDriver.Text = "Driver Assist"
 		Me.TabPgDriver.UseVisualStyleBackColor = True
@@ -494,9 +518,9 @@ Partial Class F_VECTO
 		Me.GrVACC.Controls.Add(Me.TbDesMaxFile)
 		Me.GrVACC.Controls.Add(Me.BtDesMaxBr)
 		Me.GrVACC.Controls.Add(Me.BtAccOpen)
-		Me.GrVACC.Location = New System.Drawing.Point(6, 401)
+		Me.GrVACC.Location = New System.Drawing.Point(7, 502)
 		Me.GrVACC.Name = "GrVACC"
-		Me.GrVACC.Size = New System.Drawing.Size(515, 84)
+		Me.GrVACC.Size = New System.Drawing.Size(515, 65)
 		Me.GrVACC.TabIndex = 3
 		Me.GrVACC.TabStop = False
 		Me.GrVACC.Text = "Max. acceleration and brake curves"
@@ -533,77 +557,181 @@ Partial Class F_VECTO
 		'
 		'GrLAC
 		'
+		Me.GrLAC.Controls.Add(Me.GroupBox2)
 		Me.GrLAC.Controls.Add(Me.PnLookAhead)
 		Me.GrLAC.Controls.Add(Me.CbLookAhead)
 		Me.GrLAC.Location = New System.Drawing.Point(7, 290)
 		Me.GrLAC.Name = "GrLAC"
-		Me.GrLAC.Size = New System.Drawing.Size(514, 105)
+		Me.GrLAC.Size = New System.Drawing.Size(514, 206)
 		Me.GrLAC.TabIndex = 2
 		Me.GrLAC.TabStop = False
 		Me.GrLAC.Text = "Look-Ahead Coasting"
 		'
+		'GroupBox2
+		'
+		Me.GroupBox2.BackColor = System.Drawing.Color.AliceBlue
+		Me.GroupBox2.Controls.Add(Me.Label12)
+		Me.GroupBox2.Controls.Add(Me.tbDfCoastingScale)
+		Me.GroupBox2.Controls.Add(Me.Label11)
+		Me.GroupBox2.Controls.Add(Me.tbDfCoastingOffset)
+		Me.GroupBox2.Controls.Add(Me.Label10)
+		Me.GroupBox2.Controls.Add(Me.Label5)
+		Me.GroupBox2.Controls.Add(Me.Label3)
+		Me.GroupBox2.Controls.Add(Me.tbLacDfVelocityDropFile)
+		Me.GroupBox2.Controls.Add(Me.tbLacPreviewFactor)
+		Me.GroupBox2.Controls.Add(Me.btnDfVelocityDrop)
+		Me.GroupBox2.Controls.Add(Me.btnDfTargetSpeed)
+		Me.GroupBox2.Controls.Add(Me.Label4)
+		Me.GroupBox2.Controls.Add(Me.tbLacDfTargetSpeedFile)
+		Me.GroupBox2.Location = New System.Drawing.Point(15, 76)
+		Me.GroupBox2.Name = "GroupBox2"
+		Me.GroupBox2.Size = New System.Drawing.Size(478, 124)
+		Me.GroupBox2.TabIndex = 3
+		Me.GroupBox2.TabStop = False
+		Me.GroupBox2.Text = "Coasting Parameters WB2016   (v3 only)"
+		'
+		'Label5
+		'
+		Me.Label5.AutoSize = True
+		Me.Label5.Location = New System.Drawing.Point(8, 76)
+		Me.Label5.Name = "Label5"
+		Me.Label5.Size = New System.Drawing.Size(153, 13)
+		Me.Label5.TabIndex = 11
+		Me.Label5.Text = "Decision Factor - Velocity Drop"
+		Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'Label3
+		'
+		Me.Label3.AutoSize = True
+		Me.Label3.Location = New System.Drawing.Point(43, 23)
+		Me.Label3.Name = "Label3"
+		Me.Label3.Size = New System.Drawing.Size(118, 13)
+		Me.Label3.TabIndex = 4
+		Me.Label3.Text = "Preview distance factor"
+		Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'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(167, 73)
+		Me.tbLacDfVelocityDropFile.Name = "tbLacDfVelocityDropFile"
+		Me.tbLacDfVelocityDropFile.Size = New System.Drawing.Size(264, 20)
+		Me.tbLacDfVelocityDropFile.TabIndex = 9
+		'
+		'tbLacPreviewFactor
+		'
+		Me.tbLacPreviewFactor.Location = New System.Drawing.Point(167, 20)
+		Me.tbLacPreviewFactor.Name = "tbLacPreviewFactor"
+		Me.tbLacPreviewFactor.Size = New System.Drawing.Size(64, 20)
+		Me.tbLacPreviewFactor.TabIndex = 5
+		'
+		'btnDfVelocityDrop
+		'
+		Me.btnDfVelocityDrop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.btnDfVelocityDrop.Location = New System.Drawing.Point(437, 72)
+		Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop"
+		Me.btnDfVelocityDrop.Size = New System.Drawing.Size(28, 21)
+		Me.btnDfVelocityDrop.TabIndex = 10
+		Me.btnDfVelocityDrop.TabStop = False
+		Me.btnDfVelocityDrop.Text = "..."
+		Me.btnDfVelocityDrop.UseVisualStyleBackColor = True
+		'
+		'btnDfTargetSpeed
+		'
+		Me.btnDfTargetSpeed.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+		Me.btnDfTargetSpeed.Location = New System.Drawing.Point(437, 45)
+		Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed"
+		Me.btnDfTargetSpeed.Size = New System.Drawing.Size(28, 21)
+		Me.btnDfTargetSpeed.TabIndex = 7
+		Me.btnDfTargetSpeed.TabStop = False
+		Me.btnDfTargetSpeed.Text = "..."
+		Me.btnDfTargetSpeed.UseVisualStyleBackColor = True
+		'
+		'Label4
+		'
+		Me.Label4.AutoSize = True
+		Me.Label4.Location = New System.Drawing.Point(6, 49)
+		Me.Label4.Name = "Label4"
+		Me.Label4.Size = New System.Drawing.Size(155, 13)
+		Me.Label4.TabIndex = 8
+		Me.Label4.Text = "Decision Factor - Target Speed"
+		Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+		'
+		'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(167, 46)
+		Me.tbLacDfTargetSpeedFile.Name = "tbLacDfTargetSpeedFile"
+		Me.tbLacDfTargetSpeedFile.Size = New System.Drawing.Size(264, 20)
+		Me.tbLacDfTargetSpeedFile.TabIndex = 6
+		'
 		'PnLookAhead
 		'
-		Me.PnLookAhead.Controls.Add(Me.Label29)
-		Me.PnLookAhead.Controls.Add(Me.Label25)
+		Me.PnLookAhead.BackColor = System.Drawing.Color.Transparent
+		Me.PnLookAhead.Controls.Add(Me.Label9)
+		Me.PnLookAhead.Controls.Add(Me.Label8)
 		Me.PnLookAhead.Controls.Add(Me.TbAlookahead)
-		Me.PnLookAhead.Controls.Add(Me.Label24)
+		Me.PnLookAhead.Controls.Add(Me.Label7)
 		Me.PnLookAhead.Controls.Add(Me.TbVminLA)
-		Me.PnLookAhead.Controls.Add(Me.Label28)
-		Me.PnLookAhead.Location = New System.Drawing.Point(117, 10)
+		Me.PnLookAhead.Controls.Add(Me.Label6)
+		Me.PnLookAhead.Location = New System.Drawing.Point(136, 12)
 		Me.PnLookAhead.Name = "PnLookAhead"
-		Me.PnLookAhead.Size = New System.Drawing.Size(252, 71)
+		Me.PnLookAhead.Size = New System.Drawing.Size(232, 59)
 		Me.PnLookAhead.TabIndex = 1
 		'
-		'Label29
+		'Label9
 		'
-		Me.Label29.AutoSize = True
-		Me.Label29.Location = New System.Drawing.Point(197, 38)
-		Me.Label29.Name = "Label29"
-		Me.Label29.Size = New System.Drawing.Size(38, 13)
-		Me.Label29.TabIndex = 3
-		Me.Label29.Text = "[km/h]"
+		Me.Label9.AutoSize = True
+		Me.Label9.Location = New System.Drawing.Point(182, 12)
+		Me.Label9.Name = "Label9"
+		Me.Label9.Size = New System.Drawing.Size(34, 13)
+		Me.Label9.TabIndex = 7
+		Me.Label9.Text = "[m/s²]"
 		'
-		'Label25
+		'Label8
 		'
-		Me.Label25.AutoSize = True
-		Me.Label25.Location = New System.Drawing.Point(197, 12)
-		Me.Label25.Name = "Label25"
-		Me.Label25.Size = New System.Drawing.Size(34, 13)
-		Me.Label25.TabIndex = 3
-		Me.Label25.Text = "[m/s²]"
+		Me.Label8.AutoSize = True
+		Me.Label8.Location = New System.Drawing.Point(182, 38)
+		Me.Label8.Name = "Label8"
+		Me.Label8.Size = New System.Drawing.Size(38, 13)
+		Me.Label8.TabIndex = 4
+		Me.Label8.Text = "[km/h]"
 		'
 		'TbAlookahead
 		'
-		Me.TbAlookahead.Location = New System.Drawing.Point(127, 9)
+		Me.TbAlookahead.Location = New System.Drawing.Point(112, 9)
 		Me.TbAlookahead.Name = "TbAlookahead"
 		Me.TbAlookahead.Size = New System.Drawing.Size(64, 20)
 		Me.TbAlookahead.TabIndex = 0
 		'
-		'Label24
+		'Label7
 		'
-		Me.Label24.AutoSize = True
-		Me.Label24.Location = New System.Drawing.Point(25, 12)
-		Me.Label24.Name = "Label24"
-		Me.Label24.Size = New System.Drawing.Size(96, 13)
-		Me.Label24.TabIndex = 1
-		Me.Label24.Text = "Target Retardation"
+		Me.Label7.AutoSize = True
+		Me.Label7.Location = New System.Drawing.Point(26, 38)
+		Me.Label7.Name = "Label7"
+		Me.Label7.Size = New System.Drawing.Size(80, 13)
+		Me.Label7.TabIndex = 6
+		Me.Label7.Text = "Minimum speed"
+		Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
 		'
 		'TbVminLA
 		'
-		Me.TbVminLA.Location = New System.Drawing.Point(127, 35)
+		Me.TbVminLA.Location = New System.Drawing.Point(112, 35)
 		Me.TbVminLA.Name = "TbVminLA"
 		Me.TbVminLA.Size = New System.Drawing.Size(64, 20)
 		Me.TbVminLA.TabIndex = 1
 		'
-		'Label28
+		'Label6
 		'
-		Me.Label28.AutoSize = True
-		Me.Label28.Location = New System.Drawing.Point(41, 38)
-		Me.Label28.Name = "Label28"
-		Me.Label28.Size = New System.Drawing.Size(80, 13)
-		Me.Label28.TabIndex = 1
-		Me.Label28.Text = "Minimum speed"
+		Me.Label6.AutoSize = True
+		Me.Label6.Location = New System.Drawing.Point(10, 12)
+		Me.Label6.Name = "Label6"
+		Me.Label6.Size = New System.Drawing.Size(96, 13)
+		Me.Label6.TabIndex = 5
+		Me.Label6.Text = "Target Retardation"
+		Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
 		'
 		'CbLookAhead
 		'
@@ -870,7 +998,7 @@ Partial Class F_VECTO
 		'StatusStrip1
 		'
 		Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelGEN})
-        Me.StatusStrip1.Location = New System.Drawing.Point(0, 678)
+		Me.StatusStrip1.Location = New System.Drawing.Point(0, 725)
 		Me.StatusStrip1.Name = "StatusStrip1"
 		Me.StatusStrip1.Size = New System.Drawing.Size(944, 22)
 		Me.StatusStrip1.SizingGrip = False
@@ -886,7 +1014,7 @@ Partial Class F_VECTO
 		'ButOK
 		'
 		Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
-        Me.ButOK.Location = New System.Drawing.Point(779, 652)
+		Me.ButOK.Location = New System.Drawing.Point(779, 699)
 		Me.ButOK.Name = "ButOK"
 		Me.ButOK.Size = New System.Drawing.Size(75, 23)
 		Me.ButOK.TabIndex = 0
@@ -897,7 +1025,7 @@ Partial Class F_VECTO
 		'
 		Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
 		Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
-        Me.ButCancel.Location = New System.Drawing.Point(860, 652)
+		Me.ButCancel.Location = New System.Drawing.Point(860, 699)
 		Me.ButCancel.Name = "ButCancel"
 		Me.ButCancel.Size = New System.Drawing.Size(75, 23)
 		Me.ButCancel.TabIndex = 1
@@ -1007,7 +1135,7 @@ Partial Class F_VECTO
 		'
 		Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem})
 		Me.CmOpenFile.Name = "CmOpenFile"
-        Me.CmOpenFile.Size = New System.Drawing.Size(153, 70)
+		Me.CmOpenFile.Size = New System.Drawing.Size(153, 48)
 		'
 		'OpenWithToolStripMenuItem
 		'
@@ -1088,22 +1216,54 @@ Partial Class F_VECTO
 		Me.TbMass.Size = New System.Drawing.Size(50, 20)
 		Me.TbMass.TabIndex = 3
 		'
-        'btnAAUXOpen
-        '
-        Me.btnAAUXOpen.Image = Global.VECTO.My.Resources.Resources.application_export_icon_small
-        Me.btnAAUXOpen.Location = New System.Drawing.Point(486, 45)
-        Me.btnAAUXOpen.Name = "btnAAUXOpen"
-        Me.btnAAUXOpen.Size = New System.Drawing.Size(26, 23)
-        Me.btnAAUXOpen.TabIndex = 41
-        Me.btnAAUXOpen.UseVisualStyleBackColor = true
-        '
+		'Label10
+		'
+		Me.Label10.AutoSize = True
+		Me.Label10.Location = New System.Drawing.Point(82, 102)
+		Me.Label10.Name = "Label10"
+		Me.Label10.Size = New System.Drawing.Size(79, 13)
+		Me.Label10.TabIndex = 12
+		Me.Label10.Text = "DF_coasting = "
+		'
+		'tbDfCoastingOffset
+		'
+		Me.tbDfCoastingOffset.Location = New System.Drawing.Point(168, 99)
+		Me.tbDfCoastingOffset.Name = "tbDfCoastingOffset"
+		Me.tbDfCoastingOffset.Size = New System.Drawing.Size(37, 20)
+		Me.tbDfCoastingOffset.TabIndex = 14
+		'
+		'Label11
+		'
+		Me.Label11.AutoSize = True
+		Me.Label11.Location = New System.Drawing.Point(212, 101)
+		Me.Label11.Name = "Label11"
+		Me.Label11.Size = New System.Drawing.Size(13, 13)
+		Me.Label11.TabIndex = 15
+		Me.Label11.Text = "- "
+		'
+		'tbDfCoastingScale
+		'
+		Me.tbDfCoastingScale.Location = New System.Drawing.Point(229, 99)
+		Me.tbDfCoastingScale.Name = "tbDfCoastingScale"
+		Me.tbDfCoastingScale.Size = New System.Drawing.Size(37, 20)
+		Me.tbDfCoastingScale.TabIndex = 16
+		'
+		'Label12
+		'
+		Me.Label12.AutoSize = True
+		Me.Label12.Location = New System.Drawing.Point(272, 102)
+		Me.Label12.Name = "Label12"
+		Me.Label12.Size = New System.Drawing.Size(130, 13)
+		Me.Label12.TabIndex = 17
+		Me.Label12.Text = "* DF_vTarget * DF_vDrop"
+		'
 		'F_VECTO
 		'
 		Me.AcceptButton = Me.ButOK
 		Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
 		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
 		Me.CancelButton = Me.ButCancel
-        Me.ClientSize = New System.Drawing.Size(944, 700)
+		Me.ClientSize = New System.Drawing.Size(944, 747)
 		Me.Controls.Add(Me.TbHVCclass)
 		Me.Controls.Add(Me.TbMass)
 		Me.Controls.Add(Me.TbAxleConf)
@@ -1125,138 +1285,154 @@ Partial Class F_VECTO
 		Me.Name = "F_VECTO"
 		Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
 		Me.Text = "Job Editor"
-        Me.TabPgGen.ResumeLayout(false)
-        Me.TabPgGen.PerformLayout
-        Me.GrCycles.ResumeLayout(false)
-        Me.GrCycles.PerformLayout
-        Me.GrAux.ResumeLayout(false)
-        Me.GrAux.PerformLayout
-        CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).EndInit
-        Me.TabControl1.ResumeLayout(false)
-        Me.TabPgDriver.ResumeLayout(false)
-        Me.GrVACC.ResumeLayout(false)
-        Me.GrVACC.PerformLayout
-        Me.GrLAC.ResumeLayout(false)
-        Me.GrLAC.PerformLayout
-        Me.PnLookAhead.ResumeLayout(false)
-        Me.PnLookAhead.PerformLayout
-        Me.GroupBox1.ResumeLayout(false)
-        Me.GroupBox1.PerformLayout
-        Me.PnEcoRoll.ResumeLayout(false)
-        Me.PnEcoRoll.PerformLayout
-        Me.GrStartStop.ResumeLayout(false)
-        Me.GrStartStop.PerformLayout
-        Me.PnStartStop.ResumeLayout(false)
-        Me.PnStartStop.PerformLayout
-        Me.StatusStrip1.ResumeLayout(false)
-        Me.StatusStrip1.PerformLayout
-        Me.ToolStrip1.ResumeLayout(false)
-        Me.ToolStrip1.PerformLayout
-        CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit
-        Me.CmOpenFile.ResumeLayout(false)
-        CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).EndInit
-        CType(Me.PicBox,System.ComponentModel.ISupportInitialize).EndInit
-        Me.ResumeLayout(false)
-        Me.PerformLayout
+		Me.TabPgGen.ResumeLayout(False)
+		Me.TabPgGen.PerformLayout()
+		Me.GrCycles.ResumeLayout(False)
+		Me.GrCycles.PerformLayout()
+		Me.GrAux.ResumeLayout(False)
+		Me.GrAux.PerformLayout()
+		CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).EndInit()
+		Me.TabControl1.ResumeLayout(False)
+		Me.TabPgDriver.ResumeLayout(False)
+		Me.GrVACC.ResumeLayout(False)
+		Me.GrVACC.PerformLayout()
+		Me.GrLAC.ResumeLayout(False)
+		Me.GrLAC.PerformLayout()
+		Me.GroupBox2.ResumeLayout(False)
+		Me.GroupBox2.PerformLayout()
+		Me.PnLookAhead.ResumeLayout(False)
+		Me.PnLookAhead.PerformLayout()
+		Me.GroupBox1.ResumeLayout(False)
+		Me.GroupBox1.PerformLayout()
+		Me.PnEcoRoll.ResumeLayout(False)
+		Me.PnEcoRoll.PerformLayout()
+		Me.GrStartStop.ResumeLayout(False)
+		Me.GrStartStop.PerformLayout()
+		Me.PnStartStop.ResumeLayout(False)
+		Me.PnStartStop.PerformLayout()
+		Me.StatusStrip1.ResumeLayout(False)
+		Me.StatusStrip1.PerformLayout()
+		Me.ToolStrip1.ResumeLayout(False)
+		Me.ToolStrip1.PerformLayout()
+		CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
+		Me.CmOpenFile.ResumeLayout(False)
+		CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).EndInit()
+		CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit()
+		Me.ResumeLayout(False)
+		Me.PerformLayout()
 
 	End Sub
-    Friend WithEvents TabPgGen As System.Windows.Forms.TabPage
-    Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
-    Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
-    Friend WithEvents ButtonVEH As System.Windows.Forms.Button
-    Friend WithEvents ButtonMAP As System.Windows.Forms.Button
-    Friend WithEvents ButtonGBX As System.Windows.Forms.Button
-    Friend WithEvents ButOpenVEH As System.Windows.Forms.Button
-    Friend WithEvents ButOpenGBX As System.Windows.Forms.Button
-    Friend WithEvents ButOpenENG As System.Windows.Forms.Button
-    Friend WithEvents ToolStripStatusLabelGEN As System.Windows.Forms.ToolStripStatusLabel
-    Friend WithEvents ButOK As System.Windows.Forms.Button
-    Friend WithEvents TbGBX As System.Windows.Forms.TextBox
-    Friend WithEvents TbENG As System.Windows.Forms.TextBox
-    Friend WithEvents TbVEH As System.Windows.Forms.TextBox
-    Friend WithEvents ButCancel As System.Windows.Forms.Button
-    Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
-    Friend WithEvents ToolStripBtNew As System.Windows.Forms.ToolStripButton
-    Friend WithEvents ToolStripBtOpen As System.Windows.Forms.ToolStripButton
-    Friend WithEvents ToolStripBtSave As System.Windows.Forms.ToolStripButton
-    Friend WithEvents ToolStripBtSaveAs As System.Windows.Forms.ToolStripButton
-    Friend WithEvents ToolStripBtSendTo As System.Windows.Forms.ToolStripButton
-    Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
-    Friend WithEvents GrAux As System.Windows.Forms.GroupBox
-    Friend WithEvents LvAux As System.Windows.Forms.ListView
-    Friend WithEvents ColumnHeader4 As System.Windows.Forms.ColumnHeader
-    Friend WithEvents ColumnHeader5 As System.Windows.Forms.ColumnHeader
-    Friend WithEvents ColumnHeader6 As System.Windows.Forms.ColumnHeader
-    Friend WithEvents ButAuxRem As System.Windows.Forms.Button
-    Friend WithEvents ButAuxAdd As System.Windows.Forms.Button
-    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
-    Friend WithEvents TabPgDriver As System.Windows.Forms.TabPage
-    Friend WithEvents BtDesMaxBr As System.Windows.Forms.Button
-    Friend WithEvents TbDesMaxFile As System.Windows.Forms.TextBox
-    Friend WithEvents GrCycles As System.Windows.Forms.GroupBox
-    Friend WithEvents LvCycles As System.Windows.Forms.ListView
-    Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
-    Friend WithEvents BtDRIrem As System.Windows.Forms.Button
-    Friend WithEvents BtDRIadd As System.Windows.Forms.Button
-    Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
-    Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
-    Friend WithEvents CbEngOnly As System.Windows.Forms.CheckBox
-    Friend WithEvents BtAccOpen As System.Windows.Forms.Button
-    Friend WithEvents Label2 As System.Windows.Forms.Label
-    Friend WithEvents CmOpenFile As System.Windows.Forms.ContextMenuStrip
-    Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
-    Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
-    Friend WithEvents ChBStartStop As System.Windows.Forms.CheckBox
-    Friend WithEvents GrStartStop As System.Windows.Forms.GroupBox
-    Friend WithEvents TbSSspeed As System.Windows.Forms.TextBox
-    Friend WithEvents TbSStime As System.Windows.Forms.TextBox
-    Friend WithEvents LabelSStime As System.Windows.Forms.Label
-    Friend WithEvents LabelSSspeed As System.Windows.Forms.Label
-    Friend WithEvents GrLAC As System.Windows.Forms.GroupBox
-    Friend WithEvents Label25 As System.Windows.Forms.Label
-    Friend WithEvents CbLookAhead As System.Windows.Forms.CheckBox
-    Friend WithEvents TbAlookahead As System.Windows.Forms.TextBox
-    Friend WithEvents Label24 As System.Windows.Forms.Label
-    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
-    Friend WithEvents Label21 As System.Windows.Forms.Label
-    Friend WithEvents Label20 As System.Windows.Forms.Label
-    Friend WithEvents Label14 As System.Windows.Forms.Label
-    Friend WithEvents TbVmin As System.Windows.Forms.TextBox
-    Friend WithEvents TbUnderSpeed As System.Windows.Forms.TextBox
-    Friend WithEvents TbOverspeed As System.Windows.Forms.TextBox
-    Friend WithEvents Label23 As System.Windows.Forms.Label
-    Friend WithEvents Label22 As System.Windows.Forms.Label
-    Friend WithEvents Label13 As System.Windows.Forms.Label
-    Friend WithEvents RdEcoRoll As System.Windows.Forms.RadioButton
-    Friend WithEvents RdOverspeed As System.Windows.Forms.RadioButton
-    Friend WithEvents RdOff As System.Windows.Forms.RadioButton
-    Friend WithEvents PnStartStop As System.Windows.Forms.Panel
-    Friend WithEvents Label27 As System.Windows.Forms.Label
-    Friend WithEvents Label26 As System.Windows.Forms.Label
-    Friend WithEvents PnLookAhead As System.Windows.Forms.Panel
-    Friend WithEvents Label29 As System.Windows.Forms.Label
-    Friend WithEvents TbVminLA As System.Windows.Forms.TextBox
-    Friend WithEvents Label28 As System.Windows.Forms.Label
-    Friend WithEvents Label31 As System.Windows.Forms.Label
-    Friend WithEvents Label30 As System.Windows.Forms.Label
-    Friend WithEvents TbSSdelay As System.Windows.Forms.TextBox
-    Friend WithEvents Label32 As System.Windows.Forms.Label
-    Friend WithEvents PnEcoRoll As System.Windows.Forms.Panel
-    Friend WithEvents PicVehicle As System.Windows.Forms.PictureBox
-    Friend WithEvents PicBox As System.Windows.Forms.PictureBox
-    Friend WithEvents TbEngTxt As System.Windows.Forms.TextBox
-    Friend WithEvents TbVehCat As System.Windows.Forms.TextBox
-    Friend WithEvents TbAxleConf As System.Windows.Forms.TextBox
-    Friend WithEvents TbHVCclass As System.Windows.Forms.TextBox
-    Friend WithEvents TbGbxTxt As System.Windows.Forms.TextBox
-    Friend WithEvents TbMass As System.Windows.Forms.TextBox
-    Friend WithEvents GrVACC As System.Windows.Forms.GroupBox
-    Friend WithEvents cboAdvancedAuxiliaries As System.Windows.Forms.ComboBox
-    Friend WithEvents picAuxInfo As System.Windows.Forms.PictureBox
-    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
-    Friend WithEvents Label1 As System.Windows.Forms.Label
-    Friend WithEvents btnBrowseAAUXFile As System.Windows.Forms.Button
-    Friend WithEvents txtAdvancedAuxiliaryFile As System.Windows.Forms.TextBox
-    Friend WithEvents lbAdvancedAuxiliaries As System.Windows.Forms.Label
-    Friend WithEvents btnAAUXOpen As System.Windows.Forms.Button
+	Friend WithEvents TabPgGen As System.Windows.Forms.TabPage
+	Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
+	Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
+	Friend WithEvents ButtonVEH As System.Windows.Forms.Button
+	Friend WithEvents ButtonMAP As System.Windows.Forms.Button
+	Friend WithEvents ButtonGBX As System.Windows.Forms.Button
+	Friend WithEvents ButOpenVEH As System.Windows.Forms.Button
+	Friend WithEvents ButOpenGBX As System.Windows.Forms.Button
+	Friend WithEvents ButOpenENG As System.Windows.Forms.Button
+	Friend WithEvents ToolStripStatusLabelGEN As System.Windows.Forms.ToolStripStatusLabel
+	Friend WithEvents ButOK As System.Windows.Forms.Button
+	Friend WithEvents TbGBX As System.Windows.Forms.TextBox
+	Friend WithEvents TbENG As System.Windows.Forms.TextBox
+	Friend WithEvents TbVEH As System.Windows.Forms.TextBox
+	Friend WithEvents ButCancel As System.Windows.Forms.Button
+	Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
+	Friend WithEvents ToolStripBtNew As System.Windows.Forms.ToolStripButton
+	Friend WithEvents ToolStripBtOpen As System.Windows.Forms.ToolStripButton
+	Friend WithEvents ToolStripBtSave As System.Windows.Forms.ToolStripButton
+	Friend WithEvents ToolStripBtSaveAs As System.Windows.Forms.ToolStripButton
+	Friend WithEvents ToolStripBtSendTo As System.Windows.Forms.ToolStripButton
+	Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
+	Friend WithEvents GrAux As System.Windows.Forms.GroupBox
+	Friend WithEvents LvAux As System.Windows.Forms.ListView
+	Friend WithEvents ColumnHeader4 As System.Windows.Forms.ColumnHeader
+	Friend WithEvents ColumnHeader5 As System.Windows.Forms.ColumnHeader
+	Friend WithEvents ColumnHeader6 As System.Windows.Forms.ColumnHeader
+	Friend WithEvents ButAuxRem As System.Windows.Forms.Button
+	Friend WithEvents ButAuxAdd As System.Windows.Forms.Button
+	Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
+	Friend WithEvents TabPgDriver As System.Windows.Forms.TabPage
+	Friend WithEvents BtDesMaxBr As System.Windows.Forms.Button
+	Friend WithEvents TbDesMaxFile As System.Windows.Forms.TextBox
+	Friend WithEvents GrCycles As System.Windows.Forms.GroupBox
+	Friend WithEvents LvCycles As System.Windows.Forms.ListView
+	Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
+	Friend WithEvents BtDRIrem As System.Windows.Forms.Button
+	Friend WithEvents BtDRIadd As System.Windows.Forms.Button
+	Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
+	Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
+	Friend WithEvents CbEngOnly As System.Windows.Forms.CheckBox
+	Friend WithEvents BtAccOpen As System.Windows.Forms.Button
+	Friend WithEvents Label2 As System.Windows.Forms.Label
+	Friend WithEvents CmOpenFile As System.Windows.Forms.ContextMenuStrip
+	Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
+	Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
+	Friend WithEvents ChBStartStop As System.Windows.Forms.CheckBox
+	Friend WithEvents GrStartStop As System.Windows.Forms.GroupBox
+	Friend WithEvents TbSSspeed As System.Windows.Forms.TextBox
+	Friend WithEvents TbSStime As System.Windows.Forms.TextBox
+	Friend WithEvents LabelSStime As System.Windows.Forms.Label
+	Friend WithEvents LabelSSspeed As System.Windows.Forms.Label
+	Friend WithEvents GrLAC As System.Windows.Forms.GroupBox
+	Friend WithEvents CbLookAhead As System.Windows.Forms.CheckBox
+	Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+	Friend WithEvents Label21 As System.Windows.Forms.Label
+	Friend WithEvents Label20 As System.Windows.Forms.Label
+	Friend WithEvents Label14 As System.Windows.Forms.Label
+	Friend WithEvents TbVmin As System.Windows.Forms.TextBox
+	Friend WithEvents TbUnderSpeed As System.Windows.Forms.TextBox
+	Friend WithEvents TbOverspeed As System.Windows.Forms.TextBox
+	Friend WithEvents Label23 As System.Windows.Forms.Label
+	Friend WithEvents Label22 As System.Windows.Forms.Label
+	Friend WithEvents Label13 As System.Windows.Forms.Label
+	Friend WithEvents RdEcoRoll As System.Windows.Forms.RadioButton
+	Friend WithEvents RdOverspeed As System.Windows.Forms.RadioButton
+	Friend WithEvents RdOff As System.Windows.Forms.RadioButton
+	Friend WithEvents PnStartStop As System.Windows.Forms.Panel
+	Friend WithEvents Label27 As System.Windows.Forms.Label
+	Friend WithEvents Label26 As System.Windows.Forms.Label
+	Friend WithEvents PnLookAhead As System.Windows.Forms.Panel
+	Friend WithEvents Label31 As System.Windows.Forms.Label
+	Friend WithEvents Label30 As System.Windows.Forms.Label
+	Friend WithEvents TbSSdelay As System.Windows.Forms.TextBox
+	Friend WithEvents Label32 As System.Windows.Forms.Label
+	Friend WithEvents PnEcoRoll As System.Windows.Forms.Panel
+	Friend WithEvents PicVehicle As System.Windows.Forms.PictureBox
+	Friend WithEvents PicBox As System.Windows.Forms.PictureBox
+	Friend WithEvents TbEngTxt As System.Windows.Forms.TextBox
+	Friend WithEvents TbVehCat As System.Windows.Forms.TextBox
+	Friend WithEvents TbAxleConf As System.Windows.Forms.TextBox
+	Friend WithEvents TbHVCclass As System.Windows.Forms.TextBox
+	Friend WithEvents TbGbxTxt As System.Windows.Forms.TextBox
+	Friend WithEvents TbMass As System.Windows.Forms.TextBox
+	Friend WithEvents GrVACC As System.Windows.Forms.GroupBox
+	Friend WithEvents cboAdvancedAuxiliaries As System.Windows.Forms.ComboBox
+	Friend WithEvents picAuxInfo As System.Windows.Forms.PictureBox
+	Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
+	Friend WithEvents Label1 As System.Windows.Forms.Label
+	Friend WithEvents btnBrowseAAUXFile As System.Windows.Forms.Button
+	Friend WithEvents txtAdvancedAuxiliaryFile As System.Windows.Forms.TextBox
+	Friend WithEvents lbAdvancedAuxiliaries As System.Windows.Forms.Label
+	Friend WithEvents btnAAUXOpen As System.Windows.Forms.Button
+	Friend WithEvents Label3 As System.Windows.Forms.Label
+	Friend WithEvents tbLacPreviewFactor As System.Windows.Forms.TextBox
+	Friend WithEvents tbLacDfTargetSpeedFile As System.Windows.Forms.TextBox
+	Friend WithEvents btnDfTargetSpeed As System.Windows.Forms.Button
+	Friend WithEvents Label4 As System.Windows.Forms.Label
+	Friend WithEvents Label5 As System.Windows.Forms.Label
+	Friend WithEvents tbLacDfVelocityDropFile As System.Windows.Forms.TextBox
+	Friend WithEvents btnDfVelocityDrop As System.Windows.Forms.Button
+	Friend WithEvents TbVminLA As System.Windows.Forms.TextBox
+	Friend WithEvents TbAlookahead As System.Windows.Forms.TextBox
+	Friend WithEvents Label9 As System.Windows.Forms.Label
+	Friend WithEvents Label8 As System.Windows.Forms.Label
+	Friend WithEvents Label7 As System.Windows.Forms.Label
+	Friend WithEvents Label6 As System.Windows.Forms.Label
+	Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+	Friend WithEvents Label12 As System.Windows.Forms.Label
+	Friend WithEvents tbDfCoastingScale As System.Windows.Forms.TextBox
+	Friend WithEvents Label11 As System.Windows.Forms.Label
+	Friend WithEvents tbDfCoastingOffset As System.Windows.Forms.TextBox
+	Friend WithEvents Label10 As System.Windows.Forms.Label
 End Class
diff --git a/VECTO/GUI/F_VECTO.resx b/VECTO/GUI/F_VECTO.resx
index dfedf03c9b..e86e231986 100644
--- a/VECTO/GUI/F_VECTO.resx
+++ b/VECTO/GUI/F_VECTO.resx
@@ -129,9 +129,6 @@
   <metadata name="CmOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>350, 15</value>
   </metadata>
-  <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>468, 15</value>
-  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>49</value>
   </metadata>
diff --git a/VECTO/GUI/F_VECTO.vb b/VECTO/GUI/F_VECTO.vb
index 7a92192834..0c666a360e 100644
--- a/VECTO/GUI/F_VECTO.vb
+++ b/VECTO/GUI/F_VECTO.vb
@@ -111,6 +111,9 @@ Public Class F_VECTO
 		Me.TbSSdelay.Text = cDeclaration.SSdelay
 		Me.TbAlookahead.Text = cDeclaration.LACa
 		Me.TbVminLA.Text = cDeclaration.LACvmin
+		tbLacPreviewFactor.Text = "10"
+		tbLacDfTargetSpeedFile.Text = ""
+		tbLacDfVelocityDropFile.Text = ""
 
 		Me.TbOverspeed.Text = cDeclaration.Overspeed
 		Me.TbUnderSpeed.Text = cDeclaration.Underspeed
@@ -471,7 +474,12 @@ Public Class F_VECTO
 		Me.CbLookAhead.Checked = VEC0.LookAheadOn
 		Me.TbAlookahead.Text = CStr(VEC0.a_lookahead)
 		Me.TbVminLA.Text = CStr(VEC0.vMinLA)
+		tbLacPreviewFactor.Text = CStr(VEC0.LacPreviewFactor)
+		tbDfCoastingOffset.Text = CStr(VEC0.LacDfOffset)
+		tbDfCoastingScale.Text = CStr(VEC0.LacDfScale)
 
+		tbLacDfTargetSpeedFile.Text = VEC0.LacDfTargetSpeedFile
+		tbLacDfVelocityDropFile.Text = VEC0.LacDfVelocityDropFile
 
 		'-------------------------------------------------------------
 
@@ -592,7 +600,11 @@ Public Class F_VECTO
 		VEC0.a_lookahead = CSng(fTextboxToNumString(Me.TbAlookahead.Text))
 		VEC0.vMinLA = CSng(fTextboxToNumString(Me.TbVminLA.Text))
 
-
+		VEC0.LacPreviewFactor = CSng(fTextboxToNumString(tbLacPreviewFactor.Text))
+		VEC0.LacDfOffset = CSng(fTextboxToNumString(tbDfCoastingOffset.Text))
+		VEC0.LacDfScale = CSng(fTextboxToNumString(tbDfCoastingScale.Text))
+		VEC0.LacDfTargetSpeedFile = tbLacDfTargetSpeedFile.Text
+		VEC0.LacDfVelocityDropFile = tbLacDfVelocityDropFile.Text
 		'------------------------------------------------------------
 
 		'SAVE
@@ -647,6 +659,11 @@ Public Class F_VECTO
 		Me.TbUnderSpeed.Text = ""
 		Me.TbVmin.Text = ""
 		Me.TbVminLA.Text = "50"
+		tbLacPreviewFactor.Text = "10"
+		tbDfCoastingOffset.Text = "2.5"
+		tbDfCoastingScale.Text = "1.5"
+		tbLacDfTargetSpeedFile.Text = ""
+		tbLacDfVelocityDropFile.Text = ""
 
 		'---------------------------------------------------
 
@@ -707,11 +724,11 @@ Public Class F_VECTO
 	End Sub
 
 	Private Sub TbVmin_TextChanged(sender As System.Object, e As System.EventArgs) _
-		Handles TbVmin.TextChanged, TbVminLA.TextChanged
+		Handles TbVmin.TextChanged
 		Change()
 	End Sub
 
-	Private Sub TbAlookahead_TextChanged(sender As System.Object, e As System.EventArgs) Handles TbAlookahead.TextChanged
+	Private Sub TbAlookahead_TextChanged(sender As System.Object, e As System.EventArgs)
 		Change()
 	End Sub
 
@@ -1464,4 +1481,14 @@ lbDlog:
 
 		OpenFiles(fFileRepl(Me.txtAdvancedAuxiliaryFile.Text, fPATH(VECTOfile)))
 	End Sub
+
+	Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnDfTargetSpeed.Click
+		If fbDfTargetSpeed.OpenDialog(fFileRepl(Me.tbLacDfTargetSpeedFile.Text, fPATH(VECTOfile))) Then _
+			Me.tbLacDfTargetSpeedFile.Text = fFileWoDir(fbDfTargetSpeed.Files(0), fPATH(VECTOfile))
+	End Sub
+
+	Private Sub btnDfVelocityDrop_Click(sender As Object, e As EventArgs) Handles btnDfVelocityDrop.Click
+		If fbDfVelocityDrop.OpenDialog(fFileRepl(Me.tbLacDfVelocityDropFile.Text, fPATH(VECTOfile))) Then _
+			Me.tbLacDfVelocityDropFile.Text = fFileWoDir(fbDfVelocityDrop.Files(0), fPATH(VECTOfile))
+	End Sub
 End Class
diff --git a/VECTO/Input Files/cVECTO.vb b/VECTO/Input Files/cVECTO.vb
index dd22112b39..9e548645e5 100644
--- a/VECTO/Input Files/cVECTO.vb	
+++ b/VECTO/Input Files/cVECTO.vb	
@@ -12,868 +12,870 @@
 Imports System.Collections.Generic
 
 Public Class cVECTO
+	Private Const FormatVersion As Short = 2
+	Private FileVersion As Short
 
-    Private Const FormatVersion As Short = 2
-    Private FileVersion As Short
+	'AA-TB
+	'STORES THE Type and version of the chosen or default Auxiliary Type ( Classic/Original or other )
+	Public AuxiliaryAssembly As String
+	Public AuxiliaryVersion As String
+	Public AdvancedAuxiliaryFilePath As String
 
-    'AA-TB
-    'STORES THE Type and version of the chosen or default Auxiliary Type ( Classic/Original or other )
-    public AuxiliaryAssembly As String
-    public AuxiliaryVersion As String
-    Public AdvancedAuxiliaryFilePath As String
-    
 
-    Private sFilePath As String
+	Private sFilePath As String
 
-    Private MyPath As String
+	Private MyPath As String
 
-    'Input parameters
-    Private stPathVEH As cSubPath
-    Private stPathENG As cSubPath
-    Private stPathGBX As cSubPath
+	'Input parameters
+	Private stPathVEH As cSubPath
+	Private stPathENG As cSubPath
+	Private stPathGBX As cSubPath
 
-    Private boStartStop As Boolean
-    Private siStStV As Single
-    Private siStStT As Single
-    Public StStDelay As Integer
+	Private boStartStop As Boolean
+	Private siStStV As Single
+	Private siStStT As Single
+	Public StStDelay As Integer
 
-    Private stDesMaxFile As cSubPath
-    Private laDesV As List(Of Single)
-    Private laDesMax As List(Of Single)
-    Private laDesMin As List(Of Single)
-    Private DesMaxDim As Integer
+	Private stDesMaxFile As cSubPath
+	Private laDesV As List(Of Single)
+	Private laDesMax As List(Of Single)
+	Private laDesMin As List(Of Single)
+	Private DesMaxDim As Integer
 
-    Public AuxPaths As Dictionary(Of String, cAuxEntry)
-    Public AuxRefs As Dictionary(Of String, cAux)          'Alle Nebenverbraucher die in der Veh-Datei UND im Zyklus definiert sind
-    Public AuxDef As Boolean                               'True wenn ein oder mehrere Nebenverbraucher definiert sind
-    Public EStechs As List(Of String)
+	Public AuxPaths As Dictionary(Of String, cAuxEntry)
+	Public AuxRefs As Dictionary(Of String, cAux) _
+	'Alle Nebenverbraucher die in der Veh-Datei UND im Zyklus definiert sind
+	Public AuxDef As Boolean							   'True wenn ein oder mehrere Nebenverbraucher definiert sind
+	Public EStechs As List(Of String)
 
-    Public CycleFiles As List(Of cSubPath)
+	Public CycleFiles As List(Of cSubPath)
 
-    Public EngOnly As Boolean
+	Public EngOnly As Boolean
 
-    Public a_lookahead As Single
-    Public vMin As Single
-    Public vMinLA As Single
-    Public LookAheadOn As Boolean
-    Public OverSpeedOn As Boolean
-    Public OverSpeed As Single
-    Public UnderSpeed As Single
-    Public EcoRollOn As Boolean
+	Public a_lookahead As Single
+	Public vMin As Single
+	Public vMinLA As Single
+	Public LookAheadOn As Boolean
+	Public OverSpeedOn As Boolean
+	Public OverSpeed As Single
+	Public UnderSpeed As Single
+	Public EcoRollOn As Boolean
 
-    Private MyFileList As List(Of String)
+	Private MyFileList As List(Of String)
 
-    Public SavedInDeclMode As Boolean
+	Public SavedInDeclMode As Boolean
 
 
-    Public Class cAuxEntry
-        Public Type As String
-        Public Path As cSubPath
-        Public TechStr As String = ""
+	Public Class cAuxEntry
+		Public Type As String
+		Public Path As cSubPath
+		Public TechStr As String = ""
 
-        Public Sub New()
-            Path = New cSubPath
-        End Sub
+		Public Sub New()
+			Path = New cSubPath
+		End Sub
+	End Class
 
-    End Class
+	Public Function CreateFileList() As Boolean
+		Dim Aux0 As cAuxEntry
+		Dim sb As cSubPath
+		Dim str As String
 
-    Public Function CreateFileList() As Boolean
-        Dim Aux0 As cAuxEntry
-        Dim sb As cSubPath
-        Dim str As String
+		MyFileList = New List(Of String)
 
-        MyFileList = New List(Of String)
+		'.vecto
+		MyFileList.Add(Me.sFilePath)
 
-        '.vecto
-        MyFileList.Add(Me.sFilePath)
+		'Veh
+		If Not Me.EngOnly Then
+			MyFileList.Add(Me.PathVEH)
 
-        'Veh
-        If Not Me.EngOnly Then
-            MyFileList.Add(Me.PathVEH)
+			If Not VEH.CreateFileList Then Return False
+			For Each str In VEH.FileList
+				MyFileList.Add(str)
+			Next
+		End If
 
-            If Not VEH.CreateFileList Then Return False
-            For Each str In VEH.FileList
-                MyFileList.Add(str)
-            Next
-        End If
+		'Eng
+		MyFileList.Add(Me.PathENG)
 
-        'Eng
-        MyFileList.Add(Me.PathENG)
+		If Not ENG.CreateFileList Then Return False
+		For Each str In ENG.FileList
+			MyFileList.Add(str)
+		Next
+
+		If Not Me.EngOnly Then
+
+			'Gbx
+			MyFileList.Add(Me.PathGBX)
+
+			If Not GBX.CreateFileList Then Return False
+			For Each str In GBX.FileList
+				MyFileList.Add(str)
+			Next
+
+			'Aux
+			If AuxDef And Not Cfg.DeclMode Then
+				For Each Aux0 In Me.AuxPaths.Values
+					MyFileList.Add(Aux0.Path.FullPath)
+				Next
+			End If
+
+			'.vacc
+			MyFileList.Add(Me.stDesMaxFile.FullPath)
+
+		End If
+
+		'Cycles
+		For Each sb In Me.CycleFiles
+			MyFileList.Add(sb.FullPath)
+		Next
+
+
+		Return True
+	End Function
+
+	Public Sub New()
+
+		MyPath = ""
+		sFilePath = ""
+
+		stPathVEH = New cSubPath
+		stPathENG = New cSubPath
+		stPathGBX = New cSubPath
+
+		stDesMaxFile = New cSubPath
+
+		laDesV = New List(Of Single)
+		laDesMax = New List(Of Single)
+		laDesMin = New List(Of Single)
+
+		AuxPaths = New Dictionary(Of String, cAuxEntry)
+		AuxRefs = New Dictionary(Of String, cAux)
+		AuxDef = False
+		EStechs = New List(Of String)
+
+		CycleFiles = New List(Of cSubPath)
+	End Sub
+
+	Public Function SaveFile() As Boolean
+		Dim AuxEntryKV As KeyValuePair(Of String, cAuxEntry)
+		'Dim s As String
+		Dim sb As cSubPath
+		Dim JSON As New JSON
+		Dim ls As List(Of Object)
+		Dim dic As Dictionary(Of String, Object)
+		Dim dic0 As Dictionary(Of String, Object)
+
+		'Header
+		dic = New Dictionary(Of String, Object)
+		dic.Add("CreatedBy", Lic.LicString & " (" & Lic.GUID & ")")
+		dic.Add("Date", Now.ToString)
+		dic.Add("AppVersion", VECTOvers)
+		dic.Add("FileVersion", FormatVersion)
+		JSON.Content.Add("Header", dic)
+
+		'Body
+		dic0 = New Dictionary(Of String, Object)
+
+		dic0.Add("SavedInDeclMode", Cfg.DeclMode)
+		SavedInDeclMode = Cfg.DeclMode
+
+		'Main Files
+		dic0.Add("VehicleFile", stPathVEH.PathOrDummy)
+		dic0.Add("EngineFile", stPathENG.PathOrDummy)
+		dic0.Add("GearboxFile", stPathGBX.PathOrDummy)
+
+		'Cycles
+		If CycleFiles.Count > 0 Then
+			ls = New List(Of Object)
+			For Each sb In CycleFiles
+				ls.Add(sb.PathOrDummy)
+			Next
+			dic0.Add("Cycles", ls)
+		End If
+
+		'AA-TB
+		'ADVANCED AUXILIARIES 
+		dic0.Add("AuxiliaryAssembly", AuxiliaryAssembly)
+		dic0.Add("AuxiliaryVersion", AuxiliaryVersion)
+		dic0.Add("AdvancedAuxiliaryFilePath", AdvancedAuxiliaryFilePath)
+
+		'Aux
+		If AuxPaths.Count > 0 Then
+			ls = New List(Of Object)
+			For Each AuxEntryKV In AuxPaths
+				dic = New Dictionary(Of String, Object)
+				dic.Add("ID", Trim(UCase(AuxEntryKV.Key)))
+				dic.Add("Type", AuxEntryKV.Value.Type)
+				dic.Add("Path", AuxEntryKV.Value.Path.PathOrDummy)
+				dic.Add("Technology", AuxEntryKV.Value.TechStr)
+
+				If AuxEntryKV.Key = sKey.AUX.ElecSys Then
+					dic.Add("TechList", EStechs)
+				End If
+
+				ls.Add(dic)
+			Next
+			dic0.Add("Aux", ls)
+		End If
+
+		'VACC
+		dic0.Add("VACC", stDesMaxFile.PathOrDummy)
+
+		'EngineOnlyMode
+		dic0.Add("EngineOnlyMode", EngOnly)
+
+		'Start Stop
+		dic = New Dictionary(Of String, Object)
+		dic.Add("Enabled", boStartStop)
+		dic.Add("MaxSpeed", siStStV)
+		dic.Add("MinTime", siStStT)
+		dic.Add("Delay", StStDelay)
+		dic0.Add("StartStop", dic)
+
+		'LAC
+		dic = New Dictionary(Of String, Object)
+		dic.Add("Enabled", LookAheadOn)
+		dic.Add("Dec", a_lookahead)
+		dic.Add("MinSpeed", vMinLA)
+		dic.Add("PreviewDistanceFactor", LacPreviewFactor)
+		dic.Add("DF_offset", LacDfOffset)
+		dic.Add("DF_scaling", LacDfScale)
+		dic.Add("DF_targetSpeedLookup", LacDfTargetSpeedFile)
+		dic.Add("Df_velocityDropLookup", LacDfVelocityDropFile)
+
+		dic0.Add("LAC", dic)
+
+		'Overspeed / EcoRoll
+		dic = New Dictionary(Of String, Object)
+		If EcoRollOn Then
+			dic.Add("Mode", "EcoRoll")
+		ElseIf OverSpeedOn Then
+			dic.Add("Mode", "OverSpeed")
+		Else
+			dic.Add("Mode", "Off")
+		End If
+		dic.Add("MinSpeed", vMin)
+		dic.Add("OverSpeed", OverSpeed)
+		dic.Add("UnderSpeed", UnderSpeed)
+		dic0.Add("OverSpeedEcoRoll", dic)
+
+		'
+
+
+		JSON.Content.Add("Body", dic0)
+
+		Return JSON.WriteFile(sFilePath)
+	End Function
+
+	Public Function ReadFile() As Boolean
+		Dim AuxEntry As cAuxEntry
+		Dim AuxID As String
+		Dim MsgSrc As String
+		Dim SubPath As cSubPath
+		Dim JSON As New JSON
+		Dim str As String
+		Dim dic As Object
+
+
+		MsgSrc = "Main/ReadInp/GEN"
+
+		SetDefault()
+
+		If Not JSON.ReadFile(sFilePath) Then Return False
+
+		Try
+
+			FileVersion = JSON.Content("Header")("FileVersion")
+
+			If FileVersion > 1 Then
+				SavedInDeclMode = JSON.Content("Body")("SavedInDeclMode")
+			Else
+				SavedInDeclMode = Cfg.DeclMode
+			End If
+
+			If Not JSON.Content("Body")("VehicleFile") Is Nothing Then _
+				stPathVEH.Init(MyPath, JSON.Content("Body")("VehicleFile"))
+
+			stPathENG.Init(MyPath, JSON.Content("Body")("EngineFile"))
+
+			If Not JSON.Content("Body")("GearboxFile") Is Nothing Then _
+				stPathGBX.Init(MyPath, JSON.Content("Body")("GearboxFile"))
+
+			If Not JSON.Content("Body")("Cycles") Is Nothing Then
+				For Each str In JSON.Content("Body")("Cycles")
+					SubPath = New cSubPath
+					SubPath.Init(MyPath, str)
+					CycleFiles.Add(SubPath)
+				Next
+			End If
 
-        If Not ENG.CreateFileList Then Return False
-        For Each str In ENG.FileList
-            MyFileList.Add(str)
-        Next
+			'AA-TB
+			'ADVANCED AUXILIARIES 
+			If Not JSON.Content("Body")("AuxiliaryAssembly") Is Nothing AndAlso
+				Not JSON.Content("Body")("AuxiliaryVersion") Is Nothing Then
+
+				AuxiliaryAssembly = JSON.Content("Body")("AuxiliaryAssembly").ToString()
+				AuxiliaryVersion = JSON.Content("Body")("AuxiliaryVersion").ToString()
 
-        If Not Me.EngOnly Then
+			End If
+			If Not JSON.Content("Body")("AdvancedAuxiliaryFilePath") Is Nothing Then
+				AdvancedAuxiliaryFilePath = JSON.Content("Body")("AdvancedAuxiliaryFilePath").ToString()
+			End If
 
-            'Gbx
-            MyFileList.Add(Me.PathGBX)
 
-            If Not GBX.CreateFileList Then Return False
-            For Each str In GBX.FileList
-                MyFileList.Add(str)
-            Next
+			If Not JSON.Content("Body")("Aux") Is Nothing Then
+				For Each dic In JSON.Content("Body")("Aux")
 
-            'Aux
-            If AuxDef And Not Cfg.DeclMode Then
-                For Each Aux0 In Me.AuxPaths.Values
-                    MyFileList.Add(Aux0.Path.FullPath)
-                Next
-            End If
+					AuxID = UCase(Trim(dic("ID").ToString))
 
-            '.vacc
-            MyFileList.Add(Me.stDesMaxFile.FullPath)
+					If AuxPaths.ContainsKey(AuxID) Then
+						WorkerMsg(tMsgID.Err, "Multiple definitions of the same auxiliary type (" & AuxID & ")!", MsgSrc)
+						Return False
+					End If
 
-        End If
+					AuxEntry = New cAuxEntry
 
-        'Cycles
-        For Each sb In Me.CycleFiles
-            MyFileList.Add(sb.FullPath)
-        Next
+					AuxEntry.Type = dic("Type")
+					AuxEntry.Path.Init(MyPath, dic("Path"))
 
+					If Not dic("Technology") Is Nothing Then AuxEntry.TechStr = dic("Technology")
 
-        Return True
-
-    End Function
-
-    Public Sub New()
-
-        MyPath = ""
-        sFilePath = ""
-
-        stPathVEH = New cSubPath
-        stPathENG = New cSubPath
-        stPathGBX = New cSubPath
-
-        stDesMaxFile = New cSubPath
-
-        laDesV = New List(Of Single)
-        laDesMax = New List(Of Single)
-        laDesMin = New List(Of Single)
-
-        AuxPaths = New Dictionary(Of String, cAuxEntry)
-        AuxRefs = New Dictionary(Of String, cAux)
-        AuxDef = False
-        EStechs = New List(Of String)
-
-        CycleFiles = New List(Of cSubPath)
-
-    End Sub
-
-    Public Function SaveFile() As Boolean
-        Dim AuxEntryKV As KeyValuePair(Of String, cAuxEntry)
-        'Dim s As String
-        Dim sb As cSubPath
-        Dim JSON As New JSON
-        Dim ls As List(Of Object)
-        Dim dic As Dictionary(Of String, Object)
-        Dim dic0 As Dictionary(Of String, Object)
-
-        'Header
-        dic = New Dictionary(Of String, Object)
-        dic.Add("CreatedBy", Lic.LicString & " (" & Lic.GUID & ")")
-        dic.Add("Date", Now.ToString)
-        dic.Add("AppVersion", VECTOvers)
-        dic.Add("FileVersion", FormatVersion)
-        JSON.Content.Add("Header", dic)
-
-        'Body
-        dic0 = New Dictionary(Of String, Object)
-
-        dic0.Add("SavedInDeclMode", Cfg.DeclMode)
-        SavedInDeclMode = Cfg.DeclMode
+					AuxPaths.Add(AuxID, AuxEntry)
 
-        'Main Files
-        dic0.Add("VehicleFile", stPathVEH.PathOrDummy)
-        dic0.Add("EngineFile", stPathENG.PathOrDummy)
-        dic0.Add("GearboxFile", stPathGBX.PathOrDummy)
+					AuxDef = True
 
-        'Cycles
-        If CycleFiles.Count > 0 Then
-            ls = New List(Of Object)
-            For Each sb In CycleFiles
-                ls.Add(sb.PathOrDummy)
-            Next
-            dic0.Add("Cycles", ls)
-        End If
+					If AuxID = sKey.AUX.ElecSys Then
+						If Not dic("TechList") Is Nothing Then
+							For Each str In dic("TechList")
+								EStechs.Add(str)
+							Next
+						End If
+					End If
 
-        'AA-TB
-        'ADVANCED AUXILIARIES 
-        dic0.Add("AuxiliaryAssembly",AuxiliaryAssembly)
-        dic0.Add("AuxiliaryVersion",AuxiliaryVersion)
-        dic0.Add("AdvancedAuxiliaryFilePath",AdvancedAuxiliaryFilePath)
+				Next
+			End If
 
-        'Aux
-        If AuxPaths.Count > 0 Then
-            ls = New List(Of Object)
-            For Each AuxEntryKV In AuxPaths
-                dic = New Dictionary(Of String, Object)
-                dic.Add("ID", Trim(UCase(AuxEntryKV.Key)))
-                dic.Add("Type", AuxEntryKV.Value.Type)
-                dic.Add("Path", AuxEntryKV.Value.Path.PathOrDummy)
-                dic.Add("Technology", AuxEntryKV.Value.TechStr)
+			If Not JSON.Content("Body")("VACC") Is Nothing Then stDesMaxFile.Init(MyPath, JSON.Content("Body")("VACC"))
 
-                If AuxEntryKV.Key = sKey.AUX.ElecSys Then
-                    dic.Add("TechList", EStechs)
-                End If
+			EngOnly = JSON.Content("Body")("EngineOnlyMode")
 
-                ls.Add(dic)
-            Next
-            dic0.Add("Aux", ls)
-        End If
+			If Not JSON.Content("Body")("StartStop") Is Nothing Then
+				dic = JSON.Content("Body")("StartStop")
+				boStartStop = dic("Enabled")
+				siStStV = dic("MaxSpeed")
+				siStStT = dic("MinTime")
+				StStDelay = dic("Delay")
+			Else
+				boStartStop = False
+			End If
 
-        'VACC
-        dic0.Add("VACC", stDesMaxFile.PathOrDummy)
+			If Not JSON.Content("Body")("LAC") Is Nothing Then
+				dic = JSON.Content("Body")("LAC")
+				LookAheadOn = dic("Enabled")
+				a_lookahead = dic("Dec")
+				vMinLA = dic("MinSpeed")
+				LacPreviewFactor = If(dic("PreviewDistanceFactor") Is Nothing, 10, dic("PreviewDistanceFactor"))
+				LacDfOffset = If(dic("DF_offset") Is Nothing, 2.5, dic("DF_offset"))
+				LacDfScale = If(dic("DF_scaling") Is Nothing, 1.5, dic("DF_scaling"))
+				LacDfTargetSpeedFile = If(Not dic("DF_targetSpeedLookup") Is Nothing, dic("DF_targetSpeedLookup"), "")
+				LacDfVelocityDropFile = If(Not dic("Df_velocityDropLookup") Is Nothing, dic("Df_velocityDropLookup"), "")
+			Else
+				LookAheadOn = False
+			End If
 
-        'EngineOnlyMode
-        dic0.Add("EngineOnlyMode", EngOnly)
+			If Not JSON.Content("Body")("OverSpeedEcoRoll") Is Nothing Then
 
-        'Start Stop
-        dic = New Dictionary(Of String, Object)
-        dic.Add("Enabled", boStartStop)
-        dic.Add("MaxSpeed", siStStV)
-        dic.Add("MinTime", siStStT)
-        dic.Add("Delay", StStDelay)
-        dic0.Add("StartStop", dic)
+				dic = JSON.Content("Body")("OverSpeedEcoRoll")
 
-        'LAC
-        dic = New Dictionary(Of String, Object)
-        dic.Add("Enabled", LookAheadOn)
-        dic.Add("Dec", a_lookahead)
-        dic.Add("MinSpeed", vMinLA)
-        dic0.Add("LAC", dic)
+				Select Case UCase(dic("Mode").ToString).Trim
+					Case "ECOROLL"
+						OverSpeedOn = False
+						EcoRollOn = True
 
-        'Overspeed / EcoRoll
-        dic = New Dictionary(Of String, Object)
-        If EcoRollOn Then
-            dic.Add("Mode", "EcoRoll")
-        ElseIf OverSpeedOn Then
-            dic.Add("Mode", "OverSpeed")
-        Else
-            dic.Add("Mode", "Off")
-        End If
-        dic.Add("MinSpeed", vMin)
-        dic.Add("OverSpeed", OverSpeed)
-        dic.Add("UnderSpeed", UnderSpeed)
-        dic0.Add("OverSpeedEcoRoll", dic)
+					Case "OVERSPEED"
+						OverSpeedOn = True
+						EcoRollOn = False
 
-        '
+					Case "OFF"
+						OverSpeedOn = False
+						EcoRollOn = False
 
+					Case Else
+						WorkerMsg(tMsgID.Err, "Value '" & dic("Mode") & "' is not valid for OverSpeedEcoRoll/Mode!", MsgSrc)
+						Return False
+				End Select
 
-        JSON.Content.Add("Body", dic0)
+				vMin = dic("MinSpeed")
+				OverSpeed = dic("OverSpeed")
+				If Not dic("UnderSpeed") Is Nothing Then UnderSpeed = dic("UnderSpeed")
 
-        Return JSON.WriteFile(sFilePath)
+			Else
+				OverSpeedOn = False
+				EcoRollOn = False
+			End If
 
-    End Function
 
-    Public Function ReadFile() As Boolean
-        Dim AuxEntry As cAuxEntry
-        Dim AuxID As String
-        Dim MsgSrc As String
-        Dim SubPath As cSubPath
-        Dim JSON As New JSON
-        Dim str As String
-        Dim dic As Object
+		Catch ex As Exception
+			WorkerMsg(tMsgID.Err, "Failed to read VECTO file! " & ex.Message, MsgSrc)
+			Return False
+		End Try
 
 
-        
+		Return True
+	End Function
 
+	Private Sub SetDefault()
 
-        MsgSrc = "Main/ReadInp/GEN"
+		AuxiliaryAssembly = "CLASSIC"
+		AuxiliaryVersion = "CLASSIC"
+		AdvancedAuxiliaryFilePath = String.Empty
 
-        SetDefault()
 
-        If Not JSON.ReadFile(sFilePath) Then Return False
+		boStartStop = False
+		siStStV = 5
+		siStStT = 5
+		StStDelay = 0
+		FileVersion = 0
 
-        Try
+		stPathVEH.Clear()
+		stPathENG.Clear()
+		CycleFiles.Clear()
+		stPathGBX.Clear()
 
-            FileVersion = JSON.Content("Header")("FileVersion")
+		stDesMaxFile.Clear()
+		laDesV.Clear()
+		laDesMax.Clear()
+		laDesMin.Clear()
+		DesMaxDim = -1
 
-            If FileVersion > 1 Then
-                SavedInDeclMode = JSON.Content("Body")("SavedInDeclMode")
-            Else
-                SavedInDeclMode = Cfg.DeclMode
-            End If
+		AuxPaths.Clear()
+		AuxRefs.Clear()
+		AuxDef = False
+		EStechs.Clear()
 
-            If Not JSON.Content("Body")("VehicleFile") Is Nothing Then stPathVEH.Init(MyPath, JSON.Content("Body")("VehicleFile"))
+		EngOnly = False
 
-            stPathENG.Init(MyPath, JSON.Content("Body")("EngineFile"))
+		a_lookahead = 0
+		vMin = 0
+		LookAheadOn = True
+		OverSpeedOn = False
+		EcoRollOn = False
+		OverSpeed = 0
+		UnderSpeed = 0
+		vMinLA = 0
 
-            If Not JSON.Content("Body")("GearboxFile") Is Nothing Then stPathGBX.Init(MyPath, JSON.Content("Body")("GearboxFile"))
+		SavedInDeclMode = False
+	End Sub
 
-            If Not JSON.Content("Body")("Cycles") Is Nothing Then
-                For Each str In JSON.Content("Body")("Cycles")
-                    SubPath = New cSubPath
-                    SubPath.Init(MyPath, str)
-                    CycleFiles.Add(SubPath)
-                Next
-            End If
+	Public Function DeclInit() As Boolean
 
-            'AA-TB
-            'ADVANCED AUXILIARIES 
-            If  Not JSON.Content("Body")("AuxiliaryAssembly") is Nothing  AndAlso 
-                NOT JSON.Content("Body")("AuxiliaryVersion") is nothing   
+		Dim cl As List(Of String)
+		Dim s As String
+		Dim SubPath As cSubPath
+		Dim MsgSrc As String
 
-              AuxiliaryAssembly =  JSON.Content("Body")("AuxiliaryAssembly").ToString()
-              AuxiliaryVersion  =  JSON.Content("Body")("AuxiliaryVersion").ToString()
+		MsgSrc = "VECTO/DeclInit"
 
-            End If
-            If  NOT JSON.Content("Body")("AdvancedAuxiliaryFilePath") is nothing then 
-               AdvancedAuxiliaryFilePath =   JSON.Content("Body")("AdvancedAuxiliaryFilePath").ToString()
-            end if
+		EngOnly = False
 
+		CycleFiles.Clear()
 
+		cl = Declaration.SegRef.GetCycles
 
-            If Not JSON.Content("Body")("Aux") Is Nothing Then
-                For Each dic In JSON.Content("Body")("Aux")
+		For Each s In cl
+			SubPath = New cSubPath
+			SubPath.Init(MyPath, s)
+			CycleFiles.Add(SubPath)
+		Next
 
-                    AuxID = UCase(Trim(dic("ID").ToString))
+		stDesMaxFile.Init(MyPath, Declaration.SegRef.VACCfile)
 
-                    If AuxPaths.ContainsKey(AuxID) Then
-                        WorkerMsg(tMsgID.Err, "Multiple definitions of the same auxiliary type (" & AuxID & ")!", MsgSrc)
-                        Return False
-                    End If
+		siStStV = cDeclaration.SSspeed
+		siStStT = cDeclaration.SStime
+		StStDelay = cDeclaration.SSdelay
 
-                    AuxEntry = New cAuxEntry
+		If Not EcoRollOn Then OverSpeedOn = True
 
-                    AuxEntry.Type = dic("Type")
-                    AuxEntry.Path.Init(MyPath, dic("Path"))
+		OverSpeed = cDeclaration.Overspeed
+		UnderSpeed = cDeclaration.Underspeed
+		vMin = cDeclaration.ECvmin
 
-                    If Not dic("Technology") Is Nothing Then AuxEntry.TechStr = dic("Technology")
+		LookAheadOn = True
+		a_lookahead = cDeclaration.LACa
+		vMinLA = cDeclaration.LACvmin
 
-                    AuxPaths.Add(AuxID, AuxEntry)
+		'No need to check Aux (AuxDef). Will be checked in cDeclaration.CalcInitLoad
 
-                    AuxDef = True
+		Return True
+	End Function
 
-                    If AuxID = sKey.AUX.ElecSys Then
-                        If Not dic("TechList") Is Nothing Then
-                            For Each str In dic("TechList")
-                                EStechs.Add(str)
-                            Next
-                        End If
-                    End If
+	'This Sub reads those Input-files that do not have their own class, etc.
+	Public Function Init() As Boolean
+		Dim file As cFile_V3
+		Dim line As String()
 
-                Next
-            End If
+		Dim MsgSrc As String
 
-            If Not JSON.Content("Body")("VACC") Is Nothing Then stDesMaxFile.Init(MyPath, JSON.Content("Body")("VACC"))
+		MsgSrc = "VECTO/Init"
 
-            EngOnly = JSON.Content("Body")("EngineOnlyMode")
+		If Not EngOnly Then
 
-            If Not JSON.Content("Body")("StartStop") Is Nothing Then
-                dic = JSON.Content("Body")("StartStop")
-                boStartStop = dic("Enabled")
-                siStStV = dic("MaxSpeed")
-                siStStT = dic("MinTime")
-                StStDelay = dic("Delay")
-            Else
-                boStartStop = False
-            End If
+			file = New cFile_V3
 
-            If Not JSON.Content("Body")("LAC") Is Nothing Then
-                dic = JSON.Content("Body")("LAC")
-                LookAheadOn = dic("Enabled")
-                a_lookahead = dic("Dec")
-                vMinLA = dic("MinSpeed")
-            Else
-                LookAheadOn = False
-            End If
+			If Not file.OpenRead(stDesMaxFile.FullPath) Then
+				WorkerMsg(tMsgID.Err, "Can't read .vacc file (" & stDesMaxFile.FullPath & ")", MsgSrc)
+				Return False
+			End If
 
-            If Not JSON.Content("Body")("OverSpeedEcoRoll") Is Nothing Then
+			'Skip Header
+			file.ReadLine()
 
-                dic = JSON.Content("Body")("OverSpeedEcoRoll")
+			laDesV.Clear()
+			laDesMax.Clear()
+			laDesMin.Clear()
+			DesMaxDim = -1
+			Try
 
-                Select Case UCase(dic("Mode").ToString).Trim
-                    Case "ECOROLL"
-                        OverSpeedOn = False
-                        EcoRollOn = True
+				Do While Not file.EndOfFile
 
-                    Case "OVERSPEED"
-                        OverSpeedOn = True
-                        EcoRollOn = False
+					DesMaxDim += 1
 
-                    Case "OFF"
-                        OverSpeedOn = False
-                        EcoRollOn = False
+					line = file.ReadLine
 
-                    Case Else
-                        WorkerMsg(tMsgID.Err, "Value '" & dic("Mode") & "' is not valid for OverSpeedEcoRoll/Mode!", MsgSrc)
-                        Return False
-                End Select
+					laDesV.Add(CSng(line(0)) / 3.6)						  'km/h => m/s !!!!
+					laDesMax.Add(CSng(line(1)))
+					laDesMin.Add(CSng(line(2)))
 
-                vMin = dic("MinSpeed")
-                OverSpeed = dic("OverSpeed")
-                If Not dic("UnderSpeed") Is Nothing Then UnderSpeed = dic("UnderSpeed")
+				Loop
 
-            Else
-                OverSpeedOn = False
-                EcoRollOn = False
-            End If
+			Catch ex As Exception
 
+				file.Close()
+				WorkerMsg(tMsgID.Err, "Error in .vacc file. " & ex.Message & " (" & stDesMaxFile.FullPath & ")", MsgSrc,
+						stDesMaxFile.FullPath)
+				Return False
 
+			End Try
 
+			file.Close()
 
+		End If
 
-        Catch ex As Exception
-            WorkerMsg(tMsgID.Err, "Failed to read VECTO file! " & ex.Message, MsgSrc)
-            Return False
-        End Try
-
-
-        Return True
-
-
-    End Function
-
-    Private Sub SetDefault()
-
-        AuxiliaryAssembly ="CLASSIC"
-        AuxiliaryVersion ="CLASSIC"
-        AdvancedAuxiliaryFilePath=String.Empty
-
-
-        boStartStop = False
-        siStStV = 5
-        siStStT = 5
-        StStDelay = 0
-        FileVersion = 0
-
-        stPathVEH.Clear()
-        stPathENG.Clear()
-        CycleFiles.Clear()
-        stPathGBX.Clear()
-
-        stDesMaxFile.Clear()
-        laDesV.Clear()
-        laDesMax.Clear()
-        laDesMin.Clear()
-        DesMaxDim = -1
-
-        AuxPaths.Clear()
-        AuxRefs.Clear()
-        AuxDef = False
-        EStechs.Clear()
-
-        EngOnly = False
-
-        a_lookahead = 0
-        vMin = 0
-        LookAheadOn = True
-        OverSpeedOn = False
-        EcoRollOn = False
-        OverSpeed = 0
-        UnderSpeed = 0
-        vMinLA = 0
-
-        SavedInDeclMode = False
-
-    End Sub
-
-    Public Function DeclInit() As Boolean
-
-        Dim cl As List(Of String)
-        Dim s As String
-        Dim SubPath As cSubPath
-        Dim MsgSrc As String
-
-        MsgSrc = "VECTO/DeclInit"
-
-        EngOnly = False
-
-        CycleFiles.Clear()
-
-        cl = Declaration.SegRef.GetCycles
-
-        For Each s In cl
-            SubPath = New cSubPath
-            SubPath.Init(MyPath, s)
-            CycleFiles.Add(SubPath)
-        Next
-
-        stDesMaxFile.Init(MyPath, Declaration.SegRef.VACCfile)
-
-        siStStV = cDeclaration.SSspeed
-        siStStT = cDeclaration.SStime
-        StStDelay = cDeclaration.SSdelay
-
-        If Not EcoRollOn Then OverSpeedOn = True
-
-        OverSpeed = cDeclaration.Overspeed
-        UnderSpeed = cDeclaration.Underspeed
-        vMin = cDeclaration.ECvmin
-
-        LookAheadOn = True
-        a_lookahead = cDeclaration.LACa
-        vMinLA = cDeclaration.LACvmin
-
-        'No need to check Aux (AuxDef). Will be checked in cDeclaration.CalcInitLoad
-
-        Return True
-
-    End Function
-
-    'This Sub reads those Input-files that do not have their own class, etc.
-    Public Function Init() As Boolean
-        Dim file As cFile_V3
-        Dim line As String()
-
-        Dim MsgSrc As String
-
-        MsgSrc = "VECTO/Init"
-
-        If Not EngOnly Then
-
-            file = New cFile_V3
-
-            If Not file.OpenRead(stDesMaxFile.FullPath) Then
-                WorkerMsg(tMsgID.Err, "Can't read .vacc file (" & stDesMaxFile.FullPath & ")", MsgSrc)
-                Return False
-            End If
-
-            'Skip Header
-            file.ReadLine()
-
-            laDesV.Clear()
-            laDesMax.Clear()
-            laDesMin.Clear()
-            DesMaxDim = -1
-            Try
-
-                Do While Not file.EndOfFile
-
-                    DesMaxDim += 1
-
-                    line = file.ReadLine
-
-                    laDesV.Add(CSng(line(0)) / 3.6)   'km/h => m/s !!!!
-                    laDesMax.Add(CSng(line(1)))
-                    laDesMin.Add(CSng(line(2)))
-
-                Loop
-
-            Catch ex As Exception
-
-                file.Close()
-                WorkerMsg(tMsgID.Err, "Error in .vacc file. " & ex.Message & " (" & stDesMaxFile.FullPath & ")", MsgSrc, stDesMaxFile.FullPath)
-                Return False
-
-            End Try
-
-            file.Close()
-
-        End If
-
-        Return True
-
-    End Function
+		Return True
+	End Function
 
 #Region "Aux"
 
-    Public Function AuxInit() As Boolean
+	Public Function AuxInit() As Boolean
 
-        Dim Aux0 As cAux
-        Dim AuxPathKV As KeyValuePair(Of String, cAuxEntry)
-        Dim DRIauxcheck As New Dictionary(Of String, Boolean)
-        Dim AuxID As String
+		Dim Aux0 As cAux
+		Dim AuxPathKV As KeyValuePair(Of String, cAuxEntry)
+		Dim DRIauxcheck As New Dictionary(Of String, Boolean)
+		Dim AuxID As String
 
-        Dim MsgSrc As String
+		Dim MsgSrc As String
 
-        MsgSrc = "VEH/AuxInit"
+		MsgSrc = "VEH/AuxInit"
 
-        AuxRefs = New Dictionary(Of String, cAux)
+		AuxRefs = New Dictionary(Of String, cAux)
 
-        If Cfg.DeclMode Then
+		If Cfg.DeclMode Then
 
-            For Each AuxPathKV In AuxPaths
-                AuxRefs.Add(AuxPathKV.Key, Nothing)
-            Next
+			For Each AuxPathKV In AuxPaths
+				AuxRefs.Add(AuxPathKV.Key, Nothing)
+			Next
 
-            Return True
+			Return True
 
-        End If
+		End If
 
 
-        If DRI.AuxDef Xor AuxDef Then
+		If DRI.AuxDef Xor AuxDef Then
 
-            If AuxDef Then
-                WorkerMsg(tMsgID.Err, "No auxiliary input defined in driving cycle!", MsgSrc)
-                Return False
-            Else
-                WorkerMsg(tMsgID.Warn, "No auxiliary defined in vehicle file! Psupply input will be ignored!", MsgSrc)
-                Return True
-            End If
+			If AuxDef Then
+				WorkerMsg(tMsgID.Err, "No auxiliary input defined in driving cycle!", MsgSrc)
+				Return False
+			Else
+				WorkerMsg(tMsgID.Warn, "No auxiliary defined in vehicle file! Psupply input will be ignored!", MsgSrc)
+				Return True
+			End If
 
-        End If
+		End If
 
-        If Not (DRI.AuxDef Or AuxDef) Then Return True
+		If Not (DRI.AuxDef Or AuxDef) Then Return True
 
 
-        For Each AuxID In DRI.AuxComponents.Keys
-            DRIauxcheck.Add(AuxID, False)
-        Next
+		For Each AuxID In DRI.AuxComponents.Keys
+			DRIauxcheck.Add(AuxID, False)
+		Next
 
-        For Each AuxPathKV In AuxPaths
+		For Each AuxPathKV In AuxPaths
 
-            MsgSrc = "VEH/AuxInit/" & AuxPathKV.Key
+			MsgSrc = "VEH/AuxInit/" & AuxPathKV.Key
 
-            If Not DRI.AuxComponents.ContainsKey(AuxPathKV.Key) Then
-                WorkerMsg(tMsgID.Err, "No Psupply input defined in driving cycle for auxiliary '" & AuxPathKV.Key & "'!", MsgSrc)
-                Return False
-            End If
+			If Not DRI.AuxComponents.ContainsKey(AuxPathKV.Key) Then
+				WorkerMsg(tMsgID.Err, "No Psupply input defined in driving cycle for auxiliary '" & AuxPathKV.Key & "'!", MsgSrc)
+				Return False
+			End If
 
-            Aux0 = New cAux
-            Aux0.Filepath = AuxPathKV.Value.Path.FullPath
+			Aux0 = New cAux
+			Aux0.Filepath = AuxPathKV.Value.Path.FullPath
 
-            If Not Aux0.Readfile Then
-                'Notificationin ReadFile()
-                Return False
-            End If
+			If Not Aux0.Readfile Then
+				'Notificationin ReadFile()
+				Return False
+			End If
 
-            AuxRefs.Add(AuxPathKV.Key, Aux0)
+			AuxRefs.Add(AuxPathKV.Key, Aux0)
 
-            DRIauxcheck(AuxPathKV.Key) = True
+			DRIauxcheck(AuxPathKV.Key) = True
 
-        Next
+		Next
 
-        MsgSrc = "VEH/AuxInit"
+		MsgSrc = "VEH/AuxInit"
 
-        For Each AuxID In DRI.AuxComponents.Keys
-            If Not DRIauxcheck(AuxID) Then WorkerMsg(tMsgID.Warn, "Auxiliary '" & AuxID & "' not found! Psupply input will be ignored!", MsgSrc)
-        Next
+		For Each AuxID In DRI.AuxComponents.Keys
+			If Not DRIauxcheck(AuxID) Then _
+				WorkerMsg(tMsgID.Warn, "Auxiliary '" & AuxID & "' not found! Psupply input will be ignored!", MsgSrc)
+		Next
 
-        Return True
+		Return True
+	End Function
 
-    End Function
+	Public Function Paux(ByVal AuxID As String, ByVal t As Integer, ByVal nU As Single) As Single
+		Dim Psupply As Single
+		Dim Px As Single
+		Dim Aux0 As cAux
 
-    Public Function Paux(ByVal AuxID As String, ByVal t As Integer, ByVal nU As Single) As Single
-        Dim Psupply As Single
-        Dim Px As Single
-        Dim Aux0 As cAux
+		Dim MsgSrc As String
 
-        Dim MsgSrc As String
+		MsgSrc = "VEH/Paux"
 
-        MsgSrc = "VEH/Paux"
+		If Cfg.DeclMode Then Return Declaration.AuxPower(AuxID)
 
-        If Cfg.DeclMode Then Return Declaration.AuxPower(AuxID)
+		If AuxDef Then
 
-        If AuxDef Then
+			Aux0 = AuxRefs(AuxID)
 
-            Aux0 = AuxRefs(AuxID)
+			Psupply = DRI.AuxComponents(AuxID)(t)
 
-            Psupply = DRI.AuxComponents(AuxID)(t)
+			If Psupply < 0 Then GoTo lbAuxError
 
-            If Psupply < 0 Then GoTo lbAuxError
+			Px = Aux0.Paux(nU, Psupply)
 
-            Px = Aux0.Paux(nU, Psupply)
+			If Px < 0 Then GoTo lbAuxError
 
-            If Px < 0 Then GoTo lbAuxError
+			Return Px
 
-            Return Px
+		Else
 
-        Else
+			Return 0
 
-            Return 0
-
-        End If
+		End If
 
 
 lbAuxError:
-        MODdata.ModErrors.AuxNegative = AuxID
-        Return 0
-
+		MODdata.ModErrors.AuxNegative = AuxID
+		Return 0
+	End Function
 
-    End Function
+	Public Function PauxSum(ByVal t As Integer, ByVal nU As Single) As Single
+		Dim sum As Single
+		Dim AuxID As String
 
-    Public Function PauxSum(ByVal t As Integer, ByVal nU As Single) As Single
-        Dim sum As Single
-        Dim AuxID As String
+		Dim MsgSrc As String
 
-        Dim MsgSrc As String
+		MsgSrc = "VEH/Paux"
 
-        MsgSrc = "VEH/Paux"
+		If AuxDef Then
 
-        If AuxDef Then
+			sum = 0
 
-            sum = 0
+			For Each AuxID In AuxRefs.Keys
 
-            For Each AuxID In AuxRefs.Keys
+				sum += Paux(AuxID, t, nU)
 
-                sum += Paux(AuxID, t, nU)
+			Next
 
-            Next
+			Return sum
 
-            Return sum
+		Else
 
-        Else
+			Return 0
 
-            Return 0
-
-        End If
-
-    End Function
+		End If
+	End Function
 
 #End Region
 
 
 #Region "Properties"
 
-    Public ReadOnly Property FileList As List(Of String)
-        Get
-            Return MyFileList
-        End Get
-    End Property
-
-
-    Public Property FilePath() As String
-        Get
-            Return sFilePath
-        End Get
-        Set(ByVal value As String)
-            sFilePath = value
-            If sFilePath = "" Then
-                MyPath = ""
-            Else
-                MyPath = IO.Path.GetDirectoryName(sFilePath) & "\"
-            End If
-        End Set
-    End Property
-
-
-    Public Property PathVEH(Optional ByVal Original As Boolean = False) As String
-        Get
-            If Original Then
-                Return stPathVEH.OriginalPath
-            Else
-                Return stPathVEH.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            stPathVEH.Init(MyPath, value)
-        End Set
-    End Property
-
-    Public Property PathENG(Optional ByVal Original As Boolean = False) As String
-        Get
-            If Original Then
-                Return stPathENG.OriginalPath
-            Else
-                Return stPathENG.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            stPathENG.Init(MyPath, value)
-        End Set
-    End Property
-
-    Public Property PathGBX(Optional ByVal Original As Boolean = False) As String
-        Get
-            If Original Then
-                Return stPathGBX.OriginalPath
-            Else
-                Return stPathGBX.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            stPathGBX.Init(MyPath, value)
-        End Set
-    End Property
-
-
-    Public Property StartStop() As Boolean
-        Get
-            Return boStartStop
-        End Get
-        Set(ByVal value As Boolean)
-            boStartStop = value
-        End Set
-    End Property
-
-    Public Property StStV() As Single
-        Get
-            Return siStStV
-        End Get
-        Set(ByVal value As Single)
-            siStStV = value
-        End Set
-    End Property
-
-    Public Property StStT() As Single
-        Get
-            Return siStStT
-        End Get
-        Set(ByVal value As Single)
-            siStStT = value
-        End Set
-    End Property
-
-    Public Property DesMaxFile(Optional ByVal Original As Boolean = False) As String
-        Get
-            If Original Then
-                Return stDesMaxFile.OriginalPath
-            Else
-                Return stDesMaxFile.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            stDesMaxFile.Init(MyPath, value)
-        End Set
-    End Property
+	Public ReadOnly Property FileList As List(Of String)
+		Get
+			Return MyFileList
+		End Get
+	End Property
+
+
+	Public Property FilePath() As String
+		Get
+			Return sFilePath
+		End Get
+		Set(ByVal value As String)
+			sFilePath = value
+			If sFilePath = "" Then
+				MyPath = ""
+			Else
+				MyPath = IO.Path.GetDirectoryName(sFilePath) & "\"
+			End If
+		End Set
+	End Property
+
+
+	Public Property PathVEH(Optional ByVal Original As Boolean = False) As String
+		Get
+			If Original Then
+				Return stPathVEH.OriginalPath
+			Else
+				Return stPathVEH.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			stPathVEH.Init(MyPath, value)
+		End Set
+	End Property
+
+	Public Property PathENG(Optional ByVal Original As Boolean = False) As String
+		Get
+			If Original Then
+				Return stPathENG.OriginalPath
+			Else
+				Return stPathENG.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			stPathENG.Init(MyPath, value)
+		End Set
+	End Property
+
+	Public Property PathGBX(Optional ByVal Original As Boolean = False) As String
+		Get
+			If Original Then
+				Return stPathGBX.OriginalPath
+			Else
+				Return stPathGBX.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			stPathGBX.Init(MyPath, value)
+		End Set
+	End Property
+
+
+	Public Property StartStop() As Boolean
+		Get
+			Return boStartStop
+		End Get
+		Set(ByVal value As Boolean)
+			boStartStop = value
+		End Set
+	End Property
+
+	Public Property StStV() As Single
+		Get
+			Return siStStV
+		End Get
+		Set(ByVal value As Single)
+			siStStV = value
+		End Set
+	End Property
+
+	Public Property StStT() As Single
+		Get
+			Return siStStT
+		End Get
+		Set(ByVal value As Single)
+			siStStT = value
+		End Set
+	End Property
+
+	Public Property DesMaxFile(Optional ByVal Original As Boolean = False) As String
+		Get
+			If Original Then
+				Return stDesMaxFile.OriginalPath
+			Else
+				Return stDesMaxFile.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			stDesMaxFile.Init(MyPath, value)
+		End Set
+	End Property
+
+	Public Property LacPreviewFactor As Single
+
+	Public Property LacDfOffset As Single
+
+	Public Property LacDfScale As Single
+
+	Public Property LacDfTargetSpeedFile As String
+
+	Public Property LacDfVelocityDropFile As String
+
 
 #End Region
 
-    Public Function aDesMax(ByVal v As Single) As Single
-        Dim i As Int32
+	Public Function aDesMax(ByVal v As Single) As Single
+		Dim i As Int32
 
-        'Extrapolation for x < x(1)
-        If laDesV(0) >= v Then
-            If laDesV(0) > v Then MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
-            i = 1
-            GoTo lbInt
-        End If
+		'Extrapolation for x < x(1)
+		If laDesV(0) >= v Then
+			If laDesV(0) > v Then MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
+			i = 1
+			GoTo lbInt
+		End If
 
-        i = 0
-        Do While laDesV(i) < v And i < DesMaxDim
-            i += 1
-        Loop
+		i = 0
+		Do While laDesV(i) < v And i < DesMaxDim
+			i += 1
+		Loop
 
-        'Extrapolation for x > x(imax)
-        If laDesV(i) < v Then
-            MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
-        End If
+		'Extrapolation for x > x(imax)
+		If laDesV(i) < v Then
+			MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
+		End If
 
 lbInt:
-        'Interpolation
-        Return (v - laDesV(i - 1)) * (laDesMax(i) - laDesMax(i - 1)) / (laDesV(i) - laDesV(i - 1)) + laDesMax(i - 1)
-
-    End Function
-
-    Public Function aDesMin(ByVal v As Single) As Single
-        Dim i As Int32
-
-        'Extrapolation for x < x(1)
-        If laDesV(0) >= v Then
-            If laDesV(0) > v Then MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
-            i = 1
-            GoTo lbInt
-        End If
-
-        i = 0
-        Do While laDesV(i) < v And i < DesMaxDim
-            i += 1
-        Loop
-
-        'Extrapolation for x > x(imax)
-        If laDesV(i) < v Then
-            MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
-        End If
+		'Interpolation
+		Return (v - laDesV(i - 1)) * (laDesMax(i) - laDesMax(i - 1)) / (laDesV(i) - laDesV(i - 1)) + laDesMax(i - 1)
+	End Function
+
+	Public Function aDesMin(ByVal v As Single) As Single
+		Dim i As Int32
+
+		'Extrapolation for x < x(1)
+		If laDesV(0) >= v Then
+			If laDesV(0) > v Then MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
+			i = 1
+			GoTo lbInt
+		End If
+
+		i = 0
+		Do While laDesV(i) < v And i < DesMaxDim
+			i += 1
+		Loop
+
+		'Extrapolation for x > x(imax)
+		If laDesV(i) < v Then
+			MODdata.ModErrors.DesMaxExtr = "v= " & v * 3.6 & "[km/h]"
+		End If
 
 lbInt:
-        'Interpolation
-        Return (v - laDesV(i - 1)) * (laDesMin(i) - laDesMin(i - 1)) / (laDesV(i) - laDesV(i - 1)) + laDesMin(i - 1)
-
-    End Function
-
-
+		'Interpolation
+		Return (v - laDesV(i - 1)) * (laDesMin(i) - laDesMin(i - 1)) / (laDesV(i) - laDesV(i - 1)) + laDesMin(i - 1)
+	End Function
 End Class
 
-- 
GitLab