Library

Public API

OptimizationParameters.OptimizationParameterType
OptimizationParameter{S, TX, TF, TB, DV}

The basic building block of the interface, representing one potential design variable. S is a tuple with the dimensions of the underlying data and DV indicates whether a design variable is activated for the variable.

source
OptimizationParameters.OptimizationParameterMethod
OptimizationParameter(x0; lb=-Inf, ub=Inf, scaling=1.0, dv=false, description="")

The default constructor for objects of type OptimizationParameter. x0, lb, ub, scaling, and dv may be either scalars or arrays, however, all array inputs must have the same dimensions.

source
OptimizationParameters.get_dvFunction
get_dv(optparam::OptimizationParameter)

Returns design variable flag(s) for optparam

source
get_dv(optparams, field)

Returns design variable flag(s) for field in optparams

source
OptimizationParameters.set_x0Function
set_x0(optparam::OptimizationParameter, x0)

Returns optparam with the initial value(s) given by x0

source
set_x0(optparams::AbstractDict, field, x0)

Modifies the field in optparams to have the initial value(s) given by x0

source
set_x0(optparams::NamedTuple, field, x0)

Modifies the field in optparams to have the initial value(s) given by x0

source
OptimizationParameters.set_lbFunction
set_lb(optparam::OptimizationParameter, lb)

Returns optparam with the lower bound(s) given by lb

source
set_lb(optparams::AbstractDict, field, lb)

Modifies the field in optparams to have the lower bound(s) given by lb

source
set_lb(optparams::NamedTuple, field, lb)

Modifies the field in optparams to have the lower bound(s) given by lb

source
OptimizationParameters.set_ubFunction
set_ub(optparam::OptimizationParameter, ub)

Returns optparam with the upper bound(s) given by ub

source
set_ub(optparams::AbstractDict, field, ub)

Modifies the field in optparams to have the upper bound(s) given by ub

source
set_ub(optparams::NamedTuple, field, ub)

Modifies the field in optparams to have the upper bound(s) given by ub

source
OptimizationParameters.set_scalingFunction
set_scaling(optparam::OptimizationParameter, scaling)

Returns optparam with the scaling parameter given by scaling

source
set_scaling(optparams::AbstractDict, field, scaling)

Modifies the field in optparams to have the scaling parameter(s) given by scaling

source
set_scaling(optparams::NamedTuple, field, scaling)

Modifies the field in optparams to have the scaling parameter(s) given by scaling

source
OptimizationParameters.set_dvFunction
set_dv(optparam::OptimizationParameter, dv)

Returns optparam with the design variable flag(s) given by dv

source
set_dv(optparams::AbstractDict, field, dv)

Modifies the field in optparams to have the design variable flag(s) given by dv

source
set_dv(optparams::NamedTuple, field, dv)

Modifies the field in optparams to have the design variable flag(s) given by dv

source
OptimizationParameters.set_descriptionFunction
set_description(optparam::OptimizationParameter, description)

Returns optparam with the description given by description

source
set_description(optparams::AbstractDict, field, description)

Modifies the field in optparams to have the description given by description

source
set_description(optparams::NamedTuple, field, description)

Modifies the field in optparams to have the description given by description

source
OptimizationParameters.update_parametersFunction
update_parameters(optparams, params)

Inserts parameters from params into optparams and returns the result. optparams is a named tuple or dictionary filled with objects of type OptimizationParameter. params is a named tuple or dictionary with the parameter values to be replaced or a vector of scaled design variables.

source
OptimizationParameters.update_parameters!Function
update_parameters!(optparams, params)

Inserts parameters from params into optparams and returns the result. optparams is a dictionary filled with objects of type OptimizationParameter params is a dictionary with the parameter values to be replaced or a vector of scaled design variables

source
OptimizationParameters.update_design_variablesFunction
update_design_variables(original, optimized)

Copies design variables that are active in both original and optimized from optimized into original and returns the result. original is a named tuple or dictionary filled with objects of type OptimizationParameter optimized is a named tuple or dictionary filled with objects of type OptimizationParameter

source
OptimizationParameters.update_design_variables!Function
update_design_variables!(original, optimized)

Copies design variables that are active in both original and optimized from optimized into original and returns the result. original is a named tuple or dictionary filled with objects of type OptimizationParameter optimized is a named tuple or dictionary filled with objects of type OptimizationParameter

source
OptimizationParameters.get_valuesFunction
get_values(optparam[, x])

Returns a named tuple or dictionary of the values of the optimization parameter(s) given a vector of design variables. If x is not provided, the default parameter values are returned.

source
OptimizationParameters.read_parametersFunction

read_parameters(file; dict=true)

Reads the optimization parameters in a csv file and returns either an ordered dictionary or a named tuple of the optimization parameters.

source
OptimizationParameters.write_parametersFunction

write_parameters([inputfile, ]outputfile, optparams)

Writes the optimization parameters in optparams to a csv file. If given, the file inputfile is used as a template for the organization of the resulting file.

source

Private API

OptimizationParameters.get_valueFunction
get_value(optparam[, x])

Returns the value(s) of the optimization parameter(s) given a scalar/vector of design variables. If x is not provided, the default parameter values are returned.

source
OptimizationParameters.parse_valueFunction
parse_value(value)

Returns value if value is not a string.

If value is a string this function checks if value should have been parsed as a boolean and returns the corresponding boolean.

Otherwise value is parsed as a Julia expression, with a few customizations:

  • [] parses to Float64[]
  • The unicode characters “ and ” are converted to "
source

Index