Fund.TMarginalRun.WriteAggregateDamage C# (CSharp) Method

WriteAggregateDamage() public method

public WriteAggregateDamage ( int RunId, int WeightingschemeId, double Damage, WeightingCombination WeightingCombinations ) : void
RunId int
WeightingschemeId int
Damage double
WeightingCombinations WeightingCombination
return void
        public void WriteAggregateDamage(int RunId, int WeightingschemeId, double Damage, WeightingCombination[] WeightingCombinations)
        {
            if (!CalculateMeanForMonteCarlo && (RunId == -1))
                return;
            else if (!OutputAllMonteCarloRuns && (RunId > 0))
                return;

            if (m_AggregateDamageCsv != null)
            {
                int gas = (int)_gas;

                m_AggregateDamageCsv.WriteLine(
                    (OutputVerbal ? ScenarioName : ScenarioId.ToString()) +
                    ";" +
                    (OutputVerbal ? (gas == 0 ? "C" : gas == 1 ? "CH4" : gas == 2 ? "N2O" : gas == 3 ? "SF6" : "ERROR") : ((int)_gas).ToString()) +
                    ";" +
                    _emissionyear.ToString() +
                    ";" +
                    (OutputVerbal ? (RunId == 0 ? "Best guess" : RunId == -1 ? "Mean" : RunId.ToString()) : RunId.ToString()) +
                    ";" +
                    (OutputVerbal ? WeightingCombinations[WeightingschemeId].Name : WeightingschemeId.ToString()) +
                    ";" +
                    Damage.ToString("f15")
                    );

            }
        }