PHEMlightdll.CEPHandler.Load C# (CSharp) Method

Load() private method

private Load ( string DataPath, System.Helpers Helper ) : bool
DataPath string
Helper System.Helpers
return bool
        private bool Load(string DataPath, Helpers Helper)
        {
            //Deklaration
            // get string identifier for PHEM emission class
            string emissionRep = Helper.gClass.ToString();

            // to hold everything.
            List<List<double>> matrixSpeedInertiaTable;
            List<List<double>> normedTragTableSpeedInertiaTable;
            List<List<double>> matrixFC;
            List<List<double>> matrixPollutants;
            List<double> idlingValuesFC;
            List<double> idlingValuesPollutants;
            List<string> headerFC;
            List<string> headerPollutants;

            double vehicleMass;
            double vehicleLoading;
            double vehicleMassRot;
            double crosssectionalArea;
            double cwValue;
            double f0;
            double f1;
            double f2;
            double f3;
            double f4;
            double axleRatio;
            List<double> transmissionGearRatios;
            double auxPower;
            double ratedPower;
            double engineIdlingSpeed;
            double engineRatedSpeed;
            double effectiveWhellDiameter;
            string vehicleMassType;
            string vehicleFuelType;
            double pNormV0;
            double pNormP0;
            double pNormV1;
            double pNormP1;

            if (!ReadVehicleFile(DataPath,
                                 emissionRep,
                                 Helper,
                                 out vehicleMass,
                                 out vehicleLoading,
                                 out vehicleMassRot,
                                 out crosssectionalArea,
                                 out cwValue,
                                 out f0,
                                 out f1,
                                 out f2,
                                 out f3,
                                 out f4,
                                 out axleRatio,
                                 out auxPower,
                                 out ratedPower,
                                 out engineIdlingSpeed,
                                 out engineRatedSpeed,
                                 out effectiveWhellDiameter,
                                 out transmissionGearRatios,
                                 out vehicleMassType,
                                 out vehicleFuelType,
                                 out pNormV0,
                                 out pNormP0,
                                 out pNormV1,
                                 out pNormP1,
                                 out matrixSpeedInertiaTable,
                                 out normedTragTableSpeedInertiaTable))
                return false;

            if (!ReadEmissionData(true, DataPath, emissionRep, Helper, out headerFC, out matrixFC, out idlingValuesFC))
                return false;

            if (!ReadEmissionData(false, DataPath, emissionRep, Helper, out headerPollutants, out matrixPollutants, out idlingValuesPollutants))
                return false;

            _ceps.Add(Helper.gClass, new CEP(vehicleMassType == Constants.HeavyVehicle,
                                                   vehicleMass,
                                                   vehicleLoading,
                                                   vehicleMassRot,
                                                   crosssectionalArea,
                                                   cwValue,
                                                   f0,
                                                   f1,
                                                   f2,
                                                   f3,
                                                   f4,
                                                   axleRatio,
                                                   transmissionGearRatios,
                                                   auxPower,
                                                   ratedPower,
                                                   engineIdlingSpeed,
                                                   engineRatedSpeed,
                                                   effectiveWhellDiameter,
                                                   pNormV0,
                                                   pNormP0,
                                                   pNormV1,
                                                   pNormP1,
                                                   vehicleFuelType,
                                                   matrixFC,
                                                   headerPollutants,
                                                   matrixPollutants,
                                                   matrixSpeedInertiaTable,
                                                   normedTragTableSpeedInertiaTable,
                                                   idlingValuesFC.First(),
                                                   idlingValuesPollutants));

            return true;
        }
        #endregion