Metric Model mvMax3

You can override the value of any variable in the model on a node-by-node basis. To perform a node-level override, use the aliases in the following table as additional columns in your spreadsheet or fields in your shapefile. Both long and short aliases are recognized.

Long alias Short alias Units
finance > discounted cash flow factor dccf  
finance > economic growth rate per year economic_g fraction per year
finance > elasticity of electricity demand elasticity  
finance > electricity demand growth rate per year dem_g fraction per year
finance > electricity demand multiplier demf  
finance > interest rate per year interest_g fraction per year
finance > time horizon time years
demographics > is rural rural binary
demographics > mean household size ho_size person count
demographics > mean household size (rural) ho_size_r person count
demographics > mean household size (urban) ho_size_u person count
demographics > mean interhousehold distance mid meters
demographics > population count pop population person count
demographics > population growth rate per year (rural) pop_g_r fraction per year
demographics > population growth rate per year (urban) pop_g_u fraction per year
demographics > projected household count p_ho household count
demographics > projected population count p_pop person count
demographics > projected population counts p_pops person count list
demographics > urban population threshold u_pop_thre person count
demand > projected nodal demand per year p_dem kilowatt-hours per year
demand > projected nodal discounted demand p_dem_d kilowatt-hours
demand (peak) > demand to peak demand conversion factor dem_pkdemf  
demand (peak) > peak demand as fraction of nodal demand occurring during peak hours pkdemf  
demand (peak) > peak demand as fraction of nodal demand occurring during peak hours (rural) pkdemf_r  
demand (peak) > peak demand as fraction of nodal demand occurring during peak hours (urban) pkdemf_u  
demand (peak) > peak electrical hours of operation per year pkel_hr hours per year
demand (peak) > projected peak commercial facility demand p_pkdem_co kilowatts
demand (peak) > projected peak nodal demand p_pkdem kilowatts
demand (peak) > projected peak productive demand p_pkdem_pr kilowatts
demand (household) > demand curve ho_dc  
demand (household) > demand curve points (population and multiplier) ho_dc_pts population and multiplier list
demand (household) > demand curve type ho_dc_t  
demand (household) > household unit demand per household per year ho_dc_unit kilowatt-hours per year
demand (household) > projected household demand per year p_dem_ho kilowatt-hours per year
demand (household) > target household count ct_hh_t households
demand (household) > target household penetration rate    
demand (productive) > demand curve pr_dc  
demand (productive) > demand curve points (population and multiplier) pr_dc_pts population and multiplier list
demand (productive) > demand curve type pr_dc_t  
demand (productive) > productive unit demand per household per year pr_dc_unit kilowatt-hours per year
demand (productive) > projected productive demand p_dem_pr kilowatt-hours per year
demand (social infrastructure) > commercial facility count curve co_cc  
demand (social infrastructure) > commercial facility count curve points (population and facility count) co_cc_pts population and facility count list
demand (social infrastructure) > commercial facility count curve type co_cc_t  
demand (social infrastructure) > commercial facility unit demand per commercial facility per year co_dc_unit kilowatt-hours per year
demand (social infrastructure) > demand curve so_dc  
demand (social infrastructure) > demand curve points (population and multiplier) so_dc_pts population and multiplier list
demand (social infrastructure) > demand curve type so_dc_t  
demand (social infrastructure) > education facility count curve ed_cc  
demand (social infrastructure) > education facility count curve points (population and facility count) ed_cc_pts population and facility count list
demand (social infrastructure) > education facility count curve type ed_cc_t  
demand (social infrastructure) > education facility unit demand per education facility per year ed_dc_unit kilowatt-hours per year
demand (social infrastructure) > health facility count curve he_cc  
demand (social infrastructure) > health facility count curve points (population and facility count) he_cc_pts population and facility count list
demand (social infrastructure) > health facility count curve type he_cc_t  
demand (social infrastructure) > health facility unit demand per health facility per year he_dc_unit kilowatt-hours per year
demand (social infrastructure) > projected commercial facility count p_co commercial facility count
demand (social infrastructure) > projected commercial facility demand per year p_dem_co kilowatt-hours per year
demand (social infrastructure) > projected education facility count p_ed education facility count
demand (social infrastructure) > projected education facility demand per year p_dem_ed kilowatt-hours per year
demand (social infrastructure) > projected health facility count p_he health facility count
demand (social infrastructure) > projected health facility demand per year p_dem_he kilowatt-hours per year
demand (social infrastructure) > projected public lighting facility count p_li public lighting facility count
demand (social infrastructure) > projected public lighting facility demand per year p_dem_li kilowatt-hours per year
demand (social infrastructure) > public lighting facility count curve li_cc  
demand (social infrastructure) > public lighting facility count curve points (population and facility count) li_cc_pts population and facility count list
demand (social infrastructure) > public lighting facility count curve type li_cc_t  
demand (social infrastructure) > public lighting facility unit demand per public lighting facility per year li_dc_unit kilowatt-hours per year
distribution > low voltage line cost per meter di_ll_cm dollars per meter
distribution > low voltage line equipment cost per connection di_le_cc dollars per connection
distribution > low voltage line equipment operations and maintenance cost as fraction of equipment cost di_le_omf  
distribution > low voltage line initial cost di_ll_ini dollars
distribution > low voltage line length di_ll_len meters
distribution > low voltage line lifetime di_ll_life years
distribution > low voltage line operations and maintenance cost per year di_ll_om dollars per year
distribution > low voltage line operations and maintenance cost per year as fraction of line cost di_ll_omf  
distribution > low voltage line recurring cost per year di_ll_rec dollars per year
distribution > low voltage line replacement cost per year di_ll_rep dollars per year
system (off-grid) > available system capacities (diesel generator) og_dg_cps kilowatts list
system (off-grid) > available system capacities (photovoltaic panel) og_pp_cps kilowatts list
system (off-grid) > diesel component initial cost og_d_ini dollars
system (off-grid) > diesel component recurring cost per year og_d_rec dollars per year
system (off-grid) > diesel fuel cost per year og_fl dollars per year
system (off-grid) > diesel generator actual system capacity og_dg_acp kilowatts
system (off-grid) > diesel generator actual system capacity counts og_dg_acps capacity count list
system (off-grid) > diesel generator cost og_dg_ini dollars
system (off-grid) > diesel generator desired system capacity og_dg_dcp kilowatts
system (off-grid) > diesel generator hours of operation per year (effective) og_dg_efhr hours per year
system (off-grid) > diesel generator hours of operation per year (minimum) og_dg_mnhr hours per year
system (off-grid) > diesel generator installation cost og_dg_i dollars
system (off-grid) > diesel generator operations and maintenance cost per year og_dg_om dollars per year
system (off-grid) > diesel generator replacement cost per year og_dg_rep dollars per year
system (off-grid) > peak sun hours per year pksu_hr hours per year
system (off-grid) > photovoltaic balance cost og_px_ini dollars
system (off-grid) > photovoltaic balance cost as fraction of panel cost og_px_cf  
system (off-grid) > photovoltaic balance lifetime og_px_life years
system (off-grid) > photovoltaic balance replacement cost per year og_px_rep dollars per year
system (off-grid) > photovoltaic battery cost og_pb_ini dollars
system (off-grid) > photovoltaic battery cost per kilowatt-hour og_pb_ckwh dollars per kilowatt-hour
system (off-grid) > photovoltaic battery kilowatt-hours per photovoltaic component kilowatt og_pb_hkw kilowatt-hours per kilowatt
system (off-grid) > photovoltaic battery lifetime og_pb_life years
system (off-grid) > photovoltaic battery replacement cost per year og_pb_rep dollars per year
system (off-grid) > photovoltaic component efficiency loss og_p_loss fraction
system (off-grid) > photovoltaic component initial cost og_p_ini dollars
system (off-grid) > photovoltaic component operations and maintenance cost per year og_p_om dollars per year
system (off-grid) > photovoltaic component operations and maintenance cost per year as fraction of component cost og_p_omf  
system (off-grid) > photovoltaic component recurring cost per year og_p_rec dollars per year
system (off-grid) > photovoltaic panel actual capacity og_pp_acp kilowatts
system (off-grid) > photovoltaic panel actual capacity counts og_pp_acps capacity count list
system (off-grid) > photovoltaic panel cost og_pp_ini dollars
system (off-grid) > photovoltaic panel cost per photovoltaic component kilowatt og_pp_ckw dollars per kilowatt
system (off-grid) > photovoltaic panel desired capacity og_pp_dcp kilowatts
system (off-grid) > photovoltaic panel lifetime og_pp_life years
system (off-grid) > photovoltaic panel replacement cost per year og_pp_rep dollars per year
system (off-grid) > system initial cost og_ini dollars
system (off-grid) > system nodal discounted cost og_nod_d dollars
system (off-grid) > system nodal levelized cost og_nod_lev dollars per kilowatt-hour
system (off-grid) > system recurring cost per year og_rec dollars per year
system (off-grid) > system total discounted cost og_tot_d dollars
system (off-grid) > system total discounted demand og_dem_d kilowatt-hours
system (off-grid) > system total levelized cost og_tot_lev dollars per kilowatt-hour
system (mini-grid) > available system capacities (diesel generator) mg_dg_cps kilowatts list
system (mini-grid) > diesel fuel cost per liter mg_fl_cl dollars per liter
system (mini-grid) > diesel fuel cost per year mg_fl dollars per year
system (mini-grid) > diesel fuel liters consumed per kilowatt-hour mg_fl_lkwh liters per kilowatt-hour
system (mini-grid) > diesel generator actual system capacity mg_dg_acp kilowatts
system (mini-grid) > diesel generator actual system capacity counts mg_dg_acps capacity count list
system (mini-grid) > diesel generator cost mg_dg_ini dollars
system (mini-grid) > diesel generator cost per diesel system kilowatt mg_dg_ck dollars per kilowatt
system (mini-grid) > diesel generator desired system capacity mg_dg_dcp kilowatts
system (mini-grid) > diesel generator hours of operation per year (effective) mg_dg_efhr hours per year
system (mini-grid) > diesel generator hours of operation per year (minimum) mg_dg_mnhr hours per year
system (mini-grid) > diesel generator installation cost mg_dg_i dollars
system (mini-grid) > diesel generator installation cost as fraction of generator cost mg_dg_if  
system (mini-grid) > diesel generator lifetime mg_dg_life years
system (mini-grid) > diesel generator operations and maintenance cost per year mg_dg_om dollars per year
system (mini-grid) > diesel generator operations and maintenance cost per year as fraction of generator cost mg_dg_omf  
system (mini-grid) > diesel generator replacement cost per year mg_dg_rep dollars per year
system (mini-grid) > distribution loss mg_loss fraction
system (mini-grid) > low voltage line equipment cost mg_le dollars
system (mini-grid) > low voltage line equipment operations and maintenance cost per year mg_le_om dollars per year
system (mini-grid) > system initial cost mg_ini dollars
system (mini-grid) > system nodal discounted cost mg_nod_d dollars
system (mini-grid) > system nodal levelized cost mg_nod_lev dollars per kilowatt-hour
system (mini-grid) > system recurring cost per year mg_rec dollars per year
system (mini-grid) > system total discounted cost mg_tot_d dollars
system (mini-grid) > system total discounted demand mg_dem_d kilowatt-hours
system (mini-grid) > system total levelized cost mg_tot_lev dollars per kilowatt-hour
system (grid) > available system capacities (transformer) gr_tr_cps kilowatts list
system (grid) > distribution loss gr_loss fraction
system (grid) > electricity cost per kilowatt-hour gr_el_ckwh dollars per kilowatt-hour
system (grid) > electricity cost per year gr_el dollars per year
system (grid) > external nodal discounted cost per meter ge_nodm_d dollars per meter
system (grid) > external system initial cost per meter ge_inim dollars per meter
system (grid) > external system recurring cost per meter per year ge_recm dollars per meter per year
system (grid) > grid transformer actual system capacity gr_tr_acp kilowatts
system (grid) > grid transformer actual system capacity counts gr_tr_acps capacity count list
system (grid) > grid transformer desired system capacity gr_tr_dcp kilowatts
system (grid) > installation cost gr_i dollars
system (grid) > installation cost per connection gr_i_cc dollars per connection
system (grid) > internal connection count gr_ic connection count
system (grid) > internal system initial cost gi_ini dollars
system (grid) > internal system nodal discounted cost gi_nod_d dollars
system (grid) > internal system nodal levelized cost gi_nod_lev dollars per kilowatt-hour
system (grid) > internal system recurring cost per year gi_rec dollars per year
system (grid) > low voltage line equipment cost gr_le dollars
system (grid) > low voltage line equipment operations and maintenance cost per year gr_le_om dollars per year
system (grid) > medium voltage line cost per meter gr_ml_cm dollars per meter
system (grid) > medium voltage line lifetime gr_ml_life years
system (grid) > medium voltage line operations and maintenace cost per meter per year gr_ml_omm dollars per meter per year
system (grid) > medium voltage line operations and maintenance cost per year as fraction of line cost gr_ml_omf  
system (grid) > medium voltage line replacement cost per meter per year gr_ml_repm dollars per meter per year
system (grid) > social infrastructure count gr_so facility count
system (grid) > system total discounted cost gr_tot_d dollars
system (grid) > system total discounted demand gr_dem_d kilowatt-hours
system (grid) > system total levelized cost gr_tot_lev dollars per kilowatt-hour
system (grid) > transformer cost gr_tr dollars
system (grid) > transformer cost per grid system kilowatt gr_tr_ckw dollars per kilowatt
system (grid) > transformer lifetime gr_tr_life years
system (grid) > transformer operations and maintenance cost per year gr_tr_om dollars per year
system (grid) > transformer operations and maintenance cost per year as fraction of transformer cost gr_tr_omf  
system (grid) > transformer replacement cost per year gr_tr_rep dollars per year
metric > maximum length of medium voltage line extension mvmax meters
metric > system system  

Finance

Discounted cash flow factor

Dependencies

Derivatives

class DiscountedCashFlowFactor(V):

    section = 'finance'
    option = 'discounted cash flow factor'
    aliases = ['dccf']
    dependencies = [
        TimeHorizon,
        InterestRatePerYear,
    ]

    def compute(self):
        interestExponents = [-x for x in xrange(1, self.get(TimeHorizon) + 1)]
        return sum(numpy.array(1 + self.get(InterestRatePerYear)) ** interestExponents)

Economic growth rate per year

Derivatives

class EconomicGrowthRatePerYear(V):

    section = 'finance'
    option = 'economic growth rate per year'
    aliases = ['economic_g']
    default = 0.06
    units = 'fraction per year'

Elasticity of electricity demand

Derivatives

class ElasticityOfElectricityDemand(V):

    section = 'finance'
    option = 'elasticity of electricity demand'
    aliases = ['elasticity']
    default = 1.5

Electricity demand growth rate per year

Dependencies

Derivatives

class ElectricityDemandGrowthRatePerYear(V):

    section = 'finance'
    option = 'electricity demand growth rate per year'
    aliases = ['dem_g']
    dependencies = [
        ElasticityOfElectricityDemand,
        EconomicGrowthRatePerYear,
    ]
    units = 'fraction per year'

    def compute(self):
        return abs(self.get(ElasticityOfElectricityDemand)) * self.get(EconomicGrowthRatePerYear)

Electricity demand multiplier

Dependencies

Derivatives

class ElectricityDemandMultiplier(V):

    section = 'finance'
    option = 'electricity demand multiplier'
    aliases = ['demf']
    dependencies = [
        ElectricityDemandGrowthRatePerYear,
        TimeHorizon,
    ]

    def compute(self):
        return (1 + self.get(ElectricityDemandGrowthRatePerYear)) ** self.get(TimeHorizon)

Interest rate per year

Derivatives

class InterestRatePerYear(V):

    section = 'finance'
    option = 'interest rate per year'
    aliases = ['interest_g']
    default = 0.1
    units = 'fraction per year'

Time horizon

Derivatives

class TimeHorizon(V):

    section = 'finance'
    option = 'time horizon'
    aliases = ['time']
    c = dict(parse=store.parseCeilInteger)
    default = 10
    units = 'years'

Demographics

Is rural

Dependencies

Derivatives

class IsRural(V):

    section = 'demographics'
    option = 'is rural'
    aliases = ['rural']
    c = dict(parse=int)
    dependencies = [
        ProjectedPopulationCount,
        UrbanPopulationThreshold,
    ]
    units = 'binary'

    def compute(self):
        return 1 if self.get(ProjectedPopulationCount) < self.get(UrbanPopulationThreshold) else 0

Mean household size

Dependencies

Derivatives

class MeanHouseholdSize(V):

    section = 'demographics'
    option = 'mean household size'
    aliases = ['ho_size']
    c = dict(check=store.assertPositive)
    dependencies = [
        RuralMeanHouseholdSize,
        IsRural,
        UrbanMeanHouseholdSize,
    ]
    units = 'person count'

    def compute(self):
        return self.get(RuralMeanHouseholdSize) if self.get(IsRural) else self.get(UrbanMeanHouseholdSize)

Mean interhousehold distance

Derivatives

class MeanInterhouseholdDistance(V):

    section = 'demographics'
    option = 'mean interhousehold distance'
    aliases = ['mid']
    default = 25
    units = 'meters'

Population count

Derivatives

class PopulationCount(V):

    section = 'demographics'
    option = 'population count'
    aliases = ['pop', 'population']
    c = dict(parse=store.parseCeilInteger)
    default = 0
    units = 'person count'

Projected household count

Dependencies

Derivatives

class ProjectedHouseholdCount(V):

    section = 'demographics'
    option = 'projected household count'
    aliases = ['p_ho']
    c = dict(check=store.assertNonNegative)
    dependencies = [
        ProjectedPopulationCount,
        MeanHouseholdSize,
    ]
    units = 'household count'

    def compute(self):
        return math.ceil(self.get(ProjectedPopulationCount) / float(self.get(MeanHouseholdSize)))

Projected population counts

Dependencies

Derivatives

class ProjectedPopulationCounts(V):

    section = 'demographics'
    option = 'projected population counts'
    aliases = ['p_pops']
    c = dict(parse=store.unstringifyIntegerList, format=store.flattenList, validate='validateNumberList')
    dependencies = [
        PopulationCount,
        RuralPopulationGrowthRatePerYear,
        UrbanPopulationGrowthRatePerYear,
        UrbanPopulationThreshold,
        finance.TimeHorizon,
    ]
    units = 'person count list'

    def compute(self):
        # Initialize
        populationCounts = [self.get(PopulationCount)]
        urbanThreshold = self.get(UrbanPopulationThreshold)
        ruralGrowthRate = self.get(RuralPopulationGrowthRatePerYear)
        urbanGrowthRate = self.get(UrbanPopulationGrowthRatePerYear)
        # For each year of the time horizon,
        for year in xrange(self.get(finance.TimeHorizon)):
            # Get population count
            populationCount = populationCounts[-1]
            # Get appropriate growth rate
            populationGrowthRate = ruralGrowthRate if populationCount < urbanThreshold else urbanGrowthRate
            # Append projected population count
            populationCounts.append(int(math.ceil(populationCount * (1 + populationGrowthRate))))
        # Return
        return populationCounts

Rural mean household size

Derivatives

class RuralMeanHouseholdSize(V):

    section = 'demographics'
    option = 'mean household size (rural)'
    aliases = ['ho_size_r']
    default = 9.6
    units = 'person count'

Rural population growth rate per year

Derivatives

class RuralPopulationGrowthRatePerYear(V):

    section = 'demographics'
    option = 'population growth rate per year (rural)'
    aliases = ['pop_g_r']
    default = 0.015
    units = 'fraction per year'

Urban mean household size

Derivatives

class UrbanMeanHouseholdSize(V):

    section = 'demographics'
    option = 'mean household size (urban)'
    aliases = ['ho_size_u']
    default = 7.5
    units = 'person count'

Urban population growth rate per year

Derivatives

class UrbanPopulationGrowthRatePerYear(V):

    section = 'demographics'
    option = 'population growth rate per year (urban)'
    aliases = ['pop_g_u']
    default = 0.036
    units = 'fraction per year'

Urban population threshold

Derivatives

class UrbanPopulationThreshold(V):

    section = 'demographics'
    option = 'urban population threshold'
    aliases = ['u_pop_thre']
    c = dict(parse=store.parseCeilInteger)
    default = 5000
    units = 'person count'

Demand

Projected nodal demand per year

Dependencies

Derivatives

class ProjectedNodalDemandPerYear(V):

    section = 'demand'
    option = 'projected nodal demand per year'
    aliases = ['p_dem']
    dependencies = [
        ProjectedHouseholdDemandPerYear,
        ProjectedProductiveDemandPerYear,
        ProjectedHealthFacilityDemandPerYear,
        ProjectedEducationFacilityDemandPerYear,
        ProjectedCommercialFacilityDemandPerYear,
        ProjectedPublicLightingFacilityDemandPerYear,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return sum([
            self.get(ProjectedHouseholdDemandPerYear),
            self.get(ProjectedProductiveDemandPerYear),
            self.get(ProjectedHealthFacilityDemandPerYear),
            self.get(ProjectedEducationFacilityDemandPerYear),
            self.get(ProjectedCommercialFacilityDemandPerYear),
            self.get(ProjectedPublicLightingFacilityDemandPerYear),
        ])

Projected nodal discounted demand

Dependencies

Derivatives

class ProjectedNodalDiscountedDemand(V):
    """
    Note that we are overestimating nodal demand aggregated over the time horizon
    since we are using the projected demand at the end of the time horizon as the
    recurring demand per year, which in real-life should scale year by year.
    """

    section = 'demand'
    option = 'projected nodal discounted demand'
    aliases = ['p_dem_d']
    dependencies = [
        ProjectedNodalDemandPerYear,
        finance.DiscountedCashFlowFactor,
    ]
    units = 'kilowatt-hours'

    def compute(self):
        return self.get(ProjectedNodalDemandPerYear) * self.get(finance.DiscountedCashFlowFactor)

Demand (peak)

Demand to peak demand conversion factor

Dependencies

Derivatives

class DemandToPeakDemandConversionFactor(V):

    section = 'demand (peak)'
    option = 'demand to peak demand conversion factor'
    aliases = ['dem_pkdemf']
    dependencies = [
        PeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours,
        PeakElectricalHoursOfOperationPerYear,
    ]

    def compute(self):
        return self.get(PeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours) / float(self.get(PeakElectricalHoursOfOperationPerYear))

Peak demand as fraction of nodal demand occurring during peak hours

Dependencies

Derivatives

class PeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours(V):

    section = 'demand (peak)'
    option = 'peak demand as fraction of nodal demand occurring during peak hours'
    aliases = ['pkdemf']
    dependencies = [
        RuralPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours,
        demographics.IsRural,
        UrbanPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours,
    ]

    def compute(self):
        return self.get(RuralPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours) if self.get(demographics.IsRural) else self.get(UrbanPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours)

Peak electrical hours of operation per year

Derivatives

class PeakElectricalHoursOfOperationPerYear(V):

    section = 'demand (peak)'
    option = 'peak electrical hours of operation per year'
    aliases = ['pkel_hr']
    c = dict(check=store.assertPositive)
    default = 1460
    units = 'hours per year'

Projected peak commercial facility demand

Dependencies

Derivatives

class ProjectedPeakCommercialFacilityDemand(V):

    section = 'demand (peak)'
    option = 'projected peak commercial facility demand'
    aliases = ['p_pkdem_co']
    dependencies = [
        ProjectedCommercialFacilityDemandPerYear,
        DemandToPeakDemandConversionFactor,
    ]
    units = 'kilowatts'

    def compute(self):
        return self.get(ProjectedCommercialFacilityDemandPerYear) * self.get(DemandToPeakDemandConversionFactor)

Projected peak nodal demand

Dependencies

Derivatives

class ProjectedPeakNodalDemand(V):

    section = 'demand (peak)'
    option = 'projected peak nodal demand'
    aliases = ['p_pkdem']
    dependencies = [
        ProjectedNodalDemandPerYear,
        DemandToPeakDemandConversionFactor,
    ]
    units = 'kilowatts'

    def compute(self):
        return self.get(ProjectedNodalDemandPerYear) * self.get(DemandToPeakDemandConversionFactor)

Projected peak productive demand

Dependencies

Derivatives

class ProjectedPeakProductiveDemand(V):

    section = 'demand (peak)'
    option = 'projected peak productive demand'
    aliases = ['p_pkdem_pr']
    dependencies = [
        ProjectedProductiveDemandPerYear,
        DemandToPeakDemandConversionFactor,
    ]
    units = 'kilowatts'

    def compute(self):
        return self.get(ProjectedProductiveDemandPerYear) * self.get(DemandToPeakDemandConversionFactor)

Rural peak demand as fraction of nodal demand occurring during peak hours

Derivatives

class RuralPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours(V):

    section = 'demand (peak)'
    option = 'peak demand as fraction of nodal demand occurring during peak hours (rural)'
    aliases = ['pkdemf_r']
    default = 0.4

Urban peak demand as fraction of nodal demand occurring during peak hours

Derivatives

class UrbanPeakDemandAsFractionOfNodalDemandOccurringDuringPeakHours(V):

    section = 'demand (peak)'
    option = 'peak demand as fraction of nodal demand occurring during peak hours (urban)'
    aliases = ['pkdemf_u']
    default = 0.4

Demand (household)

Household demand curve

Dependencies

Derivatives

class HouseholdDemandCurve(V):

    section = 'demand (household)'
    option = 'demand curve'
    aliases = ['ho_dc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        HouseholdDemandCurveType,
        HouseholdDemandCurvePoints,
    ]

    def compute(self):
        curveType = self.get(HouseholdDemandCurveType)
        curvePoints = self.get(HouseholdDemandCurvePoints)
        return curve.fit(curveType, curvePoints)

Household demand curve points

Derivatives

class HouseholdDemandCurvePoints(V):

    section = 'demand (household)'
    option = 'demand curve points (population and multiplier)'
    aliases = ['ho_dc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '500 1; 1000 1.56; 5000 6.16; 10000 11.5'
    units = 'population and multiplier list'

Household demand curve type

Derivatives

class HouseholdDemandCurveType(V):

    section = 'demand (household)'
    option = 'demand curve type'
    aliases = ['ho_dc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Household unit demand per household per year

Derivatives

class HouseholdUnitDemandPerHouseholdPerYear(V):

    section = 'demand (household)'
    option = 'household unit demand per household per year'
    aliases = ['ho_dc_unit']
    default = 0 # 100
    units = 'kilowatt-hours per year'

Projected household demand per year

Dependencies

Derivatives

class ProjectedHouseholdDemandPerYear(V):

    section = 'demand (household)'
    option = 'projected household demand per year'
    aliases = ['p_dem_ho']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        HouseholdDemandCurve,
        HouseholdUnitDemandPerHouseholdPerYear,
        demographics.ProjectedPopulationCount,
        TargetHouseholdCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(HouseholdDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(HouseholdUnitDemandPerHouseholdPerYear) * self.get(TargetHouseholdCount)

Target household count

Dependencies

Derivatives

class TargetHouseholdCount(V):

    section = 'demand (household)'
    option = 'target household count'
    aliases = ['ct_hh_t']
    c = dict(parse=store.parseCeilInteger)
    dependencies = [
        TargetHouseholdPenetrationRate,
        demographics.ProjectedHouseholdCount,
    ]
    units = 'households'

    def compute(self):
        return math.ceil(self.get(TargetHouseholdPenetrationRate) * self.get(demographics.ProjectedHouseholdCount))

Target household penetration rate

Derivatives

class TargetHouseholdPenetrationRate(V):

    section = 'demand (household)'
    option = 'target household penetration rate'
    default = 1

Demand (productive)

Productive demand curve

Dependencies

Derivatives

class ProductiveDemandCurve(V):

    section = 'demand (productive)'
    option = 'demand curve'
    aliases = ['pr_dc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        ProductiveDemandCurveType,
        ProductiveDemandCurvePoints,
    ]

    def compute(self):
        curveType = self.get(ProductiveDemandCurveType)
        curvePoints = self.get(ProductiveDemandCurvePoints)
        return curve.fit(curveType, curvePoints)

Productive demand curve points

Derivatives

class ProductiveDemandCurvePoints(V):

    section = 'demand (productive)'
    option = 'demand curve points (population and multiplier)'
    aliases = ['pr_dc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '500 1; 1000 3.06; 5000 3.57; 10000 5.10'
    units = 'population and multiplier list'

Productive demand curve type

Derivatives

class ProductiveDemandCurveType(V):

    section = 'demand (productive)'
    option = 'demand curve type'
    aliases = ['pr_dc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Productive unit demand per household per year

Derivatives

class ProductiveUnitDemandPerHouseholdPerYear(V):

    section = 'demand (productive)'
    option = 'productive unit demand per household per year'
    aliases = ['pr_dc_unit']
    default = 0 # 19.5
    units = 'kilowatt-hours per year'

Projected productive demand per year

Dependencies

Derivatives

class ProjectedProductiveDemandPerYear(V):
    """
    Productive demand is power for community resources such as water pumps
    and grinding mills.  By estimating productive demand on a per household
    basis, we do not have to estimate the number of water pumps or
    grinding mills that are shared by a village.  The number of water pumps
    or grinding mills is generally smaller than the number of households.
    """

    section = 'demand (productive)'
    option = 'projected productive demand'
    aliases = ['p_dem_pr']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        ProductiveDemandCurve,
        ProductiveUnitDemandPerHouseholdPerYear,
        demographics.ProjectedPopulationCount,
        TargetHouseholdCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(ProductiveDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(ProductiveUnitDemandPerHouseholdPerYear) * self.get(TargetHouseholdCount)

Demand (social infrastructure)

Commercial facility count curve

Dependencies

Derivatives

class CommercialFacilityCountCurve(V):

    section = 'demand (social infrastructure)'
    option = 'commercial facility count curve'
    aliases = ['co_cc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        CommercialFacilityCountCurveType,
        CommercialFacilityCountCurvePoints,
    ]

    def compute(self):
        curveType = self.get(CommercialFacilityCountCurveType)
        curvePoints = self.get(CommercialFacilityCountCurvePoints)
        return curve.fit(curveType, curvePoints)

Commercial facility count curve points

Derivatives

class CommercialFacilityCountCurvePoints(V):

    section = 'demand (social infrastructure)'
    option = 'commercial facility count curve points (population and facility count)'
    aliases = ['co_cc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '50 0.12; 500 1.2; 5000 25; 10000 125'
    units = 'population and facility count list'

Commercial facility count curve type

Derivatives

class CommercialFacilityCountCurveType(V):

    section = 'demand (social infrastructure)'
    option = 'commercial facility count curve type'
    aliases = ['co_cc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Commercial facility unit demand per commercial facility per year

Derivatives

class CommercialFacilityUnitDemandPerCommercialFacilityPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'commercial facility unit demand per commercial facility per year'
    aliases = ['co_dc_unit']
    default = 0 # 250
    units = 'kilowatt-hours per year'

Education facility count curve

Dependencies

Derivatives

class EducationFacilityCountCurve(V):

    section = 'demand (social infrastructure)'
    option = 'education facility count curve'
    aliases = ['ed_cc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        EducationFacilityCountCurveType,
        EducationFacilityCountCurvePoints,
    ]

    def compute(self):
        curveType = self.get(EducationFacilityCountCurveType)
        curvePoints = self.get(EducationFacilityCountCurvePoints)
        return curve.fit(curveType, curvePoints)

Education facility count curve points

Derivatives

class EducationFacilityCountCurvePoints(V):

    section = 'demand (social infrastructure)'
    option = 'education facility count curve points (population and facility count)'
    aliases = ['ed_cc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '50 0.1; 500 1; 5000 3; 10000 15'
    units = 'population and facility count list'

Education facility count curve type

Derivatives

class EducationFacilityCountCurveType(V):

    section = 'demand (social infrastructure)'
    option = 'education facility count curve type'
    aliases = ['ed_cc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Education facility unit demand per education facility per year

Derivatives

class EducationFacilityUnitDemandPerEducationFacilityPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'education facility unit demand per education facility per year'
    aliases = ['ed_dc_unit']
    default = 0 # 1200
    units = 'kilowatt-hours per year'

Health facility count curve

Dependencies

Derivatives

class HealthFacilityCountCurve(V):

    section = 'demand (social infrastructure)'
    option = 'health facility count curve'
    aliases = ['he_cc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        HealthFacilityCountCurveType,
        HealthFacilityCountCurvePoints,
    ]

    def compute(self):
        curveType = self.get(HealthFacilityCountCurveType)
        curvePoints = self.get(HealthFacilityCountCurvePoints)
        return curve.fit(curveType, curvePoints)

Health facility count curve points

Derivatives

class HealthFacilityCountCurvePoints(V):

    section = 'demand (social infrastructure)'
    option = 'health facility count curve points (population and facility count)'
    aliases = ['he_cc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '50 0.16; 500 1.6; 5000 5; 10000 20'
    units = 'population and facility count list'

Health facility count curve type

Derivatives

class HealthFacilityCountCurveType(V):

    section = 'demand (social infrastructure)'
    option = 'health facility count curve type'
    aliases = ['he_cc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Health facility unit demand per health facility per year

Derivatives

class HealthFacilityUnitDemandPerHealthFacilityPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'health facility unit demand per health facility per year'
    aliases = ['he_dc_unit']
    default = 0 # 1000
    units = 'kilowatt-hours per year'

Projected commercial facility count

Dependencies

Derivatives

class ProjectedCommercialFacilityCount(V):

    section = 'demand (social infrastructure)'
    option = 'projected commercial facility count'
    aliases = ['p_co']
    dependencies = [
        CommercialFacilityCountCurve,
        demographics.ProjectedPopulationCount,
    ]
    units = 'commercial facility count'

    def compute(self):
        return self.get(CommercialFacilityCountCurve).interpolate(self.get(demographics.ProjectedPopulationCount))

Projected commercial facility demand per year

Dependencies

Derivatives

class ProjectedCommercialFacilityDemandPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'projected commercial facility demand per year'
    aliases = ['p_dem_co']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        SocialInfrastructureDemandCurve,
        CommercialFacilityUnitDemandPerCommercialFacilityPerYear,
        demographics.ProjectedPopulationCount,
        ProjectedCommercialFacilityCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(SocialInfrastructureDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(CommercialFacilityUnitDemandPerCommercialFacilityPerYear) * self.get(ProjectedCommercialFacilityCount)

Projected education facility count

Dependencies

Derivatives

class ProjectedEducationFacilityCount(V):

    section = 'demand (social infrastructure)'
    option = 'projected education facility count'
    aliases = ['p_ed']
    dependencies = [
        EducationFacilityCountCurve,
        demographics.ProjectedPopulationCount,
    ]
    units = 'education facility count'

    def compute(self):
        return self.get(EducationFacilityCountCurve).interpolate(self.get(demographics.ProjectedPopulationCount))

Projected education facility demand per year

Dependencies

Derivatives

class ProjectedEducationFacilityDemandPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'projected education facility demand per year'
    aliases = ['p_dem_ed']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        SocialInfrastructureDemandCurve,
        EducationFacilityUnitDemandPerEducationFacilityPerYear,
        demographics.ProjectedPopulationCount,
        ProjectedEducationFacilityCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(SocialInfrastructureDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(EducationFacilityUnitDemandPerEducationFacilityPerYear) * self.get(ProjectedEducationFacilityCount)

Projected health facility count

Dependencies

Derivatives

class ProjectedHealthFacilityCount(V):

    section = 'demand (social infrastructure)'
    option = 'projected health facility count'
    aliases = ['p_he']
    dependencies = [
        HealthFacilityCountCurve,
        demographics.ProjectedPopulationCount,
    ]
    units = 'health facility count'

    def compute(self):
        return self.get(HealthFacilityCountCurve).interpolate(self.get(demographics.ProjectedPopulationCount))

Projected health facility demand per year

Dependencies

Derivatives

class ProjectedHealthFacilityDemandPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'projected health facility demand per year'
    aliases = ['p_dem_he']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        SocialInfrastructureDemandCurve,
        HealthFacilityUnitDemandPerHealthFacilityPerYear,
        demographics.ProjectedPopulationCount,
        ProjectedHealthFacilityCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(SocialInfrastructureDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(HealthFacilityUnitDemandPerHealthFacilityPerYear) * self.get(ProjectedHealthFacilityCount)

Projected public lighting facility count

Dependencies

Derivatives

class ProjectedPublicLightingFacilityCount(V):

    section = 'demand (social infrastructure)'
    option = 'projected public lighting facility count'
    aliases = ['p_li']
    dependencies = [
        PublicLightingFacilityCountCurve,
        demographics.ProjectedPopulationCount,
    ]
    units = 'public lighting facility count'

    def compute(self):
        return self.get(PublicLightingFacilityCountCurve).interpolate(self.get(demographics.ProjectedPopulationCount))

Projected public lighting facility demand per year

Dependencies

Derivatives

class ProjectedPublicLightingFacilityDemandPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'projected public lighting facility demand per year'
    aliases = ['p_dem_li']
    dependencies = [
        finance.ElectricityDemandMultiplier,
        SocialInfrastructureDemandCurve,
        PublicLightingFacilityUnitDemandPerPublicLightingFacilityPerYear,
        demographics.ProjectedPopulationCount,
        ProjectedPublicLightingFacilityCount,
    ]
    units = 'kilowatt-hours per year'

    def compute(self):
        return self.get(finance.ElectricityDemandMultiplier) * self.get(SocialInfrastructureDemandCurve).interpolate(self.get(demographics.ProjectedPopulationCount)) * self.get(PublicLightingFacilityUnitDemandPerPublicLightingFacilityPerYear) * self.get(ProjectedPublicLightingFacilityCount)

Public lighting facility count curve

Dependencies

Derivatives

class PublicLightingFacilityCountCurve(V):

    section = 'demand (social infrastructure)'
    option = 'public lighting facility count curve'
    aliases = ['li_cc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        PublicLightingFacilityCountCurveType,
        PublicLightingFacilityCountCurvePoints,
    ]

    def compute(self):
        curveType = self.get(PublicLightingFacilityCountCurveType)
        curvePoints = self.get(PublicLightingFacilityCountCurvePoints)
        return curve.fit(curveType, curvePoints)

Public lighting facility count curve points

Derivatives

class PublicLightingFacilityCountCurvePoints(V):

    section = 'demand (social infrastructure)'
    option = 'public lighting facility count curve points (population and facility count)'
    aliases = ['li_cc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '50 0.1; 500 1; 5000 7; 10000 25'
    units = 'population and facility count list'

Public lighting facility count curve type

Derivatives

class PublicLightingFacilityCountCurveType(V):

    section = 'demand (social infrastructure)'
    option = 'public lighting facility count curve type'
    aliases = ['li_cc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Public lighting facility unit demand per public lighting facility per year

Derivatives

class PublicLightingFacilityUnitDemandPerPublicLightingFacilityPerYear(V):

    section = 'demand (social infrastructure)'
    option = 'public lighting facility unit demand per public lighting facility per year'
    aliases = ['li_dc_unit']
    default = 0 # 102
    units = 'kilowatt-hours per year'

Social infrastructure demand curve

Dependencies

Derivatives

class SocialInfrastructureDemandCurve(V):

    section = 'demand (social infrastructure)'
    option = 'demand curve'
    aliases = ['so_dc']
    c = dict(parse=curve.parse, format=curve.format)
    dependencies = [
        SocialInfrastructureDemandCurveType,
        SocialInfrastructureDemandCurvePoints,
    ]

    def compute(self):
        curveType = self.get(SocialInfrastructureDemandCurveType)
        curvePoints = self.get(SocialInfrastructureDemandCurvePoints)
        return curve.fit(curveType, curvePoints)

Social infrastructure demand curve points

Derivatives

class SocialInfrastructureDemandCurvePoints(V):

    section = 'demand (social infrastructure)'
    option = 'demand curve points (population and multiplier)'
    aliases = ['so_dc_pts']
    c = dict(parse=store.unstringifyCoordinatesList, format=store.flattenCoordinatesList, validate='validateCoordinatesList')
    default = '500 1; 1000 1.5; 5000 2.25; 10000 3.375'
    units = 'population and multiplier list'

Social infrastructure demand curve type

Derivatives

class SocialInfrastructureDemandCurveType(V):

    section = 'demand (social infrastructure)'
    option = 'demand curve type'
    aliases = ['so_dc_t']
    c = dict(parse=str, input=curve.inputCurveType)
    default = 'ZeroLogisticLinear'

Distribution

Low voltage line cost per meter

Derivatives

class LowVoltageLineCostPerMeter(V):

    section = 'distribution'
    option = 'low voltage line cost per meter'
    aliases = ['di_ll_cm']
    default = 10
    units = 'dollars per meter'

Low voltage line equipment cost per connection

Derivatives

class LowVoltageLineEquipmentCostPerConnection(V):

    section = 'distribution'
    option = 'low voltage line equipment cost per connection'
    aliases = ['di_le_cc']
    default = 200
    units = 'dollars per connection'

Low voltage line equipment operations and maintenance cost per year as fraction of equipment cost

Derivatives

class LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYearAsFractionOfEquipmentCost(V):

    section = 'distribution'
    option = 'low voltage line equipment operations and maintenance cost as fraction of equipment cost'
    aliases = ['di_le_omf']
    default = 0.01

Low voltage line initial cost

Dependencies

Derivatives

class LowVoltageLineInitialCost(V):

    section = 'distribution'
    option = 'low voltage line initial cost'
    aliases = ['di_ll_ini']
    dependencies = [
        LowVoltageLineLength,
        LowVoltageLineCostPerMeter,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(LowVoltageLineCostPerMeter) * self.get(LowVoltageLineLength)

Low voltage line length

Dependencies

Derivatives

class LowVoltageLineLength(V):

    section = 'distribution'
    option = 'low voltage line length'
    aliases = ['di_ll_len']
    dependencies = [
        demographics.MeanInterhouseholdDistance,
        demand.TargetHouseholdCount,
    ]
    units = 'meters'

    def compute(self):
        # Load
        meanInterhouseholdDistance = self.get(demographics.MeanInterhouseholdDistance)
        targetHouseholdCount = self.get(demand.TargetHouseholdCount)
        # Return
        return meanInterhouseholdDistance * (targetHouseholdCount - 1) if targetHouseholdCount > 1 else 0

Low voltage line lifetime

Derivatives

class LowVoltageLineLifetime(V):

    section = 'distribution'
    option = 'low voltage line lifetime'
    aliases = ['di_ll_life']
    c = dict(check=store.assertPositive)
    default = 10
    units = 'years'

Low voltage line operations and maintenance cost per year

Dependencies

Derivatives

class LowVoltageLineOperationsAndMaintenanceCostPerYear(V):

    section = 'distribution'
    option = 'low voltage line operations and maintenance cost per year'
    aliases = ['di_ll_om']
    dependencies = [
        LowVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost,
        LowVoltageLineCostPerMeter,
        LowVoltageLineLength,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(LowVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost) * self.get(LowVoltageLineCostPerMeter) * self.get(LowVoltageLineLength)

Low voltage line operations and maintenance cost per year as fraction of line cost

Derivatives

class LowVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost(V):

    section = 'distribution'
    option = 'low voltage line operations and maintenance cost per year as fraction of line cost'
    aliases = ['di_ll_omf']
    default = 0.01

Low voltage line recurring cost per year

Dependencies

Derivatives

class LowVoltageLineRecurringCostPerYear(V):

    section = 'distribution'
    option = 'low voltage line recurring cost per year'
    aliases = ['di_ll_rec']
    dependencies = [
        LowVoltageLineOperationsAndMaintenanceCostPerYear,
        LowVoltageLineReplacementCostPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return sum([
            self.get(LowVoltageLineOperationsAndMaintenanceCostPerYear),
            self.get(LowVoltageLineReplacementCostPerYear),
        ])

Low voltage line replacement cost per year

Dependencies

Derivatives

class LowVoltageLineReplacementCostPerYear(V):

    section = 'distribution'
    option = 'low voltage line replacement cost per year'
    aliases = ['di_ll_rep']
    dependencies = [
        LowVoltageLineInitialCost,
        LowVoltageLineLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(LowVoltageLineInitialCost) / float(self.get(LowVoltageLineLifetime))

System (off-grid)

Diesel component initial cost

Dependencies

Derivatives

class DieselComponentInitialCost(costMiniGrid.MiniGridSystemInitialCost):

    section = 'system (off-grid)'
    option = 'diesel component initial cost'
    aliases = ['og_d_ini']
    dependencies = [
        DieselGeneratorCost,
        DieselGeneratorInstallationCost,
    ]

    def compute(self):
        return sum([
            self.get(DieselGeneratorCost),
            self.get(DieselGeneratorInstallationCost),
        ])

Diesel component recurring cost per year

Dependencies

Derivatives

class DieselComponentRecurringCostPerYear(costMiniGrid.MiniGridSystemRecurringCostPerYear):

    section = 'system (off-grid)'
    option = 'diesel component recurring cost per year'
    aliases = ['og_d_rec']
    dependencies = [
        DieselGeneratorOperationsAndMaintenanceCostPerYear,
        DieselGeneratorReplacementCostPerYear,
        DieselFuelCostPerYear,
    ]

    def compute(self):
        return sum([
            self.get(DieselGeneratorOperationsAndMaintenanceCostPerYear),
            self.get(DieselGeneratorReplacementCostPerYear),
            self.get(DieselFuelCostPerYear),
        ])

Diesel fuel cost per year

Dependencies

Derivatives

class DieselFuelCostPerYear(costMiniGrid.DieselFuelCostPerYear):

    section = 'system (off-grid)'
    aliases = ['og_fl']
    dependencies = [
        costMiniGrid.DieselFuelCostPerLiter,
        costMiniGrid.DieselFuelLitersConsumedPerKilowattHour,
        DieselGeneratorActualSystemCapacity,
        DieselGeneratorEffectiveHoursOfOperationPerYear,
    ]

    def compute(self):
        return self.get(costMiniGrid.DieselFuelCostPerLiter) * self.get(costMiniGrid.DieselFuelLitersConsumedPerKilowattHour) * self.get(DieselGeneratorActualSystemCapacity) * self.get(DieselGeneratorEffectiveHoursOfOperationPerYear)

Diesel generator actual system capacity

Dependencies

Derivatives

class DieselGeneratorActualSystemCapacity(costMiniGrid.DieselGeneratorActualSystemCapacity):

    section = 'system (off-grid)'
    aliases = ['og_dg_acp']
    dependencies = [
        DieselGeneratorAvailableSystemCapacities,
        DieselGeneratorActualSystemCapacityCounts,
    ]

    def compute(self):
        return numpy.dot(
            self.get(DieselGeneratorAvailableSystemCapacities),
            self.get(DieselGeneratorActualSystemCapacityCounts))

Diesel generator actual system capacity counts

Dependencies

Derivatives

class DieselGeneratorActualSystemCapacityCounts(costMiniGrid.DieselGeneratorActualSystemCapacityCounts):

    section = 'system (off-grid)'
    aliases = ['og_dg_acps']
    dependencies = [
        DieselGeneratorDesiredSystemCapacity,
        DieselGeneratorAvailableSystemCapacities,
    ]

    def compute(self):
        return metric.computeSystemCounts(
            self.get(DieselGeneratorDesiredSystemCapacity),
            self.get(DieselGeneratorAvailableSystemCapacities))

Diesel generator available system capacities

Derivatives

class DieselGeneratorAvailableSystemCapacities(costMiniGrid.DieselGeneratorAvailableSystemCapacities):

    section = 'system (off-grid)'
    default = '1000 750 500 400 200 150 100 70 32 19 12 10 8 6'
    aliases = ['og_dg_cps']

Diesel generator cost

Dependencies

Derivatives

class DieselGeneratorCost(costMiniGrid.DieselGeneratorCost):

    section = 'system (off-grid)'
    aliases = ['og_dg_ini']
    dependencies = [
        costMiniGrid.DieselGeneratorCostPerDieselSystemKilowatt,
        DieselGeneratorActualSystemCapacity,
    ]

    def compute(self):
        return self.get(costMiniGrid.DieselGeneratorCostPerDieselSystemKilowatt) * self.get(DieselGeneratorActualSystemCapacity)

Diesel generator desired system capacity

Dependencies

Derivatives

class DieselGeneratorDesiredSystemCapacity(costMiniGrid.DieselGeneratorDesiredSystemCapacity):

    section = 'system (off-grid)'
    aliases = ['og_dg_dcp']
    dependencies = [
        demand.ProjectedPeakCommercialFacilityDemand,
        demand.ProjectedPeakProductiveDemand,
    ]

    def compute(self):
        return sum([
            self.get(demand.ProjectedPeakCommercialFacilityDemand),
            self.get(demand.ProjectedPeakProductiveDemand),
        ])

Diesel generator effective hours of operation per year

Dependencies

Derivatives

class DieselGeneratorEffectiveHoursOfOperationPerYear(V):

    section = 'system (off-grid)'
    option = 'diesel generator hours of operation per year (effective)'
    aliases = ['og_dg_efhr']
    dependencies = [
        demand.ProjectedCommercialFacilityDemandPerYear,
        demand.ProjectedProductiveDemandPerYear,
        DieselGeneratorMinimumHoursOfOperationPerYear,
        DieselGeneratorActualSystemCapacity,
    ]
    units = 'hours per year'

    def compute(self):
        # Initialize
        dieselGeneratorActualSystemCapacity = self.get(DieselGeneratorActualSystemCapacity)
        # If the capacity of the diesel generator is zero,
        if dieselGeneratorActualSystemCapacity == 0:
            # Return zero hours of operation
            return 0
        # Compute effectiveDemandPerYear and assume an off-grid diesel generator does NOT have distribution loss
        effectiveDemandPerYear = self.get(demand.ProjectedCommercialFacilityDemandPerYear) + self.get(demand.ProjectedProductiveDemandPerYear)
        # Return
        return max(self.get(DieselGeneratorMinimumHoursOfOperationPerYear), effectiveDemandPerYear / float(dieselGeneratorActualSystemCapacity))

Diesel generator installation cost

Dependencies

Derivatives

class DieselGeneratorInstallationCost(costMiniGrid.DieselGeneratorInstallationCost):

    section = 'system (off-grid)'
    aliases = ['og_dg_i']
    dependencies = [
        costMiniGrid.DieselGeneratorInstallationCostAsFractionOfGeneratorCost,
        DieselGeneratorCost,
    ]

    def compute(self):
        return self.get(costMiniGrid.DieselGeneratorInstallationCostAsFractionOfGeneratorCost) * self.get(DieselGeneratorCost)

Diesel generator minimum hours of operation per year

Derivatives

class DieselGeneratorMinimumHoursOfOperationPerYear(V):

    section = 'system (off-grid)'
    option = 'diesel generator hours of operation per year (minimum)'
    aliases = ['og_dg_mnhr']
    default = 1460
    units = 'hours per year'

Diesel generator operations and maintenance cost per year

Dependencies

Derivatives

class DieselGeneratorOperationsAndMaintenanceCostPerYear(costMiniGrid.DieselGeneratorOperationsAndMaintenanceCostPerYear):

    section = 'system (off-grid)'
    aliases = ['og_dg_om']
    dependencies = [
        costMiniGrid.DieselGeneratorOperationsAndMaintenanceCostPerYearAsFractionOfGeneratorCost,
        DieselGeneratorCost,
    ]

    def compute(self):
        return self.get(costMiniGrid.DieselGeneratorOperationsAndMaintenanceCostPerYearAsFractionOfGeneratorCost) * self.get(DieselGeneratorCost)

Diesel generator replacement cost per year

Dependencies

Derivatives

class DieselGeneratorReplacementCostPerYear(costMiniGrid.DieselGeneratorReplacementCostPerYear):

    section = 'system (off-grid)'
    aliases = ['og_dg_rep']
    dependencies = [
        DieselGeneratorCost,
        costMiniGrid.DieselGeneratorLifetime,
    ]

    def compute(self):
        return self.get(DieselGeneratorCost) / float(self.get(costMiniGrid.DieselGeneratorLifetime))

Off grid system initial cost

Dependencies

Derivatives

class OffGridSystemInitialCost(V):

    section = 'system (off-grid)'
    option = 'system initial cost'
    aliases = ['og_ini']
    dependencies = [
        PhotovoltaicComponentInitialCost,
        DieselComponentInitialCost,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(PhotovoltaicComponentInitialCost) + self.get(DieselComponentInitialCost)

Off grid system nodal discounted cost

Dependencies

Derivatives

class OffGridSystemNodalDiscountedCost(V):

    section = 'system (off-grid)'
    option = 'system nodal discounted cost'
    aliases = ['og_nod_d']
    dependencies = [
        demand.ProjectedNodalDemandPerYear,
        OffGridSystemInitialCost,
        OffGridSystemRecurringCostPerYear,
        finance.DiscountedCashFlowFactor,
    ]
    units = 'dollars'

    def compute(self):
        if self.get(demand.ProjectedNodalDemandPerYear) == 0:
            return 0
        return self.get(OffGridSystemInitialCost) + self.get(OffGridSystemRecurringCostPerYear) * self.get(finance.DiscountedCashFlowFactor)

Off grid system nodal levelized cost

Dependencies

Derivatives

class OffGridSystemNodalLevelizedCost(V):

    section = 'system (off-grid)'
    option = 'system nodal levelized cost'
    aliases = ['og_nod_lev']
    dependencies = [
        demand.ProjectedNodalDiscountedDemand,
        OffGridSystemNodalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(demand.ProjectedNodalDiscountedDemand) == 0:
            return 0
        return self.get(OffGridSystemNodalDiscountedCost) / float(self.get(demand.ProjectedNodalDiscountedDemand))

Off grid system recurring cost per year

Dependencies

Derivatives

class OffGridSystemRecurringCostPerYear(V):

    section = 'system (off-grid)'
    option = 'system recurring cost per year'
    aliases = ['og_rec']
    dependencies = [
        PhotovoltaicComponentRecurringCostPerYear,
        DieselComponentRecurringCostPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicComponentRecurringCostPerYear) + self.get(DieselComponentRecurringCostPerYear)

Off grid system total discounted cost

Derivatives

class OffGridSystemTotalDiscountedCost(V):

    section = 'system (off-grid)'
    option = 'system total discounted cost'
    aliases = ['og_tot_d']
    default = 0
    units = 'dollars'

    def aggregate(self, childVS):
        # If the system is off-grid,
        if childVS.get(System)[0] == 'o':
            # Update
            self.value += childVS.get(costOffGrid.OffGridSystemNodalDiscountedCost)

Off grid system total discounted demand

Derivatives

class OffGridSystemTotalDiscountedDemand(V):

    section = 'system (off-grid)'
    option = 'system total discounted demand'
    aliases = ['og_dem_d']
    default = 0
    units = 'kilowatt-hours'

    def aggregate(self, childVS):
        # If the system is off-grid,
        if childVS.get(System)[0] == 'o':
            # Update
            self.value += childVS.get(demand.ProjectedNodalDiscountedDemand)

Off grid system total levelized cost

Dependencies

class OffGridSystemTotalLevelizedCost(V):

    section = 'system (off-grid)'
    option = 'system total levelized cost'
    aliases = ['og_tot_lev']
    dependencies = [
        OffGridSystemTotalDiscountedDemand,
        OffGridSystemTotalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(OffGridSystemTotalDiscountedDemand) == 0:
            return 0
        return self.get(OffGridSystemTotalDiscountedCost) / float(self.get(OffGridSystemTotalDiscountedDemand))

Peak sun hours per year

Derivatives

class PeakSunHoursPerYear(V):
    """
    Peak sun hours is the number of hours per year during which sunlight
    is considered brightest for a given location.
    """

    section = 'system (off-grid)'
    option = 'peak sun hours per year'
    aliases = ['pksu_hr']
    c = dict(check=store.assertPositive)
    default = 1320
    units = 'hours per year'

Photovoltaic balance cost

Dependencies

Derivatives

class PhotovoltaicBalanceCost(V):
    """
    The balance consists of the parts of the photovoltaic system besides
    the panels and the batteries.
    """

    section = 'system (off-grid)'
    option = 'photovoltaic balance cost'
    aliases = ['og_px_ini']
    dependencies = [
        PhotovoltaicBalanceCostAsFractionOfPanelCost,
        PhotovoltaicPanelCost,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(PhotovoltaicBalanceCostAsFractionOfPanelCost) * self.get(PhotovoltaicPanelCost)

Photovoltaic balance cost as fraction of panel cost

Derivatives

class PhotovoltaicBalanceCostAsFractionOfPanelCost(V):

    section = 'system (off-grid)'
    option = 'photovoltaic balance cost as fraction of panel cost'
    aliases = ['og_px_cf']
    default = 0.5

Photovoltaic balance lifetime

Derivatives

class PhotovoltaicBalanceLifetime(V):

    section = 'system (off-grid)'
    option = 'photovoltaic balance lifetime'
    aliases = ['og_px_life']
    c = dict(check=store.assertPositive)
    default = 10
    units = 'years'

Photovoltaic balance replacement cost per year

Dependencies

Derivatives

class PhotovoltaicBalanceReplacementCostPerYear(V):

    section = 'system (off-grid)'
    option = 'photovoltaic balance replacement cost per year'
    aliases = ['og_px_rep']
    dependencies = [
        PhotovoltaicBalanceCost,
        PhotovoltaicBalanceLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicBalanceCost) / float(self.get(PhotovoltaicBalanceLifetime))

Photovoltaic battery cost

Dependencies

Derivatives

class PhotovoltaicBatteryCost(V):

    section = 'system (off-grid)'
    option = 'photovoltaic battery cost'
    aliases = ['og_pb_ini']
    dependencies = [
        PhotovoltaicBatteryCostPerKilowattHour,
        PhotovoltaicBatteryKilowattHoursPerPhotovoltaicComponentKilowatt,
        PhotovoltaicPanelActualSystemCapacity,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(PhotovoltaicBatteryCostPerKilowattHour) * self.get(PhotovoltaicBatteryKilowattHoursPerPhotovoltaicComponentKilowatt) * self.get(PhotovoltaicPanelActualSystemCapacity)

Photovoltaic battery cost per kilowatt hour

Derivatives

class PhotovoltaicBatteryCostPerKilowattHour(V):

    section = 'system (off-grid)'
    option = 'photovoltaic battery cost per kilowatt-hour'
    aliases = ['og_pb_ckwh']
    default = 400
    units = 'dollars per kilowatt-hour'

Photovoltaic battery kilowatt hours per photovoltaic component kilowatt

Derivatives

class PhotovoltaicBatteryKilowattHoursPerPhotovoltaicComponentKilowatt(V):

    section = 'system (off-grid)'
    option = 'photovoltaic battery kilowatt-hours per photovoltaic component kilowatt'
    aliases = ['og_pb_hkw']
    default = 5
    units = 'kilowatt-hours per kilowatt'

Photovoltaic battery lifetime

Derivatives

class PhotovoltaicBatteryLifetime(V):

    section = 'system (off-grid)'
    option = 'photovoltaic battery lifetime'
    aliases = ['og_pb_life']
    c = dict(check=store.assertPositive)
    default = 3
    units = 'years'

Photovoltaic battery replacement cost per year

Dependencies

Derivatives

class PhotovoltaicBatteryReplacementCostPerYear(V):

    section = 'system (off-grid)'
    option = 'photovoltaic battery replacement cost per year'
    aliases = ['og_pb_rep']
    dependencies = [
        PhotovoltaicBatteryCost,
        PhotovoltaicBatteryLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicBatteryCost) / float(self.get(PhotovoltaicBatteryLifetime))

Photovoltaic component efficiency loss

Derivatives

class PhotovoltaicComponentEfficiencyLoss(V):

    section = 'system (off-grid)'
    option = 'photovoltaic component efficiency loss'
    aliases = ['og_p_loss']
    c = dict(check=store.assertLessThanOne)
    default = 0.1
    units = 'fraction'

Photovoltaic component initial cost

Dependencies

Derivatives

class PhotovoltaicComponentInitialCost(V):

    section = 'system (off-grid)'
    option = 'photovoltaic component initial cost'
    aliases = ['og_p_ini']
    dependencies = [
        PhotovoltaicPanelCost,
        PhotovoltaicBatteryCost,
        PhotovoltaicBalanceCost,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(PhotovoltaicPanelCost) + self.get(PhotovoltaicBatteryCost) + self.get(PhotovoltaicBalanceCost)

Photovoltaic component operations and maintenance cost per year

Dependencies

Derivatives

class PhotovoltaicComponentOperationsAndMaintenanceCostPerYear(V):

    section = 'system (off-grid)'
    option = 'photovoltaic component operations and maintenance cost per year'
    aliases = ['og_p_om']
    dependencies = [
        PhotovoltaicComponentOperationsAndMaintenanceCostPerYearAsFractionOfComponentCost,
        PhotovoltaicComponentInitialCost,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicComponentOperationsAndMaintenanceCostPerYearAsFractionOfComponentCost) * self.get(PhotovoltaicComponentInitialCost)

Photovoltaic component operations and maintenance cost per year as fraction of component cost

Derivatives

class PhotovoltaicComponentOperationsAndMaintenanceCostPerYearAsFractionOfComponentCost(V):

    section = 'system (off-grid)'
    option = 'photovoltaic component operations and maintenance cost per year as fraction of component cost'
    aliases = ['og_p_omf']
    default = 0.05

Photovoltaic component recurring cost per year

Dependencies

Derivatives

class PhotovoltaicComponentRecurringCostPerYear(V):

    section = 'system (off-grid)'
    option = 'photovoltaic component recurring cost per year'
    aliases = ['og_p_rec']
    dependencies = [
        PhotovoltaicPanelReplacementCostPerYear,
        PhotovoltaicBatteryReplacementCostPerYear,
        PhotovoltaicBalanceReplacementCostPerYear,
        PhotovoltaicComponentOperationsAndMaintenanceCostPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicPanelReplacementCostPerYear) + self.get(PhotovoltaicBatteryReplacementCostPerYear) + self.get(PhotovoltaicBalanceReplacementCostPerYear) + self.get(PhotovoltaicComponentOperationsAndMaintenanceCostPerYear)

Photovoltaic panel actual system capacity

Dependencies

Derivatives

class PhotovoltaicPanelActualSystemCapacity(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel actual capacity'
    aliases = ['og_pp_acp']
    dependencies = [
        PhotovoltaicPanelAvailableSystemCapacities,
        PhotovoltaicPanelActualSystemCapacityCounts,
    ]
    units = 'kilowatts'

    def compute(self):
        return numpy.dot(
            self.get(PhotovoltaicPanelAvailableSystemCapacities),
            self.get(PhotovoltaicPanelActualSystemCapacityCounts))

Photovoltaic panel actual system capacity counts

Dependencies

Derivatives

class PhotovoltaicPanelActualSystemCapacityCounts(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel actual capacity counts'
    aliases = ['og_pp_acps']
    c = dict(parse=store.unstringifyIntegerList, format=store.flattenList, validate='validateNumberList')
    dependencies = [
        PhotovoltaicPanelDesiredSystemCapacity,
        PhotovoltaicPanelAvailableSystemCapacities,
    ]
    units = 'capacity count list'

    def compute(self):
        return metric.computeSystemCounts(
            self.get(PhotovoltaicPanelDesiredSystemCapacity),
            self.get(PhotovoltaicPanelAvailableSystemCapacities))

Photovoltaic panel available system capacities

Derivatives

class PhotovoltaicPanelAvailableSystemCapacities(V):

    section = 'system (off-grid)'
    option = 'available system capacities (photovoltaic panel)'
    aliases = ['og_pp_cps']
    c = dict(parse=store.unstringifyDescendingFloatList, format=store.flattenList, validate='validateNumberList')
    default = '1.5 1.0 0.4 0.15 0.075 0.05'
    units = 'kilowatts list'

Photovoltaic panel cost

Dependencies

Derivatives

class PhotovoltaicPanelCost(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel cost'
    aliases = ['og_pp_ini']
    dependencies = [
        PhotovoltaicPanelCostPerPhotovoltaicComponentKilowatt,
        PhotovoltaicPanelActualSystemCapacity,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(PhotovoltaicPanelCostPerPhotovoltaicComponentKilowatt) * self.get(PhotovoltaicPanelActualSystemCapacity)

Photovoltaic panel cost per photovoltaic component kilowatt

Derivatives

class PhotovoltaicPanelCostPerPhotovoltaicComponentKilowatt(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel cost per photovoltaic component kilowatt'
    aliases = ['og_pp_ckw']
    default = 6000
    units = 'dollars per kilowatt'

Photovoltaic panel desired system capacity

Dependencies

Derivatives

class PhotovoltaicPanelDesiredSystemCapacity(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel desired capacity'
    aliases = ['og_pp_dcp']
    dependencies = [
        demand.ProjectedHouseholdDemandPerYear,
        demand.ProjectedHealthFacilityDemandPerYear,
        demand.ProjectedEducationFacilityDemandPerYear,
        demand.ProjectedPublicLightingFacilityDemandPerYear,
        PhotovoltaicComponentEfficiencyLoss,
        PeakSunHoursPerYear,
    ]
    units = 'kilowatts'

    def compute(self):
        # Computed effectiveDemandPerYear scaled by photovoltaic component loss
        effectiveDemandPerYear = sum([
            self.get(demand.ProjectedHouseholdDemandPerYear),
            self.get(demand.ProjectedHealthFacilityDemandPerYear),
            self.get(demand.ProjectedEducationFacilityDemandPerYear),
            self.get(demand.ProjectedPublicLightingFacilityDemandPerYear),
        ]) / float(1 - self.get(PhotovoltaicComponentEfficiencyLoss))
        # Return
        return effectiveDemandPerYear / float(self.get(PeakSunHoursPerYear))

Photovoltaic panel lifetime

Derivatives

class PhotovoltaicPanelLifetime(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel lifetime'
    aliases = ['og_pp_life']
    c = dict(check=store.assertPositive)
    default = 30
    units = 'years'

Photovoltaic panel replacement cost per year

Dependencies

Derivatives

class PhotovoltaicPanelReplacementCostPerYear(V):

    section = 'system (off-grid)'
    option = 'photovoltaic panel replacement cost per year'
    aliases = ['og_pp_rep']
    dependencies = [
        PhotovoltaicPanelCost,
        PhotovoltaicPanelLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(PhotovoltaicPanelCost) / float(self.get(PhotovoltaicPanelLifetime))

System (mini-grid)

Diesel fuel cost per liter

Derivatives

class DieselFuelCostPerLiter(V):

    section = 'system (mini-grid)'
    option = 'diesel fuel cost per liter'
    aliases = ['mg_fl_cl']
    default = 1.08
    units = 'dollars per liter'

Diesel fuel cost per year

Dependencies

Derivatives

class DieselFuelCostPerYear(V):

    section = 'system (mini-grid)'
    option = 'diesel fuel cost per year'
    aliases = ['mg_fl']
    dependencies = [
        DieselFuelCostPerLiter,
        DieselFuelLitersConsumedPerKilowattHour,
        DieselGeneratorActualSystemCapacity,
        DieselGeneratorEffectiveHoursOfOperationPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(DieselFuelCostPerLiter) * self.get(DieselFuelLitersConsumedPerKilowattHour) * self.get(DieselGeneratorActualSystemCapacity) * self.get(DieselGeneratorEffectiveHoursOfOperationPerYear)

Diesel fuel liters consumed per kilowatt hour

Derivatives

class DieselFuelLitersConsumedPerKilowattHour(V):

    section = 'system (mini-grid)'
    option = 'diesel fuel liters consumed per kilowatt-hour'
    aliases = ['mg_fl_lkwh']
    default = 0.5
    units = 'liters per kilowatt-hour'

Diesel generator actual system capacity

Dependencies

Derivatives

class DieselGeneratorActualSystemCapacity(V):

    section = 'system (mini-grid)'
    option = 'diesel generator actual system capacity'
    aliases = ['mg_dg_acp']
    dependencies = [
        DieselGeneratorAvailableSystemCapacities,
        DieselGeneratorActualSystemCapacityCounts,
    ]
    units = 'kilowatts'

    def compute(self):
        return numpy.dot(
            self.get(DieselGeneratorAvailableSystemCapacities),
            self.get(DieselGeneratorActualSystemCapacityCounts))

Diesel generator actual system capacity counts

Dependencies

Derivatives

class DieselGeneratorActualSystemCapacityCounts(V):

    section = 'system (mini-grid)'
    option = 'diesel generator actual system capacity counts'
    aliases = ['mg_dg_acps']
    c = dict(parse=store.unstringifyIntegerList, format=store.flattenList, validate='validateNumberList')
    dependencies = [
        DieselGeneratorDesiredSystemCapacity,
        DieselGeneratorAvailableSystemCapacities,
    ]
    units = 'capacity count list'

    def compute(self):
        return metric.computeSystemCounts(
            self.get(DieselGeneratorDesiredSystemCapacity),
            self.get(DieselGeneratorAvailableSystemCapacities))

Diesel generator available system capacities

Derivatives

class DieselGeneratorAvailableSystemCapacities(V):

    section = 'system (mini-grid)'
    option = 'available system capacities (diesel generator)'
    aliases = ['mg_dg_cps']
    c = dict(parse=store.unstringifyDescendingFloatList, format=store.flattenList, validate='validateNumberList')
    default = '1000 750 500 400 200 150 100 70 32 19 12 6'
    units = 'kilowatts list'

Diesel generator cost

Dependencies

Derivatives

class DieselGeneratorCost(V):

    section = 'system (mini-grid)'
    option = 'diesel generator cost'
    aliases = ['mg_dg_ini']
    dependencies = [
        DieselGeneratorCostPerDieselSystemKilowatt,
        DieselGeneratorActualSystemCapacity,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(DieselGeneratorCostPerDieselSystemKilowatt) * self.get(DieselGeneratorActualSystemCapacity)

Diesel generator cost per diesel system kilowatt

Derivatives

class DieselGeneratorCostPerDieselSystemKilowatt(V):

    section = 'system (mini-grid)'
    option = 'diesel generator cost per diesel system kilowatt'
    aliases = ['mg_dg_ck']
    default = 150
    units = 'dollars per kilowatt'

Diesel generator desired system capacity

Dependencies

Derivatives

class DieselGeneratorDesiredSystemCapacity(V):

    section = 'system (mini-grid)'
    option = 'diesel generator desired system capacity'
    aliases = ['mg_dg_dcp']
    dependencies = [
        demand.ProjectedPeakNodalDemand,
        DistributionLoss,
    ]
    units = 'kilowatts'

    def compute(self):
        return self.get(demand.ProjectedPeakNodalDemand) / float(1 - self.get(DistributionLoss))

Diesel generator effective hours of operation per year

Dependencies

Derivatives

class DieselGeneratorEffectiveHoursOfOperationPerYear(V):

    section = 'system (mini-grid)'
    option = 'diesel generator hours of operation per year (effective)'
    aliases = ['mg_dg_efhr']
    dependencies = [
        demand.ProjectedNodalDemandPerYear,
        DistributionLoss,
        DieselGeneratorMinimumHoursOfOperationPerYear,
        DieselGeneratorActualSystemCapacity,
    ]
    units = 'hours per year'

    def compute(self):
        # Initialize
        dieselGeneratorActualSystemCapacity = self.get(DieselGeneratorActualSystemCapacity)
        # If the capacity of the diesel generator is zero,
        if dieselGeneratorActualSystemCapacity == 0:
            # Return zero hours of operation
            return 0
        # Compute effectiveDemandPerYear and assume a mini-grid diesel generator has distribution loss
        effectiveDemandPerYear = self.get(demand.ProjectedNodalDemandPerYear) / float(1 - self.get(DistributionLoss))
        # Return
        return max(self.get(DieselGeneratorMinimumHoursOfOperationPerYear), effectiveDemandPerYear / float(dieselGeneratorActualSystemCapacity))

Diesel generator installation cost

Dependencies

Derivatives

class DieselGeneratorInstallationCost(V):

    section = 'system (mini-grid)'
    option = 'diesel generator installation cost'
    aliases = ['mg_dg_i']
    dependencies = [
        DieselGeneratorInstallationCostAsFractionOfGeneratorCost,
        DieselGeneratorCost,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(DieselGeneratorInstallationCostAsFractionOfGeneratorCost) * self.get(DieselGeneratorCost)

Diesel generator installation cost as fraction of generator cost

Derivatives

class DieselGeneratorInstallationCostAsFractionOfGeneratorCost(V):

    section = 'system (mini-grid)'
    aliases = ['mg_dg_if']
    option = 'diesel generator installation cost as fraction of generator cost'
    default = 0.25

Diesel generator lifetime

Derivatives

class DieselGeneratorLifetime(V):

    section = 'system (mini-grid)'
    option = 'diesel generator lifetime'
    aliases = ['mg_dg_life']
    c = dict(check=store.assertPositive)
    default = 5
    units = 'years'

Diesel generator minimum hours of operation per year

Derivatives

class DieselGeneratorMinimumHoursOfOperationPerYear(V):

    section = 'system (mini-grid)'
    option = 'diesel generator hours of operation per year (minimum)'
    aliases = ['mg_dg_mnhr']
    default = 1460
    units = 'hours per year'

Diesel generator operations and maintenance cost per year

Dependencies

Derivatives

class DieselGeneratorOperationsAndMaintenanceCostPerYear(V):

    section = 'system (mini-grid)'
    option = 'diesel generator operations and maintenance cost per year'
    aliases = ['mg_dg_om']
    dependencies = [
        DieselGeneratorOperationsAndMaintenanceCostPerYearAsFractionOfGeneratorCost,
        DieselGeneratorCost,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(DieselGeneratorOperationsAndMaintenanceCostPerYearAsFractionOfGeneratorCost) * self.get(DieselGeneratorCost)

Diesel generator operations and maintenance cost per year as fraction of generator cost

Derivatives

class DieselGeneratorOperationsAndMaintenanceCostPerYearAsFractionOfGeneratorCost(V):

    section = 'system (mini-grid)'
    option = 'diesel generator operations and maintenance cost per year as fraction of generator cost'
    aliases = ['mg_dg_omf']
    default = 0.01

Diesel generator replacement cost per year

Dependencies

Derivatives

class DieselGeneratorReplacementCostPerYear(V):

    section = 'system (mini-grid)'
    option = 'diesel generator replacement cost per year'
    aliases = ['mg_dg_rep']
    dependencies = [
        DieselGeneratorCost,
        DieselGeneratorLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(DieselGeneratorCost) / float(self.get(DieselGeneratorLifetime))

Distribution loss

Derivatives

class DistributionLoss(V):

    section = 'system (mini-grid)'
    option = 'distribution loss'
    aliases = ['mg_loss']
    c = dict(check=store.assertLessThanOne)
    default = 0.10
    units = 'fraction'

Low voltage line equipment cost

Dependencies

Derivatives

class LowVoltageLineEquipmentCost(V):

    section = 'system (mini-grid)'
    option = 'low voltage line equipment cost'
    aliases = ['mg_le']
    dependencies = [
        costDistribution.LowVoltageLineEquipmentCostPerConnection,
        demand.TargetHouseholdCount,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(costDistribution.LowVoltageLineEquipmentCostPerConnection) * self.get(demand.TargetHouseholdCount)

Low voltage line equipment operations and maintenance cost per year

Dependencies

Derivatives

class LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear(V):

    section = 'system (mini-grid)'
    option = 'low voltage line equipment operations and maintenance cost per year'
    aliases = ['mg_le_om']
    dependencies = [
        costDistribution.LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYearAsFractionOfEquipmentCost,
        LowVoltageLineEquipmentCost,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(costDistribution.LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYearAsFractionOfEquipmentCost) * self.get(LowVoltageLineEquipmentCost)

Mini grid system initial cost

Dependencies

Derivatives

class MiniGridSystemInitialCost(V):

    section = 'system (mini-grid)'
    option = 'system initial cost'
    aliases = ['mg_ini']
    dependencies = [
        DieselGeneratorCost,
        DieselGeneratorInstallationCost,
        LowVoltageLineEquipmentCost,
        costDistribution.LowVoltageLineInitialCost,
    ]
    units = 'dollars'

    def compute(self):
        return sum([
            self.get(DieselGeneratorCost),
            self.get(DieselGeneratorInstallationCost),
            self.get(LowVoltageLineEquipmentCost),
            self.get(costDistribution.LowVoltageLineInitialCost),
        ])

Mini grid system nodal discounted cost

Dependencies

Derivatives

class MiniGridSystemNodalDiscountedCost(V):

    section = 'system (mini-grid)'
    option = 'system nodal discounted cost'
    aliases = ['mg_nod_d']
    dependencies = [
        demand.ProjectedNodalDemandPerYear,
        MiniGridSystemInitialCost,
        MiniGridSystemRecurringCostPerYear,
        finance.DiscountedCashFlowFactor,
    ]
    units = 'dollars'

    def compute(self):
        if self.get(demand.ProjectedNodalDemandPerYear) == 0:
            return 0
        return self.get(MiniGridSystemInitialCost) + self.get(MiniGridSystemRecurringCostPerYear) * self.get(finance.DiscountedCashFlowFactor)

Mini grid system nodal levelized cost

Dependencies

Derivatives

class MiniGridSystemNodalLevelizedCost(V):

    section = 'system (mini-grid)'
    option = 'system nodal levelized cost'
    aliases = ['mg_nod_lev']
    dependencies = [
        demand.ProjectedNodalDiscountedDemand,
        MiniGridSystemNodalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(demand.ProjectedNodalDiscountedDemand) == 0:
            return 0
        return self.get(MiniGridSystemNodalDiscountedCost) / float(self.get(demand.ProjectedNodalDiscountedDemand))

Mini grid system recurring cost per year

Dependencies

Derivatives

class MiniGridSystemRecurringCostPerYear(V):

    section = 'system (mini-grid)'
    option = 'system recurring cost per year'
    aliases = ['mg_rec']
    dependencies = [
        DieselGeneratorOperationsAndMaintenanceCostPerYear,
        DieselGeneratorReplacementCostPerYear,
        DieselFuelCostPerYear,
        LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear,
        costDistribution.LowVoltageLineRecurringCostPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return sum([
            self.get(DieselGeneratorOperationsAndMaintenanceCostPerYear),
            self.get(DieselGeneratorReplacementCostPerYear),
            self.get(DieselFuelCostPerYear),
            self.get(LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear),
            self.get(costDistribution.LowVoltageLineRecurringCostPerYear),
        ])

Mini grid system total discounted cost

Derivatives

class MiniGridSystemTotalDiscountedCost(V):

    section = 'system (mini-grid)'
    option = 'system total discounted cost'
    aliases = ['mg_tot_d']
    default = 0
    units = 'dollars'

    def aggregate(self, childVS):
        # If the system is mini-grid,
        if childVS.get(System)[0] == 'm':
            # Update
            self.value += childVS.get(costMiniGrid.MiniGridSystemNodalDiscountedCost)

Mini grid system total discounted demand

Derivatives

class MiniGridSystemTotalDiscountedDemand(V):

    section = 'system (mini-grid)'
    option = 'system total discounted demand'
    aliases = ['mg_dem_d']
    default = 0
    units = 'kilowatt-hours'

    def aggregate(self, childVS):
        # If the system is mini-grid,
        if childVS.get(System)[0] == 'm':
            # Update
            self.value += childVS.get(demand.ProjectedNodalDiscountedDemand)

Mini grid system total levelized cost

Dependencies

class MiniGridSystemTotalLevelizedCost(V):

    section = 'system (mini-grid)'
    option = 'system total levelized cost'
    aliases = ['mg_tot_lev']
    dependencies = [
        MiniGridSystemTotalDiscountedDemand,
        MiniGridSystemTotalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(MiniGridSystemTotalDiscountedDemand) == 0:
            return 0
        return self.get(MiniGridSystemTotalDiscountedCost) / float(self.get(MiniGridSystemTotalDiscountedDemand))

System (grid)

Distribution loss

Derivatives

class DistributionLoss(V):

    section = 'system (grid)'
    option = 'distribution loss'
    aliases = ['gr_loss']
    c = dict(check=store.assertLessThanOne)
    default = 0.15
    units = 'fraction'

Grid electricity cost per kilowatt hour

Derivatives

class GridElectricityCostPerKilowattHour(V):

    section = 'system (grid)'
    option = 'electricity cost per kilowatt-hour'
    aliases = ['gr_el_ckwh']
    default = 0.17
    units = 'dollars per kilowatt-hour'

Grid electricity cost per year

Dependencies

Derivatives

class GridElectricityCostPerYear(V):

    section = 'system (grid)'
    option = 'electricity cost per year'
    aliases = ['gr_el']
    dependencies = [
        GridElectricityCostPerKilowattHour,
        demand.ProjectedNodalDemandPerYear,
        DistributionLoss,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(GridElectricityCostPerKilowattHour) * self.get(demand.ProjectedNodalDemandPerYear) / float(1 - self.get(DistributionLoss))

Grid external system initial cost per meter

Dependencies

Derivatives

class GridExternalSystemInitialCostPerMeter(V):

    section = 'system (grid)'
    option = 'external system initial cost per meter'
    aliases = ['ge_inim']
    dependencies = [
        GridMediumVoltageLineCostPerMeter,
    ]
    units = 'dollars per meter'

    def compute(self):
        return self.get(GridMediumVoltageLineCostPerMeter)

Grid external system nodal discounted cost per meter

Dependencies

Derivatives

class GridExternalSystemNodalDiscountedCostPerMeter(V):

    section = 'system (grid)'
    option = 'external nodal discounted cost per meter'
    aliases = ['ge_nodm_d']
    c = dict(check=store.assertPositive)
    dependencies = [
        GridExternalSystemInitialCostPerMeter,
        GridExternalSystemRecurringCostPerMeterPerYear,
        finance.DiscountedCashFlowFactor,
    ]
    units = 'dollars per meter'

    def compute(self):
        return self.get(GridExternalSystemInitialCostPerMeter) + self.get(GridExternalSystemRecurringCostPerMeterPerYear) * self.get(finance.DiscountedCashFlowFactor)

Grid external system recurring cost per meter per year

Dependencies

Derivatives

class GridExternalSystemRecurringCostPerMeterPerYear(V):

    section = 'system (grid)'
    option = 'external system recurring cost per meter per year'
    aliases = ['ge_recm']
    dependencies = [
        GridMediumVoltageLineOperationsAndMaintenanceCostPerMeterPerYear,
        GridMediumVoltageLineReplacementCostPerMeterPerYear,
    ]
    units = 'dollars per meter per year'

    def compute(self):
        return self.get(GridMediumVoltageLineOperationsAndMaintenanceCostPerMeterPerYear) + self.get(GridMediumVoltageLineReplacementCostPerMeterPerYear)

Grid installation cost

Dependencies

Derivatives

class GridInstallationCost(V):

    section = 'system (grid)'
    option = 'installation cost'
    aliases = ['gr_i']
    dependencies = [
        GridInstallationCostPerConnection,
        GridInternalConnectionCount,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(GridInstallationCostPerConnection) * self.get(GridInternalConnectionCount)

Grid installation cost per connection

Derivatives

class GridInstallationCostPerConnection(V):

    section = 'system (grid)'
    option = 'installation cost per connection'
    aliases = ['gr_i_cc']
    default = 130
    units = 'dollars per connection'

Grid internal connection count

Dependencies

Derivatives

class GridInternalConnectionCount(V):

    section = 'system (grid)'
    option = 'internal connection count'
    aliases = ['gr_ic']
    dependencies = [
        demand.TargetHouseholdCount,
        GridSocialInfrastructureCount,
    ]
    units = 'connection count'

    def compute(self):
        return self.get(demand.TargetHouseholdCount) + self.get(GridSocialInfrastructureCount)

Grid internal system initial cost

Dependencies

Derivatives

class GridInternalSystemInitialCost(V):

    section = 'system (grid)'
    option = 'internal system initial cost'
    aliases = ['gi_ini']
    dependencies = [
        GridInstallationCost,
        GridTransformerCost,
        LowVoltageLineEquipmentCost,
        costDistribution.LowVoltageLineInitialCost,
    ]
    units = 'dollars'

    def compute(self):
        return sum([
            self.get(GridInstallationCost),
            self.get(GridTransformerCost),
            self.get(LowVoltageLineEquipmentCost),
            self.get(costDistribution.LowVoltageLineInitialCost),
        ])

Grid internal system nodal discounted cost

Dependencies

Derivatives

class GridInternalSystemNodalDiscountedCost(V):

    section = 'system (grid)'
    option = 'internal system nodal discounted cost'
    aliases = ['gi_nod_d']
    dependencies = [
        demand.ProjectedNodalDemandPerYear,
        GridInternalSystemInitialCost,
        GridInternalSystemRecurringCostPerYear,
        finance.DiscountedCashFlowFactor,
    ]
    units = 'dollars'

    def compute(self):
        if self.get(demand.ProjectedNodalDemandPerYear) == 0:
            return 0
        return self.get(GridInternalSystemInitialCost) + self.get(GridInternalSystemRecurringCostPerYear) * self.get(finance.DiscountedCashFlowFactor)

Grid internal system nodal levelized cost

Dependencies

Derivatives

class GridInternalSystemNodalLevelizedCost(V):

    section = 'system (grid)'
    option = 'internal system nodal levelized cost'
    aliases = ['gi_nod_lev']
    dependencies = [
        demand.ProjectedNodalDiscountedDemand,
        GridInternalSystemNodalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(demand.ProjectedNodalDiscountedDemand) == 0:
            return 0
        return self.get(GridInternalSystemNodalDiscountedCost) / float(self.get(demand.ProjectedNodalDiscountedDemand))

Grid internal system recurring cost per year

Dependencies

Derivatives

class GridInternalSystemRecurringCostPerYear(V):

    section = 'system (grid)'
    option = 'internal system recurring cost per year'
    aliases = ['gi_rec']
    dependencies = [
        GridTransformerOperationsAndMaintenanceCostPerYear,
        GridTransformerReplacementCostPerYear,
        GridElectricityCostPerYear,
        LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear,
        costDistribution.LowVoltageLineRecurringCostPerYear,
    ]
    units = 'dollars per year'

    def compute(self):
        return sum([
            self.get(GridTransformerOperationsAndMaintenanceCostPerYear),
            self.get(GridTransformerReplacementCostPerYear),
            self.get(GridElectricityCostPerYear),
            self.get(LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear),
            self.get(costDistribution.LowVoltageLineRecurringCostPerYear),
        ])

Grid medium voltage line cost per meter

Derivatives

class GridMediumVoltageLineCostPerMeter(V):

    section = 'system (grid)'
    option = 'medium voltage line cost per meter'
    aliases = ['gr_ml_cm']
    default = 20
    units = 'dollars per meter'

Grid medium voltage line lifetime

Derivatives

class GridMediumVoltageLineLifetime(V):

    section = 'system (grid)'
    option = 'medium voltage line lifetime'
    aliases = ['gr_ml_life']
    c = dict(check=store.assertPositive)
    default = 30
    units = 'years'

Grid medium voltage line operations and maintenance cost per meter per year

Dependencies

Derivatives

class GridMediumVoltageLineOperationsAndMaintenanceCostPerMeterPerYear(V):

    section = 'system (grid)'
    option = 'medium voltage line operations and maintenace cost per meter per year'
    aliases = ['gr_ml_omm']
    dependencies = [
        GridMediumVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost,
        GridMediumVoltageLineCostPerMeter,
    ]
    units = 'dollars per meter per year'

    def compute(self):
        return self.get(GridMediumVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost) * self.get(GridMediumVoltageLineCostPerMeter)

Grid medium voltage line operations and maintenance cost per year as fraction of line cost

Derivatives

class GridMediumVoltageLineOperationsAndMaintenanceCostPerYearAsFractionOfLineCost(V):

    section = 'system (grid)'
    option = 'medium voltage line operations and maintenance cost per year as fraction of line cost'
    aliases = ['gr_ml_omf']
    default = 0.01

Grid medium voltage line replacement cost per meter per year

Dependencies

Derivatives

class GridMediumVoltageLineReplacementCostPerMeterPerYear(V):

    section = 'system (grid)'
    option = 'medium voltage line replacement cost per meter per year'
    aliases = ['gr_ml_repm']
    dependencies = [
        GridMediumVoltageLineCostPerMeter,
        GridMediumVoltageLineLifetime,
    ]
    units = 'dollars per meter per year'

    def compute(self):
        return self.get(GridMediumVoltageLineCostPerMeter) / float(self.get(GridMediumVoltageLineLifetime))

Grid social infrastructure count

Dependencies

Derivatives

class GridSocialInfrastructureCount(V):

    section = 'system (grid)'
    option = 'social infrastructure count'
    aliases = ['gr_so']
    dependencies = [
        demand.ProjectedHealthFacilityCount,
        demand.ProjectedEducationFacilityCount,
        demand.ProjectedPublicLightingFacilityCount,
        demand.ProjectedCommercialFacilityCount,
    ]
    units = 'facility count'

    def compute(self):
        return self.get(demand.ProjectedHealthFacilityCount) + self.get(demand.ProjectedEducationFacilityCount) + self.get(demand.ProjectedPublicLightingFacilityCount) + self.get(demand.ProjectedCommercialFacilityCount)

Grid system total discounted cost

Derivatives

class GridSystemTotalDiscountedCost(V):

    section = 'system (grid)'
    option = 'system total discounted cost'
    aliases = ['gr_tot_d']
    default = 0
    units = 'dollars'

    def aggregate(self, childVS):
        # Get
        childDataset = childVS.state[0]
        childNode = childVS.state[1]
        # If the system is grid and we are connecting a node that was not in the existing grid,
        if childVS.get(System)[0] == 'g' and not childDataset.wasNodeAlreadyConnected(childNode):
            # Get internal cost
            internalCost = childVS.get(costGrid.GridInternalSystemNodalDiscountedCost)
            # Get half the length of all new connections to the node
            newConnections = childDataset.cycleConnections(childNode, is_existing=False)
            newConnectionLengthHalved = sum(x.weight for x in newConnections) / 2.
            # Get external cost
            externalCostPerMeter = childVS.get(costGrid.GridExternalSystemNodalDiscountedCostPerMeter)
            externalCost = externalCostPerMeter * newConnectionLengthHalved
            # Add internal and external cost
            self.value += internalCost + externalCost

Grid system total discounted demand

Derivatives

class GridSystemTotalDiscountedDemand(V):

    section = 'system (grid)'
    option = 'system total discounted demand'
    aliases = ['gr_dem_d']
    default = 0
    units = 'kilowatt-hours'

    def aggregate(self, childVS):
        # Get
        childDataset = childVS.state[0]
        childNode = childVS.state[1]
        # If the system is grid and we are connecting a node that was not in the existing grid,
        if childVS.get(System)[0] == 'g' and not childDataset.wasNodeAlreadyConnected(childNode):
            # Update
            self.value += childVS.get(demand.ProjectedNodalDiscountedDemand)

Grid system total levelized cost

Dependencies

class GridSystemTotalLevelizedCost(V):

    section = 'system (grid)'
    option = 'system total levelized cost'
    aliases = ['gr_tot_lev']
    dependencies = [
        GridSystemTotalDiscountedDemand,
        GridSystemTotalDiscountedCost,
    ]
    units = 'dollars per kilowatt-hour'

    def compute(self):
        if self.get(GridSystemTotalDiscountedDemand) == 0:
            return 0
        return self.get(GridSystemTotalDiscountedCost) / float(self.get(GridSystemTotalDiscountedDemand))

Grid transformer actual system capacity

Dependencies

Derivatives

class GridTransformerActualSystemCapacity(V):

    section = 'system (grid)'
    option = 'grid transformer actual system capacity'
    aliases = ['gr_tr_acp']
    dependencies = [
        GridTransformerAvailableSystemCapacities,
        GridTransformerActualSystemCapacityCounts,
    ]
    units = 'kilowatts'

    def compute(self):
        return numpy.dot(
            self.get(GridTransformerAvailableSystemCapacities),
            self.get(GridTransformerActualSystemCapacityCounts))

Grid transformer actual system capacity counts

Dependencies

Derivatives

class GridTransformerActualSystemCapacityCounts(V):

    section = 'system (grid)'
    option = 'grid transformer actual system capacity counts'
    aliases = ['gr_tr_acps']
    c = dict(parse=store.unstringifyIntegerList, format=store.flattenList, validate='validateNumberList')
    dependencies = [
        GridTransformerDesiredSystemCapacity,
        GridTransformerAvailableSystemCapacities,
    ]
    units = 'capacity count list'

    def compute(self):
        return metric.computeSystemCounts(
            self.get(GridTransformerDesiredSystemCapacity),
            self.get(GridTransformerAvailableSystemCapacities))

Grid transformer available system capacities

Derivatives

class GridTransformerAvailableSystemCapacities(V):

    section = 'system (grid)'
    option = 'available system capacities (transformer)'
    aliases = ['gr_tr_cps']
    c = dict(parse=store.unstringifyDescendingFloatList, format=store.flattenList, validate='validateNumberList')
    default = '1000 900 800 700 600 500 400 300 200 100 90 80 70 60 50 40 30 20 15 5'
    units = 'kilowatts list'

Grid transformer cost

Dependencies

Derivatives

class GridTransformerCost(V):

    section = 'system (grid)'
    option = 'transformer cost'
    aliases = ['gr_tr']
    dependencies = [
        GridTransformerCostPerGridSystemKilowatt,
        GridTransformerActualSystemCapacity,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(GridTransformerCostPerGridSystemKilowatt) * self.get(GridTransformerActualSystemCapacity)

Grid transformer cost per grid system kilowatt

Derivatives

class GridTransformerCostPerGridSystemKilowatt(V):

    section = 'system (grid)'
    option = 'transformer cost per grid system kilowatt'
    aliases = ['gr_tr_ckw']
    default = 1000
    units = 'dollars per kilowatt'

Grid transformer desired system capacity

Dependencies

Derivatives

class GridTransformerDesiredSystemCapacity(V):

    section = 'system (grid)'
    option = 'grid transformer desired system capacity'
    aliases = ['gr_tr_dcp']
    dependencies = [
        demand.ProjectedPeakNodalDemand,
        DistributionLoss,
    ]
    units = 'kilowatts'

    def compute(self):
        return self.get(demand.ProjectedPeakNodalDemand) / float(1 - self.get(DistributionLoss))

Grid transformer lifetime

Derivatives

class GridTransformerLifetime(V):

    section = 'system (grid)'
    option = 'transformer lifetime'
    aliases = ['gr_tr_life']
    c = dict(check=store.assertPositive)
    default = 10
    units = 'years'

Grid transformer operations and maintenance cost per year

Dependencies

Derivatives

class GridTransformerOperationsAndMaintenanceCostPerYear(V):

    section = 'system (grid)'
    option = 'transformer operations and maintenance cost per year'
    aliases = ['gr_tr_om']
    dependencies = [
        GridTransformerOperationsAndMaintenanceCostPerYearAsFractionOfTransformerCost,
        GridTransformerCost,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(GridTransformerOperationsAndMaintenanceCostPerYearAsFractionOfTransformerCost) * self.get(GridTransformerCost)

Grid transformer operations and maintenance cost per year as fraction of transformer cost

Derivatives

class GridTransformerOperationsAndMaintenanceCostPerYearAsFractionOfTransformerCost(V):

    section = 'system (grid)'
    option = 'transformer operations and maintenance cost per year as fraction of transformer cost'
    aliases = ['gr_tr_omf']
    default = 0.03

Grid transformer replacement cost per year

Dependencies

Derivatives

class GridTransformerReplacementCostPerYear(V):

    section = 'system (grid)'
    option = 'transformer replacement cost per year'
    aliases = ['gr_tr_rep']
    dependencies = [
        GridTransformerCost,
        GridTransformerLifetime,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(GridTransformerCost) / float(self.get(GridTransformerLifetime))

Low voltage line equipment cost

Dependencies

Derivatives

class LowVoltageLineEquipmentCost(V):

    section = 'system (grid)'
    option = 'low voltage line equipment cost'
    aliases = ['gr_le']
    dependencies = [
        costDistribution.LowVoltageLineEquipmentCostPerConnection,
        GridInternalConnectionCount,
    ]
    units = 'dollars'

    def compute(self):
        return self.get(costDistribution.LowVoltageLineEquipmentCostPerConnection) * self.get(GridInternalConnectionCount)

Low voltage line equipment operations and maintenance cost per year

Dependencies

Derivatives

class LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYear(V):

    section = 'system (grid)'
    option = 'low voltage line equipment operations and maintenance cost per year'
    aliases = ['gr_le_om']
    dependencies = [
        costDistribution.LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYearAsFractionOfEquipmentCost,
        LowVoltageLineEquipmentCost,
    ]
    units = 'dollars per year'

    def compute(self):
        return self.get(costDistribution.LowVoltageLineEquipmentOperationsAndMaintenanceCostPerYearAsFractionOfEquipmentCost) * self.get(LowVoltageLineEquipmentCost)

Metric

Metric

Dependencies

class Metric(V):
    'Maximum length of medium voltage line for which grid extension is cheaper than standalone options'

    section = 'metric'
    option = 'maximum length of medium voltage line extension'
    aliases = ['mvmax']
    dependencies = [
        costOffGrid.OffGridSystemNodalDiscountedCost,
        costOffGrid.OffGridSystemNodalLevelizedCost,
        costMiniGrid.MiniGridSystemNodalDiscountedCost,
        costMiniGrid.MiniGridSystemNodalLevelizedCost,
        costGrid.GridInternalSystemNodalDiscountedCost,
        costGrid.GridInternalSystemNodalLevelizedCost,
        costGrid.GridExternalSystemNodalDiscountedCostPerMeter,
    ]
    units = 'meters'

    def compute(self):
        # Compute levelized costs
        self.get(costOffGrid.OffGridSystemNodalLevelizedCost)
        self.get(costMiniGrid.MiniGridSystemNodalLevelizedCost)
        self.get(costGrid.GridInternalSystemNodalLevelizedCost)
        # Compute the cost of the cheapest standalone option for the node
        standaloneCost = min(
            self.get(costOffGrid.OffGridSystemNodalDiscountedCost),
            self.get(costMiniGrid.MiniGridSystemNodalDiscountedCost))
        # Compute the (non-negative) amount of money we have left to spend on grid extension
        gridExternalBudget = max(0, standaloneCost - self.get(costGrid.GridInternalSystemNodalDiscountedCost))
        # Compute the length of line we are allowed for grid extension
        return gridExternalBudget / float(self.get(costGrid.GridExternalSystemNodalDiscountedCostPerMeter))

System

Dependencies

class System(V):

    section = 'metric'
    option = 'system'
    aliases = ['system']
    c = dict(parse=str)
    dependencies = [
        demand.ProjectedNodalDemandPerYear,
        costMiniGrid.MiniGridSystemNodalDiscountedCost,
        costOffGrid.OffGridSystemNodalDiscountedCost,
    ]

    def compute(self):
        # If the demand is positive,
        if self.get(demand.ProjectedNodalDemandPerYear) == 0:
            return 'unelectrified'
        # If grid is chosen,
        elif self.state[0].isNodeConnected(self.state[1]):
            return 'grid'
        # If mini-grid is chosen,
        elif self.get(costMiniGrid.MiniGridSystemNodalDiscountedCost) < self.get(costOffGrid.OffGridSystemNodalDiscountedCost):
            return 'mini-grid'
        # If off-grid is chosen,
        else:
            return 'off-grid'

Table Of Contents

Previous topic

Metric Model mvMax4

Next topic

Metric Model mvMax2

This Page