PyPSA is an open source framework for simulating and optimising modern power and energy systems. Use this tag for questions about using or developing PyPSA.
Questions tagged [pypsa]
12 questions
1
vote
0 answers
I am optimizing a 5 bus system with 2 storage units in PyPSA and not able to visualize all outputs
While optimizing 5 bus system. After doing lopf by GLPK solver, I am able to visualize the real power flow (P)in the lines with the command 'network.lines_t.p0' and the phase angle with the command 'network.buses_t.v_ang * 180 / np.pi' for each time…

Trina Som
- 11
- 1
1
vote
2 answers
Gurobi - Infeasible Constraint
start_time = time.time()
hours = 5
for i in range(hours):
print('---Running hour, ', i)
fsthr = i+35
lsthr = i + 1+ 35
network.lopf(network.snapshots[fsthr:lsthr], solver_name='gurobi', pyomo=False) …

shqu
- 11
- 1
1
vote
1 answer
How to select coordiante values in xarray that are indexed with a hyphen string?
Using PyPSA with the Linopy backend, I getting and xarray object that looks like the following:
Variable 'Link-p_nom':
----------------------
Variable labels:
array([ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27,…

Max Parzen
- 103
- 1
- 6
1
vote
0 answers
Modularization: Use config.yaml file from GitHub repository for module
I want to use an existing snakemake workflow (technology_data) as a module into another workflow (let's call it w). At the moment I manually download (whenever the workflow is setup new) the GitHub repository of technology_data into the desired…

euronion
- 1,142
- 6
- 14
0
votes
1 answer
Solving PyPSA-EUR using HiGHS
I am trying to solve PyPSA-Eur model using HiGHS solver. I see output like following:
153 fixed variables remaining
118 fixed variables remaining
83 fixed variables remaining
48 fixed variables remaining
14 fixed variables remaining
2 …

Dakait
- 2,531
- 1
- 25
- 43
0
votes
3 answers
HiGHS solver for PyPSA-EUR
I am trying to use HiGHS solver for PyPSA-Eur. By setting it in config.yaml like:
solver:
name: highs
options: {}
It throws following error:
RuntimeError: Attempting to use an unavailable solver.
The SolverFactory was unable to create…

Dakait
- 2,531
- 1
- 25
- 43
0
votes
1 answer
PyPSA-EUR SolveNetwork rule throwing error using cbc solver
Followed basic steps to setup PyPSA-Eur. Electricity only test was successful by executing
snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml
but when I execute
snakemake…

Dakait
- 2,531
- 1
- 25
- 43
0
votes
0 answers
Error with pypasa and Glpk solver: [Errno 2]- No such file or directory: 'glpsol'
This is my first time using Pypasa and Glpk Solver so my apologies if this error is very basic. Every time I run the optimization, I see the following error. Any help/comments are much appreciated it! Thank you!
Code: network.lopf(pyomo=…

jr5
- 1
0
votes
1 answer
Adding an isolated storage and two links to a network makes the LOPF takes forever regarding optimizing the same network solved in seconds
I do have a network with buses, lines, generators, generators max_pu and min_pu profiles, loads, loads-p_set and snapshots. Network data is uploaded via import_from_csv. There is a slack bus in the bus.csv file. The network carries AC (no…
0
votes
2 answers
How can I export a PyPSA network with multilinks?
I have a PyPSA network with multilinks which I defined with the override_component_attrs argument of pypsa.Network.
When exporting and reimporting the network as netcfd or csv folder the non-standard attributes are lost.
Is there a way to keep the…
-1
votes
1 answer
When I am importing pypsa module in Spyder IDE, I am getting this error, could you please someone sort out this?
When I am importing pypsa module in spyder IDE, I got this follwing error, and please help me how to sort out this issue?
import pypsa
Traceback (most recent call last):
Cell In[1], line 1
import pypsa
File…

Mayoran
- 7
- 3
-2
votes
1 answer
Import Modules(pypsa)
I did it with pycript.
enter image description here
The following error occurs when running live server in vs code.
enter image description here

김대원
- 1