RCAIDE.Framework.Optimization.Common.helper_functions

helper_functions#

Functions

convert_values(inputs)

Converts an inputs from an optimization into the right units

find_a_star(dictionary, string)

Searches through a dictionary looking for an *

get_values(dictionary, outputs, aliases)

Retrieves values saved in a dictionary

limit_input_values(inputs)

Ensures that the inputs are between the bounds

scale_const_bnds(inputs)

Rescales constraint bounds based on Nexus inputs scale

scale_const_values(inputs, x)

Rescales constraint values based on Nexus inputs scale

scale_input_values(inputs, x)

Scales the values according to the a provided scale

scale_obj_values(inputs, x)

Rescales an objective based on Nexus inputs scale

set_values(dictionary, input_dictionary, ...)

This method regresses through a dictionary to set the required values.

unscale_const_values(inputs, x)

Rescales values based on Nexus inputs scale

set_values(dictionary, input_dictionary, converted_values, aliases)[source]#
This method regresses through a dictionary to set the required values.

dictionary is the base class that will be modified, input_dictionary is the set of inputs to be used, converted_values are values to be set in the base dictionary, and finally the aliases which are where in the dictionary the names link to

Assumptions: N/A

Source: N/A

Inputs: dictionary [Data()] input_dictionary [Data()] converted_values [Data()] aliases [list of str]

Outputs: None

Properties Used: N/A

find_a_star(dictionary, string)[source]#

Searches through a dictionary looking for an *

Assumptions: There may or may not be an asterisk

Source: N/A

Inputs: dictionary [Data()] input_dictionary [Data()] converted_values [Data()] aliases [list of str]

Outputs: newstrings [list of str]

Properties Used: N/A

scale_input_values(inputs, x)[source]#

Scales the values according to the a provided scale

Assumptions:

Source: N/A

Inputs: x [array] inputs [list]

Outputs: inputs [list]

Properties Used: N/A

limit_input_values(inputs)[source]#

Ensures that the inputs are between the bounds

Assumptions: N/A

Source: N/A

Inputs: x [array] inputs [list]

Outputs: inputs [list]

Properties Used: N/A

convert_values(inputs)[source]#

Converts an inputs from an optimization into the right units

Assumptions: Always multiply the units by 1!

Source: N/A

Inputs: inputs [list]

Outputs: converted_values [list of str]

Properties Used: N/A

get_values(dictionary, outputs, aliases)[source]#

Retrieves values saved in a dictionary

Assumptions: N/A

Source: N/A

Inputs: dictionary [Data()] outputs [Data()] aliases [list of str]

Outputs: values [float]

Properties Used: N/A

scale_obj_values(inputs, x)[source]#

Rescales an objective based on Nexus inputs scale

Assumptions: N/A

Source: N/A

Inputs: inputs [Data()] x [float]

Outputs: scaled [float]

Properties Used: N/A

scale_const_values(inputs, x)[source]#

Rescales constraint values based on Nexus inputs scale

Assumptions: N/A

Source: N/A

Inputs: inputs [Data()] x [array]

Outputs: scaled [array]

Properties Used: N/A

scale_const_bnds(inputs)[source]#

Rescales constraint bounds based on Nexus inputs scale

Assumptions: N/A

Source: N/A

Inputs: inputs [Data()]

Outputs: converted_values [array]

Properties Used: N/A

unscale_const_values(inputs, x)[source]#

Rescales values based on Nexus inputs scale

Assumptions: N/A

Source: N/A

Inputs: inputs [Data()] x [array]

Outputs: scaled [array]

Properties Used: N/A