Class OptimisationToolbox
Optimisation Toolbox functionality in scripting
Namespace: Scripting
Syntax
public class OptimisationToolbox : IWeakEventListener
Methods
ReceiveWeakEvent(Type, Object, EventArgs)
Receives weak event notifications for further processing
Declaration
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Type | managerType | The event manager type |
System.Object | sender | The event sender |
System.EventArgs | e | The event arguments |
Returns
Type | Description |
---|---|
System.Boolean | True if handled |
RunLayoutOptimisation()
Runs the layout optimisation calculation with the current settings.
Declaration
public void RunLayoutOptimisation()
SetLayoutToWorkbook(Layout, String, String)
Updates the movable turbines in the specified Layout to the workbook.
Declaration
public void SetLayoutToWorkbook(Layout layout, string turbineTypeNameForNewTurbines, string windFarmNameForNewTurbines)
Parameters
Type | Name | Description |
---|---|---|
Layout | layout | The layout to apply. |
System.String | turbineTypeNameForNewTurbines | The name of the turbine type to use for new turbines. |
System.String | windFarmNameForNewTurbines | The name of the wind farm to use for new turbines. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if a matching turbine (by name) cannot be found in the workbook. |
SetOptimisedLayoutToWorkbook(OptimisedLayout)
Updates the movable turbines in the specified OptimisedLayout to the workbook.
Declaration
public void SetOptimisedLayoutToWorkbook(OptimisedLayout optimisedLayout)
Parameters
Type | Name | Description |
---|---|---|
OptimisedLayout | optimisedLayout | The optimised layout to apply. |