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 7d70d52c authored by Stefanos Doumpoulakis's avatar Stefanos Doumpoulakis
Browse files

Merge branch 'amdm3/develop' into amdm3/main

parents dc1e5d1b 9cdc527b
Branches
Tags Release/v0.11.2.3456-DEV
No related merge requests found
Showing
with 615 additions and 24 deletions
......@@ -211,6 +211,7 @@ Documentation/VehiclesReleaseComparisonDeclarationMode/tmp/
Documentation/VehiclesReleaseComparisonDeclarationMode/**/*.vmod
Documentation/VehiclesReleaseComparisonDeclarationMode/**/*.vsum
.vs/
.vscode/
**/dev/*.vmod
**/dev/*.vsum
/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/testVif.VIF_Report_5.xml
......@@ -229,3 +230,5 @@ Documentation/VehiclesReleaseComparisonDeclarationMode/**/*.vsum
/Generic Vehicles/Engineering Mode/GenericIHPC/6SpeedGbx/EM_Maps.xlsx
/Nuget
/.idea/.idea.hm_vecto-dev.dir/.idea
/Documentation/User Manual/pics/FuelCell/Workshop_VECTO_DEV_19_TUG_final.pdf - Verknüpfung.lnk
Documentation/User Manual/mermaid-filter.err
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/.idea.hm_vecto_sim.iml
/projectSettingsUpdater.xml
/modules.xml
/contentModel.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<Project DefaultTargets = "Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<Target Name="BeforeBuild" Condition="$(Configuration) == 'Deploy' OR $(Configuration) == 'Release'">
<ItemGroup>
<VersionTemplates Include="$(ProjectDir)**\Version.tt"/>
<VersionTemplates Include="$(ProjectDir)**\*.tt"/>
</ItemGroup>
<!-- <Exec Condition="'@(VersionTemplates)'!=''" Command="&quot;%CommonProgramFiles(x86)%\Microsoft Shared\TextTemplating\12.0\TextTransform.exe&quot; -I $(SolutionDir) &quot;%(VersionTemplates.Identity)&quot;"/> -->
<!-- <Exec Condition="'@(VersionTemplates)'!=''" Command="&quot;%CommonProgramFiles(x86)%\Microsoft Shared\TextTemplating\14.0\TextTransform.exe&quot; -I $(SolutionDir) &quot;%(VersionTemplates.Identity)&quot;"/> -->
<Exec Condition="'@(VersionTemplates)'!=''" Command="&quot;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\TextTransform.exe&quot; -I $(SolutionDir) &quot;%(VersionTemplates.Identity)&quot;"/>
</Target>
</Project>
\ No newline at end of file
<Project>
<PropertyGroup>
<DefineConstants />
<!-- For a Release-Candidate uncomment the following line: -->
<DefineConstants>RELEASE_CANDIDATE</DefineConstants>
<!--<DefineConstants>RELEASE_CANDIDATE</DefineConstants>-->
<!-- For a Release uncomment the following line: -->
<!-- <DefineConstants>CERTIFICATION_RELEASE</DefineConstants> -->
<!-- Global VECTO Version -->
<MainProductVersion>4.0.0</MainProductVersion>
<VersionSuffix>RC</VersionSuffix>
<MainProductVersion>0.11.2</MainProductVersion>
<VersionSuffix>DEV</VersionSuffix>
<!-- The following settings are used as default values for ALL projects -->
<Days>$([System.DateTime]::UtcNow.Subtract($([System.DateTime]::new(2015,1,1))).Days)</Days>
......@@ -23,12 +23,14 @@
<!-- Set to true for VectoCore to fix Ninject version conflicts-->
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DefineTrace>false</DefineTrace>
<DisableDiagnosticTracing>true</DisableDiagnosticTracing>
<RemoveIntegerChecks>true</RemoveIntegerChecks>
<DebugType>none</DebugType>
<WarningLevel>5</WarningLevel>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="$(DefineConstants.Contains('RELEASE_CANDIDATE'))">
<VersionSuffix>RC</VersionSuffix>
</PropertyGroup>
......
......@@ -11,6 +11,8 @@
<Message Text="Packaging in $(Configuration) Configuration $(VersionPrefix)" Importance="high" />
<Exec Command="cscript &quot;$(SolutionDir)documentation\user manual source\convertpptxtopdf.vbs&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto3.x.pptx&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto3.x.pdf&quot;"/>
<Exec Command="cscript &quot;$(SolutionDir)documentation\user manual source\convertpptxtopdf.vbs&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto4.x.pptx&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto4.x.pdf&quot;"/>
<Exec Command="cscript &quot;$(SolutionDir)documentation\user manual source\convertpptxtopdf.vbs&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto0.x-DEV.pptx&quot; &quot;$(SolutionDir)documentation\user manual source\release notes vecto0.x.pdf&quot;"/>
<PropertyGroup>
<CurrentDate>$([System.DateTime]::Now.ToString(yyy_MM_dd))</CurrentDate>
<DeployPath>$(SolutionDir)Deploy\$(CurrentDate)-VECTO-$(Version)\</DeployPath>
......@@ -34,8 +36,8 @@
<Net48HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net48\*.dll*"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net48\*.exe*"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net48\*.dll*"/>
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.exe*"/>
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.dll*"/>
<Net48VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.exe*"/>
<Net48VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.dll*"/>
</ItemGroup>
<!--MockupDeploy-->
......@@ -50,13 +52,13 @@
<Net48HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net48\*.dll*"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\MockupRelease\net48\*.exe*" />
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\MockupRelease\net48\*.dll*" />
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net48\*.exe*" />
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net48\*.dll*" />
<Net48VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net48\*.exe*" />
<Net48VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net48\*.dll*" />
</ItemGroup>
<Copy SourceFiles="@(Net48VectoCommandLine)" DestinationFolder="$(DeployPath)net48"/>
<Copy SourceFiles="@(Net48HashingTool)" DestinationFolder="$(DeployPath)net48"/>
<Copy SourceFiles="@(Net48VectoMultistage)" DestinationFolder="$(DeployPath)net48"/>
<Copy SourceFiles="@(Net48VectoMultistep)" DestinationFolder="$(DeployPath)net48"/>
<Copy SourceFiles="@(Net48VECTO)" DestinationFolder="$(DeployPath)net48"/>
<ItemGroup Condition="'$(Configuration)'=='Deploy'">
......@@ -74,9 +76,9 @@
<HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net6.0-windows\HashingTool.*" Exclude="*.dev.json"/>
<HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net6.0-windows\*.dll*"/>
<HashingToolRuntimes Include="$(SolutionDir)HashingTool\bin\Release\net6.0\runtimes\**\*.*"/>
<VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\VECTOMultistage.*" Exclude="*.dev.json"/>
<VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\*.dll"/>
<VectoMultistageRuntimes Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\runtimes\**\*.*"/>
<VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\VECTOMultistep.*" Exclude="*.dev.json"/>
<VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\*.dll"/>
<VectoMultistepRuntimes Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net6.0-windows\runtimes\**\*.*"/>
</ItemGroup>
<!--MockupDeploy-->
......@@ -95,24 +97,24 @@
<HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net6.0-windows\HashingTool.*" Exclude="*.dev.json"/>
<HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net6.0-windows\*.dll*"/>
<HashingToolRuntimes Include="$(SolutionDir)HashingTool\bin\Release\net6.0-windows\runtimes\**\*.*"/>
<VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\VECTOMultistage.*" Exclude="*.dev.json"/>
<VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\*.dll"/>
<VectoMultistageRuntimes Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\runtimes\**\*.*"/>
<VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\VECTOMultistep.*" Exclude="*.dev.json"/>
<VectoMultistep Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\*.dll"/>
<VectoMultistepRuntimes Include="$(SolutionDir)VECTO3GUI2020\bin\MockupRelease\net6.0-windows\runtimes\**\*.*"/>
</ItemGroup>
<Copy SourceFiles="@(HashingTool)" DestinationFolder="$(DeployPath)net60"/>
<Copy SourceFiles="@(VectoMultistage)" DestinationFolder="$(DeployPath)net60"/>
<Copy SourceFiles="@(VectoMultistep)" DestinationFolder="$(DeployPath)net60"/>
<Copy SourceFiles="@(VectoCommandLine)" DestinationFolder="$(DeployPath)net60"/>
<Copy SourceFiles="@(Vecto)" DestinationFolder="$(DeployPath)net60"/>
<Copy SourceFiles="@(HashingToolRuntimes)" DestinationFiles="@(HashingToolRuntimes->'$(DeployPath)net60\runtimes\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(VectoMultistageRuntimes)" DestinationFiles="@(VectoMultistageRuntimes->'$(DeployPath)net60\runtimes\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(VectoMultistepRuntimes)" DestinationFiles="@(VectoMultistepRuntimes->'$(DeployPath)net60\runtimes\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(VectoCommandLineRuntimes)" DestinationFiles="@(VectoCommandLineRuntimes->'$(DeployPath)net60\runtimes\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(VectoRuntimes)" DestinationFiles="@(VectoRuntimes->'$(DeployPath)net60\runtimes\%(RecursiveDir)%(Filename)%(Extension)')"/>
<ItemGroup Condition="'$(Configuration)'=='Deploy'">
<!-- All files for the VECTO starters -->
<VectoStart Include="$(SolutionDir)Tools\VECTOStart\bin\Deploy\net48\VECTO.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOMultistageStart\bin\Release\net48\VECTOMultistage.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOMultistepStart\bin\Release\net48\VECTOMultistep.exe" />
<VectoStart Include="$(SolutionDir)Tools\HashingCmdStart\bin\Release\net48\hashingcmd.exe" />
<VectoStart Include="$(SolutionDir)Tools\HashingToolStart\bin\Release\net48\HashingTool.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOConsoleStart\bin\Release\net48\vectocmd.exe" />
......@@ -120,7 +122,7 @@
<ItemGroup Condition="'$(Configuration)'=='MockupDeploy'">
<!-- All files for the VECTO starters -->
<VectoStart Include="$(SolutionDir)Tools\VECTOStart\bin\MockupDeploy\net48\VECTO.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOMultistageStart\bin\Release\net48\VECTOMultistage.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOMultistepStart\bin\Release\net48\VECTOMultistep.exe" />
<VectoStart Include="$(SolutionDir)Tools\HashingCmdStart\bin\Release\net48\hashingcmd.exe" />
<VectoStart Include="$(SolutionDir)Tools\HashingToolStart\bin\Release\net48\HashingTool.exe" />
<VectoStart Include="$(SolutionDir)Tools\VECTOConsoleStart\bin\Release\net48\vectocmd.exe" />
......@@ -141,29 +143,76 @@
<DeclarationData Include="$(SolutionDir)VectoCore\VectoCore\Resources\Declaration\**\*.ahsm" Exclude="$(SolutionDir)**\MissionCycles\**\*.*"/>
<DeclarationData Include="$(SolutionDir)VectoCore\VectoCore\Resources\Declaration\**\*.acmp" Exclude="$(SolutionDir)**\MissionCycles\**\*.*"/>
<DeclarationData Include="$(SolutionDir)VectoCore\VectoCore\Resources\Declaration\**\*.vmap" Exclude="$(SolutionDir)**\MissionCycles\**\*.*"/>
<VectoXSD Include="$(SolutionDir)VectoCore\VectoCore\Resources\XSD\**\*.*" Exclude="$(SolutionDir)**\*Engineering*"/>
<VectoXMLExamples Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\*-sample.xml"/>
<VectoXSD Include="$(SolutionDir)VectoCore\VectoCore\Resources\XSD\**\*.*" Exclude="$(SolutionDir)**\*Engineering*;$(SolutionDir)**\Engineering\*"/>
<!-- VectoXML Examples -->
<VectoXMLExamples Include="$(SolutionDir)Documentation\XML\Readme.md" />
<VectoXMLExamplesMultistep Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\Airdrag_Sample_v1.xml"/>
<VectoXMLExamplesMultistep Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\Airdrag_Sample_v2.xml"/>
<VectoXMLExamples_v25 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.5\TyreSample.xml"/>
<VectoXMLExamples_v23 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.3\vecto_vehicle-fullElectricSP.xml" />
<VectoXMLExamples_v23 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.3\engineSample.xml" />
<VectoXMLExamples_v23 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.3\engineSample_WHR.xml" />
<VectoXMLExamples_v23 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.3\engineSampleDualModeDualFuel.xml" />
<VectoXMLExamples_v23 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.3\vecto_tyre-sample.xml" />
<VectoXMLExamples_v22 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.2\vecto_tyre-sample.xml" />
<VectoXMLExamples_v22 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.2\vecto_engine-sample.xml" />
<VectoXMLExamples_v21 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.1\vecto_tyre-sample.xml" />
<VectoXMLExamples_v21 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.1\vecto_engine-sample.xml" />
<VectoXMLExamples_v20 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.0\vecto_tyre-sample.xml" />
<VectoXMLExamples_v20 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.0\vecto_engine-sample.xml" />
<VectoXMLExamples_v10 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion1.0\vecto_engine-sample.xml" />
<VectoXMLExamples_v10 Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\vecto_gearbox-sample.xml" />
<!-- <VectoXMLExamples Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\*-sample.xml"/> -->
<UserManual Include="$(SolutionDir)Documentation\User Manual\help.html"/>
<UserManual Include="$(SolutionDir)Documentation\VectoHashingTool\HashingToolHelp.html"/>
<UserManual Include="$(SolutionDir)Documentation\MultiStepTool\MultiStepToolHelp.html"/>
<!-- <ParameterDocu Include="$(SolutionDir)Documentation\ParameterDocumentation\VectoParameterDocumentation.html"/> -->
<UserManual Include="$(SolutionDir)Documentation\XML\*.png"/>
<!-- <UserManual Include="$(SolutionDir)Documentation\XML\VectoParameters.html"/> -->
<UserManual Include="$(SolutionDir)Documentation\User Manual Source\JIRA Quick Start Guide.pdf"/>
<UserManual Include="$(SolutionDir)Documentation\Cdv_Generator_VECTO3.2.xlsx"/>
<UserManual Include="$(SolutionDir)Documentation\OVC_IMC.xlsx"/>
<UserManual Include="$(SolutionDir)Documentation\XML\Documentation_OfficialResults_2ndAmendment_20230425.xlsx"/>
<ParameterDocu Include="$(SolutionDir)Documentation\XML\ParameterDocumentation\*.*"/>
<ParameterDocuStyle Include="$(SolutionDir)Documentation\XML\ParameterDocumentation\HTML\css\*.*"/>
<ReleaseNotes Include="$(SolutionDir)Documentation\User Manual Source\Release Notes Vecto3.x.pdf"/>
<ReleaseNotes3 Include="$(SolutionDir)Documentation\User Manual Source\Release Notes Vecto3.x.pdf"/>
<ReleaseNotes4 Include="$(SolutionDir)Documentation\User Manual Source\Release Notes Vecto4.x.pdf"/>
<ReleaseNotesDEV Include="$(SolutionDir)documentation\user manual source\release notes vecto0.x.pdf"/>
</ItemGroup>
<Copy SourceFiles="@(GenericVehicles)" DestinationFiles="@(GenericVehicles->'$(DeployPath)Generic Vehicles\%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- <Copy SourceFiles="@(DeclarationData)" DestinationFolder="$(DeployPath)Declaration" /> -->
<Copy SourceFiles="@(DeclarationData)" DestinationFiles="@(DeclarationData->'$(DeployPath)Declaration\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(MissionProfiles)" DestinationFolder="$(DeployPath)Mission Profiles" />
<Copy SourceFiles="@(VectoXMLExamples)" DestinationFolder="$(DeployPath)XML\Examples" />
<Copy SourceFiles="@(VectoXMLExamplesMultistep)" DestinationFiles="@(VectoXMLExamplesMultistep->'$(DeployPath)XML\Examples\multistep_v0.1\(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXMLExamples_v25)" DestinationFiles="@(VectoXMLExamples_v25->'$(DeployPath)XML\Examples\v2.5\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXMLExamples_v23)" DestinationFiles="@(VectoXMLExamples_v23->'$(DeployPath)XML\Examples\v2.3\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXMLExamples_v22)" DestinationFiles="@(VectoXMLExamples_v22->'$(DeployPath)XML\Examples\v2.2\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXMLExamples_v20)" DestinationFiles="@(VectoXMLExamples_v20->'$(DeployPath)XML\Examples\v2.0\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXMLExamples_V10)" DestinationFiles="@(VectoXMLExamples_v10->'$(DeployPath)XML\Examples\v1.0\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VectoXSD)" DestinationFolder="$(DeployPath)XML\XSD" />
<Copy SourceFiles="@(UserManual)" DestinationFolder="$(DeployPath)User Manual" />
<Copy SourceFiles="@(ReleaseNotes)" DestinationFiles="$(DeployPath)User Manual\Release Notes.pdf" />
<Copy SourceFiles="@(ReleaseNotes3)" DestinationFiles="$(DeployPath)User Manual\Release Notes Vecto 3.pdf" />
<Copy SourceFiles="@(ReleaseNotes4)" DestinationFiles="$(DeployPath)User Manual\Release Notes Vecto 4.pdf" />
<Copy SourceFiles="@(ReleaseNotesDEV)" DestinationFiles="$(DeployPath)User Manual\Release Notes Vecto DEV.pdf"/>
<Copy SourceFiles="@(VectoConfigurationSample)" DestinationFolder="$(DeployPath)"/>
<Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Mission Profiles Directory.txt" DestinationFiles="$(DeployPath)Mission Profiles\!! README !!.TXT"/>
<Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Declaration Directory.txt" DestinationFiles="$(DeployPath)Declaration\!! README !!.TXT"/>
......
from typing import List, Union, Tuple, Any
import numpy as np
import pandas as pd
from numpy import ndarray, dtype, bool_, unsignedinteger, signedinteger, floating, complexfloating, number, timedelta64
from scipy.optimize import minimize
power_col = 'P_el_out [kW]'
cons_col = '\tm_H2 [g/h]'
def read_fc_map(vfcm_path):
fc = FuelCellMap()
fc.sourceFile = vfcm_path
fc_df = pd.read_csv(vfcm_path)
fc_df = fc_df.sort_values(by=power_col)
fc_of_P = lambda p: np.interp(p, fc_df[power_col], fc_df[cons_col])
fc.minPower = fc_df[power_col].min()
fc.maxPower = fc_df[power_col].max()
fc.fc_of_p = fc_of_P
fc.eff = lambda x: x / fc.fc_of_p(x)
fc.inv_eff = lambda x: fc.fc_of_p(x) / x
fc.measured_points = fc_df[power_col]
# cons = ({'type': 'ineq', 'fun': lambda x: x[0] - 2 * x[1] + 2},
#
# {'type': 'ineq', 'fun': lambda x: -x[0] - 2 * x[1] + 6},
#
# {'type': 'ineq', 'fun': lambda x: -x[0] + 2 * x[1] + 2})
bnds = [(fc.minPower, fc.maxPower)]
result = minimize(fun=fc.inv_eff, x0=((fc.minPower + fc.maxPower) / 2), bounds=bnds)
fc.min_eff_power = result.x[0]
return fc
class FuelCellMap:
minPower = None
maxPower = None
fc_of_p = None
sourceFile = ''
eff = None
inv_eff = None
# rename
min_eff_power = None
measured_points = None
def __getFuelConsumptionForPower(self, power, use_time_slicing: bool = True):
if power < 0:
raise Exception("power must not be < 0")
if power < self.min_eff_power and use_time_slicing:
return self.fc_of_p(self.min_eff_power) * power / self.min_eff_power
return self.fc_of_p(power)
def getFuelConsumption(self, power, use_time_slicing: bool = True):
if hasattr(power, "__iter__"):
return np.array([self.__getFuelConsumptionForPower(p, use_time_slicing) for p in power])
else:
return self.__getFuelConsumptionForPower(power, use_time_slicing)
def __init__(self) -> None:
super().__init__()
self.sourceFile = None
class FuelCellString:
fuel_cell: FuelCellMap = None
def stringFuelConsumption(self, p):
fcCount = np.floor(p / (self.fuel_cell.min_eff_power))
fcCount = np.where(fcCount < 1, 1, fcCount)
fcCount = np.where(fcCount > self.count, self.count, fcCount)
p_values = p / fcCount
return fcCount * (self.fuel_cell.getFuelConsumption(p / fcCount))
def maxPower(self):
return self.fuel_cell.maxPower * self.count
def measuredPoints(self):
mp = self.fuel_cell.measured_points
min_eff_power_round = self.fuel_cell.min_eff_power.round()
for i, measuredPoint in enumerate(mp[np.where(mp < 2 * min_eff_power_round)[0]]):
yield measuredPoint, self.stringFuelConsumption(measuredPoint)
for i, measuredPoint in enumerate(
mp[np.where((mp >= min_eff_power_round) & (2 * mp < 3 * min_eff_power_round))[0]]):
power = measuredPoint * 2
yield power, self.stringFuelConsumption(power)
for i, measuredPoint in enumerate(
mp[np.where((mp >= min_eff_power_round))[0]]):
power = measuredPoint * 3
yield power, self.stringFuelConsumption(power)
def minPower(self):
return self.fuel_cell.minPower
def __init__(self, fuel_cell, count):
super().__init__()
self.count = count
self.fuel_cell = fuel_cell
class FuelCellSystem:
def __init__(self, fuel_cell_string_1: FuelCellString, fuel_cell_string_2: FuelCellString) -> None:
super().__init__()
self.fuel_cell_string_1: FuelCellString = fuel_cell_string_1
self.fuel_cell_string_2: FuelCellString = fuel_cell_string_2
def minPower(self):
return min(self.fuel_cell_string_1.minPower(), self.fuel_cell_string_2.minPower())
def maxPower(self):
return self.fuel_cell_string_1.maxPower() + self.fuel_cell_string_2.maxPower()
# a -> refers to the power distribution between the fuel cell strings p = p*(a) + p*(1-a)
def fc_consumption(self, power: float, a: float) -> (float, float, float):
# if power < self.fuel_cell_string_1.minPower() and power < self.fuel_cell_string_2.minPower():
# return np.nan, np.nan, np.nan
tol = 1e-6
if power > (self.fuel_cell_string_1.maxPower() + self.fuel_cell_string_2.maxPower()):
return np.nan, np.nan, np.nan
b = 1 - a
#if (b > (0 - tol) and (((b * power) + tol) < (self.fuel_cell_string_2.minPower()) or
if((b * power) > (self.fuel_cell_string_2.maxPower()) - tol):
return np.nan, np.nan, np.nan
# if(a > (0 - tol) and (((a * power) + tol) < (self.fuel_cell_string_1.minPower()) or
if((a * power) > (self.fuel_cell_string_1.maxPower() - tol)):
return np.nan, np.nan, np.nan
assert (b + a == 1)
fc_string1 = self.fuel_cell_string_1.stringFuelConsumption(a * power)
fc_string2 = self.fuel_cell_string_2.stringFuelConsumption(b * power)
fc_total = fc_string1 + fc_string2
return fc_total, fc_string1, fc_string2
def splits(self, power):
tolerance = 1e-6
fc1 = np.array([x for x in self.fuel_cell_string_1.measuredPoints()])[:, 0]
fc2 = np.array([x for x in self.fuel_cell_string_2.measuredPoints()])[:, 0]
concat_measured = np.concatenate((fc1, fc2))
concat_measured = np.pad(concat_measured, (0,1), 'constant')
concat_measured = np.unique(concat_measured)
concat_measured.sort()
# fc1 is lead, a1 represents the share of fc1 of the total power
a1 = concat_measured / power
a1 = a1[(a1 >= 0 - tolerance) & (a1 <= 1 + tolerance)] # Filter shares that are too high
a1 = a1[
#(a1 * power >= fc1.min() - tolerance) &
(a1 * power <= fc1.max() + tolerance) &
#& ((1 - a1) * power >= fc2.min() - tolerance)
((1 - a1) * power <= fc2.max() + tolerance)]
# fc2 is lead, b2 represents the share of the total power
b2 = concat_measured / power
b2 = b2[(b2 >= 0 - tolerance) & (b2 <= 1 + tolerance)]
b2 = b2[
#(b2 * power >= fc2.min() - tolerance) &
(b2 * power <= fc2.max() + tolerance) &
#((1 - b2) * power >= fc1.min() - tolerance) &
((1 - b2) * power <= fc1.max() + tolerance)]
a2 = 1 - b2
a = np.concatenate((a1, a2))
a = np.unique(a)
#a = a[(a * power >= fc1.min()) & (a * power <= fc1.max()) & ((1 - a) * power >= fc2.min()) & (
# (1 - a) * power <= fc2.max())]
return a
import string
from pathlib import Path
import numpy as np
from matplotlib import pyplot as plt
from FuelCellClasses import FuelCellString, FuelCellMap, FuelCellSystem
def print_fuel_cell_string_fc_map(fcstring: FuelCellString, outpath: string = None, close=True):
fig, ax1 = plt.subplots(figsize=(8, 6))
fc_ = fcstring.fuel_cell
p_string = np.linspace(fc_.minPower, fc_.maxPower * 3, 10000)
total_fc = fcstring.stringFuelConsumption(p_string)
fig, ax1 = plt.subplots(figsize=(11.69,8.27))
ax1.plot(p_string, total_fc, label='fc_total_string1', color='blue')
ax1.legend()
plt.axvline(x=fc_.min_eff_power, color='r', label="1 min eff power")
plt.axvline(x=fc_.min_eff_power * 2, color='r', label="2 min eff power")
plt.axvline(x=fc_.min_eff_power * 3, color='r', label="3 min eff power")
measuredPoints = [x for x in fcstring.measuredPoints()]
plt.scatter(x = [x[0] for x in fcstring.measuredPoints()], y = [x[1] for x in fcstring.measuredPoints()], label="measured points")
plt.title("Fuel Cell String " + fcstring.fuel_cell.sourceFile + "-" + str(fcstring.count))
plt.xlabel('p [kW]')
plt.ylabel('total fc [g/H]')
plt.legend()
plt.grid(True)
if outpath is None:
plt.savefig(r'' + fcstring.fuel_cell.sourceFile.replace(".vfcm", "") + "-" + str(fcstring.count) + '.png')
else:
plt.savefig(outpath + Path(fcstring.fuel_cell.sourceFile).stem + "-" + str(fcstring.count) + '.png')
if close:
plt.close()
def print_fc_data(fc: FuelCellMap, close=True, outputPath: string=None):
min_fc_power = fc.minPower
max_fc_power = fc.maxPower
fc1_eff = lambda x: x / fc.fc_of_p(x)
x_values = np.arange(min_fc_power, max_fc_power, 0.1)
time_slice_x_values = np.arange(0, max_fc_power, 0.1)
y_values = fc.fc_of_p(x_values)
y_time_sliced = fc.getFuelConsumption(time_slice_x_values)
y_2_values = fc1_eff(x_values)
y_3_values = 1 / y_2_values
fig, ax1 = plt.subplots(figsize=(11.69,8.27))
fig.subplots_adjust(right=0.75)
ax1.plot(x_values, y_values, label='fc', color='blue')
ax1.plot(time_slice_x_values, y_time_sliced, label='fc with time slicing', color='cyan', linestyle='--')
ax1.scatter(x=[fc.min_eff_power], y=[fc.fc_of_p(fc.min_eff_power)], color="red")
# plt.plot(x_values, y_2_values, label='Interpolated Function ^(-1)', color='green')
# ax1.scatter(x_values, y_values, color='red', marker='o')
twin1 = ax1.twinx()
twin1.plot(x_values, y_2_values, label='efficiency', color='green')
twin2 = ax1.twinx()
twin2.plot(x_values, y_3_values, label='1/efficiency', color='pink')
twin2.spines.right.set_position(("axes", 1.2))
# plt.plot(x_values, y_2_values, label='Interpolated Function ^(-1)', color='green')
# twin1.scatter(x_values, y_2_values, color='cyan', marker='o')
plt.xlabel('p [kW]')
ax1.set_ylabel('fc [g/h]')
plt.title('Fuel cell map ' + fc.sourceFile)
fig.legend()
plt.grid(True)
if outputPath is not None:
plt.savefig(outputPath + Path(fc.sourceFile).stem + ".png")
else:
plt.savefig(fc.sourceFile.replace(".vfcm", ".png"))
if close:
plt.close()
def printFuelCellSystem(fcs: FuelCellSystem, close=True):
# Create a grid of x_power and y_a values using meshgrid
x_power = np.linspace(fcs.minPower(), fcs.maxPower(), 3000)
y_a = np.linspace(0, 1, 100)
X, Y = np.meshgrid(x_power, y_a)
# Calculate the corresponding z values using the provided function
Z = np.empty(X.shape)
# Iterate over each element in the meshgrid and calculate the value using the function
for i in range(X.shape[0]):
for j in range(X.shape[1]):
Z[i, j] = fcs.fc_consumption(X[i, j], Y[i, j])[0]
# Create a 3D plot
fig = plt.figure(figsize=(11.69,8.27))
ax = fig.add_subplot(111, projection='3d')
# Plot the surface
surf = ax.plot_surface(X, Y, Z, cmap='viridis', alpha=0.9)
# Add labels
ax.set_xlabel('power')
ax.set_ylabel('a')
ax.set_zlabel('fc')
ax.view_init(elev=48, azim=-143, roll=0)
# Add a color bar which maps values to colors
fig.colorbar(surf)
add_eff_scatter(Y, Z, ax, x_power)
#Show the plot
plt.savefig(r'fuel_cell_maps/string.png')
if close:
plt.close()
def add_eff_scatter(Y, Z, ax, x_power):
for i in range(0, x_power.shape[0]):
# requested power
x = x_power[i]
minfc = np.nanmin(Z.T[i])
indices = np.where(Z.T[i] == minfc)
argmins = indices
for j in range(argmins[0].shape[0]):
min_a = Y[argmins[0][j], i]
min_fc = Z[argmins[0][j], i]
if np.isnan(min_fc):
continue
# Plot points to highlight the minimum values
ax.scatter(x, min_a, min_fc, color='red' if (j == 0) else 'blue', marker='o', s=1, label='Minimum')
def printFuelCellSystemForPower(fcs: FuelCellSystem, power, outpath=None, close=True):
get_fcs = lambda a, p: fcs.fc_consumption(power=p, a=a)
a_array = np.linspace(0, 100, 5000) / 100
y_values = np.array([get_fcs(a, power) for a in a_array])
relevant_points = fcs.splits(power)
relevant_fc = np.array([get_fcs(a, power) for a in relevant_points])
fig = plt.figure(figsize=(11.69,8.27))
ax = fig.add_subplot(111)
plt.locator_params(axis='x', nbins=20)
ax.plot(a_array, y_values)
ax.scatter(relevant_points, relevant_fc[:,0])
ax.scatter(relevant_points, relevant_fc[:,1])
ax.scatter(relevant_points, relevant_fc[:,2])
ax2 = ax.twiny()
ax2.set_xticks(ax.get_xticks())
ax2.set_xbound(ax.get_xbound())
ax2.set_xticklabels([round(1 - x, 3) for x in ax.get_xticks()])
ax.set_xticklabels([round(x, 3) for x in ax.get_xticks()])
plt.figlegend(['fc_total', 'fc_string1(a*p)', 'fc_string2(b*p)'])
plt.title("Fuel consumption " + str(power) + " kW")
if outpath is None:
plt.savefig(r'fuel_cell_maps/string' + str(power) + '_kW.png')
else:
plt.savefig(outpath + 'fuel_cell_system' + str(power) + "_kW.png")
if close:
plt.close()
import os
import string
import numpy as np
from unittest import TestCase
from parameterized import parameterized, parameterized_class
from FuelCellClasses import FuelCellSystem
from FuelCellClasses import FuelCellString
from FuelCellClasses import FuelCellMap
from FuelCellClasses import read_fc_map
from PrintMethods import print_fc_data
from PrintMethods import print_fuel_cell_string_fc_map
from PrintMethods import printFuelCellSystem
from PrintMethods import printFuelCellSystemForPower
import shutil
class TestFuelCell(TestCase):
@parameterized.expand([
(r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm', 3,
r'fuel_cell_maps/GenericFuelCellMassflowMap2.vfcm', 3,
r'testoutput/different_fc_same_range/',
[1, 50e3, 150e3, 200e3, 300e3, 400e3, 550e3]),
(r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm', 3,
r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm', 3,
r'testoutput/same_fc_same_range/',
[1, 47700, 50e3, 150e3, 200e3, 300e3, 400e3, 550e3]),
(r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm', 1,
r'fuel_cell_maps/GenericFuelCellMassflowMap3.vfcm', 1,
r'testoutput/different_fc_different_range/',
[1, 47700, 50e3, 150e3, 200e3, 300e3, 400e3, 494e3, 495e3]),
(r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm', 3,
r'fuel_cell_maps/GenericFuelCellMassflowMap3.vfcm', 3,
r'testoutput/different_fc_different_range_#3/',
[1, 47700, 50e3, 150e3, 200e3, 300e3, 400e3, 494e3, 495e3]),
])
def test_multiple_fuelcells(self, fcmap1: string, count1: int, fcmap2: string, count2:int, outpath: string, powersplit):
if not os.path.isdir(outpath):
os.makedirs(outpath)
fc1 = read_fc_map(fcmap1)
shutil.copy2(fcmap1, outpath) # target filename is /dst/dir/file.ext
print_fc_data(fc1, outputPath=outpath)
fc2 = read_fc_map(fcmap2)
shutil.copy2(fcmap2, outpath)
print_fc_data(fc2, outputPath=outpath)
fcString1 = FuelCellString(fc1, count1)
fcString2 = FuelCellString(fc2, count2)
print_fuel_cell_string_fc_map(fcString1, outpath=outpath)
print_fuel_cell_string_fc_map(fcString2, outpath=outpath)
fcSystem = FuelCellSystem(fuel_cell_string_1=fcString1, fuel_cell_string_2=fcString2)
for p in powersplit:
printFuelCellSystemForPower(fcSystem, p / 1000, outpath=outpath)
P_el_out [kW], m_H2 [g/h]
30.0, 2002.0
60.0, 3003.0
105.0, 5436.5
150.0, 8662.5
195.0, 12199.7
255.0, 17017.0
300.0, 21450.0
P_el_out [kW], m_H2 [g/h]
30.0, 2002.0
70.0, 3003.0
140.0, 4436.5
150.0, 7662.5
195.0, 14199.7
255.0, 19017.0
300.0, 28450.0
P_el_out [kW], m_H2 [g/h]
30.0, 2002.0
70.0, 3003.0
140.0, 4436.5
150.0, 7662.5
195.0, 14199.7
import pandas as pd
import matplotlib.pyplot as plt
from scipy.optimize import minimize
import numpy as np
from FuelCellClasses import read_fc_map, FuelCellString, FuelCellSystem
from PrintMethods import print_fuel_cell_string_fc_map, print_fc_data, printFuelCellSystem, printFuelCellSystemForPower
fc1 = read_fc_map(r'fuel_cell_maps/GenericFuelCellMassflowMap1.vfcm')
print_fc_data(fc1)
fc2 = read_fc_map(r'fuel_cell_maps/GenericFuelCellMassflowMap2.vfcm')
print_fc_data(fc2)
string1 = FuelCellString(fc1, 3)
string2 = FuelCellString(fc2, 3)
print_fuel_cell_string_fc_map(string1)
print_fuel_cell_string_fc_map(string2)
fuelCellSystem = FuelCellSystem(string1, string2)
#printFuelCellSystem(fuelCellSystem, False)
printFuelCellSystemForPower(fuelCellSystem, 300)
File added
File added
No preview for this file type
No preview for this file type
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment