Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

Merge branch 'develop' of...

parents 4ad50a3a cb385c86
Branches
Tags
No related merge requests found
Showing
with 150 additions and 25 deletions
......@@ -66,6 +66,10 @@ In this tab the global calculation settings can be changed.
: Select either [Declaration Mode](#declaration-mode) or [Engineering Mode](#engineering-mode)
**Output Directory**
: This input can be used to write all simulation result files to a certain directory. This can be either an absolute path or a relative path. If an absolute path is provided, all result files are written to this directory. If a relative path is provided the .vmod and XML reports are written into the corresponding subdirectory of the job file and the .vsum file is written to the corresponding subdirectory of the first selected job file.
**Output**
![cb](pics/checkbox.png) Write modal results
......
Documentation/User Manual/pics/VECTO_OptionsTab.PNG

5.94 KiB | W: | H:

Documentation/User Manual/pics/VECTO_OptionsTab.PNG

8.93 KiB | W: | H:

Documentation/User Manual/pics/VECTO_OptionsTab.PNG
Documentation/User Manual/pics/VECTO_OptionsTab.PNG
Documentation/User Manual/pics/VECTO_OptionsTab.PNG
Documentation/User Manual/pics/VECTO_OptionsTab.PNG
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,6 +2,7 @@
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=HashingTool_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Default: Reformat Code</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CommonFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String>
......@@ -17,12 +18,21 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_CATCH_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ELSE_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FINALLY_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_EMBEDDED_STATEMENT_ON_SAME_LINE/@EntryValue">NEVER</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_TYPEOF_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/USE_INDENT_FROM_VS/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CssFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/HtmlFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/JavaScriptCodeFormatting/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/ProtobufCodeFormatting/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/ResxFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/VBFormat/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AMT/@EntryIndexedValue">AMT</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AT/@EntryIndexedValue">AT</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CSV/@EntryIndexedValue">CSV</s:String>
......@@ -89,6 +99,9 @@
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File63D02BF9E971474EB0B2A88FBE79E5D6/@KeyIndexDefined">True</s:Boolean>
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File63D02BF9E971474EB0B2A88FBE79E5D6/RelativePriority/@EntryValue">3</s:Double>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
......@@ -100,4 +113,5 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EFormat_002ESettingsUpgrade_002EAlignmentTabFillStyleMigration/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
......@@ -32,6 +32,8 @@ Public Class Configuration
Public ValidateRunData As Boolean
public OutputFolder As String
Public Const DefaultFuelType As FuelType = FuelType.DieselCI
Private Const FormatVersion As Short = 2
......@@ -58,6 +60,7 @@ Public Class Configuration
FirstRun = True
DeclMode = True
ValidateRunData = True
OutputFolder = ""
End Sub
Public Sub Load()
......@@ -86,6 +89,7 @@ Public Class Configuration
FirstRun = body.GetEx(Of Boolean)("FirstRun")
DeclMode = body.GetEx(Of Boolean)("DeclMode")
ValidateRunData = IsNothing(body("ValidateRunData")) OrElse body.GetEx(Of Boolean)("ValidateRunData")
OutputFolder = If(body("OutputFolder") Is Nothing, "", body("OutputFolder").Value(of string)())
End Using
Catch ex As Exception
GUIMsg(MessageType.Err, "Error while loading settings!")
......@@ -111,6 +115,7 @@ Public Class Configuration
body.Add("FirstRun", FirstRun)
body.Add("DeclMode", DeclMode)
body.Add("ValidateRunData", ValidateRunData)
body.Add("OutputFolder", OutputFolder)
JSONFileWriter.WriteFile(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}}, FilePath)
End Sub
......
......@@ -59,6 +59,9 @@ Partial Class MainForm
Me.ButtonGENadd = New System.Windows.Forms.Button()
Me.TabPgOptions = New System.Windows.Forms.TabPage()
Me.PanelOptAllg = New System.Windows.Forms.Panel()
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.BtTCfileBrowse = New System.Windows.Forms.Button()
Me.tbOutputFolder = New System.Windows.Forms.TextBox()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.cbActVmod = New System.Windows.Forms.CheckBox()
Me.cbValidateRunData = New System.Windows.Forms.CheckBox()
......@@ -122,6 +125,7 @@ Partial Class MainForm
CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit
Me.TabPgOptions.SuspendLayout
Me.PanelOptAllg.SuspendLayout
Me.GroupBox4.SuspendLayout
Me.GroupBox3.SuspendLayout
Me.GroupBox2.SuspendLayout
Me.GroupBox1.SuspendLayout
......@@ -375,6 +379,7 @@ Partial Class MainForm
'
'PanelOptAllg
'
Me.PanelOptAllg.Controls.Add(Me.GroupBox4)
Me.PanelOptAllg.Controls.Add(Me.GroupBox3)
Me.PanelOptAllg.Controls.Add(Me.GroupBox2)
Me.PanelOptAllg.Controls.Add(Me.GroupBox1)
......@@ -383,6 +388,34 @@ Partial Class MainForm
Me.PanelOptAllg.Size = New System.Drawing.Size(1022, 290)
Me.PanelOptAllg.TabIndex = 0
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.BtTCfileBrowse)
Me.GroupBox4.Controls.Add(Me.tbOutputFolder)
Me.GroupBox4.Location = New System.Drawing.Point(183, 4)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(260, 46)
Me.GroupBox4.TabIndex = 19
Me.GroupBox4.TabStop = false
Me.GroupBox4.Text = "Output Directory"
'
'BtTCfileBrowse
'
Me.BtTCfileBrowse.Image = Global.TUGraz.VECTO.My.Resources.Resources.Open_icon
Me.BtTCfileBrowse.Location = New System.Drawing.Point(227, 14)
Me.BtTCfileBrowse.Name = "BtTCfileBrowse"
Me.BtTCfileBrowse.Size = New System.Drawing.Size(24, 24)
Me.BtTCfileBrowse.TabIndex = 27
Me.BtTCfileBrowse.TabStop = false
Me.BtTCfileBrowse.UseVisualStyleBackColor = true
'
'tbOutputFolder
'
Me.tbOutputFolder.Location = New System.Drawing.Point(6, 17)
Me.tbOutputFolder.Name = "tbOutputFolder"
Me.tbOutputFolder.Size = New System.Drawing.Size(215, 20)
Me.tbOutputFolder.TabIndex = 0
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.cbActVmod)
......@@ -842,6 +875,8 @@ Partial Class MainForm
CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit
Me.TabPgOptions.ResumeLayout(false)
Me.PanelOptAllg.ResumeLayout(false)
Me.GroupBox4.ResumeLayout(false)
Me.GroupBox4.PerformLayout
Me.GroupBox3.ResumeLayout(false)
Me.GroupBox3.PerformLayout
Me.GroupBox2.ResumeLayout(false)
......@@ -951,5 +986,7 @@ End Sub
Friend WithEvents cbValidateRunData As System.Windows.Forms.CheckBox
Friend WithEvents cbActVmod As System.Windows.Forms.CheckBox
Friend WithEvents EPTPJobEditorToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents GroupBox4 As GroupBox
Friend WithEvents tbOutputFolder As TextBox
Friend WithEvents BtTCfileBrowse As Button
End Class
......@@ -223,6 +223,9 @@
<metadata name="CmOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>732, 12</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>850, 12</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>49</value>
</metadata>
......
......@@ -51,6 +51,7 @@ Imports TUGraz.VectoCore
Imports TUGraz.VectoCore.InputData.FileIO.XML
Imports TUGraz.VectoCore.InputData.FileIO.XML.Declaration
Imports TUGraz.VectoCore.InputData.FileIO.XML.Engineering
Imports TUGraz.VectoCore.Models.Simulation
Imports TUGraz.VectoCore.OutputData
Imports TUGraz.VectoCore.OutputData.FileIO
Imports TUGraz.VectoCore.Utils
......@@ -937,7 +938,7 @@ Imports TUGraz.VectoCore.Utils
AllowSleepOff()
Dim sumFileWriter As FileOutputWriter = New FileOutputWriter(JobFileList(0))
Dim sumFileWriter As FileOutputWriter = New FileOutputWriter(GetOutputDirectory(JobFileList(0)))
Dim sumWriter As SummaryDataContainer = New SummaryDataContainer(sumFileWriter)
Dim jobContainer As JobContainer = New JobContainer(sumWriter)
......@@ -987,7 +988,8 @@ Imports TUGraz.VectoCore.Utils
Continue For
End If
Dim fileWriter As FileOutputWriter = New FileOutputWriter(jobFile)
Dim outFile As String = GetOutputDirectory(jobFile)
Dim fileWriter As FileOutputWriter = New FileOutputWriter(outFile)
Dim runsFactory As SimulatorFactory = New SimulatorFactory(mode, input, fileWriter)
runsFactory.WriteModalResults = Cfg.ModOut
......@@ -1087,7 +1089,7 @@ Imports TUGraz.VectoCore.Utils
Next
For Each job As String In JobFileList
dim w as FileOutputWriter = new FileOutputWriter(job)
dim w as FileOutputWriter = new FileOutputWriter(GetOutputDirectory(job))
For Each entry as KeyValuePair(Of string, string) In _
new Dictionary(Of string, string) _
from {{w.XMLFullReportName, "XML Manufacturer Report"}, {w.XMLCustomerReportName, "XML Customer Report"},
......@@ -1127,6 +1129,23 @@ Imports TUGraz.VectoCore.Utils
End If
End Sub
Private Function GetOutputDirectory(jobFile As String) As String
dim outFile as String = jobfile
If (Not string.IsNullOrWhiteSpace(tbOutputFolder.Text)) Then
Dim outPath as string = tbOutputFolder.Text
if (path.IsPathRooted(outPath)) Then
outFile = Path.Combine(outPath, Path.GetFileName(jobFile))
Else
outFile = Path.Combine(path.GetDirectoryName(jobFile), outPath, path.GetFileName(jobFile))
End If
If (Not directory.Exists(path.GetDirectoryName(outFile))) then
Directory.CreateDirectory(path.GetDirectoryName(outFile))
End If
End If
Return outFile
End Function
Private Shared Sub PrintRuns(progress As Dictionary(Of Integer, JobContainer.ProgressEntry),
fileWriters As Dictionary(Of Integer, FileOutputWriter))
......@@ -1435,6 +1454,9 @@ Imports TUGraz.VectoCore.Utils
RbDecl.Checked = Cfg.DeclMode
cbValidateRunData.Checked = cfg.ValidateRunData
tbOutputFolder.Text = Cfg.OutputFolder
End Sub
'Update config class from options in GUI, e.g. before running calculations
......@@ -1442,6 +1464,7 @@ Imports TUGraz.VectoCore.Utils
Cfg.ModOut = ChBoxModOut.Checked
Cfg.Mod1Hz = ChBoxMod1Hz.Checked
Cfg.ValidateRunData = cbValidateRunData.Checked
Cfg.OutputFolder = tbOutputFolder.Text
End Sub
#End Region
......@@ -2100,6 +2123,16 @@ Imports TUGraz.VectoCore.Utils
Handles EPTPJobEditorToolStripMenuItem.Click
OpenVECTOeditor("<VTP>")
End Sub
Private Sub BtTCfileBrowse_Click(sender As Object, e As EventArgs) Handles BtTCfileBrowse.Click
If Not FolderFileBrowser.OpenDialog("") Then
Exit Sub
End If
Dim filePath As String = FolderFileBrowser.Files(0)
tbOutputFolder.Text = Path.GetFullPath(filePath)
End Sub
End Class
......@@ -162,8 +162,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Ninject">
<HintPath>..\..\STUDENTEN_PROJEKTE\Kober_VectoGIT\VECTO_GIT\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="Ninject" version="3.3.4" targetFramework="net45" />
<package id="NLog" version="4.5.11" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -54,8 +54,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Ninject">
<HintPath>..\..\STUDENTEN_PROJEKTE\Kober_VectoGIT\VECTO_GIT\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Ninject" version="3.3.4" targetFramework="net45" />
<package id="NLog" version="4.5.11" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -306,6 +306,15 @@ namespace TUGraz.VectoCore.InputData.Reader
return false;
}
if (first.AirSpeedRelativeToVehicle != null && second.AirSpeedRelativeToVehicle != null &&
!first.AirSpeedRelativeToVehicle.IsEqual(second.AirSpeedRelativeToVehicle)) {
return false;
}
if (!first.WindYawAngle.IsEqual(second.WindYawAngle)) {
return false;
}
return true;
}
......
......@@ -41,7 +41,11 @@ namespace TUGraz.VectoCore.Models.Declaration
{
public enum WeightingGroup
{
Group4UD = 1,
Group1 = 1,
Group2,
Group3,
Group4UD,
Group4RD,
Group4LH,
Group5RD,
......@@ -50,6 +54,11 @@ namespace TUGraz.VectoCore.Models.Declaration
Group9LH,
Group10RD,
Group10LH,
Group11,
Group12,
Group16,
Unknown
}
......
......@@ -299,7 +299,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (_powershiftLossEnergy != null) {
var remainingShiftLossLime = ModelData.PowershiftShiftTime - (absTime - LastShift);
if (remainingShiftLossLime.IsGreater(0)) {
aliquotEnergyLoss = _powershiftLossEnergy * VectoMath.Min(1.0, dt / remainingShiftLossLime);
aliquotEnergyLoss = _powershiftLossEnergy * VectoMath.Min(1.0, VectoMath.Min(dt, remainingShiftLossLime) / ModelData.PowershiftShiftTime);
var avgEngineSpeed = (DataBus.EngineSpeed + outAngularVelocity * effectiveRatio) / 2;
powershiftLoss = aliquotEnergyLoss / dt / avgEngineSpeed;
inTorque += powershiftLoss;
......@@ -317,7 +317,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.Gear = Gear;
CurrentState.TransmissionTorqueLoss = inTorque * effectiveRatio - outTorque;
CurrentState.PowershiftLoss = powershiftLoss;
CurrentState.PowershiftLossEnergy = _powershiftLossEnergy ?? 0.SI<WattSecond>() - aliquotEnergyLoss;
CurrentState.PowershiftLossEnergy = _powershiftLossEnergy;
TorqueConverter.Locked(CurrentState.InTorque, CurrentState.InAngularVelocity, CurrentState.InTorque,
CurrentState.InAngularVelocity);
}
......
......@@ -596,7 +596,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}).
Case<ResponseOverload>(r => {
var angularSpeed = SearchAlgorithm.Search(nextAngularSpeed, r.Delta,
-Constants.SimulationSettings.EngineIdlingSearchInterval,
Constants.SimulationSettings.EngineIdlingSearchInterval,
getYValue: result => ((ResponseDryRun)result).DeltaFullLoad,
evaluateFunction: n => RequestPort.Request(absTime, dt, 0.SI<NewtonMeter>(), n, true),
criterion: result => ((ResponseDryRun)result).DeltaFullLoad.Value());
......
......@@ -702,6 +702,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var brakingDistance = Driver.ComputeDecelerationDistance(DriverStrategy.BrakeTrigger.NextTargetSpeed) +
DefaultDriverStrategy.BrakingSafetyMargin;
DriverStrategy.BrakeTrigger.BrakingStartDistance = DriverStrategy.BrakeTrigger.TriggerDistance - brakingDistance;
if (DriverStrategy.BrakeTrigger.Action == DrivingBehavior.Braking) {
Phase = BrakingPhase.Brake;
}
if (Phase == BrakingPhase.Coast) {
var resp = CheckSwitchingToBraking(ds, currentDistance);
if (resp != null) {
......
......@@ -44,8 +44,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
/// Retarder component.
/// </summary>
public class Retarder : StatefulProviderComponent<SimpleComponentState, ITnOutPort, ITnInPort, ITnOutPort>,
IPowerTrainComponent, ITnInPort,
ITnOutPort
IPowerTrainComponent, ITnInPort, ITnOutPort
{
private readonly RetarderLossMap _lossMap;
private readonly double _ratio;
......
......@@ -97,6 +97,14 @@ namespace TUGraz.VectoCore.OutputData
/// </summary>
private int _resultCount;
protected readonly IReportWriter Writer;
protected DeclarationReport(IReportWriter writer)
{
Writer = writer;
}
[MethodImpl(MethodImplOptions.Synchronized)]
public void PrepareResult(LoadingType loading, Mission mission, VectoRunData runData)
{
......
......@@ -618,8 +618,8 @@ namespace TUGraz.VectoCore.OutputData
row[MAX_ENGINE_SPEED] = (ConvertedSI)modData.MaxEngineSpeed().AsRPM.SI<Scalar>();
if (accTimeShare != null && decTimeShare != null && cruiseTimeShare != null) {
var shareSum = accTimeShare + decTimeShare + cruiseTimeShare + stopTimeShare;
if (!shareSum.IsEqual(100)) {
Log.Error(
if (!shareSum.IsEqual(100, 1e-2)) {
Log.Warn(
"Sumfile Error: driving behavior timeshares must sum up to 100%: acc: {0}%, dec: {1}%, cruise: {2}%, stop: {3}%, sum: {4}%",
accTimeShare.ToOutputFormat(1, null, false), decTimeShare.ToOutputFormat(1, null, false),
cruiseTimeShare.ToOutputFormat(1, null, false), stopTimeShare.ToOutputFormat(1, null, false),
......
......@@ -54,7 +54,6 @@ namespace TUGraz.VectoCore.OutputData.XML
private readonly XMLCustomerReport _customerReport;
private readonly XMLMonitoringReport _monitoringReport;
private readonly IOutputDataWriter _writer;
private IDictionary<Tuple<MissionType, LoadingType>, double> _weightingFactors;
......@@ -181,13 +180,11 @@ namespace TUGraz.VectoCore.OutputData.XML
}
}
public XMLDeclarationReport(IOutputDataWriter writer = null)
public XMLDeclarationReport(IReportWriter writer = null) : base(writer)
{
_manufacturerReport = new XMLManufacturerReport();
_customerReport = new XMLCustomerReport();
_monitoringReport = new XMLMonitoringReport(_manufacturerReport);
_writer = writer;
}
public XDocument FullReport
......@@ -223,10 +220,10 @@ namespace TUGraz.VectoCore.OutputData.XML
var fullReportHash = GetSignature(_manufacturerReport.Report);
_customerReport.GenerateReport(fullReportHash);
if (_writer != null) {
_writer.WriteReport(ReportType.DeclarationReportCustomerXML, _customerReport.Report);
_writer.WriteReport(ReportType.DeclarationReportManufacturerXML, _manufacturerReport.Report);
_writer.WriteReport(ReportType.DeclarationReportMonitoringXML, _monitoringReport.Report);
if (Writer != null) {
Writer.WriteReport(ReportType.DeclarationReportCustomerXML, _customerReport.Report);
Writer.WriteReport(ReportType.DeclarationReportManufacturerXML, _manufacturerReport.Report);
Writer.WriteReport(ReportType.DeclarationReportMonitoringXML, _monitoringReport.Report);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment