Performance Summary Usage¶
This example shows how to integrate the performance summary to the optimization to have more information how your optimization performs. The summary is created and added to the energy system model (esM) instance if the boolean is set to True in the optimize()-method.
Performance Summary includes:
- RAM usage
- FINE parameters
- TSAM parameters
- Gurobi values
Import Modules and Data¶
import fine as fn
import pandas as pd
Load Multi-regional Energy System Example¶
To show the functionality of the performance summary, the example of the multi-regional Energy System workflow is used. The following code gets the input data and sets up the esM instance.
def getModel(data):
"""Create and return an energy system model instance."""
# %matplotlib inline
# %load_ext autoreload
# %autoreload 2
# %% [markdown]
# # 2. Create an energy system model instance
#
# The structure of the energy system model is given by the considered locations, commodities, the number of time steps as well as the hours per time step.
#
# The commodities are specified by a unit (i.e. 'GW_electric', 'GW_H2lowerHeatingValue', 'Mio. t CO2/h') which can be given as an energy or mass unit per hour. Furthermore, the cost unit and length unit are specified.
# %%
locations = {
"cluster_0",
"cluster_1",
"cluster_2",
"cluster_3",
"cluster_4",
"cluster_5",
"cluster_6",
"cluster_7",
}
commodityUnitDict = {
"electricity": r"GW$_{el}$",
"methane": r"GW$_{CH_{4},LHV}$",
"biogas": r"GW$_{biogas,LHV}$",
"CO2": r"Mio. t$_{CO_2}$/h",
"hydrogen": r"GW$_{H_{2},LHV}$",
}
commodities = {"electricity", "hydrogen", "methane", "biogas", "CO2"}
numberOfTimeSteps = 8760
hoursPerTimeStep = 1
CO2_reductionTarget = 0.1
balanceLimit = pd.DataFrame(
index=["CO2 limit"],
columns=["Total", "lowerBound"],
data=[[-366 * (1 - CO2_reductionTarget), True]],
)
# %%
esM = fn.EnergySystemModel(
locations=locations,
commodities=commodities,
numberOfTimeSteps=numberOfTimeSteps,
commodityUnitsDict=commodityUnitDict,
hoursPerTimeStep=hoursPerTimeStep,
costUnit="1e9 Euro",
lengthUnit="km",
verboseLogLevel=0,
balanceLimit=balanceLimit,
)
# %% [markdown]
# # 3. Add commodity sources to the energy system model
# %% [markdown]
# ## 3.1. Electricity sources
# %% [markdown]
# ### Wind onshore
# %%
esM.add(
fn.Source(
esM=esM,
name="Wind (onshore)",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["Wind (onshore), operationRateMax"],
capacityMax=data["Wind (onshore), capacityMax"],
investPerCapacity=1.1,
opexPerCapacity=1.1 * 0.02,
interestRate=0.08,
economicLifetime=20,
)
)
# %% [markdown]
# Full load hours:
# %%
data["Wind (onshore), operationRateMax"].sum()
# %% [markdown]
# ### Wind offshore
# %%
esM.add(
fn.Source(
esM=esM,
name="Wind (offshore)",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["Wind (offshore), operationRateMax"],
capacityMax=data["Wind (offshore), capacityMax"],
investPerCapacity=2.3,
opexPerCapacity=2.3 * 0.02,
interestRate=0.08,
economicLifetime=20,
)
)
# %% [markdown]
# Full load hours:
# %%
data["Wind (offshore), operationRateMax"].sum()
# %% [markdown]
# ### PV
# %%
esM.add(
fn.Source(
esM=esM,
name="PV",
commodity="electricity",
hasCapacityVariable=True,
operationRateMax=data["PV, operationRateMax"],
capacityMax=data["PV, capacityMax"],
investPerCapacity=0.65,
opexPerCapacity=0.65 * 0.02,
interestRate=0.08,
economicLifetime=25,
)
)
# %% [markdown]
# Full load hours:
# %%
data["PV, operationRateMax"].sum()
# %% [markdown]
# ### Exisisting run-of-river hydroelectricity plants
# %%
esM.add(
fn.Source(
esM=esM,
name="Existing run-of-river plants",
commodity="electricity",
hasCapacityVariable=True,
operationRateFix=data["Existing run-of-river plants, operationRateFix"],
tsaWeight=0.01,
capacityFix=data["Existing run-of-river plants, capacityFix"],
investPerCapacity=0,
opexPerCapacity=0.208,
)
)
# %% [markdown]
# ## 3.2. Methane (natural gas and biogas)
# %% [markdown]
# ### Natural gas
# %%
esM.add(
fn.Source(
esM=esM,
name="Natural gas purchase",
commodity="methane",
hasCapacityVariable=False,
commodityCost=0.0331 * 1e-3,
)
)
# %% [markdown]
# ### Biogas
# %%
esM.add(
fn.Source(
esM=esM,
name="Biogas purchase",
commodity="biogas",
operationRateMax=data["Biogas, operationRateMax"],
hasCapacityVariable=False,
commodityCost=0.05409 * 1e-3,
)
)
# %% [markdown]
# # 4. Add conversion components to the energy system model
# %% [markdown]
# ### Combined cycle gas turbine plants
# %%
esM.add(
fn.Conversion(
esM=esM,
name="CCGT plants (methane)",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={
"electricity": 1,
"methane": -1 / 0.6,
"CO2": 201 * 1e-6 / 0.6,
},
hasCapacityVariable=True,
investPerCapacity=0.65,
opexPerCapacity=0.021,
interestRate=0.08,
economicLifetime=33,
)
)
# %% [markdown]
# ### New combined cycle gas turbine plants for biogas
# %%
esM.add(
fn.Conversion(
esM=esM,
name="New CCGT plants (biogas)",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "biogas": -1 / 0.63},
hasCapacityVariable=True,
investPerCapacity=0.7,
opexPerCapacity=0.021,
interestRate=0.08,
economicLifetime=33,
)
)
# %% [markdown]
# ### New combined cycly gas turbines for hydrogen
# %%
esM.add(
fn.Conversion(
esM=esM,
name="New CCGT plants (hydrogen)",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": 1, "hydrogen": -1 / 0.63},
hasCapacityVariable=True,
investPerCapacity=0.7,
opexPerCapacity=0.021,
interestRate=0.08,
economicLifetime=33,
)
)
# %% [markdown]
# ### Electrolyzers
# %%
esM.add(
fn.Conversion(
esM=esM,
name="Electrolyzer",
physicalUnit=r"GW$_{el}$",
commodityConversionFactors={"electricity": -1, "hydrogen": 0.7},
hasCapacityVariable=True,
investPerCapacity=0.5,
opexPerCapacity=0.5 * 0.025,
interestRate=0.08,
economicLifetime=10,
)
)
# %% [markdown]
# ### rSOC
# %%
capexRSOC = 1.5
esM.add(
fn.Conversion(
esM=esM,
name="rSOEC",
physicalUnit=r"GW$_{el}$",
linkedConversionCapacityID="rSOC",
commodityConversionFactors={"electricity": -1, "hydrogen": 0.6},
hasCapacityVariable=True,
investPerCapacity=capexRSOC / 2,
opexPerCapacity=capexRSOC * 0.02 / 2,
interestRate=0.08,
economicLifetime=10,
)
)
esM.add(
fn.Conversion(
esM=esM,
name="rSOFC",
physicalUnit=r"GW$_{el}$",
linkedConversionCapacityID="rSOC",
commodityConversionFactors={"electricity": 1, "hydrogen": -1 / 0.6},
hasCapacityVariable=True,
investPerCapacity=capexRSOC / 2,
opexPerCapacity=capexRSOC * 0.02 / 2,
interestRate=0.08,
economicLifetime=10,
)
)
# %% [markdown]
# # 5. Add commodity storages to the energy system model
# %% [markdown]
# ## 5.1. Electricity storage
# %% [markdown]
# ### Lithium ion batteries
#
# The self discharge of a lithium ion battery is here described as 3% per month. The self discharge per hours is obtained using the equation (1-$\text{selfDischarge}_\text{hour})^{30*24\text{h}} = 1-\text{selfDischarge}_\text{month}$.
# %%
esM.add(
fn.Storage(
esM=esM,
name="Li-ion batteries",
commodity="electricity",
hasCapacityVariable=True,
chargeEfficiency=0.95,
cyclicLifetime=10000,
dischargeEfficiency=0.95,
selfDischarge=1 - (1 - 0.03) ** (1 / (30 * 24)),
chargeRate=1,
dischargeRate=1,
doPreciseTsaModeling=False,
investPerCapacity=0.151,
opexPerCapacity=0.002,
interestRate=0.08,
economicLifetime=22,
)
)
# %% [markdown]
# ## 5.2. Hydrogen storage
# %% [markdown]
# ### Hydrogen filled salt caverns
# The maximum capacity is here obtained by: dividing the given capacity (which is given for methane) by the lower heating value of methane and then multiplying it with the lower heating value of hydrogen.
# %%
esM.add(
fn.Storage(
esM=esM,
name="Salt caverns (hydrogen)",
commodity="hydrogen",
hasCapacityVariable=True,
capacityVariableDomain="continuous",
capacityPerPlantUnit=133,
chargeRate=1 / 470.37,
dischargeRate=1 / 470.37,
sharedPotentialID="Existing salt caverns",
stateOfChargeMin=0.33,
stateOfChargeMax=1,
capacityMax=data["Salt caverns (hydrogen), capacityMax"],
investPerCapacity=0.00011,
opexPerCapacity=0.00057,
interestRate=0.08,
economicLifetime=30,
)
)
# %% [markdown]
# ## 5.3. Methane storage
# %% [markdown]
# ### Methane filled salt caverns
# %%
esM.add(
fn.Storage(
esM=esM,
name="Salt caverns (biogas)",
commodity="biogas",
hasCapacityVariable=True,
capacityVariableDomain="continuous",
capacityPerPlantUnit=443,
chargeRate=1 / 470.37,
dischargeRate=1 / 470.37,
sharedPotentialID="Existing salt caverns",
stateOfChargeMin=0.33,
stateOfChargeMax=1,
capacityMax=data["Salt caverns (methane), capacityMax"],
investPerCapacity=0.00004,
opexPerCapacity=0.00001,
interestRate=0.08,
economicLifetime=30,
)
)
# %% [markdown]
# ## 5.4 Pumped hydro storage
# %% [markdown]
# ### Pumped hydro storage
# %%
esM.add(
fn.Storage(
esM=esM,
name="Pumped hydro storage",
commodity="electricity",
chargeEfficiency=0.88,
dischargeEfficiency=0.88,
hasCapacityVariable=True,
selfDischarge=1 - (1 - 0.00375) ** (1 / (30 * 24)),
chargeRate=0.16,
dischargeRate=0.12,
capacityFix=data["Pumped hydro storage, capacityFix"],
investPerCapacity=0,
opexPerCapacity=0.000153,
)
)
# %% [markdown]
# # 6. Add commodity transmission components to the energy system model
# %% [markdown]
# ## 6.1. Electricity transmission
# %% [markdown]
# ### AC cables
# %% [markdown]
# esM.add(fn.LinearOptimalPowerFlow(esM=esM, name='AC cables', commodity='electricity',
# hasCapacityVariable=True, capacityFix=data['AC cables, capacityFix'],
# reactances=data['AC cables, reactances']))
# %%
esM.add(
fn.Transmission(
esM=esM,
name="AC cables",
commodity="electricity",
hasCapacityVariable=True,
capacityFix=data["AC cables, capacityFix"],
)
)
# %% [markdown]
# ### DC cables
# %%
esM.add(
fn.Transmission(
esM=esM,
name="DC cables",
commodity="electricity",
losses=data["DC cables, losses"],
distances=data["DC cables, distances"],
hasCapacityVariable=True,
capacityFix=data["DC cables, capacityFix"],
)
)
# %% [markdown]
# ## 6.2 Methane transmission
# %% [markdown]
# ### Methane pipeline
# %%
esM.add(
fn.Transmission(
esM=esM,
name="Pipelines (biogas)",
commodity="biogas",
distances=data["Pipelines, distances"],
hasCapacityVariable=True,
hasIsBuiltBinaryVariable=True,
bigM=300,
locationalEligibility=data["Pipelines, eligibility"],
capacityMax=data["Pipelines, eligibility"] * 15,
sharedPotentialID="pipelines",
investPerCapacity=0.000037,
investIfBuilt=0.000314,
interestRate=0.08,
economicLifetime=40,
)
)
# %% [markdown]
# ## 6.3 Hydrogen transmission
# %% [markdown]
# ### Hydrogen pipelines
# %%
esM.add(
fn.Transmission(
esM=esM,
name="Pipelines (hydrogen)",
commodity="hydrogen",
distances=data["Pipelines, distances"],
hasCapacityVariable=True,
hasIsBuiltBinaryVariable=True,
bigM=300,
locationalEligibility=data["Pipelines, eligibility"],
capacityMax=data["Pipelines, eligibility"] * 15,
sharedPotentialID="pipelines",
investPerCapacity=0.000177,
investIfBuilt=0.00033,
interestRate=0.08,
economicLifetime=40,
)
)
# %% [markdown]
# # 7. Add commodity sinks to the energy system model
# %% [markdown]
# ## 7.1. Electricity sinks
# %% [markdown]
# ### Electricity demand
# %%
esM.add(
fn.Sink(
esM=esM,
name="Electricity demand",
commodity="electricity",
hasCapacityVariable=False,
operationRateFix=data["Electricity demand, operationRateFix"],
)
)
# %% [markdown]
# ## 7.2. Hydrogen sinks
# %% [markdown]
# ### Fuel cell electric vehicle (FCEV) demand
# %%
FCEV_penetration = 0.5
esM.add(
fn.Sink(
esM=esM,
name="Hydrogen demand",
commodity="hydrogen",
hasCapacityVariable=False,
operationRateFix=data["Hydrogen demand, operationRateFix"]
* FCEV_penetration,
)
)
# %% [markdown]
# ## 7.3. CO2 sinks
# %% [markdown]
# ### CO2 exiting the system's boundary
# %%
esM.add(
fn.Sink(
esM=esM,
name="CO2 to enviroment",
commodity="CO2",
hasCapacityVariable=False,
balanceLimitID="CO2 limit",
)
)
return esM
from getData import getData
data = getData()
esM = getModel(data)
The distances of a component are set to a normalized value of 1.
Run Model with Performance Summary¶
The function esM.optimizeAndIncludePerformanceSummary is a wrapper around esM.optimize and additionally stores a performance summary (in Dataframe format) as attribute ('esM.performanceSummary') in the esM instance.
Usage
Set the boolean includePerformanceSummary in esM.optimize(...) to True to get a performance summary after optimization. There is no need to change the other arguments.
Notes
the following packages are required: psutil, grblogtools
if time series aggregation (TSA) is used, storeTSAinstance should be set to True so that the TSA parameters are saved in the ESM instance
a log file name should be specified. This log file is used by Gurobi to store the log and later used to extract relevant Gurobi parameters
# Usage
logFileName = "run.log"
# If time series aggregation is enabled, the TSA instance needs to be saved (storeTSAinstance=True) in order to be included in the performance summary
esM.aggregateTemporally(numberOfTypicalPeriods=2, storeTSAinstance=True)
# with performance summary
esM.optimize(
timeSeriesAggregation=True,
logFileName=logFileName,
optimizationSpecs="OptimalityTol=1e-3 method=2 cuts=0 MIPGap=5e-3",
includePerformanceSummary=True,
solver=fn.utils.ImplementedSolvers.GUROBI.value,
)
Clustering time series data with 2 typical periods and 24 time steps per period
further clustered to 12 segments per period...
(5.1264 sec)
Time series aggregation specifications:
Number of typical periods:2, 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...
(0.1490 sec)
Declaring sets, variables and constraints for ConversionModel
declaring sets...
declaring variables...
declaring constraints...
(0.0563 sec)
Declaring sets, variables and constraints for StorageModel
declaring sets...
declaring variables...
declaring constraints...
(1.3888 sec)
Declaring sets, variables and constraints for TransmissionModel
declaring sets...
declaring variables...
declaring constraints...
(0.1051 sec)
Declaring shared potential constraint...
(0.0020 sec)
Declaring linked component quantity constraint...
(0.0000 sec)
Declaring commodity balances...
(0.0983 sec)
(0.0000 sec)
Declaring objective function...
(0.8590 sec)
Either solver not selected or specified solver not available.gurobi is set as solver.
Using license file C:\Users\t.gross\gurobi.lic
Academic license - for non-commercial use only
Read LP format model from file C:\Users\T58C8~1.GRO\AppData\Local\Temp\tmp18vfvg5m.pyomo.lp
Reading time = 0.10 seconds
x1: 44997 rows, 16580 columns, 122638 nonzeros
Changed value of parameter QCPDual to 1
Prev: 0 Min: 0 Max: 1 Default: 0
Changed value of parameter Threads to 3
Prev: 0 Min: 0 Max: 1024 Default: 0
Changed value of parameter logfile to run.log
Prev: Default:
Changed value of parameter OptimalityTol to 0.001
Prev: 1e-06 Min: 1e-09 Max: 0.01 Default: 1e-06
Changed value of parameter method to 2
Prev: -1 Min: -1 Max: 5 Default: -1
Changed value of parameter cuts to 0
Prev: -1 Min: -1 Max: 3 Default: -1
Changed value of parameter MIPGap to 0.005
Prev: 0.0001 Min: 0.0 Max: inf Default: 0.0001
Gurobi Optimizer version 9.0.1 build v9.0.1rc0 (win64)
Optimize a model with 44997 rows, 16580 columns and 122638 nonzeros
Model fingerprint: 0xca5ad7cf
Variable types: 16528 continuous, 52 integer (52 binary)
Coefficient statistics:
Matrix range [7e-07, 5e+02]
Objective range [1e-05, 3e-01]
Bounds range [4e-02, 1e+05]
RHS range [4e-02, 3e+02]
Presolve removed 18005 rows and 7809 columns
Presolve time: 0.12s
Presolved: 26992 rows, 8771 columns, 89294 nonzeros
Variable types: 8745 continuous, 26 integer (26 binary)
Root barrier log...
Ordering time: 0.01s
Barrier statistics:
Dense cols : 168
Free vars : 176
AA' NZ : 1.743e+05
Factor NZ : 6.563e+05 (roughly 20 MBytes of memory)
Factor Ops : 7.640e+07 (less than 1 second per iteration)
Threads : 3
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 3.22081149e+05 -2.92037832e+06 6.80e+05 7.47e-02 4.27e+03 0s
1 2.76383617e+05 -1.22928033e+07 4.92e+05 7.28e+03 3.09e+03 0s
2 1.67469410e+05 -1.05564170e+07 2.79e+05 5.56e+03 1.91e+03 0s
3 1.33437477e+05 -6.45497567e+06 1.93e+05 1.09e+04 1.11e+03 0s
4 7.53242751e+04 -3.36063063e+06 8.00e+04 4.89e+03 5.82e+02 0s
5 5.55917340e+04 -2.03159500e+06 4.50e+04 5.19e+03 2.36e+02 0s
6 3.87721396e+04 -5.22748032e+05 2.06e+04 3.65e+03 1.05e+02 0s
7 2.25904487e+04 -2.83566987e+05 6.31e+03 1.26e+03 3.47e+01 0s
8 9.69205978e+03 -1.79875756e+05 1.44e+03 6.30e+02 1.19e+01 0s
9 5.72185314e+03 -8.25632694e+04 5.88e+02 2.28e+02 4.78e+00 0s
10 2.44231217e+03 -3.26369131e+04 1.11e+02 6.84e+01 1.40e+00 0s
11 1.35841273e+03 -1.03718531e+04 5.01e+00 1.34e+01 3.54e-01 0s
12 6.53464301e+02 -3.05393209e+03 2.79e-02 3.90e+00 1.03e-01 0s
13 4.49199640e+02 -1.92992117e+03 1.46e-02 2.48e+00 6.51e-02 0s
14 2.75490700e+02 -1.45379073e+03 6.40e-03 1.86e+00 4.67e-02 0s
15 1.30191388e+02 -3.07232786e+02 1.43e-03 3.94e-01 1.17e-02 0s
16 8.43261262e+01 -6.35030113e+01 5.13e-04 1.25e-01 3.94e-03 0s
17 6.48796401e+01 9.85014109e-01 2.23e-04 4.79e-02 1.70e-03 0s
18 5.35651687e+01 1.40656253e+01 9.36e-05 3.27e-02 1.05e-03 0s
19 4.70392106e+01 2.81618221e+01 3.47e-05 1.59e-02 5.02e-04 0s
20 4.54285541e+01 3.00278575e+01 2.37e-05 1.36e-02 4.10e-04 0s
21 4.33901840e+01 3.45005500e+01 1.14e-05 8.10e-03 2.36e-04 0s
22 4.19986349e+01 3.74337316e+01 5.14e-06 4.16e-03 1.21e-04 0s
23 4.12968550e+01 3.88955411e+01 2.72e-06 2.03e-03 6.28e-05 0s
24 4.07772614e+01 3.94873652e+01 1.27e-06 1.09e-03 3.33e-05 0s
25 4.05524435e+01 3.97532629e+01 7.76e-07 6.53e-04 2.07e-05 0s
26 4.04055794e+01 3.99835364e+01 4.66e-07 2.70e-04 1.10e-05 0s
27 4.03547163e+01 4.00509942e+01 3.67e-07 1.58e-04 7.85e-06 0s
28 4.03181376e+01 4.00816471e+01 2.97e-07 1.14e-04 6.12e-06 1s
29 4.02556271e+01 4.01110093e+01 1.69e-07 7.22e-05 3.72e-06 1s
30 4.02312354e+01 4.01348744e+01 1.24e-07 3.86e-05 2.50e-06 1s
31 4.02144993e+01 4.01448158e+01 9.39e-08 2.29e-05 1.80e-06 1s
32 4.02030659e+01 4.01482662e+01 7.35e-08 1.73e-05 1.41e-06 1s
33 4.01936736e+01 4.01520096e+01 5.67e-08 1.28e-05 1.08e-06 1s
34 4.01911099e+01 4.01532768e+01 5.16e-08 1.14e-05 9.78e-07 1s
35 4.01869289e+01 4.01559727e+01 4.36e-08 8.18e-06 8.02e-07 1s
36 4.01791482e+01 4.01604511e+01 2.81e-08 3.33e-06 4.90e-07 1s
37 4.01688879e+01 4.01623276e+01 8.91e-09 1.28e-06 1.71e-07 1s
38 4.01645550e+01 4.01630880e+01 1.78e-09 3.26e-07 3.55e-08 1s
39 4.01639083e+01 4.01634549e+01 7.54e-10 9.78e-08 1.08e-08 1s
40 4.01637662e+01 4.01635460e+01 4.59e-10 5.25e-08 5.16e-09 1s
41 4.01636746e+01 4.01635935e+01 2.18e-09 2.99e-08 1.80e-09 1s
42 4.01636547e+01 4.01637063e+01 8.05e-07 4.43e-07 1.22e-09 1s
43 4.01636545e+01 4.01637857e+01 7.03e-07 3.49e-07 1.05e-09 1s
44 4.01636538e+01 4.01635926e+01 4.17e-07 1.01e-07 2.98e-10 1s
45 4.01636536e+01 4.01636220e+01 3.58e-07 2.42e-07 1.81e-10 1s
46 4.01636533e+01 4.01639850e+01 2.19e-07 6.67e-07 1.28e-10 1s
47 4.01636533e+01 4.01639839e+01 2.15e-07 6.29e-07 1.26e-10 1s
48 4.01636533e+01 4.01639791e+01 2.16e-07 6.26e-07 1.25e-10 1s
49 4.01636533e+01 4.01640809e+01 2.77e-07 6.57e-07 1.24e-10 1s
50 4.01636533e+01 4.01640802e+01 2.76e-07 6.55e-07 1.24e-10 1s
51 4.01636533e+01 4.01641728e+01 2.76e-07 6.82e-07 1.23e-10 1s
52 4.01636533e+01 4.01641662e+01 2.76e-07 6.82e-07 1.23e-10 1s
53 4.01636533e+01 4.01641649e+01 2.76e-07 6.82e-07 1.23e-10 1s
54 4.01636533e+01 4.01641433e+01 2.76e-07 6.82e-07 1.23e-10 1s
55 4.01636533e+01 4.01641471e+01 2.75e-07 6.74e-07 1.23e-10 1s
56 4.01636533e+01 4.01641360e+01 2.75e-07 6.77e-07 1.23e-10 1s
Barrier solved model in 56 iterations and 0.91 seconds
Optimal objective 4.01636746e+01
Root relaxation: objective 4.016365e+01, 2611 iterations, 0.86 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 40.16365 0 7 - 40.16365 - - 1s
H 0 0 40.2122149 40.16365 0.12% - 1s
Explored 1 nodes (2611 simplex iterations) in 1.05 seconds
Thread count was 3 (of 8 available processors)
Solution count 1: 40.2122
Optimal solution found (tolerance 5.00e-03)
Best objective 4.021221485623e+01, best bound 4.016365299024e+01, gap 0.1208%
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: 1.052042007446289
Error rc: 0
Time: 1.6672213077545166
Name: x1
Lower bound: 40.16365299024388
Upper bound: 40.21221485623409
Number of objectives: 1
Number of constraints: 44997
Number of variables: 16580
Number of binary variables: 52
Number of integer variables: 52
Number of continuous variables: 16528
Number of nonzeros: 122638
Sense: minimize
Solve time: 3.2098329067230225 sec.
Processing optimization output...
for SourceSinkModel ... (0.9859sec)
for ConversionModel ... (0.5402sec)
for StorageModel ... (1.5049sec)
for TransmissionModel ... (1.2071sec)
(4.2651 sec)
# Access the performance Summary
pd.set_option("display.max_rows", 500)
esM.performanceSummary
| Value | ||
|---|---|---|
| Category | Parameter | |
| FineParameters | noOfRegions | 8 |
| numberOfTimeSteps | 8760 | |
| hoursPerTimestep | 1 | |
| numberOfYears | 1.0 | |
| optimizationSpecs | OptimalityTol=1e-3 method=2 cuts=0 MIPGap=5e-3 | |
| RAMUsage | ramUsageStartGB | 0.311729 |
| ramUsageEndGB | 0.352001 | |
| ProcessingTimes | buildtime | 2.664385 |
| tsaBuildTime | 5.126427 | |
| solvetime | 3.209833 | |
| runtime | 10.140343 | |
| TSAParameters | clusterMethod | hierarchical |
| noTypicalPeriods | 2 | |
| hoursPerPeriod | 24 | |
| segmentation | True | |
| noSegments | 12 | |
| tsaSolver | cbc | |
| timeStepsPerPeriod | 24 | |
| tsaBuildTime | 5.126427 | |
| GurobiSummary | Platform | win64 |
| Time | 03/21/24 10:37:50 | |
| NumConstrs | 44997 | |
| NumVars | 16580 | |
| NumNZs | 122638 | |
| Fingerprint | 0x24632396 | |
| PresolvedNumConVars | 8745 | |
| PresolvedNumIntVars | 26 | |
| PresolvedNumBinVars | 26 | |
| MinCoeff | 0.000001 | |
| MaxCoeff | 500.0 | |
| MinObjCoeff | 0.00001 | |
| MaxObjCoeff | 0.3 | |
| MinBound | 0.04 | |
| MaxBound | 100000.0 | |
| MinRHS | 0.04 | |
| MaxRHS | 300.0 | |
| PresolveTime | 0.15 | |
| PresolvedNumConstrs | 26992 | |
| PresolvedNumVars | 8771 | |
| PresolvedNumNZs | 89294 | |
| Status | OPTIMAL | |
| ObjVal | 40.212229 | |
| RelaxObj | 40.16367 | |
| RelaxIterCount | 2675 | |
| RelaxTime | 1.03 | |
| OrderingTime | 0.02 | |
| BarIterCount | 54 | |
| Runtime | 1.26 | |
| NodeCount | 1 | |
| IterCount | 2675 | |
| ObjBound | 40.163667 | |
| MIPGap | 0.001208 | |
| Threads | 3 | |
| Cores | 8 | |
| SolCount | 1 | |
| ModelType | MIP | |
| ChangedParams | {} | |
| LogFilePath | C:\Users\t.gross\Documents\Programming\Jugit\f... | |
| LogNumber | 1 | |
| Seed | 0 | |
| Version | 9.0.1 |