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
  • 111190be2eef963295cdb61b20ba016d9fd8bc05
  • development default
  • 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
  • feature/EDELIVERY-15382-rest-api-jwt-authentication-for-dynamic-discovery-client
  • 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
  • release/5.1.x
  • feature/EDELIVERY-12746-external-secret-sharing-services-as-vaults
  • EDELIVERY-15229-upgrade-libraries-and-plugins
  • 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

expired-password-dialog.component.html

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    EngineFLDTest.cs 1.74 KiB
    using System;
    using System.Diagnostics;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using TUGraz.VectoCommon.Utils;
    using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
    
    namespace TUGraz.VectoCore.Tests.Dummy
    {
    	[TestClass]
    	public class EngineFLDTest
    	{
    		[TestMethod]
    		public void CompareFLDLookupPerformance()
    		{
    			var engineFile1 = @"TestData\Components\40t_Long_Haul_Truck.vfld";
    			var engineFile2 = @"E:\QUAM\Downloads\EngineFLD\Map_375c_BB1390_modTUG_R49_375c_BB1386.vfld";
    
    			var map1 = EngineFullLoadCurve.ReadFromFile(engineFile1, true);
    			var map2 = EngineFullLoadCurve.ReadFromFile(engineFile2, true);
    
    			map1.FullLoadStationaryTorque(1000.RPMtoRad());
    			map2.FullLoadStationaryTorque(1000.RPMtoRad());
    
    			foreach (var map in new[] { map1, map2 }) {
    				var rand = new Random();
    				var stopWatch = Stopwatch.StartNew();
    
    
    				for (var i = 0; i < 500000; i++) {
    					var angularVelocity = rand.Next(1000, 1400).RPMtoRad();
    
    					var tqMax = map.FullLoadStationaryTorque(angularVelocity);
    				}
    
    				stopWatch.Stop();
    				Debug.Print("{0}", stopWatch.ElapsedMilliseconds);
    			}
    		}
    
    		[TestMethod]
    		public void LookupTest()
    		{
    			var engineFile2 = @"E:\QUAM\Downloads\EngineFLD\Map_375c_BB1390_modTUG_R49_375c_BB1386.vfld";
    
    			var map = EngineFullLoadCurve.ReadFromFile(engineFile2, true);
    
    			Assert.AreEqual(1208, map.FullLoadStationaryTorque(500.RPMtoRad()).Value(), 1e-3);
    
    			Assert.AreEqual(27, map.FullLoadStationaryTorque(2202.RPMtoRad()).Value(), 1e-3);
    
    			Assert.AreEqual(2341.5714, map.FullLoadStationaryTorque(1500.RPMtoRad()).Value(), 1e-3);
    			Assert.AreEqual(376.7142, map.FullLoadStationaryTorque(2175.RPMtoRad()).Value(), 1e-3);
    
    			Assert.AreEqual(1544, map.FullLoadStationaryTorque(628.RPMtoRad()).Value(), 1e-3);
    		}
    	}
    }