Skip to main content
Namespace: Phoenix.Optimization

Overview

Class to hold information about a design variable

Inheritance

DesignVariable

Declaration

Description

Class to hold information about a design variable

Public Member Functions

Properties

Properties inherited from IVariableName

Constructor & Destructor Documentation

DesignVariable()

Creates a new design variable with the given name. Assumes that the variable is continuous and that there are no bounds. The start value will be random. The uid is empty. Parameters:
  • name - string containing the name of the design variable

DesignVariable()

Creates a new design variable with the given id and name. Assumes that that the variable is continuous and that there are no bounds. The start value will be random. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable

DesignVariable()

Creates a new design variable with the given name and start value. Assumes that that the variable is continuous and that there are no bounds. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • startValue - object containing the start value for the design variable

DesignVariable()

Copy constructor for a design variable Parameters:
  • designVariable - DesignVariable containing the design variable to be copied.

DesignVariable()

Creates a new design variable with the given name, start value and selected alphabet. The start value will be random. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • selectedAlphabet - DataTable containing the name value pairs associated with the discrete design variable.

DesignVariable()

Creates a new design variable with the given name, start value and selected alphabet Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • startValue - object containing the start value for the design variable
  • selectedAlphabet - DataTable containing the name value pairs associated with the discrete design variable.

DesignVariable()

Creates a new design variable with the given name, start value, lower and upper bounds. The start value will be random. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • lowerBound - double containing the lower bound for the design variable or NaN if there is no lower bound.
  • upperBound - double containing the upper bound for the design variable or NaN if there is no upper bound.

DesignVariable()

Creates a new design variable with the given name, start value, lower and upper bounds. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • startValue - object containing the start value for the design variable.
  • lowerBound - double containing the lower bound for the design variable or NaN if there is no lower bound.
  • upperBound - double containing the upper bound for the design variable or NaN if there is no upper bound.

DesignVariable()

Creates a new design variable with the given name, start value, lower bound, upper bound and selected alphabet. This constructor is used internally to create design variables. Either bounds or selected alphabet should be specified, but not both. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • startValue - object containing the start value for the design variable
  • lowerBound - double containing the lower bound for the design variable or NaN if there is no lower bound.
  • upperBound - double containing the upper bound for the design variable or NaN if there is no upper bound.
  • selectedAlphabet - DataTable containing the name value pairs associated with the discrete design variable.

DesignVariable()

Creates a new design variable with the given name, start value, lower bound, upper bound, selected alphabet and alphabet. This constructor is used internally to create design variables. Either bounds or selected alphabet should be specified, but not both. Parameters:
  • uid - uniqie identifier of the design variable allows to keep track of it
  • name - string containing the name of the design variable
  • startValue - object containing the start value for the design variable
  • lowerBound - double containing the lower bound for the design variable or NaN if there is no lower bound.
  • upperBound - double containing the upper bound for the design variable or NaN if there is no upper bound.
  • selectedAlphabet - DataTable containing the name value pairs associated with the discrete design variable.
  • alphabet - DataTable containing the full available name value pairs for the discrete design variable.

Member Function Documentation

BoundFromString

Convert bound from string to double. Parameters:
  • boundText - Bound as a string.
Returns:
  • Bound value.

BoundToString

Convert bound to string. Parameters:
  • bound - Bound value.
Returns:
  • Bound as a string.

CheckBounds

Check bounds

CheckLowerBoundValue

Check Lower bound value

CheckMe

Check design variable for valid state Parameters:
  • doTryToFix -

CheckStartValue

Check StartValue

CheckUpperBoundValue

Check Upper bound value

Equals

Determines whether the specified DesignVariable is equal to the current DesignVariable. Parameters:
  • desVar - The DesignVariable object to compare with the current DesignVariable.
Returns:
  • true if the specified DesignVariable is equal to the current DesignVariable; otherwise, false.

Equals

Determines whether the specified Object is equal to the current Object. Parameters:
  • obj - The object to compare with the current object.
Returns:
  • true if the specified Object is equal to the current Object; otherwise, false.

FixValue

Fix the value in case if the value is string which can be parsed as double Parameters:
  • o -

GetHashCode

Serves as a hash function for DesignVariable. Returns:
  • A hash code for the current DesignVariable.

IsValueValid

Return false for: "", null, NaN, “NaN”. Else returns true. Note: UT for this method are under PHXSolverTest::StaticMethodTests. Parameters:
  • value -

operator!=

Determines whether the specified DesignVariable instances are considered not equal. Parameters:
  • a - The first DesignVariable to compare.
  • b - The second DesignVariable to compare.
Returns:
  • true if the DesignVariables are not considered equal; otherwise, false.

operator==

Determines whether the specified DesignVariable instances are considered equal. Parameters:
  • a - The first DesignVariable to compare.
  • b - The second DesignVariable to compare.
Returns:
  • true if the DesignVariables are considered equal; otherwise, false.

TryConvertToDouble

Fix the value in case if the value is string which can be parsed as double. Note: UT for this method are under PHXSolverTest::StaticMethodTests. Parameters:
  • o -

ValueFromString

Convert value from string in case of double use localization if cannot convert to double then return string as it is. Parameters:
  • valueText -

ValueToString

Convert value to string in case of double use localization, return string.Empty for double Nan or Infinity Parameters:
  • o -

Property Documentation

Alphabet

DataTable containing the full list of name value pairs for discrete design variables. The DataTable has two columns: Name and Value. The Name column contains the alias for the alphabet value and the Value column contains an object with the underlying value.

BestDesignValue

BestDesignValueGUI

BestDesignValueGUI

LastRunValue can be null

BestLastDesignValueAsXmlAttr

Current Model center Value (current at the moment of creating this object)

IsDiscrete

Boolean stating whether or not the design variable is discrete. True when the design variable is discrete and false otherwise.

IsMarked

Internal marker.

LowerBound

Double containing the lower bound for the design variable or NaN if there is no lower bound.

LowerBoundErrText

Upper Bound Error text

LowerBoundForCheck

Get lower for checking bound

LowerBoundGUI

Set get LowerBound as text to/from GUI

LowerBoundText

Lower bound as a Text with localization for Nan returns appropriate Nan string

ModelCenterValue

Current Model center Value (current at the moment of creating this object)

ModelCenterValueGUI

Gets a reference to “Index”

Name

Name of the design variable Implements IVariableName.

NameErrText

Variable name error text summary>

SelectedAlphabet

DataTable containing the name value pairs for discrete design variables. The DataTable has two columns: Name and Value. The Name column contains the alias for the alphabet value and the Value column contains an object with the underlying value.

StartValue

Object containing the start value for the design variable

StartValueAsDouble

Returns Start value as a double if it’s possible to convert startValue object to double otherwise returns NaN

StartValueAsXmlAttr

Object containing the raw start value for the design variable

StartValueBehavior

Start Value Behavior BestDesignValue

StartValueCalcGUI

Object containing the start value for the design variable

StartValueErrText

Start Value Error /Lower Bound Error text

StartValueGUI

Object containing the start value for the design variable

StartValueRaw

Object containing the raw start value for the design variable it returns string.empty for null value

StartValueRawText

string containing the raw start value for the design variable it returns string.empty for null value

Uid

String with unique identifier of the variable.

UpperBound

Double containing the upper bound for the design variable or NaN if there is no upper bound.

UpperBoundErrText

Type of the value

UpperBoundForCheck

Get upper for checking bound

UpperBoundGUI

Set get UpperBound as text to/from GUI

UpperBoundText

Upper bound as a Text with localization for Nan returns appropriate Nan string

ValueGUI

Value GUI if there is best design the return best design value, otherewise return modelcenter value