Question about propt optimization code
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone. I have found the following example in which a version of Zermelo's optimization problem is solved. There is however a part of the code that I don't understand:
The first two lines of the document are:
% Array with consecutive number of collocation points
narr = [20 40];
and later on, the author writes
% Initial guess
if n==narr(1)
x0 = {tf == 2; icollocate({x1 == xi(1); x2 == xi(2)})
collocate({u1 == pi})};
else
x0 = {tf == tfopt; icollocate({x1 == xopt1; x2 == xopt2})
collocate({u1 == uopt1})};
end
and
tfopt = subs(tf,solution);
xopt1 = subs(x1,solution);
xopt2 = subs(x2,solution);
uopt1 = subs(u1,solution);
If I understand propperly, the code first constructs an optimal solution based on a very simple guess and then, uses the found optimal solution as an initial guess for a second optimal solution?
If someone can confirm that I have undestoood this correctly, I would be very thankful.
Regards.
Jaime.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!