Jump to content

WAsP Scripting (2009-09-23)


Recommended Posts

Hi,



I'm trying to prepare a script for Wasp in which I need to know something about the wtg file used. Especially which performance table of the wtg that has been used.



Any way to get this?



Thanks,



Hans Peter Jensen

--------

Hi,



Here is some example script code which will probably help.



Set Calculator = TurbineSite.AsICalculatingHierarchyMember

Set PowerCalculation = Calculator.CalculationByType(5)

Set Associates = PowerCalculation.Associates

Set Wtg = Associates.WindTurbineGenerator



Assuming that you have a reference to the turbine site, then you can retrieve the associated WTG like that. The '5' in the CalculationByType corresponds to the power production.



Then you can get the index of the selected performance table, and the performance table itself.



Set Ptable = Wtg.SelectedPerformanceTable

Index = Wtg.SelectedPerformanceTableIndex

--------

Thanks,


Is there a way to actual set the performance table to be used by a turbine site group and then do the calculations? I often need to run through 5 different performance tables for a single site group and re-calculate AEP. Would that be possible programmatically?

--------

Yes, the SelectedPerformanceTableIndex property is not read-only, so you can use that to change the currently selected performance table.

--------
Link to comment
  • 1 month later...
Works perfectly, I can set the tables as I want.

There's further complications though; I need to check (one at a time) each TurbineSite to see if there's a 'local' wtg attached. If not I'll need to attach 'locally' the wtg from the level above and at the same time keep the original for all the other sites in that group. Then do some calculations and then delete the 'local' copy before moving on to the next TurbineSite. Any chance of that happening? I hope it's clear what I'm trying to do. If not let me know :-)

Thanks

HP
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...