Menu

Monte Carlo Analysis with Python

Beginners
2016-12-07
2019-10-08
  • Guilherme Custódio

    Hi! I decided to start a Monte Calos analysis with python and opendss that studies the impact of eletric vehicles in distribution networks. However, I don't now how to run Monte Carlo for it with Python and Opendss. Can you give some ideas to start it?
    Thanks,
    Best regards,
    Guilherme.

     
  • Paulo Radatz

    Paulo Radatz - 2016-12-07

    Hello Guilherme,

    I've done a study with PVSystem. Basically, I coded my own Monte Carlo.

    Check out the code by using the following link: https://drive.google.com/open?id=0B5BGi1phDHa7UTZMWHcwV3hrZms

    Let me know if you have any question

    Best Regards

    Paulo Radatz

     
    • Guilherme Custódio

      Thanks a lot! I will try to understand your code and then I will start to code my Monte Carlo.
      If I have any questions, I ask for help.
      Best Regards,
      Guilherme.

       
    • NB

      NB - 2017-11-26

      Hello Paulo,
      Can you please give access to that python code?
      Thank you
      Narayan

       
    • Michelle Melo Cavalcante

      Hello Paulo,

      Can you make the link available again?

      Best Regards

      Michelle

       
    • Vinícius Amorim Botelho

      Hello Paulo,
      Can you please give access to that python code?
      Best Regards,
      Vinícius.

       
      • Paulo Radatz

        Paulo Radatz - 2019-10-08

        Hi Vinicius,

        I am sorry, I can't find this code .

        Best regards,

         
  • Guilherme Custódio

    Hi Again!
    Now I wanna create loads and its loadshapes with python, because the number of loads changes at each scenario. I wrote this command, but it seems that is not working properly:

    self.dssText.Command = "New Loadshape.ve_" + str(veLocations[i]) + "npts=24 interval=1 mult=(" + str(self.loadShape) + ")"

    Where self.loadShape constains the "new" loadshape and veLocations the bus that the load will be placed. Is this command right?

    Thanks,
    Best Regards,
    Guilherme.

     
  • Paulo Radatz

    Paulo Radatz - 2016-12-11

    Hello Guilherme,

    Looking at your code, I suggest you to give a space between " and npts, as shown below:

    self.dssText.Command = "New Loadshape.ve_" + str(veLocations[i]) + " npts=24 interval=1 mult=(" + str(self.loadShape) + ")"

    I usually print the command that I write in dssText.Command in order to see if it's correct, in your case, you can do:

    print "New Loadshape.ve_" + str(veLocations[i]) + "npts=24 interval=1 mult=(" + str(self.loadShape) + ")"

    Doing this, you are going to see that there is no space between loadshape.Name and npts.

    I hope it helps

    Best regards

    Paulo Radatz

     
    • Guilherme Custódio

      It worked, this tip made my day!
      Thanks!
      Best regards,
      Guilherme

       
  • Paulo Radatz

    Paulo Radatz - 2016-12-13

    I am so glad to hear that.

    I've had the same experience, but in my case it was like 2 days.

    Best regards

    Paulo Radatz

     
  • jschmitz

    jschmitz - 2018-02-09

    Paulo,

    Any chance you can post a new link to the python PV code you posted some time ago? Tld be really interested in looking at it and he current link doesn't work anymore.

    Thanks for your help.

     

Log in to post a comment.

MongoDB Logo MongoDB