From a7eab2393019d44abfff541aab50adb6defaaf85 Mon Sep 17 00:00:00 2001 From: "Burns, Terry" <Terry.Burns@ricardo.com> Date: Fri, 17 Oct 2014 15:42:57 +0000 Subject: [PATCH] Creating TestHarnessToTest the model with environment. Work in progress. git-tfs-id: [http://tfs00.element.root.com:8080/tfs/TFSCollection]$/VECTO;C1642 --- AuxillaryTestHarness/App.config | 6 + .../AuxillaryTestHarness.vbproj | 138 +++++++ AuxillaryTestHarness/Dashboard.Designer.vb | 382 ++++++++++++++++++ AuxillaryTestHarness/Dashboard.resx | 129 ++++++ AuxillaryTestHarness/Dashboard.vb | 56 +++ .../My Project/Application.Designer.vb | 38 ++ .../My Project/Application.myapp | 11 + .../My Project/AssemblyInfo.vb | 35 ++ .../DataSources/Dashboard.datasource | 10 + .../My Project/Resources.Designer.vb | 63 +++ .../My Project/Resources.resx | 117 ++++++ .../My Project/Settings.Designer.vb | 73 ++++ .../My Project/Settings.settings | 7 + Performance1.psess | 21 + VECTO.sln | 14 +- VECTO/GUI/F_VEH_AuxDlog.vb | 1 - .../VectoAuxiliaries/AuxillaryEnvironment.vb | 62 +++ .../Electrics/AlternatorMap.vb | 3 - .../Electrics/ElectricConstants.vb | 6 + .../Electrics/IElectricsUserInputsConfig.vb | 3 +- .../M0_5_SmartAlternatorSetEfficiency.vb | 13 +- .../VectoAuxiliaries/Hvac/HVACConstants.vb | 16 + VECTOAux/VectoAuxiliaries/Hvac/HVACInputs.vb | 2 +- .../Hvac/HVACUserInputsConfig.vb | 35 ++ VECTOAux/VectoAuxiliaries/Hvac/IHVACInputs.vb | 2 +- .../Hvac/IHVACUserInputsConfig.vb | 24 ++ .../Hvac/IM1_AverageHVACLoadDemand.vb | 16 + .../Hvac/M1_AverageHVACLoadDemand.vb | 42 +- VECTOAux/VectoAuxiliaries/IVectoInputs.vb | 8 + .../Pneumatics/IM4_AirCompressor.vb | 6 +- .../Pneumatics/IPneumaticUserInputsConfig.vb | 9 +- .../Pneumatics/M4_AirCompressor.vb | 14 +- .../Pneumatics/PneumaticUserInputsConfig.vb | 24 +- VECTOAux/VectoAuxiliaries/UI/F_HVAC.vb | 2 +- .../VectoAuxiliaries/VectoAuxiliaries.vbproj | 8 +- VECTOAux/VectoAuxiliaries/VectoInputs.vb | 17 + .../UnitTests/AirCompressorTests.vb | 14 +- 37 files changed, 1384 insertions(+), 43 deletions(-) create mode 100644 AuxillaryTestHarness/App.config create mode 100644 AuxillaryTestHarness/AuxillaryTestHarness.vbproj create mode 100644 AuxillaryTestHarness/Dashboard.Designer.vb create mode 100644 AuxillaryTestHarness/Dashboard.resx create mode 100644 AuxillaryTestHarness/Dashboard.vb create mode 100644 AuxillaryTestHarness/My Project/Application.Designer.vb create mode 100644 AuxillaryTestHarness/My Project/Application.myapp create mode 100644 AuxillaryTestHarness/My Project/AssemblyInfo.vb create mode 100644 AuxillaryTestHarness/My Project/DataSources/Dashboard.datasource create mode 100644 AuxillaryTestHarness/My Project/Resources.Designer.vb create mode 100644 AuxillaryTestHarness/My Project/Resources.resx create mode 100644 AuxillaryTestHarness/My Project/Settings.Designer.vb create mode 100644 AuxillaryTestHarness/My Project/Settings.settings create mode 100644 Performance1.psess create mode 100644 VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb create mode 100644 VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb create mode 100644 VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb create mode 100644 VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb create mode 100644 VECTOAux/VectoAuxiliaries/Hvac/IM1_AverageHVACLoadDemand.vb create mode 100644 VECTOAux/VectoAuxiliaries/IVectoInputs.vb create mode 100644 VECTOAux/VectoAuxiliaries/VectoInputs.vb diff --git a/AuxillaryTestHarness/App.config b/AuxillaryTestHarness/App.config new file mode 100644 index 0000000000..3a327fa4d1 --- /dev/null +++ b/AuxillaryTestHarness/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> + </startup> +</configuration> diff --git a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj new file mode 100644 index 0000000000..b935f4aaf6 --- /dev/null +++ b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}</ProjectGuid> + <OutputType>WinExe</OutputType> + <StartupObject>AuxillaryTestHarness.My.MyApplication</StartupObject> + <RootNamespace>AuxillaryTestHarness</RootNamespace> + <AssemblyName>AuxillaryTestHarness</AssemblyName> + <FileAlignment>512</FileAlignment> + <MyType>WindowsForms</MyType> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <SccProjectName>SAK</SccProjectName> + <SccLocalPath>SAK</SccLocalPath> + <SccAuxPath>SAK</SccAuxPath> + <SccProvider>SAK</SccProvider> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <DefineDebug>true</DefineDebug> + <DefineTrace>true</DefineTrace> + <OutputPath>bin\Debug\</OutputPath> + <DocumentationFile>AuxillaryTestHarness.xml</DocumentationFile> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <DefineDebug>false</DefineDebug> + <DefineTrace>true</DefineTrace> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DocumentationFile>AuxillaryTestHarness.xml</DocumentationFile> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + </PropertyGroup> + <PropertyGroup> + <OptionExplicit>On</OptionExplicit> + </PropertyGroup> + <PropertyGroup> + <OptionCompare>Binary</OptionCompare> + </PropertyGroup> + <PropertyGroup> + <OptionStrict>Off</OptionStrict> + </PropertyGroup> + <PropertyGroup> + <OptionInfer>On</OptionInfer> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + </ItemGroup> + <ItemGroup> + <Import Include="Microsoft.VisualBasic" /> + <Import Include="System" /> + <Import Include="System.Collections" /> + <Import Include="System.Collections.Generic" /> + <Import Include="System.Data" /> + <Import Include="System.Drawing" /> + <Import Include="System.Diagnostics" /> + <Import Include="System.Windows.Forms" /> + <Import Include="System.Linq" /> + <Import Include="System.Xml.Linq" /> + <Import Include="System.Threading.Tasks" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Dashboard.Designer.vb"> + <DependentUpon>Dashboard.vb</DependentUpon> + </Compile> + <Compile Include="Dashboard.vb"> + <SubType>Form</SubType> + </Compile> + <Compile Include="My Project\AssemblyInfo.vb" /> + <Compile Include="My Project\Application.Designer.vb"> + <AutoGen>True</AutoGen> + <DependentUpon>Application.myapp</DependentUpon> + </Compile> + <Compile Include="My Project\Resources.Designer.vb"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="My Project\Settings.Designer.vb"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Dashboard.resx"> + <DependentUpon>Dashboard.vb</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="My Project\Resources.resx"> + <Generator>VbMyResourcesResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.vb</LastGenOutput> + <CustomToolNamespace>My.Resources</CustomToolNamespace> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <None Include="My Project\Application.myapp"> + <Generator>MyApplicationCodeGenerator</Generator> + <LastGenOutput>Application.Designer.vb</LastGenOutput> + </None> + <None Include="My Project\DataSources\Dashboard.datasource" /> + <None Include="My Project\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <CustomToolNamespace>My</CustomToolNamespace> + <LastGenOutput>Settings.Designer.vb</LastGenOutput> + </None> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\VECTOAux\VectoAuxiliaries\VectoAuxiliaries.vbproj"> + <Project>{fdeee460-0b8a-4ef6-8d9e-72f203a50f65}</Project> + <Name>VectoAuxiliaries</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.Designer.vb b/AuxillaryTestHarness/Dashboard.Designer.vb new file mode 100644 index 0000000000..dd37ab725f --- /dev/null +++ b/AuxillaryTestHarness/Dashboard.Designer.vb @@ -0,0 +1,382 @@ +<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ +Partial Class Dashboard + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + <System.Diagnostics.DebuggerNonUserCode()> _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + <System.Diagnostics.DebuggerStepThrough()> _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.tabMain = New System.Windows.Forms.TabControl() + Me.tabGeneralConfig = New System.Windows.Forms.TabPage() + Me.cboCycle = New System.Windows.Forms.ComboBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.txtVehicleWeightKG = New System.Windows.Forms.TextBox() + Me.tabElectricalConfig = New System.Windows.Forms.TabPage() + Me.DataGridView3 = New System.Windows.Forms.DataGridView() + Me.DataGridView2 = New System.Windows.Forms.DataGridView() + Me.DataGridView1 = New System.Windows.Forms.DataGridView() + Me.Label9 = New System.Windows.Forms.Label() + Me.Label8 = New System.Windows.Forms.Label() + Me.Label7 = New System.Windows.Forms.Label() + Me.chkSmartElectricals = New System.Windows.Forms.CheckBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.gvElectricalConsumables = New System.Windows.Forms.DataGridView() + Me.bsElectricalConsumables = New System.Windows.Forms.BindingSource(Me.components) + Me.txtDoorActuationTimeSeconds = New System.Windows.Forms.TextBox() + Me.labelDoorActuationTimeSeconds = New System.Windows.Forms.Label() + Me.Label5 = New System.Windows.Forms.Label() + Me.txtAlternatorGearEfficiency = New System.Windows.Forms.TextBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.txtAlternatorMapPath = New System.Windows.Forms.TextBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.txtPowernetVoltage = New System.Windows.Forms.TextBox() + Me.tabPneumaticConfig = New System.Windows.Forms.TabPage() + Me.tabHVACConfig = New System.Windows.Forms.TabPage() + Me.tabPlayground = New System.Windows.Forms.TabPage() + Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components) + Me.tabMain.SuspendLayout + Me.tabGeneralConfig.SuspendLayout + Me.tabElectricalConfig.SuspendLayout + CType(Me.DataGridView3,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.DataGridView2,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.gvElectricalConsumables,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.bsElectricalConsumables,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.BindingSource1,System.ComponentModel.ISupportInitialize).BeginInit + Me.SuspendLayout + ' + 'tabMain + ' + Me.tabMain.AccessibleDescription = "" + Me.tabMain.Controls.Add(Me.tabGeneralConfig) + Me.tabMain.Controls.Add(Me.tabElectricalConfig) + Me.tabMain.Controls.Add(Me.tabPneumaticConfig) + Me.tabMain.Controls.Add(Me.tabHVACConfig) + Me.tabMain.Controls.Add(Me.tabPlayground) + Me.tabMain.Location = New System.Drawing.Point(30, 12) + Me.tabMain.Name = "tabMain" + Me.tabMain.SelectedIndex = 0 + Me.tabMain.Size = New System.Drawing.Size(1116, 687) + Me.tabMain.TabIndex = 0 + Me.tabMain.Tag = "" + ' + 'tabGeneralConfig + ' + Me.tabGeneralConfig.Controls.Add(Me.cboCycle) + Me.tabGeneralConfig.Controls.Add(Me.Label3) + Me.tabGeneralConfig.Controls.Add(Me.Label2) + Me.tabGeneralConfig.Controls.Add(Me.txtVehicleWeightKG) + Me.tabGeneralConfig.Location = New System.Drawing.Point(4, 22) + Me.tabGeneralConfig.Name = "tabGeneralConfig" + Me.tabGeneralConfig.Padding = New System.Windows.Forms.Padding(3) + Me.tabGeneralConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabGeneralConfig.TabIndex = 0 + Me.tabGeneralConfig.Text = "GeneralConfig" + Me.tabGeneralConfig.UseVisualStyleBackColor = true + ' + 'cboCycle + ' + Me.cboCycle.FormattingEnabled = true + Me.cboCycle.Items.AddRange(New Object() {"Urban", "Heavy urban", "Suburban", "Interurban", "Coach"&Global.Microsoft.VisualBasic.ChrW(9), ""&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)&Global.Microsoft.VisualBasic.ChrW(9)}) + Me.cboCycle.Location = New System.Drawing.Point(123, 78) + Me.cboCycle.Name = "cboCycle" + Me.cboCycle.Size = New System.Drawing.Size(121, 21) + Me.cboCycle.TabIndex = 6 + ' + 'Label3 + ' + Me.Label3.AutoSize = true + Me.Label3.Location = New System.Drawing.Point(24, 78) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(33, 13) + Me.Label3.TabIndex = 5 + Me.Label3.Text = "Cycle" + ' + 'Label2 + ' + Me.Label2.AutoSize = true + Me.Label2.Location = New System.Drawing.Point(21, 38) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(97, 13) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "Vehicle Weight KG" + ' + 'txtVehicleWeightKG + ' + Me.txtVehicleWeightKG.Location = New System.Drawing.Point(123, 35) + Me.txtVehicleWeightKG.Name = "txtVehicleWeightKG" + Me.txtVehicleWeightKG.Size = New System.Drawing.Size(100, 20) + Me.txtVehicleWeightKG.TabIndex = 2 + ' + 'tabElectricalConfig + ' + Me.tabElectricalConfig.Controls.Add(Me.DataGridView3) + Me.tabElectricalConfig.Controls.Add(Me.DataGridView2) + Me.tabElectricalConfig.Controls.Add(Me.DataGridView1) + Me.tabElectricalConfig.Controls.Add(Me.Label9) + Me.tabElectricalConfig.Controls.Add(Me.Label8) + Me.tabElectricalConfig.Controls.Add(Me.Label7) + Me.tabElectricalConfig.Controls.Add(Me.chkSmartElectricals) + Me.tabElectricalConfig.Controls.Add(Me.Label6) + Me.tabElectricalConfig.Controls.Add(Me.gvElectricalConsumables) + Me.tabElectricalConfig.Controls.Add(Me.txtDoorActuationTimeSeconds) + Me.tabElectricalConfig.Controls.Add(Me.labelDoorActuationTimeSeconds) + Me.tabElectricalConfig.Controls.Add(Me.Label5) + Me.tabElectricalConfig.Controls.Add(Me.txtAlternatorGearEfficiency) + Me.tabElectricalConfig.Controls.Add(Me.Label4) + Me.tabElectricalConfig.Controls.Add(Me.txtAlternatorMapPath) + Me.tabElectricalConfig.Controls.Add(Me.Label1) + Me.tabElectricalConfig.Controls.Add(Me.txtPowernetVoltage) + Me.tabElectricalConfig.Location = New System.Drawing.Point(4, 22) + Me.tabElectricalConfig.Name = "tabElectricalConfig" + Me.tabElectricalConfig.Padding = New System.Windows.Forms.Padding(3) + Me.tabElectricalConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabElectricalConfig.TabIndex = 1 + Me.tabElectricalConfig.Text = "ElectricalConfig" + Me.tabElectricalConfig.UseVisualStyleBackColor = true + ' + 'DataGridView3 + ' + Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.DataGridView3.Location = New System.Drawing.Point(161, 529) + Me.DataGridView3.Name = "DataGridView3" + Me.DataGridView3.Size = New System.Drawing.Size(141, 81) + Me.DataGridView3.TabIndex = 18 + ' + 'DataGridView2 + ' + Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.DataGridView2.Location = New System.Drawing.Point(161, 431) + Me.DataGridView2.Name = "DataGridView2" + Me.DataGridView2.Size = New System.Drawing.Size(141, 81) + Me.DataGridView2.TabIndex = 17 + ' + 'DataGridView1 + ' + Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.DataGridView1.Location = New System.Drawing.Point(161, 324) + Me.DataGridView1.Name = "DataGridView1" + Me.DataGridView1.Size = New System.Drawing.Size(141, 84) + Me.DataGridView1.TabIndex = 16 + ' + 'Label9 + ' + Me.Label9.AutoSize = true + Me.Label9.Location = New System.Drawing.Point(74, 530) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(83, 13) + Me.Label9.TabIndex = 15 + Me.Label9.Text = "Results Overrun" + ' + 'Label8 + ' + Me.Label8.AutoSize = true + Me.Label8.Location = New System.Drawing.Point(71, 428) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(84, 13) + Me.Label8.TabIndex = 14 + Me.Label8.Text = "Results Traction" + ' + 'Label7 + ' + Me.Label7.AutoSize = true + Me.Label7.Location = New System.Drawing.Point(92, 325) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(62, 13) + Me.Label7.TabIndex = 13 + Me.Label7.Text = "Results Idle" + ' + 'chkSmartElectricals + ' + Me.chkSmartElectricals.AutoSize = true + Me.chkSmartElectricals.Location = New System.Drawing.Point(161, 132) + Me.chkSmartElectricals.Name = "chkSmartElectricals" + Me.chkSmartElectricals.Size = New System.Drawing.Size(101, 17) + Me.chkSmartElectricals.TabIndex = 12 + Me.chkSmartElectricals.Text = "SmartElectricals" + Me.chkSmartElectricals.UseVisualStyleBackColor = true + ' + 'Label6 + ' + Me.Label6.AutoSize = true + Me.Label6.Location = New System.Drawing.Point(27, 166) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(116, 13) + Me.Label6.TabIndex = 11 + Me.Label6.Text = "Electrical Consumables" + ' + 'gvElectricalConsumables + ' + Me.gvElectricalConsumables.AutoGenerateColumns = false + Me.gvElectricalConsumables.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.gvElectricalConsumables.DataSource = Me.bsElectricalConsumables + Me.gvElectricalConsumables.Location = New System.Drawing.Point(161, 170) + Me.gvElectricalConsumables.Name = "gvElectricalConsumables" + Me.gvElectricalConsumables.Size = New System.Drawing.Size(877, 118) + Me.gvElectricalConsumables.TabIndex = 10 + ' + 'txtDoorActuationTimeSeconds + ' + Me.txtDoorActuationTimeSeconds.Location = New System.Drawing.Point(161, 101) + Me.txtDoorActuationTimeSeconds.Name = "txtDoorActuationTimeSeconds" + Me.txtDoorActuationTimeSeconds.Size = New System.Drawing.Size(100, 20) + Me.txtDoorActuationTimeSeconds.TabIndex = 9 + ' + 'labelDoorActuationTimeSeconds + ' + Me.labelDoorActuationTimeSeconds.AutoSize = true + Me.labelDoorActuationTimeSeconds.Location = New System.Drawing.Point(30, 101) + Me.labelDoorActuationTimeSeconds.Name = "labelDoorActuationTimeSeconds" + Me.labelDoorActuationTimeSeconds.Size = New System.Drawing.Size(111, 13) + Me.labelDoorActuationTimeSeconds.TabIndex = 8 + Me.labelDoorActuationTimeSeconds.Text = "DoorActuationTime(S)" + ' + 'Label5 + ' + Me.Label5.AutoSize = true + Me.Label5.Location = New System.Drawing.Point(30, 73) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(121, 13) + Me.Label5.TabIndex = 7 + Me.Label5.Text = "AlternatorGearEfficiency" + ' + 'txtAlternatorGearEfficiency + ' + Me.txtAlternatorGearEfficiency.Location = New System.Drawing.Point(161, 73) + Me.txtAlternatorGearEfficiency.Name = "txtAlternatorGearEfficiency" + Me.txtAlternatorGearEfficiency.Size = New System.Drawing.Size(100, 20) + Me.txtAlternatorGearEfficiency.TabIndex = 6 + ' + 'Label4 + ' + Me.Label4.AutoSize = true + Me.Label4.Location = New System.Drawing.Point(27, 47) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(73, 13) + Me.Label4.TabIndex = 5 + Me.Label4.Text = "AlternatorMap" + ' + 'txtAlternatorMapPath + ' + Me.txtAlternatorMapPath.Location = New System.Drawing.Point(161, 43) + Me.txtAlternatorMapPath.Name = "txtAlternatorMapPath" + Me.txtAlternatorMapPath.Size = New System.Drawing.Size(319, 20) + Me.txtAlternatorMapPath.TabIndex = 4 + ' + 'Label1 + ' + Me.Label1.AutoSize = true + Me.Label1.Location = New System.Drawing.Point(24, 18) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(88, 13) + Me.Label1.TabIndex = 3 + Me.Label1.Text = "PowernetVoltage" + ' + 'txtPowernetVoltage + ' + Me.txtPowernetVoltage.Location = New System.Drawing.Point(161, 16) + Me.txtPowernetVoltage.Name = "txtPowernetVoltage" + Me.txtPowernetVoltage.Size = New System.Drawing.Size(100, 20) + Me.txtPowernetVoltage.TabIndex = 2 + ' + 'tabPneumaticConfig + ' + Me.tabPneumaticConfig.Location = New System.Drawing.Point(4, 22) + Me.tabPneumaticConfig.Name = "tabPneumaticConfig" + Me.tabPneumaticConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabPneumaticConfig.TabIndex = 2 + Me.tabPneumaticConfig.Text = "PneumaticConfig" + Me.tabPneumaticConfig.UseVisualStyleBackColor = true + ' + 'tabHVACConfig + ' + Me.tabHVACConfig.Location = New System.Drawing.Point(4, 22) + Me.tabHVACConfig.Name = "tabHVACConfig" + Me.tabHVACConfig.Size = New System.Drawing.Size(1108, 661) + Me.tabHVACConfig.TabIndex = 3 + Me.tabHVACConfig.Text = "HVACConfig" + Me.tabHVACConfig.UseVisualStyleBackColor = true + ' + 'tabPlayground + ' + Me.tabPlayground.Location = New System.Drawing.Point(4, 22) + Me.tabPlayground.Name = "tabPlayground" + Me.tabPlayground.Size = New System.Drawing.Size(1108, 661) + Me.tabPlayground.TabIndex = 4 + Me.tabPlayground.Text = "Playground" + Me.tabPlayground.UseVisualStyleBackColor = true + ' + 'BindingSource1 + ' + Me.BindingSource1.DataSource = GetType(AuxillaryTestHarness.Dashboard) + ' + 'Dashboard + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1192, 711) + Me.Controls.Add(Me.tabMain) + Me.Name = "Dashboard" + Me.Text = "Dashboard" + Me.tabMain.ResumeLayout(false) + Me.tabGeneralConfig.ResumeLayout(false) + Me.tabGeneralConfig.PerformLayout + Me.tabElectricalConfig.ResumeLayout(false) + Me.tabElectricalConfig.PerformLayout + CType(Me.DataGridView3,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.DataGridView2,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.gvElectricalConsumables,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.bsElectricalConsumables,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.BindingSource1,System.ComponentModel.ISupportInitialize).EndInit + Me.ResumeLayout(false) + +End Sub + Friend WithEvents tabMain As System.Windows.Forms.TabControl + Friend WithEvents tabGeneralConfig As System.Windows.Forms.TabPage + Friend WithEvents tabElectricalConfig As System.Windows.Forms.TabPage + Friend WithEvents tabPneumaticConfig As System.Windows.Forms.TabPage + Friend WithEvents tabHVACConfig As System.Windows.Forms.TabPage + Friend WithEvents tabPlayground As System.Windows.Forms.TabPage + Friend WithEvents cboCycle As System.Windows.Forms.ComboBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents txtVehicleWeightKG As System.Windows.Forms.TextBox + Friend WithEvents txtDoorActuationTimeSeconds As System.Windows.Forms.TextBox + Friend WithEvents labelDoorActuationTimeSeconds As System.Windows.Forms.Label + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents txtAlternatorGearEfficiency As System.Windows.Forms.TextBox + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents txtAlternatorMapPath As System.Windows.Forms.TextBox + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents txtPowernetVoltage As System.Windows.Forms.TextBox + Friend WithEvents DataGridView3 As System.Windows.Forms.DataGridView + Friend WithEvents DataGridView2 As System.Windows.Forms.DataGridView + Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView + 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 chkSmartElectricals As System.Windows.Forms.CheckBox + Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents gvElectricalConsumables As System.Windows.Forms.DataGridView + Friend WithEvents bsElectricalConsumables As System.Windows.Forms.BindingSource + Friend WithEvents BindingSource1 As System.Windows.Forms.BindingSource +End Class diff --git a/AuxillaryTestHarness/Dashboard.resx b/AuxillaryTestHarness/Dashboard.resx new file mode 100644 index 0000000000..0df5ca240e --- /dev/null +++ b/AuxillaryTestHarness/Dashboard.resx @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="bsElectricalConsumables.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>202, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>42</value> + </metadata> +</root> \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.vb b/AuxillaryTestHarness/Dashboard.vb new file mode 100644 index 0000000000..1c0b80995f --- /dev/null +++ b/AuxillaryTestHarness/Dashboard.vb @@ -0,0 +1,56 @@ + +Imports VectoAuxiliaries +Imports VectoAuxiliaries.Electrics + + +Public Class Dashboard + + +public auxEnvironment As New AuxillaryEnvironment("") + + +Private Sub Dashboard_Load( sender As Object, e As EventArgs) Handles MyBase.Load + +cboCycle.SelectedIndex=0 + + CreateBindings() + +End Sub + +Private Sub cboCycle_SelectedIndexChanged( sender As Object, e As EventArgs) Handles cboCycle.SelectedIndexChanged + +End Sub + +Private Sub CreateBindings + + 'auxEnvironment.Vecto Bindings + txtPowernetVoltage.DataBindings.Add("Text", auxEnvironment.VectoInputs, "PowerNetVoltage") + txtVehicleWeightKG.DataBindings.Add("Text",auxEnvironment.VectoInputs,"VehicleWeightKG") + cboCycle.DataBindings.Add("Text",auxEnvironment.VectoInputs,"Cycle") + + 'Electricals + + 'UserInput + txtAlternatorMapPath.DataBindings.Add("Text",auxEnvironment.ElectricalUserInputsConfig,"AlternatorMap") + txtAlternatorGearEfficiency.DataBindings.Add("Text", auxEnvironment.ElectricalUserInputsConfig,"AlternatorGearEfficiency") + txtDoorActuationTimeSeconds.DataBindings.Add("Text",auxEnvironment.ElectricalUserInputsConfig,"DoorActuationTimeSecond") + chkSmartElectricals.DataBindings.Add("Checked",auxEnvironment.ElectricalUserInputsConfig,"SmartElectrical") + + + Dim cIndex As Integer = gvElectricalConsumables.Columns.Add("ConsumerName","ConsumerName") + gvElectricalConsumables.Columns(cIndex).DataPropertyName="Value.ConsumerName" + + + Dim list As New List(of IElectricalConsumer) + + + + gvElectricalConsumables.DataSource = list + + + + +End Sub + + +End Class \ No newline at end of file diff --git a/AuxillaryTestHarness/My Project/Application.Designer.vb b/AuxillaryTestHarness/My Project/Application.Designer.vb new file mode 100644 index 0000000000..e466da946d --- /dev/null +++ b/AuxillaryTestHarness/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' <auto-generated> +' This code was generated by a tool. +' Runtime Version:4.0.30319.18444 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' </auto-generated> +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.AuxillaryTestHarness.Dashboard + End Sub + End Class +End Namespace diff --git a/AuxillaryTestHarness/My Project/Application.myapp b/AuxillaryTestHarness/My Project/Application.myapp new file mode 100644 index 0000000000..1243847fd9 --- /dev/null +++ b/AuxillaryTestHarness/My Project/Application.myapp @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <MySubMain>true</MySubMain> + <MainForm>Form1</MainForm> + <SingleInstance>false</SingleInstance> + <ShutdownMode>0</ShutdownMode> + <EnableVisualStyles>true</EnableVisualStyles> + <AuthenticationMode>0</AuthenticationMode> + <ApplicationType>0</ApplicationType> + <SaveMySettingsOnExit>true</SaveMySettingsOnExit> +</MyApplicationData> diff --git a/AuxillaryTestHarness/My Project/AssemblyInfo.vb b/AuxillaryTestHarness/My Project/AssemblyInfo.vb new file mode 100644 index 0000000000..ebf4f20bab --- /dev/null +++ b/AuxillaryTestHarness/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + +<Assembly: AssemblyTitle("AuxillaryTestHarness")> +<Assembly: AssemblyDescription("")> +<Assembly: AssemblyCompany("AEA Group")> +<Assembly: AssemblyProduct("AuxillaryTestHarness")> +<Assembly: AssemblyCopyright("Copyright © AEA Group 2014")> +<Assembly: AssemblyTrademark("")> + +<Assembly: ComVisible(False)> + +'The following GUID is for the ID of the typelib if this project is exposed to COM +<Assembly: Guid("1e95f392-456f-468f-9a38-af5e71cdf1c3")> + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' <Assembly: AssemblyVersion("1.0.*")> + +<Assembly: AssemblyVersion("1.0.0.0")> +<Assembly: AssemblyFileVersion("1.0.0.0")> diff --git a/AuxillaryTestHarness/My Project/DataSources/Dashboard.datasource b/AuxillaryTestHarness/My Project/DataSources/Dashboard.datasource new file mode 100644 index 0000000000..820302241f --- /dev/null +++ b/AuxillaryTestHarness/My Project/DataSources/Dashboard.datasource @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio .Net. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="Dashboard" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>AuxillaryTestHarness.Dashboard, AuxillaryTestHarness, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/AuxillaryTestHarness/My Project/Resources.Designer.vb b/AuxillaryTestHarness/My Project/Resources.Designer.vb new file mode 100644 index 0000000000..ac40355531 --- /dev/null +++ b/AuxillaryTestHarness/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' <auto-generated> +' This code was generated by a tool. +' Runtime Version:4.0.30319.18444 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' </auto-generated> +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + '''<summary> + ''' A strongly-typed resource class, for looking up localized strings, etc. + '''</summary> + <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ + Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ + Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ + Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + '''<summary> + ''' Returns the cached ResourceManager instance used by this class. + '''</summary> + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AuxillaryTestHarness.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + '''<summary> + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + '''</summary> + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/AuxillaryTestHarness/My Project/Resources.resx b/AuxillaryTestHarness/My Project/Resources.resx new file mode 100644 index 0000000000..af7dbebbac --- /dev/null +++ b/AuxillaryTestHarness/My Project/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/AuxillaryTestHarness/My Project/Settings.Designer.vb b/AuxillaryTestHarness/My Project/Settings.Designer.vb new file mode 100644 index 0000000000..360d1f8e77 --- /dev/null +++ b/AuxillaryTestHarness/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' <auto-generated> +' This code was generated by a tool. +' Runtime Version:4.0.30319.18444 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' </auto-generated> +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _ + Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ + Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ + Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ + Friend Module MySettingsProperty + + <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ + Friend ReadOnly Property Settings() As Global.AuxillaryTestHarness.My.MySettings + Get + Return Global.AuxillaryTestHarness.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/AuxillaryTestHarness/My Project/Settings.settings b/AuxillaryTestHarness/My Project/Settings.settings new file mode 100644 index 0000000000..85b890b3c6 --- /dev/null +++ b/AuxillaryTestHarness/My Project/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/Performance1.psess b/Performance1.psess new file mode 100644 index 0000000000..7dc9d392dd --- /dev/null +++ b/Performance1.psess @@ -0,0 +1,21 @@ +<VSPerformanceSession Version="1.00"> + <Options> + <CollectionMethod>Sampling</CollectionMethod> + <AllocationMethod>None</AllocationMethod> + <AddReport>true</AddReport> + <UniqueReport>Timestamp</UniqueReport> + <SamplingMethod>Cycles</SamplingMethod> + <CycleCount>10000000</CycleCount> + <PageFaultCount>10</PageFaultCount> + <SysCallCount>10</SysCallCount> + <SamplingCounter PlatformID="00000000" CounterID="0000000000000000" ReloadValue="000000000000000a" /> + <RelocateBinaries>false</RelocateBinaries> + <HardwareCounters EnableHWCounters="false" /> + </Options> + <PreinstrumentEvent> + <InstrEventExclude>false</InstrEventExclude> + </PreinstrumentEvent> + <PostinstrumentEvent> + <InstrEventExclude>false</InstrEventExclude> + </PostinstrumentEvent> +</VSPerformanceSession> diff --git a/VECTO.sln b/VECTO.sln index ce241b73a9..6ecaebed73 100644 --- a/VECTO.sln +++ b/VECTO.sln @@ -9,6 +9,13 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VectoAuxiliaries", "VECTOAu EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VectoAuxiliariesTests", "VECTOAux\VectoAuxiliariesTests\VectoAuxiliariesTests.vbproj", "{6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DF50B0A7-5651-4568-9FB9-8768882CFFDB}" + ProjectSection(SolutionItems) = preProject + Performance1.psess = Performance1.psess + EndProjectSection +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AuxillaryTestHarness", "AuxillaryTestHarness\AuxillaryTestHarness.vbproj", "{BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -37,7 +44,12 @@ Global {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|Any CPU.Build.0 = Release|Any CPU {6F31F8B2-6AB3-4F85-8AC9-D09ADCA6432D}.Release|x86.ActiveCfg = Release|Any CPU - + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Debug|x86.ActiveCfg = Debug|Any CPU + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Release|Any CPU.Build.0 = Release|Any CPU + {BFCFD8BD-2FF5-4F63-80CE-5B94FDC8298E}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/VECTO/GUI/F_VEH_AuxDlog.vb b/VECTO/GUI/F_VEH_AuxDlog.vb index e076506e0a..9972d93cd6 100644 --- a/VECTO/GUI/F_VEH_AuxDlog.vb +++ b/VECTO/GUI/F_VEH_AuxDlog.vb @@ -199,7 +199,6 @@ Public Class F_VEH_AuxDlog ''' <summary> ''' HVAC VALIDATION ''' </summary> - ''' <param name="message">Returns a string with any errors</param> ''' <returns></returns> ''' <remarks></remarks> Private Function ValidateHVAC() As Boolean diff --git a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb new file mode 100644 index 0000000000..043e9e7fa1 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb @@ -0,0 +1,62 @@ + +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Hvac +Imports System.IO + + +Public Class AuxillaryEnvironment + + 'Vecto + Public Property VectoInputs As IVectoInputs + + 'Electrical + Public property ElectricalUserInputsConfig As IElectricsUserInputsConfig + + 'Pneumatics + Private Property PneumaticUserInputsConfig As IPneumaticUserInputsConfig + Private Property PneumaticAuxillariesConfig As IPneumaticsAuxilliariesConfig + + 'Hvac + Public Property HvacUserInputsConfig As IHVACUserInputsConfig + + 'Vecto Signals + public Property Signals As ISignals + + +Public Sub new(auxConfigFile As String) + + +If auxConfigFile.Trim().Length=0 orelse Not FILE.Exists(auxConfigFile) then + + setdefaults() + +End If + +End Sub + +Private Sub setDefaults() + +'Here's where the magic happens. + + VectoInputs = New VectoInputs With {.Cycle="Urban", .VehicleWeightKG=16500, .PowerNetVoltage=26.3} + + 'Pneumatics + PneumaticUserInputsConfig = New PneumaticUserInputsConfig(true) + PneumaticAuxillariesConfig = New PneumaticsAuxilliariesConfig(true) + + ElectricalUserInputsConfig = New ElectricsUserInputsConfig() With {.DoorActuationTimeSecond=4, + .ElectricalConsumers= New ElectricalConsumerList(VectoInputs.PowerNetVoltage,0.1,true), + .PowerNetVoltage= VectoInputs.PowerNetVoltage, + .ResultCardIdleAmps= New Dictionary(Of Single, Single), + .ResultCardOverrunAmps= New Dictionary(Of Single, Single), + .ResultCardTractionAmps=New Dictionary(Of Single, Single), + .SmartElectrical=True} + + HvacUserInputsConfig = New HVACUserInputsConfig(1,1,New HVACInputs(),"HVACMAPPATHGOESHERE.CSV") + +End Sub + + +End Class + diff --git a/VECTOAux/VectoAuxiliaries/Electrics/AlternatorMap.vb b/VECTOAux/VectoAuxiliaries/Electrics/AlternatorMap.vb index 09619eeef2..d5c8c60398 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/AlternatorMap.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/AlternatorMap.vb @@ -84,7 +84,6 @@ Namespace Electrics ''' <remarks></remarks> Public Function GetEfficiency(ByVal rpm As Integer, ByVal amps As Integer) As AlternatorMapValues Implements IAlternatorMap.GetEfficiency - Dim key As New AlternatorMapKey(amps, rpm) Return GetValueOrInterpolate(key) @@ -190,8 +189,6 @@ Namespace Electrics End Function - - Private Structure AlternatorMapKey Implements IComparable diff --git a/VECTOAux/VectoAuxiliaries/Electrics/ElectricConstants.vb b/VECTOAux/VectoAuxiliaries/Electrics/ElectricConstants.vb index bbec529eb4..dd1c99e486 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/ElectricConstants.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/ElectricConstants.vb @@ -15,6 +15,12 @@ Public Class ElectricConstants Public Const NominalConsumptionAmpsMax As Integer = 100 + 'Alternator + public const AlternatorPulleyEfficiencyMin as single =0.1 + public const AlternatorPulleyEfficiencyMax as single =1 + + + End Class diff --git a/VECTOAux/VectoAuxiliaries/Electrics/IElectricsUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Electrics/IElectricsUserInputsConfig.vb index c0a6fa4fc0..b028e5270e 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/IElectricsUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/IElectricsUserInputsConfig.vb @@ -15,10 +15,9 @@ Property ResultCardTractionAmps As Dictionary(Of Single, Single) Property ResultCardOverrunAmps As Dictionary(Of Single, Single) Property SmartElectrical As Boolean - - End Interface + End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb b/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb index 0cb5aa5774..5860ee8e65 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb @@ -71,11 +71,11 @@ Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, _ 'Sanity Check on supplied arguments, throw an argument exception If m0 is Nothing then Throw New ArgumentException("Module 0 must be supplied") If electricalConsumables is Nothing then Throw New ArgumentException("ElectricalConsumablesList must be supplied even if empty") - If alternatorMap is Nothing then throw new ArgumentException("Must supply a valid alternator map") - if resultCardIdle is nothing then throw new ArgumentException("Result Card 'IDLE' must be supplied even if it has no contents") - if resultCardTraction is nothing then throw new ArgumentException("Result Card 'TRACTION' must be supplied even if it has no contents") - if resultCardOverrun is nothing then throw new ArgumentException("Result Card 'OVERRUN' must be supplied even if it has no contents") - If signals is Nothing then Throw New ArgumentException("No Signals Reference object was provided ") + If alternatorMap is Nothing then throw new ArgumentException("Must supply a valid alternator map") + if resultCardIdle is nothing then throw new ArgumentException("Result Card 'IDLE' must be supplied even if it has no contents") + if resultCardTraction is nothing then throw new ArgumentException("Result Card 'TRACTION' must be supplied even if it has no contents") + if resultCardOverrun is nothing then throw new ArgumentException("Result Card 'OVERRUN' must be supplied even if it has no contents") + If signals is Nothing then Throw New ArgumentException("No Signals Reference object was provided ") 'Assignments to private variables. _m0=m0 @@ -89,9 +89,6 @@ Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, _ End Sub - - - End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb new file mode 100644 index 0000000000..a720467d03 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb @@ -0,0 +1,16 @@ +Namespace Hvac + +Public Class HVACConstants + + + + + +End Class + + + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACInputs.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACInputs.vb index 7d74115b67..d401aa629a 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/HVACInputs.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACInputs.vb @@ -1,5 +1,5 @@  -Namespace hvac +Namespace Hvac Public Class HVACInputs diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb new file mode 100644 index 0000000000..226572b251 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb @@ -0,0 +1,35 @@ + +Imports VectoAuxiliaries.Hvac +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics + +Namespace Hvac + +Public Class HVACUserInputsConfig +Implements IHVACUserInputsConfig + + Public Property _compressorGearEfficiency As Single Implements IHVACUserInputsConfig._compressorGearEfficiency + Public Property _compressorGearRatio As Single Implements IHVACUserInputsConfig._compressorGearRatio + Public Property _hvacInputs As IHVACInputs Implements IHVACUserInputsConfig._hvacInputs + Public Property _hvacMapPath As String Implements IHVACUserInputsConfig._hvacMapPath + + + Public Sub new (compressorGearEfficiency As single,compressorGearRatio As Single ,hvacInputs as IHVACInputs ,hvacMapPath As string) + + 'Sanity Check + if hvacMapPath.Trim().Length=0 then Throw New ArgumentException("hvacMap Path must have a string to represent the csv file location") + + 'Assign + _compressorGearEfficiency = compressorGearEfficiency + _compressorGearRatio = compressorGearRatio + _hvacInputs = hvacInputs + _hvacMapPath = hvacMapPath + + End Sub + +End Class + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IHVACInputs.vb b/VECTOAux/VectoAuxiliaries/Hvac/IHVACInputs.vb index 9e7d03aef8..27ac62a71e 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/IHVACInputs.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/IHVACInputs.vb @@ -1,5 +1,5 @@  -Namespace hvac +Namespace Hvac Public Interface IHVACInputs diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb new file mode 100644 index 0000000000..8ead247abb --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb @@ -0,0 +1,24 @@ + +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Hvac + +Namespace Hvac + +Public Interface IHVACUserInputsConfig + + + property _hvacInputs as IHVACInputs + Property _hvacMapPath As string + Property _compressorGearRatio As Single + Property _compressorGearEfficiency As Single + + +End Interface + + + + +End Namespace + + diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IM1_AverageHVACLoadDemand.vb b/VECTOAux/VectoAuxiliaries/Hvac/IM1_AverageHVACLoadDemand.vb new file mode 100644 index 0000000000..b78670a6d5 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/IM1_AverageHVACLoadDemand.vb @@ -0,0 +1,16 @@ +Public Interface IM1_AverageHVACLoadDemand + +Function AveragePowerDemandAtCrankFromHVACMechanicalsWatts() As Single + +Function AveragePowerDemandAtAlternatorFromHVACElectricsWatts() As Single + +Function AveragePowerDemandAtCrankFromHVACElectricsWatts() As Single + +Function HVACFuelingLitresPerHour() As Single + + + + + + +End Interface diff --git a/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb b/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb index fa6e032ff0..273db68da7 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb @@ -3,19 +3,55 @@ Namespace Hvac Public Class M1_AverageHVACLoadDemand + Implements IM1_AverageHVACLoadDemand + Private _m0 As IM0_NonSmart_AlternatorsSetEfficiency Private _alternatorGearEfficiency As Single Private _hvacInputs As IHVACInputs Private _hvacMap As IHVACMap + Private _signals As ISignals + Private _powernetVoltage As single + + + Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, hvacMap As IHVACMap, hvacInputs As IHVACInputs, altGearEfficiency As Single, powernetVoltage As Single, signals As ISignals ) + + 'Sanity Check - Illegal operations without all params. + If m0 is Nothing then Throw New ArgumentException("Module0 as supplied is null") + If hvacMap is Nothing then Throw New ArgumentException("hvacMap as supplied is null") + If hvacInputs is Nothing then Throw New ArgumentException("hvacInputs as supplied is null") + If altGearEfficiency< ElectricConstants.AlternatorPulleyEfficiencyMin orelse altGearEfficiency> ElectricConstants.AlternatorPulleyEfficiencyMax then _ + Throw New ArgumentException(String.Format("Gear efficiency must be between {0} and {1}",ElectricConstants.AlternatorPulleyEfficiencyMin,ElectricConstants.AlternatorPulleyEfficiencyMax )) + + If signals is Nothing then Throw New Exception ("Signals object as supplied is null") + If powernetVoltage< ElectricConstants.PowenetVoltageMin orelse powernetVoltage> ElectricConstants.PowenetVoltageMax then _ + Throw New ArgumentException(String.Format("PowenetVoltage supplied must be in the range {0} to {1}",ElectricConstants.PowenetVoltageMin,ElectricConstants.PowenetVoltageMax)) + + 'Assign + _m0=m0 + _hvacMap= hvacMap + _hvacInputs = hvacInputs + _alternatorGearEfficiency=altGearEfficiency + _signals = _Signals + + End Sub - Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, altGearEfficiency As Single ) - - End Sub + Public Function AveragePowerDemandAtAlternatorFromHVACElectricsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtAlternatorFromHVACElectricsWatts + Return 100'TODO FIX THIS + End Function + Public Function AveragePowerDemandAtCrankFromHVACElectricsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtCrankFromHVACElectricsWatts + Return 100'TODO FIX THIS + End Function + Public Function AveragePowerDemandAtCrankFromHVACMechanicalsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtCrankFromHVACMechanicalsWatts + Return 100'TODO FIX THIS + End Function + Public Function HVACFuelingLitresPerHour() As Single Implements IM1_AverageHVACLoadDemand.HVACFuelingLitresPerHour + Return 100'TODO FIX THI + End Function End Class diff --git a/VECTOAux/VectoAuxiliaries/IVectoInputs.vb b/VECTOAux/VectoAuxiliaries/IVectoInputs.vb new file mode 100644 index 0000000000..60b57bcbfc --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/IVectoInputs.vb @@ -0,0 +1,8 @@ +Public Interface IVectoInputs + +Property VehicleWeightKG As Single +Property Cycle As String +Property PowerNetVoltage As Single + + +End Interface diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/IM4_AirCompressor.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/IM4_AirCompressor.vb index c408d25b19..e2bcedeec7 100644 --- a/VECTOAux/VectoAuxiliaries/Pneumatics/IM4_AirCompressor.vb +++ b/VECTOAux/VectoAuxiliaries/Pneumatics/IM4_AirCompressor.vb @@ -26,7 +26,6 @@ ''' <summary> ''' Returns the flow rate [litres/second] of compressor for the given engine rpm ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Function GetFlowRate() As Single @@ -34,7 +33,6 @@ ''' <summary> ''' Returns the power consumed for the given engine rpm when compressor is off ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Function GetPowerCompressorOff() As Single @@ -42,7 +40,6 @@ ''' <summary> ''' Returns the power consumed for the given engine rpm when compressor is on ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Function GetPowerCompressorOn() As Single @@ -50,8 +47,7 @@ ''' <summary> ''' Returns the difference in power between compressonr on and compressor off operation at the given engine rpm ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> - ''' <returns></returns> + ''' <returns>Single / Watts</returns> ''' <remarks></remarks> Function GetPowerDifference() As Single diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/IPneumaticUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/IPneumaticUserInputsConfig.vb index 5f308a6144..e43edffcef 100644 --- a/VECTOAux/VectoAuxiliaries/Pneumatics/IPneumaticUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Pneumatics/IPneumaticUserInputsConfig.vb @@ -1,4 +1,8 @@ -Public Interface IPneumaticUserInputsConfig + +Namespace Pneumatics + + +Public Interface IPneumaticUserInputsConfig Property CompressorType As String @@ -15,8 +19,9 @@ Property AdBlueDosing As String 'pnmeumatic or electric Property Doors As String 'pneumatic or electric +End Interface +End Namespace -End Interface diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/M4_AirCompressor.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/M4_AirCompressor.vb index fe28680f06..b8bcd3e58f 100644 --- a/VECTOAux/VectoAuxiliaries/Pneumatics/M4_AirCompressor.vb +++ b/VECTOAux/VectoAuxiliaries/Pneumatics/M4_AirCompressor.vb @@ -12,7 +12,6 @@ Namespace Pneumatics Private _pulleyGearRatio As Single Private _pulleyGearEfficiency As Single Private _map As ICompressorMap - Private _signals As ISignals ''' <summary> @@ -70,10 +69,13 @@ Namespace Pneumatics ''' <param name="pulleyGearRatio">Ratio of Pulley/Gear</param> ''' <param name="pulleyGearEfficiency">Efficiency of Pulley/Gear</param> ''' <remarks></remarks> - Public Sub New(ByVal map As ICompressorMap, ByVal pulleyGearRatio As Single, ByVal pulleyGearEfficiency As Single) + Public Sub New(ByVal map As ICompressorMap, ByVal pulleyGearRatio As Single, ByVal pulleyGearEfficiency As Single, signals As ISignals) + _map = map _pulleyGearRatio = pulleyGearRatio _pulleyGearEfficiency = pulleyGearEfficiency + _signals = signals + End Sub ''' <summary> @@ -99,7 +101,6 @@ Namespace Pneumatics ''' <summary> ''' Returns the flow rate [litres/second] of compressor for the given engine rpm ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Public Function GetFlowRate() As Single Implements IM4_AirCompressor.GetFlowRate @@ -110,7 +111,6 @@ Namespace Pneumatics ''' <summary> ''' Returns the power consumed for the given engine rpm when compressor is off ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Public Function GetPowerCompressorOff() As Single Implements IM4_AirCompressor.GetPowerCompressorOff @@ -120,7 +120,6 @@ Namespace Pneumatics ''' <summary> ''' Returns the power consumed for the given engine rpm when compressor is on ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Public Function GetPowerCompressorOn() As Single Implements IM4_AirCompressor.GetPowerCompressorOn @@ -130,7 +129,6 @@ Namespace Pneumatics ''' <summary> ''' Returns the difference in power between compressonr on and compressor off operation at the given engine rpm ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <returns></returns> ''' <remarks></remarks> Public Function GetPowerDifference() As Single Implements IM4_AirCompressor.GetPowerDifference @@ -142,7 +140,6 @@ Namespace Pneumatics ''' <summary> ''' Looks up the compressor power from the map at given engine speed ''' </summary> - ''' <param name="engineRpm">Engine speed in rpm</param> ''' <param name="compressorOn">Is compressor on</param> ''' <returns></returns> ''' <remarks></remarks> @@ -156,9 +153,6 @@ Namespace Pneumatics End Function - - - Public Function GetAveragePowerDemandPerCompressorUnitFlowRate() As Single Implements IM4_AirCompressor.GetAveragePowerDemandPerCompressorUnitFlowRate Return _map.GetAveragePowerDemandPerCompressorUnitFlowRate() diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb index 78208e6c30..824e5d3337 100644 --- a/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb @@ -3,6 +3,10 @@ Public Class PneumaticUserInputsConfig Implements IPneumaticUserInputsConfig + + + + 'pnmeumatic or electric Public Property AdBlueDosing As String Implements IPneumaticUserInputsConfig.AdBlueDosing 'mechanical or electrical @@ -25,10 +29,28 @@ Public Property SmartAirCompression As Boolean Implements IPneumaticUserInputsCo Public Property SmartRegeneration As Boolean Implements IPneumaticUserInputsConfig.SmartRegeneration +Public Sub New( optional setToDefaults As Boolean = False) + +If setToDefaults then SetPropertiesToDefaults() -Public Sub New() +End Sub +Public sub SetPropertiesToDefaults() + + + ActuationsMap="" + AdBlueDosing="pneumatic" + AirSuspensionControl="electrically" + CompressorGearEfficiency=0.8 + CompressorGearRatio=0 + CompressorMap="" + CompressorType="" + Doors="pneumatic" + KneelingHeightMilimeters=80 + RetarderBrake=True + SmartAirCompression=True + SmartRegeneration=True End Sub diff --git a/VECTOAux/VectoAuxiliaries/UI/F_HVAC.vb b/VECTOAux/VectoAuxiliaries/UI/F_HVAC.vb index a64fb575fc..333b3b950d 100644 --- a/VECTOAux/VectoAuxiliaries/UI/F_HVAC.vb +++ b/VECTOAux/VectoAuxiliaries/UI/F_HVAC.vb @@ -165,7 +165,7 @@ Namespace UI _mapFilter(oridnal) = String.Empty End If - Dim results = _map.GetMapSubSet(_mapFilter.ToArray()) + Dim results as List(Of String()) = _map.GetMapSubSet(_mapFilter.ToArray()) PopulateResultsTable(results) diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj index b8810dfaa2..70870d7360 100644 --- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj +++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj @@ -72,6 +72,7 @@ <Import Include="System.Threading.Tasks" /> </ItemGroup> <ItemGroup> + <Compile Include="AuxillaryEnvironment.vb" /> <Compile Include="Electrics\AlternatorMapValues.vb" /> <Compile Include="Electrics\ElectricsUserInputsConfig.vb" /> <Compile Include="Electrics\IElectricsUserInputsConfig.vb" /> @@ -84,12 +85,17 @@ <Compile Include="Electrics\IM0_NonSmart_AlternatorsSetEfficiency.vb" /> <Compile Include="Electrics\M5__SmartAlternatorSetGeneration.vb" /> <Compile Include="Electrics\ResultCard.vb" /> + <Compile Include="Hvac\HVACConstants.vb" /> <Compile Include="Hvac\HVACInputs.vb" /> <Compile Include="Electrics\IElectricalConsumerList.vb" /> + <Compile Include="Hvac\HVACUserInputsConfig.vb" /> <Compile Include="Hvac\IHVACInputs.vb" /> <Compile Include="Hvac\HVACMapParameter.vb" /> <Compile Include="Hvac\IHVACMap.vb" /> + <Compile Include="Hvac\IHVACUserInputsConfig.vb" /> + <Compile Include="Hvac\IM1_AverageHVACLoadDemand.vb" /> <Compile Include="ISignals.vb" /> + <Compile Include="IVectoInputs.vb" /> <Compile Include="Pneumatics\ActuationsKey.vb" /> <Compile Include="Pneumatics\M4_AirCompressor.vb" /> <Compile Include="Electrics\AlternatorMap.vb" /> @@ -155,6 +161,7 @@ <Compile Include="UI\F_PneumaticConsumers.vb"> <SubType>Form</SubType> </Compile> + <Compile Include="VectoInputs.vb" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="My Project\Resources.resx"> @@ -174,7 +181,6 @@ </EmbeddedResource> </ItemGroup> <ItemGroup> - <None Include="Hvac\HVACMap.vaux" /> <None Include="My Project\Application.myapp"> <Generator>MyApplicationCodeGenerator</Generator> <LastGenOutput>Application.Designer.vb</LastGenOutput> diff --git a/VECTOAux/VectoAuxiliaries/VectoInputs.vb b/VECTOAux/VectoAuxiliaries/VectoInputs.vb new file mode 100644 index 0000000000..34d3dbff4e --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/VectoInputs.vb @@ -0,0 +1,17 @@ + + +Public Class VectoInputs + +Implements IVectoInputs + + + + Public Property Cycle As String Implements IVectoInputs.Cycle + + Public Property VehicleWeightKG As Single Implements IVectoInputs.VehicleWeightKG + + Public Property PowerNetVoltage As Single Implements IVectoInputs.PowerNetVoltage + + +End Class + diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb index 7d7b9b7216..cdb25d8cde 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb @@ -15,7 +15,7 @@ Namespace UnitTests Private Const GoodRatio As Single = 1 Private Const TooLowRatio As Single = 1.0 - Private Const TooHighRatio As Single = 6.0 + Private Const TooHighRatio As Single = 6 #End Region @@ -23,6 +23,14 @@ Namespace UnitTests Private _signals As ISignals = New Signals +Public Sub new() + +_signals.EngineSpeed=100 + + +End Sub + + #Region "Factory Methods" Private Function GetNonFailingCompressorMapMock() As ICompressorMap @@ -35,7 +43,7 @@ Private _signals As ISignals = New Signals Private Function GetGoodCompressor() As M4_AirCompressor Dim map As ICompressorMap = GetNonFailingCompressorMapMock() - Dim target As M4_AirCompressor = New M4_AirCompressor(map, GoodRatio, GoodEfficiency) + Dim target As M4_AirCompressor = New M4_AirCompressor(map, GoodRatio, GoodEfficiency, _signals) Return target End Function #End Region @@ -51,7 +59,7 @@ Private _signals As ISignals = New Signals <Test()> Public Sub CreateNewAllParametersTest() Dim map As ICompressorMap = GetNonFailingCompressorMapMock() - Dim target As M4_AirCompressor = New M4_AirCompressor(map, GoodRatio, GoodEfficiency) + Dim target As M4_AirCompressor = New M4_AirCompressor(map, GoodRatio, GoodEfficiency,_signals) Assert.IsNotNull(target) End Sub -- GitLab