beginner's problems

444 views
Skip to first unread message

marko kolenc

unread,
Nov 30, 2017, 5:45:23 AM11/30/17
to pypsa

Dear all,

I want to test pypsa for its usability. However, I am facing a problem when rinning examples from the pypsa web page.  Minimal_example_pf.py works, but when I want to start minimal_example_lopf.py I get some errors that I cannot resolve. I face the very same problem at my colleagues' computer. I would be glad if you have any ideas what this could be:

Thank you.


attribute  v_nom type    x    y carrier  v_mag_pu_set  v_mag_pu_min  \
My bus 0     1.0       0.0  0.0      AC           1.0           0.0  
My bus 1     1.0       0.0  0.0      AC           1.0           0.0  
My bus 2     1.0       0.0  0.0      AC           1.0           0.0  

attribute  v_mag_pu_max control sub_network 
My bus 0            inf      PQ             
My bus 1            inf      PQ             
My bus 2            inf      PQ             
attribute      bus0      bus1 type       x    r    g    b  s_nom  \
My line 0  My bus 0  My bus 1       0.0001  0.0  0.0  0.0   60.0  
My line 1  My bus 1  My bus 2       0.0001  0.0  0.0  0.0   60.0  
My line 2  My bus 2  My bus 0       0.0001  0.0  0.0  0.0   60.0  

attribute  s_nom_extendable  s_nom_min    ...      terrain_factor  \
My line 0             False        0.0    ...                 1.0  
My line 1             False        0.0    ...                 1.0  
My line 2             False        0.0    ...                 1.0  

attribute  num_parallel  v_ang_min  v_ang_max  sub_network  x_pu  r_pu g_pu  \
My line 0           1.0       -inf        inf                0.0   0.0  0.0  
My line 1           1.0       -inf        inf                0.0   0.0  0.0  
My line 2           1.0       -inf        inf                0.0   0.0  0.0  

attribute  b_pu  s_nom_opt 
My line 0   0.0        0.0 
My line 1   0.0        0.0 
My line 2   0.0        0.0 

[3 rows x 23 columns]
attribute       bus control type  p_nom  p_nom_extendable  p_nom_min  \
My gen 0   My bus 0      PQ       100.0             False        0.0  
My gen 1   My bus 1      PQ       100.0             False        0.0  

attribute  p_nom_max  p_min_pu  p_max_pu  p_set    ...      start_up_cost  \
My gen 0         inf       0.0       1.0    0.0    ...                0.0  
My gen 1         inf       0.0       1.0    0.0    ...                0.0  

attribute  shut_down_cost min_up_time  min_down_time  initial_status  \
My gen 0              0.0           0              0               1  
My gen 1              0.0           0              0               1  

attribute  ramp_limit_up  ramp_limit_down  ramp_limit_start_up  \
My gen 0             NaN              NaN                  1.0  
My gen 1             NaN              NaN                  1.0  

attribute  ramp_limit_shut_down  p_nom_opt 
My gen 0                    1.0        0.0 
My gen 1                    1.0        0.0 

[2 rows x 27 columns]
My gen 0    0.0
My gen 1    0.0
Name: p_set, dtype: float64
attribute       bus type  p_set  q_set  sign
My load    My bus 2       100.0    0.0  -1.0
My load    100.0
Name: p_set, dtype: float64
INFO:pypsa.pf:Slack bus for sub-network 0 is My bus 0
INFO:pypsa.opf:Performed preliminary steps
INFO:pypsa.opf:Building pyomo model using `angles` formulation
Index(['now'], dtype='object')
INFO:pypsa.opf:Solving model using glpk
ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 616, solve
ERROR:pyomo.opt:Solver (glpk) returned non-zero return code (1)
    Solver (glpk) returned non-zero return code (1)
ERROR:pyomo.opt:Solver log:
ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 621, solve
GLPSOL: GLPK LP/MIP Solver, v4.61
    Solver log:
Parameter(s) specified in the command line:
    GLPSOL: GLPK LP/MIP Solver, v4.61
    Parameter(s) specified in the command line:
 --write C:\Users\komarko\AppData\Local\Temp\tmp55ee1p88.glpk.raw --wglp C:\Users\komarko\AppData\Local\Temp\tmpapbcgxv9.glpk.glp
     --write C:\Users\komarko\AppData\Local\Temp\tmp55ee1p88.glpk.raw --wglp C:\Users\komarko\AppData\Local\Temp\tmpapbcgxv9.glpk.glp
 --cpxlp C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp
     --cpxlp C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp
Reading problem data from 'C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp'...
    Reading problem data from 'C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp'...
C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp:7: constraints section missing
    C:\Users\komarko\AppData\Local\Temp\tmpkn0t7j9y.pyomo.lp:7: constraints section missing
CPLEX LP file processing error
    CPLEX LP file processing error

Traceback (most recent call last):
  File "C:/Users/komarko/Desktop/pypsa 2/examples/minimal_example_lopf.py", line 82, in <module>
    network.lopf(extra_functionality=my_f)
  File "C:\Users\komarko\AppData\Roaming\Python\Python36\site-packages\pypsa\opf.py", line 1338, in network_lopf
    keepfiles=keep_files, options=solver_options)
  File "C:\Users\komarko\AppData\Roaming\Python\Python36\site-packages\pyomo\opt\base\solvers.py", line 623, in solve
    "Solver (%s) did not exit normally" % self.name)
pyutilib.common._exceptions.ApplicationError: Solver (glpk) did not exit normally

Process finished with exit code 1

Tom Brown

unread,
Nov 30, 2017, 5:53:46 AM11/30/17
to py...@googlegroups.com
Hi Marko,

This bug was introduced by an update to pandas and was fixed in the
master branch yesterday, see the discussion here:

https://github.com/PyPSA/PyPSA/issues/26

I'll update the pip repository tonight or tomorrow. In the meantime you
can either:

i) Downgrade pandas to 0.20 or earlier

ii) Use a different solver like cbc (solver_name="cbc" in network.lopf)


Background: In pandas 0.21 the sum of an empty Series/DataFrame returns
NaN, whereas before it returned zero. Jonas has now pushed a workaround.

Best,

Tom
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To post to this group, send email to py...@googlegroups.com
> <mailto:py...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/3bd5e7c4-8e27-4be9-8127-dcaf58b27db2%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/3bd5e7c4-8e27-4be9-8127-dcaf58b27db2%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Tom Brown
Postdoctoral Researcher
Frankfurt Institute for Advanced Studies
https://fias.uni-frankfurt.de/physics/schramm/renewable-energy-system-and-network-analysis/
Personal site: https://www.nworbmot.org
Phone: +49 69 798 47693

Marko Kolenc

unread,
Nov 30, 2017, 6:02:36 AM11/30/17
to Tom Brown, py...@googlegroups.com

Thank you for the quick reply.
(....when testing new tool it's good to know that it has active and responsive community.)

Regards,
Marko




--
Tom Brown
Postdoctoral Researcher
Frankfurt Institute for Advanced Studies
https://fias.uni-frankfurt.de/physics/schramm/renewable-energy-system-and-network-analysis/
Personal site: https://www.nworbmot.org
Phone: +49 69 798 47693

--
You received this message because you are subscribed to a topic in the Google Groups "pypsa" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pypsa/dQspw7aMikQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pypsa+unsubscribe@googlegroups.com.
To post to this group, send an email to py...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pypsa/aa90d5ab-b89c-08ba-3622-a198825072f5%40fias.uni-frankfurt.de.

For more options, visit https://groups.google.com/d/optout.



--
Prijazen pozdrav
Marko Kolenc
Žal mi je za vse slovnične nepravilnosti.
Xoxo.reply ASAP.

Jonas Hörsch

unread,
Nov 30, 2017, 10:06:04 AM11/30/17
to Marko Kolenc, Tom Brown, py...@googlegroups.com
Hi everyone,

you can always also install packages directly from github using an
invocation like:

pip install git+https://github.com/PyPSA/PyPSA.git

(On the linux machines I am working on at least, if windows does not
like that please tell me).

Best,
Jonas
>> > an email to pypsa+un...@googlegroups.com
>> > <mailto:pypsa+un...@googlegroups.com>.
>> > To post to this group, send email to py...@googlegroups.com
>> > <mailto:py...@googlegroups.com>.
>> > To view this discussion on the web, visit
>> > https://groups.google.com/d/msgid/pypsa/3bd5e7c4-8e27-
>> 4be9-8127-dcaf58b27db2%40googlegroups.com
>> > <https://groups.google.com/d/msgid/pypsa/3bd5e7c4-8e27-
>> 4be9-8127-dcaf58b27db2%40googlegroups.com?utm_medium=
>> email&utm_source=footer>.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Tom Brown
>> Postdoctoral Researcher
>> Frankfurt Institute for Advanced Studies
>> https://fias.uni-frankfurt.de/physics/schramm/renewable-
>> energy-system-and-network-analysis/
>> Personal site: https://www.nworbmot.org
>> Phone: +49 69 798 47693
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "pypsa" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/pypsa/dQspw7aMikQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> pypsa+un...@googlegroups.com.
>> To post to this group, send an email to py...@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/
>> msgid/pypsa/aa90d5ab-b89c-08ba-3622-a198825072f5%40fias.uni-frankfurt.de.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Prijazen pozdrav
> Marko Kolenc
> Žal mi je za vse slovnične nepravilnosti.
> Xoxo.reply ASAP.
>
> --
> You received this message because you are subscribed to the Google Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pypsa+un...@googlegroups.com.
> To post to this group, send an email to py...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/pypsa/CAGppMc3DDKVJaArWRjraFkV4NOp-bOrPKU-VQJrGN91tXC4fWA%40mail.gmail.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages