Main Content

explore

Class: OptimizationResult

Explore fixed-point implementations found during optimization process

Description

explore(result) applies the data types of the best solution found during the optimization process for the OptimizationResult object specified by result. If you have defined tolerances for logged signals in your system, explore opens the Simulation Data Inspector with logging data displayed for further exploration of numeric behavior. By default, the best solution and the first simulation scenario will be applied on the model and explored.

explore(result,Name,Value) explores result with additional options specified by name-value pairs.

solution = explore(result,Name,Value) explores result with additional options specified by name-value pairs and returns an OptimizationSolution object, solution.

Input Arguments

expand all

OptimizationResult object to explore.

If the optimization finds a feasible solution, the vector of OptimizationSolution objects contained in the result object is sorted by cost, with the lowest cost (most optimal) solution as the first element of the vector. If the optimization does not find a feasible solution, the vector is sorted by least violation.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: solution = explore(result,'SolutionIndex',1,'ScenarioIndex',5,'KeepOriginalModelParameters',false);

nth best solution contained in result to apply to the model, specified as a positive integer. By default, the best solution is applied.

If optimization finds a feasible result, the best solution is defined as the solution with minimal cost that meets all behavioral constraints. If optimization finds only infeasible solutions, the best solution is defined as the least-violating solution.

Example: solution = explore(result,'SolutionIndex',2); returns the second-best solution.

nth simulation scenario contained in result. If no simulation scenarios were used for optimization, this value is set to 1.

Example: solution = explore(result,'SolutionIndex',2,'ScenarioIndex',5); returns the second-best solution using the simulation scenario with index 5.

Whether to maintain original values of model parameters that are altered during the optimization process, specified as a numeric or logical 1 (true) or 0 (false).

A value of true maintains the original model parameters, but may lead to inconsistencies with the results returned by fxpopt. For more information, see Model Configuration Changes Made During Data Type Optimization.

Example: solution = explore(result,'KeepOriginalModelParameters',true) maintains the original values of model parameters.

Output Arguments

expand all

OptimizationSolution object containing information related to the optimal fixed-point implementation for the system, including total cost of the implementation and the maximum difference between the baseline and the solution.

Introduced in R2018a