OptimisationVariableCollection

A collection of variables used in the optimisation process.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Add an optimisation search with the frequency as parameter

freq = project.Variables:Add("freq", 10e6)
search = project.Optimisation.Searches:Add(cf.Enums.OptimisationMethodTypeEnum.GridSearch)
search.Parameters.Variables:Add(freq, 1e6, 100e6)

    -- Modify the first optimisation variable in the collection

search.Parameters.Variables:Modify(1, true, freq, 1e6, 100e6, 10e6, 10)

Usage locations (collections)

The following objects contain the OptimisationVariableCollection collection:

Property List

Count
The number of OptimisationVariable items in the collection. (Read only number)

Method List

Add (variable Variable, minimum Expression, maximum Expression)
Add a variable to use in the optimisation process.
Item (index number)
Returns the OptimisationVariable at the given index. (Returns a OptimisationVariable object.)
Modify (index number, enabled boolean, variable Variable, minimum Expression, maximum Expression, start Expression, numberofpoints Expression)
Modify a variable used in the optimisation process.
Remove (index number)
Remove a variable used in the optimisation process.

Index List

[number]
Returns the OptimisationVariable at the given index in the collection. (Read OptimisationVariable)

Property Details

Count
The number of OptimisationVariable items in the collection.
Type
number
Access
Read only

Method Details

Add (variable Variable, minimum Expression, maximum Expression)
Add a variable to use in the optimisation process.
Input Parameters
variable(Variable)
Variable.
minimum(Expression)
Minimum value.
maximum(Expression)
Maximum value.
Item (index number)
Returns the OptimisationVariable at the given index.
Input Parameters
index(number)
The index of the OptimisationVariable.
Return
OptimisationVariable
The OptimisationVariable at the given index.
Modify (index number, enabled boolean, variable Variable, minimum Expression, maximum Expression, start Expression, numberofpoints Expression)
Modify a variable used in the optimisation process.
Input Parameters
index(number)
Index.
enabled(boolean)
Enabled.
variable(Variable)
Variable.
minimum(Expression)
Minimum value.
maximum(Expression)
Maximum value.
start(Expression)
Start value.
numberofpoints(Expression)
Number of points.
Remove (index number)
Remove a variable used in the optimisation process.
Input Parameters
index(number)
Index of processing step.