I trying to solve the optimization problem ,i faced three kinds of error ,does any one know how can i solve them?

79 次查看(过去 30 天)
first:The value of local variables may have been changed to match the globals. Future versions of MATLAB will require that you declare a variable to be global before you use that variable.
second: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.255027e-18. No feasible solution found.
third:fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance.

采纳的回答

Walter Roberson
Walter Roberson 2015-5-21
First: your code is of the form
x = some value
global x
You need to move the "global x" to before you assign the value to x.
Second: either you make a mistake in constructing the values, or else the function goes to +/- infinity within the bounds to be explored, or else the function is discontinuous and the estimation of the derivative is not possible because of that.
You need to re-check how you construct your values, and you need to recheck whether the function is discontinuous or has singularities.
Third: your function either suffers badly from numeric round-off, or else your function is discontinuous. The optimizer has found a point where it cannot step finely enough to find a point that might possibly solve the problem because it has detected that if a solution exists it must be within an interval smaller than the smallest step size you allow, but at both the upper and lower bound of the interval with the potential solution, the constraints cannot be satisfied.
You need to check that your function is continuous and you need to check that your constraints can be satisfied taking into account the limits of double precision calculations.
In summary: you probably asked it to solve a discontinuous optimization, and it cannot find the solution because of the discontinuity.
  5 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by