For more details on analysing input/output data, see the full urban scale example model
import calliope
# We increase logging verbosity
calliope.set_log_verbosity('INFO', include_solver_output=False)
model = calliope.examples.milp()
# Note, we see the overrides that we have applied printed here, thanks to inreasing logging verbosity
# We also see a warning that we are applying binary/integer decision variables in a model, to remind us that this
# model may take a while to run
[2021-07-29 16:03:10] INFO Model: initialising [2021-07-29 16:03:10] INFO Applying the following overrides from scenario definition: ['milp'] [2021-07-29 16:03:10] INFO Override applied to model.name: Urban-scale example model -> Urban-scale example model with MILP `run.solver_options.mipgap`:0.05 applied from override as new configuration `techs.boiler.costs.monetary.energy_cap`:35 applied from override as new configuration `techs.boiler.costs.monetary.purchase`:2000 applied from override as new configuration `techs.chp.constraints.energy_cap_min_use`:0.2 applied from override as new configuration `techs.chp.constraints.energy_cap_per_unit`:300 applied from override as new configuration `techs.chp.constraints.units_max`:4 applied from override as new configuration Override applied to techs.chp.costs.monetary.energy_cap: 750 -> 700 `techs.chp.costs.monetary.purchase`:40000 applied from override as new configuration `techs.heat_pipes.constraints.force_asynchronous_prod_con`:True applied from override as new configuration [2021-07-29 16:03:10] INFO Model: preprocessing stage 1 (model_run) [2021-07-29 16:03:11] INFO NumExpr defaulting to 8 threads. [2021-07-29 16:03:11] INFO Model: preprocessing stage 2 (model_data) [2021-07-29 16:03:11] WARNING /Users/brynmorp/Repos/calliope-project/calliope/calliope/exceptions.py:60: ModelWarning: Possible issues found during model processing: * Integer and / or binary decision variables are included in this model. This may adversely affect solution time, particularly if you are using a non-commercial solver. To improve solution time, consider changing MILP related solver options (e.g. `mipgap`) or removing MILP constraints. [2021-07-29 16:03:11] INFO Model: preprocessing complete
# Model inputs can be viewed at `model.inputs`.
# Variables are indexed over any combination of `techs`, `locs`, `carriers`, `costs` and `timesteps`,
# although `techs`, `locs`, and `carriers` are often concatenated.
# e.g. `chp`, `X1`, `heat` -> `X1::chp::heat`
model.inputs
<xarray.Dataset> Dimensions: (carrier_tiers: 3, carriers: 3, coordinates: 2, costs: 1, loc_carriers: 10, loc_tech_carriers_conversion_plus: 3, loc_techs: 26, loc_techs_area: 3, loc_techs_conversion: 2, loc_techs_conversion_plus: 1, loc_techs_export: 4, loc_techs_finite_resource: 9, loc_techs_investment_cost: 20, loc_techs_milp: 1, loc_techs_non_conversion: 23, loc_techs_om_cost: 9, loc_techs_supply_plus: 3, loc_techs_transmission: 10, locs: 4, techs: 9, timesteps: 48) Coordinates: (12/21) * carrier_tiers (carrier_tiers) <U5 'in' 'out' 'out_2' * carriers (carriers) <U11 'gas' ... 'heat' * coordinates (coordinates) object 'y' 'x' * costs (costs) object 'monetary' * loc_carriers (loc_carriers) object 'X1::electric... * loc_tech_carriers_conversion_plus (loc_tech_carriers_conversion_plus) object ... ... ... * loc_techs_om_cost (loc_techs_om_cost) object 'X1::sup... * loc_techs_supply_plus (loc_techs_supply_plus) object 'X2:... * loc_techs_transmission (loc_techs_transmission) object 'N1... * locs (locs) object 'X3' 'X1' 'N1' 'X2' * techs (techs) object 'heat_pipes' ... 'chp' * timesteps (timesteps) datetime64[ns] 2005-07-... Data variables: (12/43) energy_cap_max (loc_techs) float64 2e+03 ... 2e+03 energy_con (loc_techs) float64 1.0 nan ... 1.0 resource_area_max (loc_techs_area) int64 1500 1500 1500 units_max (loc_techs_milp) int64 4 resource_area_per_energy_cap (loc_techs_area) int64 7 7 7 resource_eff (loc_techs_finite_resource) float64 ... ... ... lookup_loc_techs_conversion_plus (carrier_tiers, loc_techs_conversion_plus) object ... lookup_loc_techs_export (loc_techs_export) object 'X2::pv::... lookup_loc_techs_area (locs) object 'X3::pv' ... 'X2::pv' timestep_resolution (timesteps) float64 1.0 1.0 ... 1.0 timestep_weights (timesteps) float64 1.0 1.0 ... 1.0 max_demand_timesteps (carriers) datetime64[ns] 2005-07-0... Attributes: calliope_version: 0.6.7-dev applied_overrides: milp scenario: milp defaults: available_area: null\ncarrier_ratios: false\ncharge_... allow_operate_mode: 1
array(['in', 'out', 'out_2'], dtype='<U5')
array(['gas', 'electricity', 'heat'], dtype='<U11')
array(['y', 'x'], dtype=object)
array(['monetary'], dtype=object)
array(['X1::electricity', 'X3::electricity', 'N1::heat', 'X2::gas', 'X1::heat', 'X1::gas', 'X2::heat', 'X3::gas', 'X3::heat', 'X2::electricity'], dtype=object)
array(['X1::chp::heat', 'X1::chp::electricity', 'X1::chp::gas'], dtype=object)
array(['N1::heat_pipes:X2', 'X1::supply_grid_power', 'X3::power_lines:X1', 'X2::demand_heat', 'X1::demand_heat', 'X2::boiler', 'X2::demand_electricity', 'X1::heat_pipes:N1', 'X3::demand_electricity', 'X3::boiler', 'X1::pv', 'X1::supply_gas', 'X2::supply_gas', 'X2::heat_pipes:N1', 'X3::heat_pipes:N1', 'X2::pv', 'X3::pv', 'X3::demand_heat', 'N1::heat_pipes:X3', 'X1::chp', 'X3::supply_gas', 'N1::heat_pipes:X1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::demand_electricity', 'X2::power_lines:X1'], dtype=object)
array(['X2::pv', 'X1::pv', 'X3::pv'], dtype=object)
array(['X3::boiler', 'X2::boiler'], dtype='<U10')
array(['X1::chp'], dtype='<U7')
array(['X2::pv', 'X1::pv', 'X3::pv', 'X1::chp'], dtype=object)
array(['X2::demand_heat', 'X1::demand_heat', 'X2::demand_electricity', 'X3::demand_electricity', 'X1::pv', 'X2::pv', 'X3::pv', 'X3::demand_heat', 'X1::demand_electricity'], dtype=object)
array(['N1::heat_pipes:X2', 'X1::supply_grid_power', 'X3::power_lines:X1', 'X2::boiler', 'X1::heat_pipes:N1', 'X2::heat_pipes:N1', 'X3::boiler', 'X1::pv', 'X1::supply_gas', 'X2::supply_gas', 'X3::heat_pipes:N1', 'X2::pv', 'X3::pv', 'N1::heat_pipes:X3', 'X1::chp', 'X3::supply_gas', 'N1::heat_pipes:X1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X2::power_lines:X1'], dtype=object)
array(['X1::chp'], dtype=object)
array(['N1::heat_pipes:X2', 'X1::supply_grid_power', 'X3::power_lines:X1', 'X2::demand_heat', 'X1::demand_heat', 'X2::demand_electricity', 'X1::heat_pipes:N1', 'X3::demand_electricity', 'X1::pv', 'X2::supply_gas', 'X1::supply_gas', 'X2::heat_pipes:N1', 'X3::heat_pipes:N1', 'X2::pv', 'X3::pv', 'X3::demand_heat', 'N1::heat_pipes:X3', 'X3::supply_gas', 'N1::heat_pipes:X1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::demand_electricity', 'X2::power_lines:X1'], dtype=object)
array(['X1::supply_grid_power', 'X3::supply_gas', 'X2::boiler', 'X3::boiler', 'X2::supply_gas', 'X1::supply_gas', 'X2::pv', 'X3::pv', 'X1::chp'], dtype=object)
array(['X2::pv', 'X1::pv', 'X3::pv'], dtype=object)
array(['N1::heat_pipes:X2', 'X3::power_lines:X1', 'N1::heat_pipes:X1', 'X1::power_lines:X2', 'X1::heat_pipes:N1', 'X2::heat_pipes:N1', 'X3::heat_pipes:N1', 'X1::power_lines:X3', 'N1::heat_pipes:X3', 'X2::power_lines:X1'], dtype=object)
array(['X3', 'X1', 'N1', 'X2'], dtype=object)
array(['heat_pipes', 'demand_heat', 'power_lines', 'demand_electricity', 'supply_grid_power', 'supply_gas', 'pv', 'boiler', 'chp'], dtype=object)
array(['2005-07-01T00:00:00.000000000', '2005-07-01T01:00:00.000000000', '2005-07-01T02:00:00.000000000', '2005-07-01T03:00:00.000000000', '2005-07-01T04:00:00.000000000', '2005-07-01T05:00:00.000000000', '2005-07-01T06:00:00.000000000', '2005-07-01T07:00:00.000000000', '2005-07-01T08:00:00.000000000', '2005-07-01T09:00:00.000000000', '2005-07-01T10:00:00.000000000', '2005-07-01T11:00:00.000000000', '2005-07-01T12:00:00.000000000', '2005-07-01T13:00:00.000000000', '2005-07-01T14:00:00.000000000', '2005-07-01T15:00:00.000000000', '2005-07-01T16:00:00.000000000', '2005-07-01T17:00:00.000000000', '2005-07-01T18:00:00.000000000', '2005-07-01T19:00:00.000000000', '2005-07-01T20:00:00.000000000', '2005-07-01T21:00:00.000000000', '2005-07-01T22:00:00.000000000', '2005-07-01T23:00:00.000000000', '2005-07-02T00:00:00.000000000', '2005-07-02T01:00:00.000000000', '2005-07-02T02:00:00.000000000', '2005-07-02T03:00:00.000000000', '2005-07-02T04:00:00.000000000', '2005-07-02T05:00:00.000000000', '2005-07-02T06:00:00.000000000', '2005-07-02T07:00:00.000000000', '2005-07-02T08:00:00.000000000', '2005-07-02T09:00:00.000000000', '2005-07-02T10:00:00.000000000', '2005-07-02T11:00:00.000000000', '2005-07-02T12:00:00.000000000', '2005-07-02T13:00:00.000000000', '2005-07-02T14:00:00.000000000', '2005-07-02T15:00:00.000000000', '2005-07-02T16:00:00.000000000', '2005-07-02T17:00:00.000000000', '2005-07-02T18:00:00.000000000', '2005-07-02T19:00:00.000000000', '2005-07-02T20:00:00.000000000', '2005-07-02T21:00:00.000000000', '2005-07-02T22:00:00.000000000', '2005-07-02T23:00:00.000000000'], dtype='datetime64[ns]')
array([2000., 2000., 2000., nan, nan, 600., nan, 2000., nan, 600., 250., 2000., 2000., 2000., 2000., 250., 50., nan, 2000., 1500., 2000., 2000., 2000., 2000., nan, 2000.])
array([ 1., nan, 1., 1., 1., 1., 1., 1., 1., 1., nan, nan, nan, 1., 1., nan, nan, 1., 1., 1., nan, 1., 1., 1., 1., 1.])
array([1500, 1500, 1500])
array([4])
array([7, 7, 7])
array([nan, nan, nan, nan, 1., 1., 1., nan, nan])
array(['energy', 'energy', 'energy', 'energy', 'energy_per_area', 'energy_per_area', 'energy_per_area', 'energy', 'energy'], dtype=object)
array([0.85, 0.85, 0.85])
array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, 0.2, nan, nan, nan, nan, nan, nan])
array([ 1., 1., 1., nan, nan, 1., nan, 1., nan, 1., 1., 1., 1., 1., 1., 1., 1., nan, 1., 1., 1., 1., 1., 1., nan, 1.])
array([ 1., nan, nan, nan, nan, nan, nan, 1., nan, nan, nan, nan, nan, 1., 1., nan, nan, nan, 1., nan, nan, 1., nan, nan, nan, nan])
array([ nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, 300., nan, nan, nan, nan, nan, nan])
array([ True, True, True, True, True, True, True, True, True])
array([[-6.47319908e+01, -7.04534393e+01, -7.71929758e+01, -1.04556436e+02, -1.23228444e+02, -1.67668819e+02, -2.64887092e+02, -3.65137675e+02, -2.58172589e+02, -1.90585578e+02, -1.48187116e+02, -1.13121625e+02, -1.09166107e+02, -1.08999523e+02, -1.13778846e+02, -8.21624174e+01, -1.05634371e+02, -1.28475341e+02, -1.67408783e+02, -1.63406268e+02, -1.68509356e+02, -2.42732229e+02, -1.55373912e+02, -9.81262560e+01, -8.32699616e+01, -8.88243408e+01, -9.14132670e+01, -1.08043612e+02, -1.26498438e+02, -1.60887899e+02, -2.52423895e+02, -3.51663241e+02, -2.48154419e+02, -1.88012759e+02, -1.47321309e+02, -1.11706592e+02, -1.08499086e+02, -1.08153801e+02, -1.05261025e+02, -8.46144166e+01, -1.04549875e+02, -1.22646451e+02, -1.66442507e+02, -1.61099889e+02, -1.66931078e+02, -2.40034833e+02, -1.43576460e+02, -8.60820143e+01], [-2.15376486e-01, -2.00837540e-01, -2.07305695e-01, -3.18949064e-01, -6.50733617e-01, -1.03938435e+00, -1.18156736e+00, -1.28540329e+00, -1.20911744e+00, -1.21991243e+00, -7.36295125e-01, -5.72356325e-01, ... -8.60402016e-01, -8.60351757e-01, -1.56000000e-02, -1.56000000e-02, -8.60335361e-01, -1.56000000e-02, -1.56000000e-02, -8.60291122e-01, -1.56000000e-02, -8.60300165e-01, -1.56000000e-02, -8.60289856e-01], [-4.55564001e-01, -4.05798008e-01, -3.93291395e-01, -3.93992241e-01, -4.40085390e-01, -5.67820520e-01, -7.32534533e-01, -7.13803086e-01, -6.89991654e-01, -7.07650084e-01, -7.23601032e-01, -7.04059494e-01, -6.77476247e-01, -6.62892364e-01, -6.83060115e-01, -7.80370371e-01, -9.40634343e-01, -9.78388210e-01, -1.02206286e+00, -1.16951880e+00, -1.30793776e+00, -1.09933437e+00, -8.26212381e-01, -5.59498838e-01, -4.55564001e-01, -4.05798008e-01, -3.93291395e-01, -3.93992241e-01, -4.40085390e-01, -5.67820520e-01, -7.32534533e-01, -7.13803086e-01, -6.89991654e-01, -7.07650084e-01, -7.23601032e-01, -7.04059494e-01, -6.77476247e-01, -6.62892364e-01, -6.83060115e-01, -7.80370371e-01, -9.40634343e-01, -9.78388210e-01, -1.02206286e+00, -1.16951880e+00, -1.30793776e+00, -1.09933437e+00, -8.26212381e-01, -5.59498838e-01]])
array(['electricity', 'electricity', 'electricity', 'electricity'], dtype=object)
array([25., 25., 25., nan, nan, 25., nan, 25., nan, 25., 25., 25., 25., 25., 25., 25., 25., nan, 25., 25., 25., 25., 25., 25., nan, 25.])
array([0.92685937, nan, 0.98 , nan, nan, 0.85 , nan, 0.92685937, nan, 0.85 , nan, nan, nan, 0.92685937, 0.90368789, nan, nan, nan, 0.90368789, 0.405 , nan, 0.92685937, 0.98 , 0.98 , nan, 0.98 ])
array([[0.1 , 0.025, 0.004, 0.004, 0.025, 0.025, nan, nan, nan]])
array([[0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807, 0.11016807]])
array([[9.00e-01, 1.00e+02, 5.00e-02, 4.31e+01, 9.00e-01, 9.00e-01, 7.80e+01, 1.35e+03, 1.00e+00, 1.00e+00, 1.20e+00, 1.35e+03, 1.35e+03, 1.20e+00, 7.00e+02, 1.00e+00, 9.00e-01, 1.00e-01, 5.00e-02, 1.00e-01]])
array([[ nan, nan, nan, nan, nan, nan, -0.0203, nan, 0.004 ]])
array([[[ nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], [ nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], ... [ nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], [-0.031732, -0.029376, -0.028932, -0.026064, -0.020632, -0.027568, -0.0297 , -0.034012, -0.03788 , -0.046136, -0.044776, -0.040216, -0.039736, -0.038808, -0.03858 , -0.040184, -0.044744, -0.047236, -0.046928, -0.042796, -0.04064 , -0.038516, -0.037368, -0.033428, -0.028376, -0.02732 , -0.026892, -0.026952, -0.024864, -0.025472, -0.030384, -0.035796, -0.035084, -0.035056, -0.035952, -0.041952, -0.04564 , -0.04012 , -0.042476, -0.043784, -0.046456, -0.045732, -0.042956, -0.03978 , -0.03628 , -0.03558 , -0.035088, -0.033512]]])
array([[ nan, nan, nan, nan, nan, nan, nan, -80.5, nan]])
array([[ nan, nan, nan, 2000., nan, nan, 2000., nan, nan, nan, nan, nan, nan, nan, 40000., nan, nan, nan, nan, nan]])
array([ 3., 5., 3., 10., 3., 3., 4., 5., 4., 10.])
array(['X2::heat_pipes:N1', 'X1::power_lines:X3', 'X1::heat_pipes:N1', 'X2::power_lines:X1', 'N1::heat_pipes:X1', 'N1::heat_pipes:X2', 'N1::heat_pipes:X3', 'X3::power_lines:X1', 'X3::heat_pipes:N1', 'X1::power_lines:X2'], dtype=object)
array([ 900., 500., nan, 1300.])
array([[3, 7, 7, 7], [5, 2, 5, 8]])
array(['#823739', '#660507', '#6783E3', '#072486', '#C5ABE3', '#C98AAD', '#F9D956', '#8E2999', '#E4AB97'], dtype=object)
array(['transmission', 'demand', 'transmission', 'demand', 'supply', 'supply', 'supply_power_plus.supply_plus', 'conversion', 'conversion_plus'], dtype=object)
array(['District heat distribution', 'Heat demand', 'Electrical power distribution', 'Electrical demand', 'National grid import', 'Natural gas import', 'Solar photovoltaic power', 'Natural gas boiler', 'Combined heat and power'], dtype=object)
array([[1. , 1. , 1. ], [1. , 1. , 1. ], [0.8, 1. , 1. ]])
array(['X1::power_lines:X3::electricity,X1::power_lines:X2::electricity,X1::chp::electricity,X1::pv::electricity,X1::demand_electricity::electricity,X1::supply_grid_power::electricity', 'X3::pv::electricity,X3::power_lines:X1::electricity,X3::demand_electricity::electricity', 'N1::heat_pipes:X2::heat,N1::heat_pipes:X1::heat,N1::heat_pipes:X3::heat', 'X2::supply_gas::gas,X2::boiler::gas', 'X1::chp::heat,X1::demand_heat::heat,X1::heat_pipes:N1::heat', 'X1::supply_gas::gas,X1::chp::gas', 'X2::heat_pipes:N1::heat,X2::demand_heat::heat,X2::boiler::heat', 'X3::boiler::gas,X3::supply_gas::gas', 'X3::demand_heat::heat,X3::boiler::heat,X3::heat_pipes:N1::heat', 'X2::pv::electricity,X2::demand_electricity::electricity,X2::power_lines:X1::electricity'], dtype=object)
array(['N1::heat_pipes:X2::heat', 'X1::supply_grid_power::electricity', 'X3::power_lines:X1::electricity', 'X2::demand_heat::heat', 'X1::demand_heat::heat', 'X2::demand_electricity::electricity', 'X1::heat_pipes:N1::heat', 'X3::demand_electricity::electricity', 'X1::pv::electricity', 'X2::supply_gas::gas', 'X1::supply_gas::gas', 'X2::heat_pipes:N1::heat', 'X3::heat_pipes:N1::heat', 'X2::pv::electricity', 'X3::pv::electricity', 'X3::demand_heat::heat', 'N1::heat_pipes:X3::heat', 'X3::supply_gas::gas', 'N1::heat_pipes:X1::heat', 'X1::power_lines:X2::electricity', 'X1::power_lines:X3::electricity', 'X1::demand_electricity::electricity', 'X2::power_lines:X1::electricity'], dtype=object)
array([['X3::boiler::gas', 'X2::boiler::gas'], ['X3::boiler::heat', 'X2::boiler::heat'], [None, None]], dtype=object)
array(['X1::chp::gas'], dtype=object)
array(['X1::chp::electricity'], dtype=object)
array([['X1::chp::gas'], ['X1::chp::electricity'], ['X1::chp::heat']], dtype=object)
array(['X2::pv::electricity', 'X1::pv::electricity', 'X3::pv::electricity', 'X1::chp::electricity'], dtype=object)
array(['X3::pv', 'X1::pv', '', 'X2::pv'], dtype=object)
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
array(['2005-07-01T00:00:00.000000000', '2005-07-01T08:00:00.000000000', '2005-07-01T07:00:00.000000000'], dtype='datetime64[ns]')
# Individual data variables can be accessed easily, `to_pandas()` reformats the data to look nicer
# Here we look at one of the MILP overrides that we have added, the fixed `purchase` cost
model.inputs.cost_purchase.to_pandas().dropna(axis=1)
loc_techs_investment_cost | X2::boiler | X3::boiler | X1::chp |
---|---|---|---|
costs | |||
monetary | 2000.0 | 2000.0 | 40000.0 |
# Solve the model. Results are loaded into `model.results`.
# By including logging (see package importing), we can see the timing of parts of the run, as well as the solver's log
model.run()
[2021-07-29 16:03:11] INFO Backend: starting model run [2021-07-29 16:03:12] INFO Loading sets [2021-07-29 16:03:12] INFO Loading parameters [2021-07-29 16:03:12] INFO constraints are loaded in the following order: ['capacity', 'dispatch', 'policy', 'energy_balance', 'costs', 'network', 'conversion', 'group', 'conversion_plus', 'export', 'milp'] [2021-07-29 16:03:12] INFO creating capacity constraints [2021-07-29 16:03:12] INFO creating dispatch constraints [2021-07-29 16:03:12] INFO creating policy constraints [2021-07-29 16:03:12] INFO creating energy_balance constraints [2021-07-29 16:03:12] INFO creating costs constraints [2021-07-29 16:03:12] INFO creating network constraints [2021-07-29 16:03:12] INFO creating conversion constraints [2021-07-29 16:03:12] INFO creating group constraints [2021-07-29 16:03:12] INFO creating conversion_plus constraints [2021-07-29 16:03:12] INFO creating export constraints [2021-07-29 16:03:12] INFO creating milp constraints [2021-07-29 16:03:12] INFO Backend: model generated. Time since start of model run: 0:00:00.463842 [2021-07-29 16:03:12] INFO Backend: sending model to solver [2021-07-29 16:03:14] INFO Backend: solver finished running. Time since start of model run: 0:00:02.825151 [2021-07-29 16:03:14] INFO Backend: loaded results [2021-07-29 16:03:14] INFO Backend: generated solution array. Time since start of model run: 0:00:02.930689 [2021-07-29 16:03:14] INFO Postprocessing: started [2021-07-29 16:03:15] INFO Postprocessing: All values < 1e-10 set to 0 in system_balance [2021-07-29 16:03:15] INFO Postprocessing: ended. Time since start of model run: 0:00:03.061067
# Model results are held in the same structure as model inputs.
# The results consist of the optimal values for all decision variables, including capacities and carrier flow
# There are also results, like system capacity factor and levelised costs, which are calculated in postprocessing
# before being added to the results Dataset
model.results
<xarray.Dataset> Dimensions: (carriers: 3, costs: 1, loc_carriers: 10, loc_carriers_system_balance_constraint: 10, loc_tech_carriers_con: 19, loc_tech_carriers_export: 4, loc_tech_carriers_prod: 21, loc_techs: 26, loc_techs_area: 3, loc_techs_asynchronous_prod_con: 6, loc_techs_balance_demand_constraint: 6, loc_techs_cost: 20, loc_techs_cost_investment_constraint: 20, loc_techs_investment_cost: 20, loc_techs_milp: 1, loc_techs_om_cost: 9, loc_techs_purchase: 2, loc_techs_supply_plus: 3, techs: 16, timesteps: 48) Coordinates: (12/20) * carriers (carriers) <U11 'electricity' ...... * loc_carriers (loc_carriers) object 'N1::heat' ... * loc_carriers_system_balance_constraint (loc_carriers_system_balance_constraint) object ... * loc_tech_carriers_con (loc_tech_carriers_con) object 'N... * loc_tech_carriers_export (loc_tech_carriers_export) object ... * loc_tech_carriers_prod (loc_tech_carriers_prod) object '... ... ... * costs (costs) object 'monetary' * loc_techs (loc_techs) object 'N1::heat_pipe... * loc_techs_area (loc_techs_area) object 'X2::pv' ... * loc_techs_milp (loc_techs_milp) object 'X1::chp' * loc_techs_purchase (loc_techs_purchase) object 'X3::... * timesteps (timesteps) datetime64[ns] 2005-0... Data variables: (12/23) energy_cap (loc_techs) float64 214.8 ... 274.1 carrier_prod (loc_tech_carriers_prod, timesteps) float64 ... carrier_con (loc_tech_carriers_con, timesteps) float64 ... cost (costs, loc_techs_cost) float64 0... resource_area (loc_techs_area) float64 994.1 ..... resource_con (loc_techs_supply_plus, timesteps) float64 ... ... ... cost_investment_rhs (costs, loc_techs_cost_investment_constraint) float64 ... cost_var_rhs (costs, loc_techs_om_cost, timesteps) float64 ... capacity_factor (timesteps, loc_tech_carriers_prod) float64 ... systemwide_capacity_factor (carriers, techs) float64 0.0 ...... systemwide_levelised_cost (carriers, costs, techs) float64 ... total_levelised_cost (carriers, costs) float64 0.08171... Attributes: termination_condition: optimal objective_function_value: 900.2250130640398 solution_time: 2.930689 time_finished: 2021-07-29 16:03:14 calliope_version: 0.6.7-dev applied_overrides: milp scenario: milp defaults: available_area: null\ncarrier_ratios: false\nc... allow_operate_mode: 1 model_config: calliope_version: 0.6.7\nname: Urban-scale exa... run_config: backend: pyomo\nbigM: 1000000.0\ncyclic_storag...
array(['electricity', 'gas', 'heat'], dtype='<U11')
array(['N1::heat', 'X1::electricity', 'X1::gas', 'X1::heat', 'X2::electricity', 'X2::gas', 'X2::heat', 'X3::electricity', 'X3::gas', 'X3::heat'], dtype=object)
array(['N1::heat', 'X1::electricity', 'X1::gas', 'X1::heat', 'X2::electricity', 'X2::gas', 'X2::heat', 'X3::electricity', 'X3::gas', 'X3::heat'], dtype=object)
array(['N1::heat_pipes:X1::heat', 'N1::heat_pipes:X2::heat', 'N1::heat_pipes:X3::heat', 'X1::chp::gas', 'X1::demand_electricity::electricity', 'X1::demand_heat::heat', 'X1::heat_pipes:N1::heat', 'X1::power_lines:X2::electricity', 'X1::power_lines:X3::electricity', 'X2::boiler::gas', 'X2::demand_electricity::electricity', 'X2::demand_heat::heat', 'X2::heat_pipes:N1::heat', 'X2::power_lines:X1::electricity', 'X3::boiler::gas', 'X3::demand_electricity::electricity', 'X3::demand_heat::heat', 'X3::heat_pipes:N1::heat', 'X3::power_lines:X1::electricity'], dtype=object)
array(['X1::chp::electricity', 'X1::pv::electricity', 'X2::pv::electricity', 'X3::pv::electricity'], dtype=object)
array(['N1::heat_pipes:X1::heat', 'N1::heat_pipes:X2::heat', 'N1::heat_pipes:X3::heat', 'X1::chp::electricity', 'X1::chp::heat', 'X1::heat_pipes:N1::heat', 'X1::power_lines:X2::electricity', 'X1::power_lines:X3::electricity', 'X1::pv::electricity', 'X1::supply_gas::gas', 'X1::supply_grid_power::electricity', 'X2::boiler::heat', 'X2::heat_pipes:N1::heat', 'X2::power_lines:X1::electricity', 'X2::pv::electricity', 'X2::supply_gas::gas', 'X3::boiler::heat', 'X3::heat_pipes:N1::heat', 'X3::power_lines:X1::electricity', 'X3::pv::electricity', 'X3::supply_gas::gas'], dtype=object)
array(['N1::heat_pipes:X1', 'N1::heat_pipes:X2', 'N1::heat_pipes:X3', 'X1::heat_pipes:N1', 'X2::heat_pipes:N1', 'X3::heat_pipes:N1'], dtype=object)
array(['X1::demand_electricity', 'X1::demand_heat', 'X2::demand_electricity', 'X2::demand_heat', 'X3::demand_electricity', 'X3::demand_heat'], dtype=object)
array(['N1::heat_pipes:X1', 'N1::heat_pipes:X2', 'N1::heat_pipes:X3', 'X1::chp', 'X1::heat_pipes:N1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::pv', 'X1::supply_gas', 'X1::supply_grid_power', 'X2::boiler', 'X2::heat_pipes:N1', 'X2::power_lines:X1', 'X2::pv', 'X2::supply_gas', 'X3::boiler', 'X3::heat_pipes:N1', 'X3::power_lines:X1', 'X3::pv', 'X3::supply_gas'], dtype=object)
array(['N1::heat_pipes:X1', 'N1::heat_pipes:X2', 'N1::heat_pipes:X3', 'X1::chp', 'X1::heat_pipes:N1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::pv', 'X1::supply_gas', 'X1::supply_grid_power', 'X2::boiler', 'X2::heat_pipes:N1', 'X2::power_lines:X1', 'X2::pv', 'X2::supply_gas', 'X3::boiler', 'X3::heat_pipes:N1', 'X3::power_lines:X1', 'X3::pv', 'X3::supply_gas'], dtype=object)
array(['N1::heat_pipes:X1', 'N1::heat_pipes:X2', 'N1::heat_pipes:X3', 'X1::chp', 'X1::heat_pipes:N1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::pv', 'X1::supply_gas', 'X1::supply_grid_power', 'X2::boiler', 'X2::heat_pipes:N1', 'X2::power_lines:X1', 'X2::pv', 'X2::supply_gas', 'X3::boiler', 'X3::heat_pipes:N1', 'X3::power_lines:X1', 'X3::pv', 'X3::supply_gas'], dtype=object)
array(['X1::chp', 'X1::supply_gas', 'X1::supply_grid_power', 'X2::boiler', 'X2::pv', 'X2::supply_gas', 'X3::boiler', 'X3::pv', 'X3::supply_gas'], dtype=object)
array(['X1::pv', 'X2::pv', 'X3::pv'], dtype=object)
array(['boiler', 'chp', 'demand_electricity', 'demand_heat', 'heat_pipes', 'heat_pipes:N1', 'heat_pipes:X1', 'heat_pipes:X2', 'heat_pipes:X3', 'power_lines', 'power_lines:X1', 'power_lines:X2', 'power_lines:X3', 'pv', 'supply_gas', 'supply_grid_power'], dtype=object)
array(['monetary'], dtype=object)
array(['N1::heat_pipes:X2', 'X1::supply_grid_power', 'X3::power_lines:X1', 'X2::demand_heat', 'X1::demand_heat', 'X2::boiler', 'X2::demand_electricity', 'X1::heat_pipes:N1', 'X3::demand_electricity', 'X3::boiler', 'X1::pv', 'X1::supply_gas', 'X2::supply_gas', 'X2::heat_pipes:N1', 'X3::heat_pipes:N1', 'X2::pv', 'X3::pv', 'X3::demand_heat', 'N1::heat_pipes:X3', 'X1::chp', 'X3::supply_gas', 'N1::heat_pipes:X1', 'X1::power_lines:X2', 'X1::power_lines:X3', 'X1::demand_electricity', 'X2::power_lines:X1'], dtype=object)
array(['X2::pv', 'X1::pv', 'X3::pv'], dtype=object)
array(['X1::chp'], dtype=object)
array(['X3::boiler', 'X2::boiler'], dtype=object)
array(['2005-07-01T00:00:00.000000000', '2005-07-01T01:00:00.000000000', '2005-07-01T02:00:00.000000000', '2005-07-01T03:00:00.000000000', '2005-07-01T04:00:00.000000000', '2005-07-01T05:00:00.000000000', '2005-07-01T06:00:00.000000000', '2005-07-01T07:00:00.000000000', '2005-07-01T08:00:00.000000000', '2005-07-01T09:00:00.000000000', '2005-07-01T10:00:00.000000000', '2005-07-01T11:00:00.000000000', '2005-07-01T12:00:00.000000000', '2005-07-01T13:00:00.000000000', '2005-07-01T14:00:00.000000000', '2005-07-01T15:00:00.000000000', '2005-07-01T16:00:00.000000000', '2005-07-01T17:00:00.000000000', '2005-07-01T18:00:00.000000000', '2005-07-01T19:00:00.000000000', '2005-07-01T20:00:00.000000000', '2005-07-01T21:00:00.000000000', '2005-07-01T22:00:00.000000000', '2005-07-01T23:00:00.000000000', '2005-07-02T00:00:00.000000000', '2005-07-02T01:00:00.000000000', '2005-07-02T02:00:00.000000000', '2005-07-02T03:00:00.000000000', '2005-07-02T04:00:00.000000000', '2005-07-02T05:00:00.000000000', '2005-07-02T06:00:00.000000000', '2005-07-02T07:00:00.000000000', '2005-07-02T08:00:00.000000000', '2005-07-02T09:00:00.000000000', '2005-07-02T10:00:00.000000000', '2005-07-02T11:00:00.000000000', '2005-07-02T12:00:00.000000000', '2005-07-02T13:00:00.000000000', '2005-07-02T14:00:00.000000000', '2005-07-02T15:00:00.000000000', '2005-07-02T16:00:00.000000000', '2005-07-02T17:00:00.000000000', '2005-07-02T18:00:00.000000000', '2005-07-02T19:00:00.000000000', '2005-07-02T20:00:00.000000000', '2005-07-02T21:00:00.000000000', '2005-07-02T22:00:00.000000000', '2005-07-02T23:00:00.000000000'], dtype='datetime64[ns]')
array([214.84464 , 82.507813 , 45.778336 , 365.13767 , 1.7197109, 166.00691 , 269.34435 , 238.7146 , 64.927357 , 0. , 0. , 740.74074 , 195.30224 , 214.84464 , 10.399862 , 142.01617 , 50. , 9.3982291, 10.399862 , 300. , 0. , 238.7146 , 274.10211 , 45.778336 , 1.3079378, 274.10211 ])
array([[ 69.857405, 72.541074, 72.915564, ..., 163.03621 , 116.80008 , 92.852036], [ 0. , 0. , 0. , ..., 0. , 0. , 0. ], [ 0. , 0. , 0. , ..., 0. , 0. , 0. ], ..., [ 18.762912, 18.762912, 18.762912, ..., 18.762912, 18.762912, 18.762912], [ 0. , 0. , 0. , ..., 0. , 0. , 0. ], [ 0. , 0. , 0. , ..., 0. , 0. , 0. ]])
array([[-1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00], [-6.9840142e+01, -7.1589062e+01, -7.2898302e+01, -7.2795344e+01, -7.5563761e+01, -1.2489435e+02, -1.5257954e+02, -2.1484464e+02, -2.1104445e+02, -2.0562513e+02, -1.5988090e+02, -1.2204832e+02, -1.1778066e+02, -1.1760093e+02, -1.2275740e+02, -8.8646044e+01, -1.1397022e+02, -1.3861363e+02, -1.8061940e+02, -1.7630104e+02, -1.8180682e+02, -1.6902175e+02, -1.1673973e+02, -8.5116858e+01, -8.9840988e+01, -7.9284131e+01, -7.6987586e+01, -7.9352370e+01, -8.1285949e+01, -1.2297207e+02, -1.5737857e+02, -2.0030691e+02, ... -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, -1.6173357e-10, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00], [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, -1.5095879e+00, -8.0545879e+00, -1.3239588e+01, -1.4344588e+01, -1.1837088e+01, -5.5470880e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00]])
array([[6.4846176e-02, 5.8361966e-02, 3.7667925e-03, 1.8348219e+02, 6.4846176e-02, 8.2732330e-03, 6.9086452e-04, 0.0000000e+00, 5.2897160e+02, 6.4468218e+01, 1.1853703e+01, 5.8361966e-02, 8.2732330e-03, 5.2821909e+01, 3.9663214e+01, 0.0000000e+00, 3.7667925e-03, 6.9086452e-04, 1.8692301e+01, 0.0000000e+00]])
array([994.11321, 0. , 350. ])
array([[ 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 7.8108897 , 28.971299 , 55.244292 , 77.966879 , 95.434868 , 107.50624 , 106.93818 , 89.470189 , 70.724054 , 64.049294 , 50.415742 , 38.344367 , 26.130976 , 9.6571 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 8.0949217 , 28.545251 , 48.285499 , 67.741714 , 89.612205 , 106.93818 , 110.6306 , 102.25164 , 81.233251 , 57.51655 , 40.900658 , 26.841057 , 14.627666 , 6.1066953 , 0.85209718, 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 2.7500001 , 10.2 , 19.45 , 27.45 , 33.6 , 37.85 , 37.65 , 31.5 , 24.9 , 22.55 , 17.75 , 13.5 , 9.1999999 , 3.4000001 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 2.8499999 , 10.05 , 17. , 23.85 , 31.55 , 37.65 , 38.95 , 36. , 28.6 , 20.25 , 14.4 , 9.45 , 5.1500001 , 2.1499999 , 0.30000005, 0. , 0. , 0. , 0. ]])
array([ 0. , 110.6306, 38.95 ])
array([[ 0. , 0. , 0. , 0. , 0. , 0. , 0. , 9.9010128, 0. , 10.02836 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 24.638058 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 6.6392562, 24.625604 , 46.957648 , 66.271847 , 81.119638 , 49.968582 , 0. , 0. , 9.9202503, 1.631557 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 6.8806835, 24.263463 , 41.042674 , 57.580457 , 76.170374 , 86.758281 , 39.922395 , 54.40163 , 38.26718 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ]])
array([[[ 3.7792696e-01, 3.9233148e-01, 3.9438403e-01, 3.9438684e-01, 4.1602323e-01, 7.2230558e-01, 8.8511024e-01, 8.6324675e-01, 1.1643720e+00, 6.6419336e-01, 8.7584911e-01, 6.6949396e-01, 6.4502646e-01, 6.4523623e-01, 6.7167294e-01, 4.8840455e-01, 6.2267360e-01, 7.5660041e-01, 9.7826154e-01, 9.5973563e-01, 9.8402918e-01, 9.1955008e-01, 6.3185784e-01, 4.6551101e-01, 4.8598158e-01, 4.2881389e-01, 4.2245614e-01, 4.3192053e-01, 4.4935177e-01, 6.7207208e-01, 8.5729701e-01, 2.1166932e-01, 9.5651533e-01, 9.1676056e-01, 8.6133265e-01, 6.5311485e-01, 6.3927236e-01, 6.3705454e-01, 6.1519504e-01, 4.9527128e-01, 6.1685066e-01, 7.1763272e-01, 9.7264073e-01, 9.4631396e-01, 9.7484569e-01, 8.8212742e-01, 6.3208915e-01, 5.0225623e-01], [ 5.8322061e+00, 6.0544982e+00, 6.0861733e+00, 6.0862166e+00, 6.4201116e+00, 1.1146691e+01, 1.3659109e+01, 1.8518519e+01, 1.7968704e+01, 1.7389842e+01, 1.3516190e+01, 1.0331697e+01, 9.9541121e+00, 9.9573492e+00, 1.0365323e+01, 7.5371073e+00, 9.6091605e+00, 1.1675932e+01, 1.5096629e+01, 1.4810735e+01, 1.5185635e+01, 1.4190588e+01, 9.7508927e+00, 7.1838118e+00, 7.4997157e+00, 6.6174983e+00, 6.5193848e+00, 6.6654403e+00, 6.9344409e+00, 1.0371483e+01, 1.3229892e+01, 1.6876747e+01, ... 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00], [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00]]])
array([[6.4846176e-02, 5.8361966e-02, 3.7667925e-03, 1.5091517e+02, 6.4846176e-02, 8.2732330e-03, 6.9086452e-04, 0.0000000e+00, 4.4715605e-01, 4.9806722e+00, 5.5264517e+00, 5.8361966e-02, 8.2732330e-03, 1.1573493e+02, 1.1789628e-01, 0.0000000e+00, 3.7667925e-03, 6.9086452e-04, 1.8692301e+01, 0.0000000e+00]])
array([0., 1.])
array([1.])
array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]])
array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]])
array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])
array([[ 4.02838266e-07, -3.40000004e-07, -5.96999998e-07, -5.96999998e-07, 6.79999998e-07, 1.60000000e-06, -2.00000001e-06, -3.89999999e-06, -5.40000002e-06, -5.40000001e-06, 4.40000001e-06, -1.90000000e-06, -1.10016174e-06, -2.80000000e-06, -1.10000001e-06, 2.99838259e-07, 5.98983827e-06, -9.20161722e-07, -2.59716174e-06, -7.40016173e-06, -2.59716171e-06, -1.66000000e-06, -2.59699999e-06, -1.19999992e-07, -7.45161725e-07, 4.03000000e-07, 6.70000009e-07, -5.96999998e-07, 3.29999999e-07, -2.59700001e-06, -2.59700001e-06, -7.02999998e-06, -2.59700001e-06, -4.79999980e-07, -2.59699998e-06, -2.59699999e-06, -8.60000013e-07, -5.23999999e-06, -2.59716173e-06, -5.97161745e-07, -7.10016173e-06, -2.59716174e-06, -2.59716174e-06, -8.15016172e-06, -2.59716174e-06, 1.85000002e-06, -2.59700001e-06, -7.39999998e-07], [ 0.00000000e+00, -1.00000099e-08, -3.90000009e-07, -2.39999989e-07, 2.61000000e-06, 8.47999999e-06, 4.70000013e-07, -1.89000001e-06, 4.34999998e-06, -5.08000002e-06, 4.96999999e-06, -4.48999999e-06, ... 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [-1.61733570e-10, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, -1.61733570e-10, 0.00000000e+00, 0.00000000e+00, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, -1.61733570e-10, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, -1.61733570e-10, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]])
array([[-4.55564001e-01, -4.05798008e-01, -3.93291395e-01, -3.93992241e-01, -4.40085390e-01, -5.67820520e-01, -7.32534533e-01, -7.13803086e-01, -6.89991654e-01, -7.07650084e-01, -7.23601032e-01, -7.04059494e-01, -6.77476247e-01, -6.62892364e-01, -6.83060115e-01, -7.80370371e-01, -9.40634343e-01, -9.78388210e-01, -1.02206286e+00, -1.16951880e+00, -1.30793776e+00, -1.09933437e+00, -8.26212381e-01, -5.59498838e-01, -4.55564001e-01, -4.05798008e-01, -3.93291395e-01, -3.93992241e-01, -4.40085390e-01, -5.67820520e-01, -7.32534533e-01, -7.13803086e-01, -6.89991654e-01, -7.07650084e-01, -7.23601032e-01, -7.04059494e-01, -6.77476247e-01, -6.62892364e-01, -6.83060115e-01, -7.80370371e-01, -9.40634343e-01, -9.78388210e-01, -1.02206286e+00, -1.16951880e+00, -1.30793776e+00, -1.09933437e+00, -8.26212381e-01, -5.59498838e-01], [-2.15376486e-01, -2.00837540e-01, -2.07305695e-01, -3.18949064e-01, -6.50733617e-01, -1.03938435e+00, -1.18156736e+00, -1.28540329e+00, -1.20911744e+00, -1.21991243e+00, -7.36295125e-01, -5.72356325e-01, ... -1.87629121e+01, -1.87629121e+01, -1.87629121e+01, -1.89544182e+01, -1.91459244e+01, -1.87629121e+01, -1.87629121e+01, -1.87629121e+01, -1.87629121e+01, -1.87629121e+01, -1.87629121e+01, -1.87629121e+01], [-1.56000000e-02, -8.60322027e-01, -1.56000000e-02, -1.56000000e-02, -8.60406948e-01, -7.26332670e+00, -9.39822908e+00, -5.79284175e+00, -3.32258511e+00, -1.92726389e+00, -1.62161880e+00, -1.37951739e+00, -1.17358434e+00, -1.40568903e+00, -1.17113535e+00, -1.25635276e+00, -7.78178300e-01, -8.60429186e-01, -1.56000000e-02, -8.60416964e-01, -1.56000000e-02, -8.60321406e-01, -1.56000000e-02, -8.34671551e-01, -4.12287220e-02, -1.56000000e-02, -8.60291287e-01, -1.56000000e-02, -8.60386481e-01, -1.56000000e-02, -1.56000000e-02, -8.60290111e-01, -1.56000000e-02, -8.60293236e-01, -1.56000000e-02, -1.56000000e-02, -8.60402016e-01, -8.60351757e-01, -1.56000000e-02, -1.56000000e-02, -8.60335361e-01, -1.56000000e-02, -1.56000000e-02, -8.60291122e-01, -1.56000000e-02, -8.60300165e-01, -1.56000000e-02, -8.60289856e-01]])
array([[6.48461769e-02, 5.83619667e-02, 3.76679259e-03, 1.50915167e+02, 6.48461769e-02, 8.27323316e-03, 6.90864524e-04, 0.00000000e+00, 4.47156051e-01, 4.98067216e+00, 5.52645175e+00, 5.83619667e-02, 8.27323316e-03, 1.15734928e+02, 1.17896281e-01, 0.00000000e+00, 3.76679259e-03, 6.90864524e-04, 1.86923007e+01, 0.00000000e+00]])
array([[[ 3.77926956e-01, 3.92331484e-01, 3.94384032e-01, 3.94386836e-01, 4.16023240e-01, 7.22305600e-01, 8.85110240e-01, 8.63246753e-01, 1.16437204e+00, 6.64193343e-01, 8.75849120e-01, 6.69493960e-01, 6.45026480e-01, 6.45236240e-01, 6.71672960e-01, 4.88404560e-01, 6.22673600e-01, 7.56600400e-01, 9.78261520e-01, 9.59735640e-01, 9.84029160e-01, 9.19550080e-01, 6.31857840e-01, 4.65511000e-01, 4.85981560e-01, 4.28813880e-01, 4.22456120e-01, 4.31920520e-01, 4.49351760e-01, 6.72072080e-01, 8.57297000e-01, 2.11669316e-01, 9.56515320e-01, 9.16760560e-01, 8.61332640e-01, 6.53114840e-01, 6.39272360e-01, 6.37054520e-01, 6.15195040e-01, 4.95271280e-01, 6.16850680e-01, 7.17632720e-01, 9.72640720e-01, 9.46313960e-01, 9.74845680e-01, 8.82127400e-01, 6.32089160e-01, 5.02256240e-01], [ 5.83220625e+00, 6.05449825e+00, 6.08617325e+00, 6.08621650e+00, 6.42011150e+00, 1.11466910e+01, 1.36591085e+01, 1.85185185e+01, 1.79687040e+01, 1.73898423e+01, 1.35161900e+01, 1.03316970e+01, ... 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]])
array([[0.29263985, 0. , 0. , ..., 0.40986444, 0. , 0. ], [0.30388202, 0. , 0. , ..., 0.40986444, 0. , 0. ], [0.30545079, 0. , 0. , ..., 0.40986444, 0. , 0. ], ..., [0.68297544, 0. , 0. , ..., 0.40986444, 0. , 0. ], [0.48928754, 0. , 0. , ..., 0.40986444, 0. , 0. ], [0.38896672, 0. , 0. , ..., 0.40986444, 0. , 0. ]])
array([[0. , 0.59459 , nan, nan, nan, 0. , 0. , 0. , 0. , nan, 0.58276742, 0. , 0.02432095, 0.20185729, 0. , 0.15020685], [0. , 0. , nan, nan, nan, 0. , 0. , 0. , 0. , nan, 0. , 0. , 0. , 0. , 0.50573689, 0. ], [0.16873555, 0.475672 , nan, nan, nan, 0.26285701, 0.55131856, 0. , 0. , nan, 0. , 0. , 0. , 0. , 0. , 0. ]])
array([[[ inf, 2.14295880e-02, nan, nan, nan, inf, inf, inf, inf, nan, 1.00180312e-06, inf, 1.29274001e-05, 3.84387146e-02, inf, 1.08372629e-01]], [[ inf, inf, nan, nan, nan, inf, inf, inf, inf, nan, inf, inf, inf, inf, 2.50248671e-02, inf]], [[8.81617200e-03, 2.67869848e-02, nan, nan, nan, 2.16908962e-05, 1.02650610e-05, inf, inf, nan, inf, inf, inf, inf, inf, inf]]])
array([[0.08170905], [0.03961771], [0.10986101]])
# We can sum operating units of CHP over all locations and turn the result into a pandas DataFrame
df_units = model.get_formatted_array('operating_units').sum('locs').to_pandas().T
#The information about the dataframe tells us about the amount of data it holds in the index and in each column
df_units.info()
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 48 entries, 2005-07-01 00:00:00 to 2005-07-02 23:00:00 Data columns (total 1 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 chp 48 non-null float64 dtypes: float64(1) memory usage: 1.8 KB
# Using .head() to see the first few rows of operating units
df_units.head()
techs | chp |
---|---|
timesteps | |
2005-07-01 00:00:00 | 1.0 |
2005-07-01 01:00:00 | 1.0 |
2005-07-01 02:00:00 | 1.0 |
2005-07-01 03:00:00 | 1.0 |
2005-07-01 04:00:00 | 1.0 |
# We can plot this by using the timeseries plotting functionality.
# The top-left dropdown gives us the chance to scroll through other timeseries data too.
model.plot.timeseries()
[2021-07-29 16:03:15] WARNING /Users/brynmorp/Repos/calliope-project/calliope/calliope/postprocess/plotting/plotting.py:105: FutureWarning: Plotting will no longer be available as a method of the Calliope model object infuture versions of Calliope. In the meantime, as of v0.6.6, plotting is untested; this functionality should now be used with caution. We expect to reintroduce it as a seperate module in v0.7.0.