Workflow for the EnergyLand energy system¶
In this application of the ETHOS.FINE framework, a single node energy system is modeled and optimized. Compared to the previous examples, this example includes a lot more technologies considered in the system.
The workflow is structures as follows:
- Required packages are imported and the input data path is set
- An energy system model instance is created
- Commodity sources are added to the energy system model
- Commodity conversion components are added to the energy system model
- Commodity storages are added to the energy system model
- Commodity sinks are added to the energy system model
- The energy system model is optimized
- Selected optimization results are presented
from IPython.display import Image
from pathlib import Path
Image(Path("images/strukturExample.png"))
1. Import packages¶
The FINE framework is imported which provides the required classes and functions for modeling the energy system. The working directory and the underlying excelfile which provides some of the input data is imported.
import fine as fn
from getData import getData
import pandas as pd
from pathlib import Path
cwd = Path.cwd()
data = getData()
2. Set up energy system model instance¶
The structure of the energy system model is given by the considered locations, in this case we consider only one location (EnergyLand), commodities, the number of time steps as well as the hours per time step.
The commodities are specified by a unit, which can be given as an energy or mass unit per hour.
locations = {"EnergyLand"}
commodityUnitDict = {
"electricity": r"GW$_{el}$",
"hydrogen": r"GW$_{H_{2},LHV}$",
"nGas": r"GW$_{CH4}$",
"coal": r"GW$_{coal}$",
"PHeat": r"GW$_{Pheat}$",
"LTHeat": r"GW$_{LTHeat}$",
"CO2": r"kt$_{CO_{2}}$/h",
"pTransport": "Mio pkm/h",
"fTransport": "Mio tkm/h",
"crudeOil": r"GW$_{Oil}$",
"wood": r"GW$_{wood}$",
"biowaste": r"GW$_{biowaste}$",
"bioslurry": r"GW$_{bioslurry}$",
"diesel": r"GW$_{diesel}$",
"biogas": r"GW$_{CH4}$",
"nGasImp": r"GW$_{CH4}$",
}
commodities = {
"electricity",
"hydrogen",
"nGas",
"coal",
"PHeat",
"LTHeat",
"CO2",
"pTransport",
"fTransport",
"crudeOil",
"wood",
"biowaste",
"bioslurry",
"diesel",
"nGasImp",
"biogas",
}
numberOfTimeSteps = 8760
hoursPerTimeStep = 1
balanceLimit = pd.DataFrame(
index=["CO2_cap"], columns=["EnergyLand", "lowerBound"], data=[[-210000, True]]
)
esM = fn.EnergySystemModel(
locations=locations,
commodities=commodities,
numberOfTimeSteps=8760,
commodityUnitsDict=commodityUnitDict,
hoursPerTimeStep=1,
costUnit="1e6 Euro",
lengthUnit="km",
verboseLogLevel=0,
balanceLimit=balanceLimit,
)
3. Sources¶
Source components transfer a commodity from outside the system boundary of EnergyLand into the system.
3.1 Electricity sources¶
Wind turbines¶
Onshore Wind Turbines¶
esM.add(
fn.Source(
esM=esM,
name="Wind_Onshore",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["Wind_onshore, operationRateMax"],
capacityMax=data["Wind_onshore, capacityMax"],
investPerCapacity=1250,
opexPerCapacity=1250 * 0.02,
interestRate=0.08,
economicLifetime=20,
)
)
Offshore Wind Turbines¶
esM.add(
fn.Source(
esM=esM,
name="Wind_Offshore",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["Wind_offshore, operationRateMax"],
capacityMax=data["Wind_offshore, capacityMax"],
investPerCapacity=2530,
opexPerCapacity=2530 * 0.045,
interestRate=0.08,
economicLifetime=20,
)
)
Photovoltaic¶
esM.add(
fn.Source(
esM=esM,
name="PV",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["PV, operationRateMax"],
capacityMax=data["PV, capacityMax"],
investPerCapacity=800,
opexPerCapacity=800 * 0.019,
interestRate=0.08,
economicLifetime=20,
)
)
Electricity import¶
esM.add(
fn.Source(
esM=esM,
name="el_Import",
commodity="electricity",
hasCapacityVariable=False,
operationRateMax=data["el_Import, operationRateMax"],
)
)
3.2 Hydrogen source¶
esM.add(
fn.Source(
esM=esM,
name="H2_Import",
commodity="hydrogen",
hasCapacityVariable=False,
operationRateMax=data["H2_Import, operationRateMax"],
commodityCost=0.132,
)
)
3.3 Coal source¶
esM.add(
fn.Source(
esM=esM,
name="CoalSource",
commodity="coal",
hasCapacityVariable=False,
commodityCost=0.021,
)
)
3.4 Crude Oil source¶
esM.add(
fn.Source(
esM=esM,
name="CrudeOilSource",
commodity="crudeOil",
hasCapacityVariable=False,
commodityCost=0.036,
)
)
3.5 Natural gas source¶
esM.add(
fn.Source(
esM=esM,
name="nGasSource",
commodity="nGasImp",
hasCapacityVariable=False,
commodityCost=0.0256,
)
)
3.6 Biomass sources¶
Wood Source¶
esM.add(
fn.Source(
esM=esM,
name="WoodSource",
commodity="wood",
hasCapacityVariable=True,
capacityMax=data["wood_source, capacityMax"],
commodityCost=0.028,
)
)
Biowaste Source¶
esM.add(
fn.Source(
esM=esM,
name="BiowasteSource",
commodity="biowaste",
hasCapacityVariable=True,
capacityMax=data["biowaste_source, capacityMax"],
commodityCost=0.07,
)
)
Bioslurry Source¶
esM.add(
fn.Source(
esM=esM,
name="BioslurrySource",
commodity="bioslurry",
hasCapacityVariable=True,
capacityMax=data["bioslurry_source, capacityMax"],
commodityCost=0.07,
)
)
4. Conversion components¶
These are the components which can transfer one commodity into another one.
4.1 Biomas to biogas¶
Bioslurry to Biogas¶
esM.add(
fn.Conversion(
esM=esM,
name="bioslurry-biogas",
physicalUnit=r"GW$_{CH4}$",
commodityConversionFactors={"bioslurry": -1, "biogas": 1},
hasCapacityVariable=False,
)
)
Biowaste to Biogas¶
esM.add(
fn.Conversion(
esM=esM,
name="biowaste-biogas",
physicalUnit=r"GW$_{CH4}$",
commodityConversionFactors={"biowaste": -1, "biogas": 1},
hasCapacityVariable=False,
)
)
4.2 Methane Slip (Virtual conversion)¶
methaneSlip = 0.1
esM.add(
fn.Conversion(
esM=esM,
name="CH4Slip",
physicalUnit=r"GW$_{CH4}$",
commodityConversionFactors={
"nGasImp": -1,
"nGas": 1,
"CO2": methaneSlip * 2.014,
},
hasCapacityVariable=False,
)
)
4.3 Biogas to Methane (Virtual conversion)¶
esM.add(
fn.Conversion(
esM=esM,
name="biogas-nGas",
physicalUnit=r"GW$_{CH4}$",
commodityConversionFactors={"biogas": -1, "nGas": 1, "CO2": -0.2014},
hasCapacityVariable=True,
opexPerOperation=0.0003,
investPerCapacity=343,
opexPerCapacity=343 * 0.025,
interestRate=0.08,
economicLifetime=15,
)
)
4.4 Transport¶
Batterie Electric Vehicle¶
BEV Car¶
esM.add(
fn.Conversion(
esM=esM,
name="BEV_PCar",
physicalUnit=r"Mio pkm/h",
commodityConversionFactors={"electricity": -1 / 7.676226, "pTransport": 1},
hasCapacityVariable=True,
investPerCapacity=15694,
opexPerCapacity=15694 * 0.009,
interestRate=0.08,
economicLifetime=12,
)
)
BEV Truck¶
esM.add(
fn.Conversion(
esM=esM,
name="BEV_Truck",
physicalUnit=r"Mio tkm/h",
commodityConversionFactors={"electricity": -1 / 11.401, "fTransport": 1},
hasCapacityVariable=True,
investPerCapacity=4304,
opexPerCapacity=4304 * 0.009,
interestRate=0.08,
economicLifetime=15,
)
)
Fuel Cell Electric Vehicle¶
FCEV Car¶
esM.add(
fn.Conversion(
esM=esM,
name="FCEV_PCar",
physicalUnit=r"Mio pkm/h",
commodityConversionFactors={"hydrogen": -1 / 4.7472, "pTransport": 1},
hasCapacityVariable=True,
investPerCapacity=15694,
opexPerCapacity=15694 * 0.009,
interestRate=0.08,
economicLifetime=12,
)
)
FCEV Truck¶
esM.add(
fn.Conversion(
esM=esM,
name="FCEV_Truck",
physicalUnit=r"Mio tkm/h",
commodityConversionFactors={"hydrogen": -1 / 8.251, "fTransport": 1},
hasCapacityVariable=True,
investPerCapacity=4283,
opexPerCapacity=4283 * 0.009,
interestRate=0.08,
economicLifetime=15,
)
)
Fossil Vehicles¶
Fossil Car¶
esM.add(
fn.Conversion(
esM=esM,
name="FossilCar",
physicalUnit=r"Mio pkm/h",
commodityConversionFactors={"diesel": -1 / 3.1308, "pTransport": 1},
hasCapacityVariable=True,
investPerCapacity=15694,
opexPerCapacity=15694 * 0.016,
interestRate=0.08,
economicLifetime=12,
)
)
Fossil Truck¶
esM.add(
fn.Conversion(
esM=esM,
name="FossilTruck",
physicalUnit=r"Mio tkm/h",
commodityConversionFactors={"diesel": -1 / 7.938, "fTransport": 1},
hasCapacityVariable=True,
investPerCapacity=3342,
opexPerCapacity=3342 * 0.016,
interestRate=0.08,
economicLifetime=15,
)
)
4.5 Diesel Refinery¶
esM.add(
fn.Conversion(
esM=esM,
name="DieselRef",
physicalUnit=r"GW$_{diesel}$",
commodityConversionFactors={"crudeOil": -1 / 0.364, "diesel": 1, "CO2": 0.725},
hasCapacityVariable=True,
investPerCapacity=1 / 0.364,
opexPerCapacity=(1 / 0.364) * 0.001,
interestRate=0.08,
economicLifetime=20,
)
)
4.6 Power Plants¶
Combined Cycle Gas Turbine¶
Natural Gas CCGT¶
esM.add(
fn.Conversion(
esM=esM,
name="CCGT plants (NGas)",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "nGas": -1 / 0.65, "CO2": 0.31},
hasCapacityVariable=True,
investPerCapacity=850,
opexPerCapacity=850 * 0.03,
opexPerOperation=0.002,
interestRate=0.08,
economicLifetime=30,
)
)
H2 CCGT¶
esM.add(
fn.Conversion(
esM=esM,
name="CCGT plants (hydrogen)",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "hydrogen": -1 / 0.6},
hasCapacityVariable=True,
investPerCapacity=760,
opexPerCapacity=760 * 0.014,
opexPerOperation=0.002,
interestRate=0.08,
economicLifetime=20,
)
)
Fuel cell¶
esM.add(
fn.Conversion(
esM=esM,
name="LS-SOFC",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"hydrogen": -1 / 0.7,
"LTHeat": 0.25 / 0.7,
},
hasCapacityVariable=True,
investPerCapacity=1210,
opexPerCapacity=1210 * 0.008,
interestRate=0.08,
economicLifetime=20,
)
)
Coal power plant¶
esM.add(
fn.Conversion(
esM=esM,
name="CoalPP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "coal": -1 / 0.5, "CO2": 0.674},
hasCapacityVariable=True,
opexPerOperation=0.0015,
investPerCapacity=1450,
opexPerCapacity=1450 * 0.026,
interestRate=0.08,
economicLifetime=40,
)
)
Combined Heat and Power Plants¶
Coal CHP¶
esM.add(
fn.Conversion(
esM=esM,
name="CoalCHP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"LTHeat": 0.51 / 0.38,
"coal": -1 / 0.38,
"CO2": 0.886,
},
hasCapacityVariable=True,
opexPerOperation=0.0051,
investPerCapacity=1847,
opexPerCapacity=1847 * 0.027,
interestRate=0.08,
economicLifetime=35,
)
)
Wood CHP¶
esM.add(
fn.Conversion(
esM=esM,
name="WoodCHP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"LTHeat": 0.826 / 0.291,
"wood": -1 / 0.291,
},
hasCapacityVariable=True,
opexPerOperation=0.0038,
investPerCapacity=3000,
opexPerCapacity=3000 * 0.029,
interestRate=0.08,
economicLifetime=25,
)
)
Natural Gas CHP¶
esM.add(
fn.Conversion(
esM=esM,
name="nGasCHP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"LTHeat": 0.5 / 0.35,
"nGas": -1 / 0.35,
"CO2": 0.575,
},
hasCapacityVariable=True,
opexPerOperation=0.0015,
investPerCapacity=666,
opexPerCapacity=666 * 0.041,
interestRate=0.08,
economicLifetime=30,
)
)
Biogas CHP¶
esM.add(
fn.Conversion(
esM=esM,
name="BioGasCHP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "LTHeat": 1, "biogas": -1 / 0.47},
hasCapacityVariable=True,
opexPerOperation=0.008,
investPerCapacity=850,
opexPerCapacity=850 * 0.01,
interestRate=0.08,
economicLifetime=25,
)
)
H2 CHP¶
esM.add(
fn.Conversion(
esM=esM,
name="H2CHP",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"LTHeat": 0.41 / 0.49,
"hydrogen": -1 / 0.49,
},
hasCapacityVariable=True,
opexPerOperation=0.0006,
investPerCapacity=715,
opexPerCapacity=715 * 0.001,
interestRate=0.08,
economicLifetime=20,
)
)
4.7 Thermal power plants¶
Oil Boiler¶
esM.add(
fn.Conversion(
esM=esM,
name="oilBoiler",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"crudeOil": -1 / 0.96, "LTHeat": 1, "CO2": 0.275},
hasCapacityVariable=True,
investPerCapacity=330,
opexPerCapacity=330 * 0.041,
interestRate=0.08,
economicLifetime=20,
)
)
Gas Boiler¶
esM.add(
fn.Conversion(
esM=esM,
name="gasBoiler",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"nGas": -1 / 0.96, "LTHeat": 1, "CO2": 0.21},
hasCapacityVariable=True,
investPerCapacity=330,
opexPerCapacity=330 * 0.012,
interestRate=0.08,
economicLifetime=20,
)
)
H2 Boiler¶
esM.add(
fn.Conversion(
esM=esM,
name="H2Boiler",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"hydrogen": -1 / 0.98, "LTHeat": 1},
hasCapacityVariable=True,
investPerCapacity=655,
opexPerCapacity=655 * 0.01,
interestRate=0.08,
economicLifetime=20,
)
)
Heat pump¶
esM.add(
fn.Conversion(
esM=esM,
name="Heatpump",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"electricity": -1 / 0.45, "LTHeat": 1},
hasCapacityVariable=True,
investPerCapacity=725,
opexPerCapacity=725 * 0.02,
interestRate=0.08,
economicLifetime=20,
)
)
Heating rod¶
esM.add(
fn.Conversion(
esM=esM,
name="Heating rod",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"electricity": -1 / 0.99, "LTHeat": 1},
hasCapacityVariable=True,
investPerCapacity=800,
opexPerCapacity=800 * 0.0125,
interestRate=0.08,
economicLifetime=30,
)
)
Electrode boiler¶
esM.add(
fn.Conversion(
esM=esM,
name="electrode boiler",
physicalUnit=r"GW$_{Pheat}$",
commodityConversionFactors={"electricity": -1 / 0.99, "PHeat": 1},
hasCapacityVariable=True,
investPerCapacity=140,
opexPerCapacity=140 * 0.02,
interestRate=0.08,
economicLifetime=20,
)
)
Stove¶
esM.add(
fn.Conversion(
esM=esM,
name="woood Stove",
physicalUnit=r"GW$_{LTHeat}$",
commodityConversionFactors={"wood": -1 / 0.75, "LTHeat": 1},
hasCapacityVariable=True,
investPerCapacity=775,
opexPerCapacity=775 * 0.06,
interestRate=0.08,
economicLifetime=20,
)
)
4.8 Electrolyzer¶
esM.add(
fn.Conversion(
esM=esM,
name="electroylzer",
physicalUnit=r"GW$_{H_{2},LHV}$",
commodityConversionFactors={"electricity": -1 / 0.7, "hydrogen": 1},
hasCapacityVariable=True,
investPerCapacity=500,
opexPerCapacity=500 * 0.03,
interestRate=0.08,
economicLifetime=10,
)
)
5. Storages¶
The storages which can be used by the EnergyLand model are constructed.
Lithium ion batteries¶
esM.add(
fn.Storage(
esM=esM,
name="Li-ion batteries",
commodity="electricity",
hasCapacityVariable=True,
chargeEfficiency=0.99,
dischargeEfficiency=0.99,
selfDischarge=0.004,
doPreciseTsaModeling=False,
investPerCapacity=120,
opexPerCapacity=120 * 0.014,
opexPerChargeOperation=0.0001,
interestRate=0.08,
economicLifetime=10,
)
)
Hydrogen filled salt caverns¶
esM.add(
fn.Storage(
esM=esM,
name="H2Storage",
commodity="hydrogen",
hasCapacityVariable=True,
chargeEfficiency=0.98,
dischargeEfficiency=0.998,
doPreciseTsaModeling=False,
investPerCapacity=362,
opexPerCapacity=362 * 0.02,
opexPerChargeOperation=0.0001,
interestRate=0.08,
economicLifetime=40,
)
)
Heat storage¶
esM.add(
fn.Storage(
esM=esM,
name="LTHeatstorage",
commodity="LTHeat",
hasCapacityVariable=True,
chargeEfficiency=0.95,
dischargeEfficiency=0.95,
selfDischarge=0.0003,
chargeRate=1,
dischargeRate=1,
doPreciseTsaModeling=False,
investPerCapacity=147,
opexPerCapacity=147 * 0.01,
opexPerChargeOperation=0.0001,
interestRate=0.08,
economicLifetime=20,
)
)
6. Sinks¶
Electricity, heat and transport demand are set in the following components.
Electricity demand¶
eDemand = 516
esM.add(
fn.Sink(
esM=esM,
name="Electricity demand",
commodity="electricity",
hasCapacityVariable=False,
operationRateFix=data["Electricity demand, operationRateFix"] * eDemand,
)
)
Passenger Transportation demand¶
pTdemand = 867
esM.add(
fn.Sink(
esM=esM,
name="pT_demand",
commodity="pTransport",
hasCapacityVariable=False,
operationRateFix=data["T_demand, operationRateFix"] * pTdemand,
)
)
Freight Transportation demand¶
fTdemand = 945.5
esM.add(
fn.Sink(
esM=esM,
name="fT_demand",
commodity="fTransport",
hasCapacityVariable=False,
operationRateFix=data["T_demand, operationRateFix"] * fTdemand,
)
)
Heat demand¶
Process heat demand¶
pHeatDemand = 423.75
esM.add(
fn.Sink(
esM=esM,
name="PHeat_demand",
commodity="PHeat",
hasCapacityVariable=False,
operationRateFix=data["pHeat_demand, operationRateFix"] * pHeatDemand,
)
)
Low temperature residential heat demand¶
LTHeatDemand = 560.8
esM.add(
fn.Sink(
esM=esM,
name="LTHeat_demand",
commodity="LTHeat",
hasCapacityVariable=False,
operationRateFix=data["LtHeat_demand, operationRateFix"] * LTHeatDemand,
)
)
Environment¶
The CO2 limit is set in this component.
esM.add(
fn.Sink(
esM=esM,
name="environment",
commodity="CO2",
hasCapacityVariable=False,
balanceLimitID="CO2_cap",
)
)
7. Optimization of EnergyLand¶
esM.aggregateTemporally(numberOfTypicalPeriods=48)
Clustering time series data with 48 typical periods and 24 time steps per period further clustered to 12 segments per period... (13.4556 sec)
esM.optimize(
timeSeriesAggregation=True, solver=fn.utils.ImplementedSolvers.GUROBI.value
)
Time series aggregation specifications:
Number of typical periods:48, number of time steps per period:24, number of segments per period:12
Declaring sets, variables and constraints for SourceSinkModel
declaring sets...
declaring variables...
declaring constraints...
(1.5911 sec)
Declaring sets, variables and constraints for ConversionModel
declaring sets...
declaring variables...
declaring constraints...
(1.6577 sec)
Declaring sets, variables and constraints for StorageModel
declaring sets...
declaring variables...
declaring constraints...
(0.7759 sec)
Declaring shared potential constraint...
(0.0012 sec)
Declaring linked component quantity constraint...
(0.0001 sec)
Declaring commodity balances...
(0.5096 sec)
(0.0018 sec)
Declaring objective function...
(2.0107 sec)
Set parameter ServerPassword
Set parameter TSPort to value 41955
Set parameter GURO_PAR_SPECIAL
Set parameter TokenServer to value "iek3028"
Read LP format model from file /tmp/tmpk6hnc76c.pyomo.lp
Reading time = 0.09 seconds
x1: 40198 rows, 32770 columns, 122151 nonzeros
Set parameter QCPDual to value 1
Set parameter Threads to value 3
Gurobi Optimizer version 11.0.2 build v11.0.2rc0 (linux64 - "Rocky Linux 8.8 (Green Obsidian)")
CPU model: Intel(R) Xeon(R) Gold 6154 CPU @ 3.00GHz, instruction set [SSE2|AVX|AVX2|AVX512]
Thread count: 36 physical cores, 72 logical processors, using up to 3 threads
Optimize a model with 40198 rows, 32770 columns and 122151 nonzeros
Model fingerprint: 0x4d1dc8f1
Coefficient statistics:
Matrix range [6e-07, 2e+01]
Objective range [2e-04, 2e+03]
Bounds range [4e-01, 8e+02]
RHS range [2e+05, 2e+05]
Presolve removed 10257 rows and 10174 columns
Presolve time: 0.08s
Presolved: 29941 rows, 22596 columns, 110225 nonzeros
Concurrent LP optimizer: dual simplex and barrier
Showing barrier log only...
Ordering time: 0.27s
Barrier statistics:
Dense cols : 30
Free vars : 417
AA' NZ : 2.545e+05
Factor NZ : 1.265e+06 (roughly 30 MB of memory)
Factor Ops : 2.323e+08 (less than 1 second per iteration)
Threads : 2
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 8.35818215e+07 -4.87993160e+07 1.85e+06 2.85e+00 3.10e+06 0s
1 1.09895183e+08 -1.30708071e+08 1.35e+06 1.90e+02 1.91e+06 1s
2 1.20639012e+08 -1.97368783e+08 5.65e+05 8.14e+01 8.42e+05 1s
3 1.29294112e+08 -2.33537306e+08 1.91e+05 2.08e+01 2.59e+05 1s
4 1.21035819e+08 -2.21427134e+08 1.06e+05 7.39e+00 1.23e+05 1s
5 1.02912484e+08 -2.03329339e+08 6.56e+04 2.65e+00 6.58e+04 1s
6 8.14755220e+07 -1.74373549e+08 4.38e+04 8.11e-01 3.79e+04 1s
7 5.59631580e+07 -1.47857012e+08 2.59e+04 3.60e-01 2.19e+04 1s
8 3.98508356e+07 -1.25447276e+08 1.63e+04 2.03e-01 1.37e+04 1s
9 2.72131877e+07 -1.06836912e+08 9.57e+03 1.16e-01 8.27e+03 1s
10 1.82561837e+07 -6.93606860e+07 5.14e+03 3.29e-02 4.07e+03 1s
11 7.84682616e+06 -3.31575996e+07 1.32e+03 6.90e-03 1.18e+03 1s
12 4.27458212e+06 -1.77370151e+07 5.43e+02 2.29e-03 5.23e+02 1s
13 2.90680016e+06 -1.08287742e+07 3.00e+02 1.21e-03 2.98e+02 1s
14 2.28866336e+06 -5.59718435e+06 2.11e+02 5.45e-04 1.65e+02 1s
15 1.67360251e+06 -3.39804294e+06 1.32e+02 7.58e-04 1.01e+02 1s
16 1.38575643e+06 -1.92978380e+06 9.75e+01 1.99e-03 6.45e+01 1s
17 1.11427392e+06 -9.76592967e+05 6.49e+01 1.15e-03 3.96e+01 1s
18 8.61983965e+05 -2.87625923e+05 3.81e+01 5.51e-04 2.13e+01 1s
19 7.07442480e+05 9.80126568e+04 2.24e+01 3.36e-04 1.11e+01 1s
20 6.26213770e+05 2.18192851e+05 1.47e+01 2.44e-04 7.36e+00 1s
21 5.99302336e+05 2.82010310e+05 1.24e+01 1.54e-04 5.70e+00 1s
22 5.26033171e+05 3.16760085e+05 6.93e+00 1.74e-04 3.74e+00 1s
23 4.95796503e+05 3.59430923e+05 4.76e+00 1.15e-04 2.43e+00 1s
24 4.75033316e+05 3.73647184e+05 3.39e+00 8.42e-05 1.81e+00 1s
25 4.64891696e+05 3.85738325e+05 2.74e+00 1.19e-04 1.41e+00 2s
26 4.47490606e+05 3.93542348e+05 1.66e+00 1.42e-04 9.60e-01 2s
27 4.40130764e+05 4.04009954e+05 1.24e+00 1.01e-04 6.42e-01 2s
28 4.33843580e+05 4.07206598e+05 8.88e-01 1.10e-04 4.74e-01 2s
29 4.29579145e+05 4.10213588e+05 6.57e-01 8.77e-05 3.44e-01 2s
30 4.26811055e+05 4.12557943e+05 5.14e-01 1.19e-04 2.53e-01 2s
31 4.24464787e+05 4.13472897e+05 3.93e-01 1.02e-04 1.95e-01 2s
32 4.20817051e+05 4.14737702e+05 2.04e-01 6.71e-05 1.08e-01 2s
33 4.19402334e+05 4.15660220e+05 1.34e-01 5.72e-05 6.65e-02 2s
34 4.18343170e+05 4.15905819e+05 8.28e-02 4.65e-05 4.33e-02 2s
35 4.17693909e+05 4.16157734e+05 5.10e-02 3.19e-05 2.73e-02 2s
36 4.17124803e+05 4.16349715e+05 2.45e-02 2.36e-05 1.38e-02 2s
37 4.16885544e+05 4.16450215e+05 1.37e-02 2.61e-05 7.73e-03 2s
38 4.16762379e+05 4.16489345e+05 8.61e-03 2.80e-05 4.85e-03 2s
39 4.16630104e+05 4.16520570e+05 3.14e-03 2.38e-05 1.94e-03 2s
40 4.16575945e+05 4.16535209e+05 1.09e-03 1.87e-05 7.23e-04 2s
41 4.16558926e+05 4.16539124e+05 5.35e-04 1.35e-05 3.52e-04 2s
42 4.16554643e+05 4.16540069e+05 3.90e-04 9.83e-06 2.59e-04 2s
43 4.16550599e+05 4.16541122e+05 2.53e-04 6.65e-06 1.68e-04 2s
44 4.16546282e+05 4.16541945e+05 1.16e-04 7.35e-06 7.71e-05 2s
45 4.16544717e+05 4.16542322e+05 6.61e-05 8.76e-06 4.26e-05 2s
46 4.16544493e+05 4.16542352e+05 5.90e-05 8.55e-06 3.81e-05 2s
47 4.16543914e+05 4.16542355e+05 4.24e-05 8.28e-06 2.78e-05 2s
48 4.16543369e+05 4.16542410e+05 2.58e-05 4.83e-06 1.71e-05 2s
49 4.16542872e+05 4.16542408e+05 1.16e-05 1.01e-05 8.21e-06 3s
50 4.16542451e+05 4.16542415e+05 3.75e-08 4.22e-06 6.53e-07 3s
51 4.16542441e+05 4.16542424e+05 8.24e-07 4.22e-06 3.07e-07 3s
52 4.16542428e+05 4.16542427e+05 2.44e-07 4.23e-06 2.68e-08 3s
53 4.16542428e+05 4.16542427e+05 1.38e-06 4.23e-06 2.18e-08 3s
Barrier solved model in 53 iterations and 2.77 seconds (1.89 work units)
Optimal objective 4.16542428e+05
Crossover log...
14539 DPushes remaining with DInf 0.0000000e+00 3s
0 DPushes remaining with DInf 0.0000000e+00 3s
3299 PPushes remaining with PInf 1.1634352e-02 3s
0 PPushes remaining with PInf 0.0000000e+00 4s
Push phase complete: Pinf 0.0000000e+00, Dinf 3.1037636e-02 4s
Iteration Objective Primal Inf. Dual Inf. Time
11638 4.1654243e+05 0.000000e+00 3.103764e-02 4s
Solved with barrier
Extra simplex iterations after uncrush: 1
11652 4.1654243e+05 0.000000e+00 0.000000e+00 4s
Solved in 11652 iterations and 3.70 seconds (2.93 work units)
Optimal objective 4.165424262e+05
Status: ok
Return code: 0
Message: Model was solved to optimality (subject to tolerances), and an optimal solution is available.
Termination condition: optimal
Termination message: Model was solved to optimality (subject to tolerances), and an optimal solution is available.
Wall time: 3.703886032104492
Error rc: 0
Time: 4.190406560897827
Name: x1
Lower bound: 416542.42615464196
Upper bound: 416542.42615464196
Number of objectives: 1
Number of constraints: 40198
Number of variables: 32770
Number of binary variables: 0
Number of integer variables: 0
Number of continuous variables: 32770
Number of nonzeros: 122151
Sense: minimize
Solve time: 5.00289249420166 sec.
Processing optimization output...
for SourceSinkModel ...(1.4575sec)
for ConversionModel ...(0.8742sec)
/fast/home/k-okosun/iek3-models/fine/fine/storage.py:1984: UserWarning: Charge and discharge at the same time for component LTHeatstorage warnings.warn(
for StorageModel ... (1.1298sec) (3.5214 sec)
8. Results¶
esM.getOptimizationSummary("SourceSinkModel", outputLevel=2)
| EnergyLand | |||
|---|---|---|---|
| Component | Property | Unit | |
| BioslurrySource | NPVcontribution | [1e6 Euro] | 1388.317174 |
| TAC | [1e6 Euro/a] | 1388.317174 | |
| capacity | [GW$_{bioslurry}$] | 2.9 | |
| commissioning | [GW$_{bioslurry}$] | 2.9 | |
| commodCosts | [1e6 Euro/a] | 1388.317174 | |
| ... | ... | ... | ... |
| nGasSource | commodCosts | [1e6 Euro/a] | 4488.148228 |
| operation | [GW$_{CH4}$*h/a] | 175318.290169 | |
| [GW$_{CH4}$*h] | 175318.290169 | ||
| pT_demand | operation | [Mio pkm/h*h/a] | 867000.0 |
| [Mio pkm/h*h] | 867000.0 |
82 rows × 1 columns
esM.getOptimizationSummary("ConversionModel", outputLevel=2)
| EnergyLand | |||
|---|---|---|---|
| Component | Property | Unit | |
| BEV_PCar | NPVcontribution | [1e6 Euro] | 220091.47299 |
| TAC | [1e6 Euro/a] | 220091.47299 | |
| capacity | [Mio pkm/h] | 98.972603 | |
| capexCap | [1e6 Euro/a] | 206111.988744 | |
| commissioning | [Mio pkm/h] | 98.972603 | |
| ... | ... | ... | ... |
| oilBoiler | commissioning | [GW$_{LTHeat}$] | 21.758642 |
| invest | [1e6 Euro] | 7180.351733 | |
| operation | [GW$_{LTHeat}$*h/a] | 81395.70118 | |
| [GW$_{LTHeat}$*h] | 81395.70118 | ||
| opexCap | [1e6 Euro/a] | 294.394421 |
112 rows × 1 columns
esM.getOptimizationSummary("StorageModel", outputLevel=2)
| EnergyLand | |||
|---|---|---|---|
| Component | Property | Unit | |
| LTHeatstorage | NPVcontribution | [1e6 Euro] | 4079.380451 |
| TAC | [1e6 Euro/a] | 4079.380451 | |
| capacity | [GW$_{LTHeat}$*h] | 247.387544 | |
| capexCap | [1e6 Euro/a] | 3703.954264 | |
| commissioning | [GW$_{LTHeat}$*h] | 247.387544 | |
| invest | [1e6 Euro] | 36365.968952 | |
| operationCharge | [GW$_{LTHeat}$*h/a] | 117664.977687 | |
| [GW$_{LTHeat}$*h] | 117664.977687 | ||
| operationDischarge | [GW$_{LTHeat}$*h/a] | 105911.368227 | |
| [GW$_{LTHeat}$*h] | 105911.368227 | ||
| opexCap | [1e6 Euro/a] | 363.65969 | |
| opexCharge | [1e6 Euro/a] | 11.766498 | |
| Li-ion batteries | NPVcontribution | [1e6 Euro] | 4013.435069 |
| TAC | [1e6 Euro/a] | 4013.435069 | |
| capacity | [GW$_{el}$*h] | 204.845137 | |
| capexCap | [1e6 Euro/a] | 3663.355922 | |
| commissioning | [GW$_{el}$*h] | 204.845137 | |
| invest | [1e6 Euro] | 24581.416432 | |
| operationCharge | [GW$_{el}$*h/a] | 59393.168636 | |
| [GW$_{el}$*h] | 59393.168636 | ||
| operationDischarge | [GW$_{el}$*h/a] | 55281.19631 | |
| [GW$_{el}$*h] | 55281.19631 | ||
| opexCap | [1e6 Euro/a] | 344.13983 | |
| opexCharge | [1e6 Euro/a] | 5.939317 |