openego / eTraGo

Optimization of flexibility options for transmission grids based on PyPSA
GNU Affero General Public License v3.0
30 stars 13 forks source link

Calculation using status2019 not working #649

Closed CarlosEpia closed 10 months ago

CarlosEpia commented 10 months ago

The LOPF is working correctly when using the default parameters of etrago, but for an entire year and 300 buses AC it shows the next error: INFO:etrago.cluster.electrical:Start k-medoids Dijkstra Clustering
WARNING:pypsa.io:The following Link have buses which are not defined:
Index(['388', '1388'], dtype='object', name='Link')
WARNING:pypsa.io:The following Link have buses which are not defined:
Index(['388', '1388'], dtype='object', name='Link')
WARNING:pypsa.io:The following Link have buses which are not defined:
Index(['388', '1388'], dtype='object', name='Link')
/home/powerd/etrago/eTraGo/etrago/tools/utilities.py:247: FutureWarning: The geopandas.dataset module is deprecated and will be removed in GeoPandas 1.0. You can get the original 'naturalearth_lowres' data from https://www.naturalearthdata.com/downloads/110m-cultural-vectors/.
path = gpd.datasets.get_path("naturalearth_lowres")
INFO:etrago.cluster.electrical:Network clustered to 300 buses with kmedoids-dijkstra
INFO:etrago.tools.utilities:Start kmedoids-dijkstra clustering GAS
/home/powerd/etrago/eTraGo/etrago/cluster/gas.py:776: FutureWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warni ng.
clusters = pd.Series()
INFO:etrago.tools.utilities:GAS Network clustered to 17 DE-buses and 13 foreign buses with kmedoids-dijkstra algorithm.
WARNING:pypsa.components:Solving optimisation problem with pyomo.In PyPSA version 0.21 the default will change to n.lopf(pyomo=False).Explicitly set n.lopf(pyomo=True) to retain current behaviour.
INFO:pypsa.opf:Performed preliminary steps
INFO:pypsa.opf:Building pyomo model using kirchhoff formulation
Traceback (most recent call last):
File "appl.py", line 498, in
etrago = run_etrago(args, json_path=None)
File "appl.py", line 476, in run_etrago
etrago.lopf()
File "/home/powerd/etrago/eTraGo/etrago/tools/execute.py", line 382, in lopf
iterate_lopf(
File "/home/powerd/etrago/eTraGo/etrago/tools/execute.py", line 315, in iterate_lopf
run_lopf(etrago, extra_functionality, method)
File "/home/powerd/etrago/eTraGo/etrago/tools/execute.py", line 201, in run_lopf
etrago.network.lopf(
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/components.py", line 769, in lopf
return network_lopf(self, **args)
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/opf.py", line 2416, in network_lopf
network_lopf_build_model(
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/opf.py", line 2163, in network_lopf_build_model
define_storage_variables_constraints(network, snapshots)
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/opf.py", line 829, in define_storage_variables_constraints
l_constraint(
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/opt.py", line 203, in l_constraint
sum_expr = _build_sum_expression(variables)
File "/home/powerd/etrago/venv/lib/python3.8/site-packages/pypsa/opt.py", line 141, in _build_sum_expression
expr.linear_vars = [item[1] for item in variables]
AttributeError: can't set attribute

CarlosEpia commented 10 months ago

It was failing in the server because the virtual environment did not have the package: gurobipy.