Library
Public API
OptimizationParameters.OptimizationParameter — Type
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.
OptimizationParameters.OptimizationParameter — Method
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.
OptimizationParameters.get_x0 — Function
get_x0(optparam::OptimizationParameter)Returns initial value(s) for optparam
get_x0(optparams, field)Returns initial value(s) for field in optparams
OptimizationParameters.get_lb — Function
get_lb(optparam::OptimizationParameter)Returns lower bound(s) for optparam
get_lb(optparams, field)Returns lower bound(s) for field in optparams
OptimizationParameters.get_ub — Function
get_ub(optparam::OptimizationParameter)Returns upper bound(s) for optparam
get_ub(optparams, field)Returns upper bound(s) for field in optparams
OptimizationParameters.get_scaling — Function
get_scaling(optparam::OptimizationParameter)Returns scaling parameter(s) for optparam
get_scaling(optparams, field)Returns scaling parameter(s) for field in optparams
OptimizationParameters.get_dv — Function
get_dv(optparam::OptimizationParameter)Returns design variable flag(s) for optparam
get_dv(optparams, field)Returns design variable flag(s) for field in optparams
OptimizationParameters.get_description — Function
get_description(optparam::OptimizationParameter)Returns the description for optparam
get_description(optparams, field)Returns the description for field in optparams
OptimizationParameters.set_x0 — Function
set_x0(optparam::OptimizationParameter, x0)Returns optparam with the initial value(s) given by x0
set_x0(optparams::AbstractDict, field, x0)Modifies the field in optparams to have the initial value(s) given by x0
set_x0(optparams::NamedTuple, field, x0)Modifies the field in optparams to have the initial value(s) given by x0
OptimizationParameters.set_x0! — Function
set_x0!(optparams::AbstractDict, field, x0)Modifies the field in optparams to have the initial value(s) given by x0
OptimizationParameters.set_lb — Function
set_lb(optparam::OptimizationParameter, lb)Returns optparam with the lower bound(s) given by lb
set_lb(optparams::AbstractDict, field, lb)Modifies the field in optparams to have the lower bound(s) given by lb
set_lb(optparams::NamedTuple, field, lb)Modifies the field in optparams to have the lower bound(s) given by lb
OptimizationParameters.set_lb! — Function
set_lb!(optparams::AbstractDict, field, lb)Modifies the field in optparams to have the lower bound(s) given by lb
OptimizationParameters.set_ub — Function
set_ub(optparam::OptimizationParameter, ub)Returns optparam with the upper bound(s) given by ub
set_ub(optparams::AbstractDict, field, ub)Modifies the field in optparams to have the upper bound(s) given by ub
set_ub(optparams::NamedTuple, field, ub)Modifies the field in optparams to have the upper bound(s) given by ub
OptimizationParameters.set_ub! — Function
set_ub!(optparams::AbstractDict, field, ub)Modifies the field in optparams to have the upper bound(s) given by ub
OptimizationParameters.set_scaling — Function
set_scaling(optparam::OptimizationParameter, scaling)Returns optparam with the scaling parameter given by scaling
set_scaling(optparams::AbstractDict, field, scaling)Modifies the field in optparams to have the scaling parameter(s) given by scaling
set_scaling(optparams::NamedTuple, field, scaling)Modifies the field in optparams to have the scaling parameter(s) given by scaling
OptimizationParameters.set_scaling! — Function
set_scaling!(optparams::AbstractDict, field, scaling)Modifies the field in optparams to have the scaling parameter(s) given by scaling
OptimizationParameters.set_dv — Function
set_dv(optparam::OptimizationParameter, dv)Returns optparam with the design variable flag(s) given by dv
set_dv(optparams::AbstractDict, field, dv)Modifies the field in optparams to have the design variable flag(s) given by dv
set_dv(optparams::NamedTuple, field, dv)Modifies the field in optparams to have the design variable flag(s) given by dv
OptimizationParameters.set_dv! — Function
set_dv!(optparams::AbstractDict, field, dv)Modifies the field in optparams to have the design variable flag(s) given by dv
OptimizationParameters.set_description — Function
set_description(optparam::OptimizationParameter, description)Returns optparam with the description given by description
set_description(optparams::AbstractDict, field, description)Modifies the field in optparams to have the description given by description
set_description(optparams::NamedTuple, field, description)Modifies the field in optparams to have the description given by description
OptimizationParameters.set_description! — Function
set_description!(optparams::AbstractDict, field, description)Modifies the field in optparams to have the description given by description
OptimizationParameters.update_parameters — Function
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.
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
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
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
OptimizationParameters.named_tuple_to_dict — Function
named_tuple_to_dict(nt)Converts a named tuple to an ordered dictionary
OptimizationParameters.dict_to_named_tuple — Function
dict_to_named_tuple(dict)Converts a dictionary to a named tuple
OptimizationParameters.assemble_input — Function
assemble_input(optparams)Assembles the input for the optimization problem: x0, lb, ub
OptimizationParameters.get_values — Function
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.
OptimizationParameters.print_design_variables — Function
print_design_variables(optparams, x)Prints design variable get_values for the current iteration
OptimizationParameters.read_parameters — Function
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.
OptimizationParameters.write_parameters — Function
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.
Private API
OptimizationParameters.get_value — Function
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.
OptimizationParameters.parse_value — Function
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 "
OptimizationParameters.write_value — Function
write_value(value)Returns a string representing value using a set of custom rules.
OptimizationParameters.get_column_ordering — Function
get_column_ordering(header)Returns the column ordering given the file header
Index
OptimizationParameters.OptimizationParameterOptimizationParameters.OptimizationParameterOptimizationParameters.assemble_inputOptimizationParameters.dict_to_named_tupleOptimizationParameters.get_column_orderingOptimizationParameters.get_descriptionOptimizationParameters.get_dvOptimizationParameters.get_lbOptimizationParameters.get_scalingOptimizationParameters.get_ubOptimizationParameters.get_valueOptimizationParameters.get_valuesOptimizationParameters.get_x0OptimizationParameters.named_tuple_to_dictOptimizationParameters.parse_valueOptimizationParameters.print_design_variablesOptimizationParameters.read_parametersOptimizationParameters.set_descriptionOptimizationParameters.set_description!OptimizationParameters.set_dvOptimizationParameters.set_dv!OptimizationParameters.set_lbOptimizationParameters.set_lb!OptimizationParameters.set_scalingOptimizationParameters.set_scaling!OptimizationParameters.set_ubOptimizationParameters.set_ub!OptimizationParameters.set_x0OptimizationParameters.set_x0!OptimizationParameters.update_design_variablesOptimizationParameters.update_design_variables!OptimizationParameters.update_parametersOptimizationParameters.update_parameters!OptimizationParameters.write_parametersOptimizationParameters.write_value