switch_model/policies/CA_policies.py
def post_solve(model, outdir):
    """
    Export california's annual emissions and its carbon caps
    for each period.
    """
    reporting.write_table(
        model, model.PERIODS,
        output_file=os.path.join(outdir, "ca_policies.csv"),
        headings=("PERIOD",
                  "AnnualEmissions_tCO2_per_yr_CA", "carbon_cap_tco2_per_yr_CA", "CA_AnnualDispatch", "CA_AnnualDemand",
                  "Dispatch/Demand ratio", "Minimum ratio"),
        values=lambda m, p: [p,
                             m.AnnualEmissions_CA[p],
                             m.carbon_cap_tco2_per_yr_CA[p],
                             m.CA_AnnualDispatch[p],
                             m.CA_AnnualDemand[p],
                             m.CA_AnnualDispatch[p] / m.CA_AnnualDemand[p],
                             m.ca_min_gen_period_ratio[p]
                             ])

    Export california's annual emissions and its carbon caps
    for each period.
    
Export california's annual emissions and its carbon caps
for each period.
Export california ' s annual emissions and its carbon caps for each period .
def post_solve(model, outdir):
    reporting.write_table(
        model, model.PERIODS,
        output_file=os.path.join(outdir, "ca_policies.csv"),
        headings=("PERIOD",
                  "AnnualEmissions_tCO2_per_yr_CA", "carbon_cap_tco2_per_yr_CA", "CA_AnnualDispatch", "CA_AnnualDemand",
                  "Dispatch/Demand ratio", "Minimum ratio"),
        values=lambda m, p: [p,
                             m.AnnualEmissions_CA[p],
                             m.carbon_cap_tco2_per_yr_CA[p],
                             m.CA_AnnualDispatch[p],
                             m.CA_AnnualDemand[p],
                             m.CA_AnnualDispatch[p] / m.CA_AnnualDemand[p],
                             m.ca_min_gen_period_ratio[p]
                             ])
def post_solve ( model , outdir ) : reporting . write_table ( model , model . PERIODS , output_file = os . path . join ( outdir , "ca_policies.csv" ) , headings = ( "PERIOD" , "AnnualEmissions_tCO2_per_yr_CA" , "carbon_cap_tco2_per_yr_CA" , "CA_AnnualDispatch" , "CA_AnnualDemand" , "Dispatch/Demand ratio" , "Minimum ratio" ) , values = lambda m , p : [ p , m . AnnualEmissions_CA [ p ] , m . carbon_cap_tco2_per_yr_CA [ p ] , m . CA_AnnualDispatch [ p ] , m . CA_AnnualDemand [ p ] , m . CA_AnnualDispatch [ p ] / m . CA_AnnualDemand [ p ] , m . ca_min_gen_period_ratio [ p ] ] )
Export california's annual emissions and its carbon caps
for each period.
Export california ' s annual emissions and its carbon caps for each period .
"""
    Export california's annual emissions and its carbon caps
    for each period.
    """
model
outdir