Ejemplo n.º 1
0
        public EmissionesCo2EmissionsByRegionDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Emissiones",
                VariableName      = "CO2 emissions by region"
            };

            XlsRanges = new IXlsRange[] {
            };

            Year.CellBg.Row  = 0;
            Year.CellEnd.Row = 0;
        }
        public EmissionesNonCo2EmissionsBySectorDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Emissiones",
                VariableName      = "CO2 emissions by sector"
            };

            XlsRanges = new IXlsRange[] {
            };

            Year.CellBg.Row  = 0;
            Year.CellEnd.Row = 0;
        }
Ejemplo n.º 3
0
        public ResidentialFuelConsumptionByTechnologyDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Residential",
                VariableName      = "Fuel consumption by technology"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 791;
            Year.CellEnd.Row = 791;
        }
Ejemplo n.º 4
0
        public AgricultureFuelConsumptionByTechnologyDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Agriculture",
                VariableName      = "Fuel consumption by technology"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 860;
            Year.CellEnd.Row = 860;
        }
        public PrimaryEnergyProductionDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Primary Energy",
                VariableName      = "Primary Energy: Production"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 6;
            Year.CellEnd.Row = 6;
        }
        public PrimaryEnergyImpExportDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Primary Energy",
                VariableName      = "Primary Energy: Imports/Exports"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 124;
            Year.CellEnd.Row = 124;
        }
Ejemplo n.º 7
0
        public IndustryFuelConsumptionByTechnologyDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Industry",
                VariableName      = "Fuel consumption by technology"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 716;
            Year.CellEnd.Row = 716;
        }
Ejemplo n.º 8
0
        public ElectricityCo2IntensityDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Electricity",
                VariableName      = "CO2 intensity"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 29;
            Year.CellEnd.Row = 29;
        }
Ejemplo n.º 9
0
        public GdpVariable()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Top",
                VariableName      = "GDP"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 34;
            Year.CellEnd.Row = 34;
        }
Ejemplo n.º 10
0
        public PopulationVariable()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Top",
                VariableName      = "Population"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 2;
            Year.CellEnd.Row = 2;
        }
        public FinalEnergyConsumptionBySectorlDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Final Energy Consumption",
                VariableName      = "Final Energy Consumption : By sector"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange
            };

            Year.CellBg.Row  = 200;
            Year.CellEnd.Row = 200;
        }
Ejemplo n.º 12
0
        public ElectricityConsumptionBySectorDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Electricity",
                VariableName      = "Consumption by sector"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange
            };

            Year.CellBg.Row  = 36;
            Year.CellEnd.Row = 36;
        }
        public EmissionesCo2EmissionsBySectorDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Emissiones",
                VariableName      = "CO2 emissions by sector"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange
            };

            Year.CellBg.Row  = 224;
            Year.CellEnd.Row = 224;
        }
Ejemplo n.º 14
0
        public ElectricityAnnualisedInvestmentCostsDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Electricity",
                VariableName      = "Annualised investment costs"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange,
                _thirdRange
            };

            Year.CellBg.Row  = 76;
            Year.CellEnd.Row = 76;
        }
Ejemplo n.º 15
0
        public ElectricityGenerationDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Electricity",
                VariableName      = "Generation"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange,
                _thirdRange
            };

            Year.CellBg.Row  = 6;
            Year.CellEnd.Row = 6;
        }
        public ElectricityCapacityDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Electricity",
                VariableName      = "Capacity"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange,
                _secondRange,
                _thirdRange
            };

            Year.CellBg.Row  = 52;
            Year.CellEnd.Row = 52;
        }
Ejemplo n.º 17
0
        public SystemCostsVariable()
        {
            SheetName = "Global Results";

            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Bottom",
                VariableName      = "System costs"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 720;
            Year.CellBg.Col  = 3;
            Year.CellEnd.Row = 720;
            Year.CellEnd.Col = 11;
        }
Ejemplo n.º 18
0
        public CarbonPriceVariable()
        {
            SheetName = "Global Results";

            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Bottom",
                VariableName      = "Carbon price"
            };

            XlsRanges = new IXlsRange[] {
                _firstRange
            };

            Year.CellBg.Row  = 358;
            Year.CellBg.Col  = 3;
            Year.CellEnd.Row = 358;
            Year.CellEnd.Col = 11;
        }
Ejemplo n.º 19
0
        private async Task <IEnumerable <SubVariableData> > GetXlsValuesByRangeAsync(IXlsRange currentRange)
        {
            var subVariableDataByRange = new List <SubVariableData>();

            var curentRow  = currentRange.CellBg.Row;
            var regionName = GetXlsValue(curentRow, SubVariableCol);

            while (!string.IsNullOrEmpty(regionName))
            {
                await SetCurrentSubVariableId(regionName);
                await SetCurrentRegionId(regionName);

                var yearIndex = 0;
                for (var curentCol = currentRange.CellBg.Col; curentCol <= currentRange.CellEnd.Col; curentCol++)
                {
                    var currentValue    = GetCurrentValue(curentRow, curentCol);
                    var subVariableData = new SubVariableData
                    {
                        RegionAgrigationTypeId = CurrentRegionAggregationTypeId,
                        VariableId             = CurrenVariableId,
                        SubVariableId          = CurrentSubVariableId,
                        RegionId            = CurrenRegionId,
                        ParentRegionId      = XlsImportVariableDataService.CurrentParentRegionId,
                        ScenarioId          = XlsImportVariableDataService.CurrentScenarioId,
                        KeyParameterId      = XlsImportVariableDataService.CurrentKeyParameterId,
                        KeyParameterLevelId = XlsImportVariableDataService.CurrentKeyParameterLevelId,
                        Year  = CurrentYears[yearIndex],
                        Value = currentValue
                    };
                    subVariableDataByRange.Add(subVariableData);
                    yearIndex++;
                }

                curentRow++;
                regionName = GetXlsValue(curentRow, SubVariableCol);
            }
            ;

            return(subVariableDataByRange);
        }
        public TransportFuelConsumptionByTechnologyDescription()
        {
            VariableDbDescription = new VariableDbDescription
            {
                VariableGroupName = "Transport",
                VariableName      = "Fuel consumption by technology"
            };

            XlsRanges = new IXlsRange[] {
                _carRange,
                _hgvRange,
                _lgvRange,
                _busRange,
                _threeWheelerRange,
                _twoWheelerRange,
                _airRange,
                _shipRange,
                _trainRange
            };

            Year.CellBg.Row  = 547;
            Year.CellEnd.Row = 547;
        }
Ejemplo n.º 21
0
        protected async Task <IEnumerable <SubVariableData> > GetXlsValuesByRangeAsync(IXlsRange currentRange)
        {
            var subVariableDataByRange = new List <SubVariableData>();

            for (var curentRow = currentRange.CellBg.Row; curentRow <= currentRange.CellEnd.Row; curentRow++)
            {
                await SetCurrentSubVariableId(curentRow, SubVariableCol, currentRange.Prefix);

                var yearIndex = 0;
                for (var curentCol = currentRange.CellBg.Col + 1; curentCol <= currentRange.CellEnd.Col; curentCol++)
                {
                    var currentValue    = GetCurrentValue(curentRow, curentCol);
                    var subVariableData = new SubVariableData
                    {
                        RegionAgrigationTypeId = CurrentRegionAggregationTypeId,
                        VariableId             = CurrenVariableId,
                        SubVariableId          = CurrentSubVariableId,
                        RegionId            = CurrentRegionId,
                        ParentRegionId      = XlsImportVariableDataService.CurrentParentRegionId,
                        ScenarioId          = XlsImportVariableDataService.CurrentScenarioId,
                        KeyParameterId      = XlsImportVariableDataService.CurrentKeyParameterId,
                        KeyParameterLevelId = XlsImportVariableDataService.CurrentKeyParameterLevelId,
                        Year  = CurrentYears[yearIndex],
                        Value = currentValue
                    };
                    subVariableDataByRange.Add(subVariableData);
                    yearIndex++;
                }
            }
            return(subVariableDataByRange);
        }