/// <summary> /// this function is used to call all the calculate functions which runs once /// </summary> private void DoWork() { Aerodynamic.Calculate(); Aerodynamic.StoreResult(); Brake.Calculate(); Brake.StoreResult(); Engine.Calculate(); Engine.StoreResult(); GearBox.Calculate(); GearBox.StoreResult(); SecondaryDrive.Calculate(); SecondaryDrive.StoreResult(); Steering.Calculate(); Steering.StoreResult(); DoIterativeWork(); //call the CalculateBackwards functions Aerodynamic.CalculateBackwards(); Aerodynamic.StoreResult(); Brake.CalculateBackwards(); Brake.StoreResult(); Engine.CalculateBackwards(); Engine.StoreResult(); GearBox.CalculateBackwards(); GearBox.StoreResult(); SecondaryDrive.CalculateBackwards(); SecondaryDrive.StoreResult(); Steering.CalculateBackwards(); Steering.StoreResult(); Track.Instance.CalculateBackwards(); Track.Instance.StoreResult(); Wheels.CalculateBackwards(); Wheels.StoreResult(); OverallCar.CalculateBackwards(); OverallCar.StoreResult(); Suspension.CalculateBackwards(); Suspension.StoreResult(); }
public void TestSecondaryCalculate() { secondaryDrive.Calculate(); secondaryDrive.StoreResult(); Assert.AreEqual(200, SecondaryDriveOutput.LastCalculation.Torque, 1e-5); }