Code Monkey home page Code Monkey logo

pandapower-paper's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pandapower-paper's Issues

Bug in "Creating an example network"

Moin,

I was trying out https://github.com/e2nIEE/pandapower-paper/blob/master/grid.ipynb and I got at:

`def create_example_net():
    # An empty network object is created, that will be filled in the next steps.
    net = pp.create_empty_network()

    #create slack nodes
    hvb = pp.create_buses(net, 2, vn_kv=110.)
    pp.create_ext_grid(net, hvb[0], s_sc_min_mva=2500, rx_min=0.3)
    pp.create_ext_grid(net, hvb[1], s_sc_min_mva=3000, rx_min=0.2)

    #create a first bus
    lb = pp.create_bus(net, vn_kv=10.)
    # we start with the transformer at the first high voltage bus
    pp.create_transformer(net, hvb[0], lb, std_type="40 MVA 110/10 kV", df=0.1)
    # define the standard types for this network
    std_types = ["70-AL1/11-ST1A 10.0", "NA2XS2Y 1x240 RM/25 6/10 kV"]
    # create several lines and busses below the first transformer
    for length, std_type in zip([1.8, 2.4, 3.6, 4.8, 4.8, 1.2], [0, 1, 0, 1, 1, 1]):
        lb = create_bus_with_line(net, lb, length_km=length, std_type=std_types[std_type])
    lb = 5
    # create several lines and busses below bus 5
    for length, std_type in zip([1.2, 3., 4.8, 3.6, 1.2, 0.6], [1, 1, 1, 0, 1, 0]):
        lb = create_bus_with_line(net, lb, length_km=length, std_type=std_types[std_type])
    # we create another the transformer (this time a 3w transformer) at the other high voltage bus
    # and connect it to bus 8
    pp.create_transformer3w(net, hvb[1], 8, lb, "63/25/38 MVA 110/10/10 kV")
    net.line.loc[net.line.index[net.line.type == "ol"], "endtemp_degree"] = 100 #overhead lines
    net.line.loc[net.line.index[net.line.type == "cs"], "endtemp_degree"] = 20 #cables

    #add constraints
    net.line["max_loading_percent"] = 50
    net.trafo["max_loading_percent"] = 50
    net.bus["max_vm_pu"] = 1.03
    net.bus["min_vm_pu"] = 0.97

    #create load and generation elements
    for bus in [3, 6, 10, 13]:
        pp.create_sgen(net, bus, p_kw=-1280, sn_kva=1280, k=1.2)
    for bus in [3, 4, 5, 6, 7, 9, 10, 11, 12, 13]:
        pp.create_load(net, bus, p_kw=3.5e3)

    # create a valid original switching state
    net.switch.closed.loc[[6, 14]] = False
    
    return net
`

the following error:


TypeError Traceback (most recent call last)
Cell In[11], line 1
----> 1 net = create_example_net()
2 net

Cell In[10], line 37, in create_example_net()
35 #create load and generation elements
36 for bus in [3, 6, 10, 13]:
---> 37 pp.create_sgen(net, bus, p_kw=-1280, sn_mva=1280, k=1.2)
38 for bus in [3, 4, 5, 6, 7, 9, 10, 11, 12, 13]:
39 pp.create_load(net, bus, p_mw=3.5e3)

TypeError: create_sgen() got an unexpected keyword argument 'p_kw'

So it doesn´t work with other units as the standard units of the documentation (with p_mw it works).

Kind regards,
Lukas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.