[Scilab-users] "optim" doesn't work

fujimoto2005 fujimoto2005 at gmail.com
Fri Mar 2 01:41:18 CET 2018


I am trying to solve the minimization problem like the attached code.
The problem of finding "shifted value" from [mLogY1Prod, mLogY2] which
minimizes the objective function "ExSqShiftedVal".

First I calculated the values of the objective function around [mLogY1Prod,
mLogY2]. You can see that the objective function decreases as you shift from
mLogY1Prod, mLogY2 to larger values.

Analysis of the objective function shows the followings.
1. The value of the objective function is nonnegative.
2. When the shift becomes very large, the objective function value becomes
larger than that in case of shift 0.
Therefore, there is always an optimal solution.

Next, I ran  "optim" code, but it does not work.
In the case of algorithm "qn", the optimum value does not change from the
initial value. It might be because a numerical integration function "intg"
is used in the objective function and the function value is not smooth and
it fails.
But I am not sure.

In the case of algorithm "nd", Warning "Round-off error detected, the
requested tolerance (or default) cannot be achieved. Try using bigger
tolerances." appeared and "optim" stopped.

Please let me know if you know how to manage this problem.

Best regards

test_optim.sce <http://mailinglists.scilab.org/file/t497065/test_optim.sce>  



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html



More information about the users mailing list