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
Select Git revision
  • 2ec49665d437b74c7a4f4a351bcea22ceb75c272
  • development default
  • feature/EDELIVERY-13760-translate-server-side-error-messages
  • release/5.1.x
  • feature/EDELIVERY-15382-rest-api-jwt-authentication-for-dynamic-discovery-client
  • bugfix/EDELIVERY-14172-domismp-accepts-requests-with-wrong-domain-header-value
  • EDELIVERY-15372-upgrade-libraries-and-plugins-and-update-httpclient-to-httpclient5
  • EDELIVERY-15377-migrate-to-angular-20
  • bugfix/EDELIVERY-14196-select-domain-select-resource-dropdown-should-be-order-alphabetically
  • feature/EDELIVERY-12753-sml-integration-migration-to-different-smp
  • feature/EDELIVERY-13757-extend-session-dialog-should-have-an-active-counter
  • EDELIVERY-15144-sql-update
  • bugfix/EDELIVERY-14326-ui-edit-resource-filters
  • feature/EDELIVERY-15144-domismp-system-notification-generalize-time-expiration-alerts
  • bugfix/EDELIVERY-15102-alert-is-not-appearing-when-adding-duplicated-certificate
  • bugfix/EDELIVERY-15203-small-left-grid-shows-no-data-found-for-1-2-seconds-before-loading-the-data
  • EDELIVERY-15219-search-filter-with-understore-char-does-not-work
  • bugfix/EDELIVERY-15226-certificates-error-when-trying-to-delete-certificates
  • bugfix/EDELIVERY-15224-error-when-trying-to-update-info-from-profile-page
  • bugfix/EDELIVERY-15225-emails-are-not-sent-in-domismp
  • feature/EDELIVERY-12746-external-secret-sharing-services-as-vaults
  • 5.1.1
  • 5.1
  • 5.1-TEST
  • 5.1-RC1
  • 5.0.1
  • 5.0
  • 5.0-RC1
  • 4.2
  • 4.2-RC1
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.1.0-RC1
  • 4.0.0
  • 4.0.0-RC1
  • 3.0.2
  • 3.0.1
  • 3.0.0
39 results

app.component.ts

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    MainModule.vb 2.67 KiB
    ' Copyright 2017 European Union.
    ' Licensed under the EUPL (the 'Licence');
    '
    ' * You may not use this work except in compliance with the Licence.
    ' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
    ' * Unless required by applicable law or agreed to in writing,
    '   software distributed under the Licence is distributed on an "AS IS" basis,
    '   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    '
    ' See the LICENSE.txt for the specific language governing permissions and limitations.
    Imports System.Collections.Generic
    Imports System.IO
    Imports System.Reflection
    Imports System.Runtime.Remoting
    Imports TUGraz.VectoCommon
    Imports TUGraz.VectoCommon.InputData
    Imports TUGraz.VectoCommon.OutputData
    Imports TUGraz.VectoCommon.Utils
    Imports TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
    Imports TUGraz.VectoCore.Models.SimulationComponent.Data
    Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
    Imports VectoAuxiliaries
    
    ''' <summary>
    ''' Main calculation routines.
    ''' </summary>
    ''' <remarks></remarks>
    Module MainModule
    	Public JobFileList As List(Of String)
    
    	Public Function ConvertToEngineData(ByVal fld As EngineFullLoadCurve, ByVal nIdle As PerSecond, ByVal gear As Integer,
    										ByVal maxTorque As NewtonMeter) As CombustionEngineData
    
    		Dim retVal As CombustionEngineData = New CombustionEngineData()
    		Dim fullLoadCurves As Dictionary(Of UInteger, EngineFullLoadCurve) = New Dictionary(Of UInteger, EngineFullLoadCurve)
    		fullLoadCurves(0) = fld
    		fullLoadCurves(CType(gear, UInteger)) = AbstractSimulationDataAdapter.IntersectFullLoadCurves(fld, maxTorque)
    		retVal.FullLoadCurves = fullLoadCurves
    		retVal.IdleSpeed = nIdle
    		Return retVal
    	End Function
    
    	Public Function ConvPicPath(hdVclass As Integer, isLongHaul As Boolean) As Bitmap
    		Select Case hdVclass
    			Case 1, 2, 3, 6, 7
    				Return My.Resources._4x2r
    			Case 4
    				If isLongHaul Then Return My.Resources._4x2rt
    				Return My.Resources._4x2r
    			Case 5, 8
    				Return My.Resources._4x2tt
    			Case 9, 11, 13
    				If isLongHaul Then Return My.Resources._6x2rt
    				Return My.Resources._6x2r
    			Case 10, 12, 14
    				Return My.Resources._6x2tt
    			Case Else
    				Return My.Resources.Undef
    		End Select
    	End Function
    
    	Public Function GetRelativePath(filePath As String, basePath As String) As String
    		If (String.IsNullOrEmpty(filePath)) then
    			Return ""
    		End If
            If (string.isnullOrempty(basePath)) Then
                Return filePath
            End If
    		If (Path.GetDirectoryName(filePath).StartsWith(basePath, StringComparison.OrdinalIgnoreCase)) Then
    			Return Path.GetFullPath(filePath).Substring(basePath.Length + If(basePath.EndsWith("\"), 0, 1))
    		End If
    		Return filePath
    	End Function
    End Module