Main Content

OptimizationSolution Class

Optimized fixed-point implementation of system

Description

An OptimizationSolution object is a fixed-point implementation of a system whose data types were optimized using the fxpopt function.

Construction

solution = explore(result) opens the Simulation Data Inspector. If the optimization found a solution, it returns the OptimizationSolution object with the lowest cost out of the vector of OptimizationSolution objects contained in the OptimizationResult object, result. If the optimization did not find a solution, it returns the OptimizationSolution object with the smallest MaxDifference.

You can also access a OptimizationSolution object by indexing the Solutions property of an OptimizationResult object. For example, to access the solution with the second lowest cost contained in the OptimizationResult object, result, enter

solution = result.Solutions(2)

Input Arguments

expand all

The Solutions property of the OptimizationResult object is a vector of OptimizationSolution objects found during the optimization process. If the optimization found a feasible solution, the vector is sorted by cost, with the lowest cost (most optimal) solution as the first element of the vector. If the optimization did not find a feasible solution, the vector is sorted by MaxDifference, with the solution with the smallest MaxDifference as the first element.

Properties

expand all

Sum of all word lengths used in the solution in the system under design. The most optimal solution is the solution with the smallest cost.

Data Types: double

Whether the solution meets the criteria specified by the associated fxpOptimizationOptions object, specified as a logical.

Data Types: logical

The maximum absolute difference between the baseline the solution.

Data Types: double

Unique numerical identification for the run used by the Simulation Data Inspector. For more information, see Inspect and Compare Data Programmatically.

Data Types: double

Name of the run in Simulation Data Inspector.

Data Types: char

Methods

showContents Get summary of changes made during data type optimization

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Version History

Introduced in R2018a