This warning may be displayed if for certain values of input parameters “x”, the objective function returns a NaN value (not a number). Because of this, FMINCON is unable to determine the gradient of the objective function and throws the warning above.
To avoid the warning, you may need to modify your objective function to return non-NaN values for inputs of this type. There are also known limitations with the Active-Set algorithm in that in certain intermediate iterations it may choose a value of “x” that violates the constraints. This can pose a problem if the objective function is not defined (returns NaN) for values of “x” in which the constraints are invalid.
If this is relevant to your application, as workarounds you can either generalize the objective function to handle such values of “x” or use the Interior-Point algorithm which does not have this limitation.
Matlab(fmincon):警告: 矩阵接近奇异值,或者缩放错误。结果可能不准确。RCOND = 2.156571e-16。
最新推荐文章于 2025-03-13 06:35:43 发布