Minimize a variable in a no-linear system
古いコメントを表示
Hi, i need to minimize Fv in this system:

The problems variables are :

19 件のコメント
David Hill
2023 年 1 月 21 日
Show us your code and ask a specific question.
Matt J
2023 年 1 月 22 日
I would imagine linprog would be applicable, since all constraints appear to be linear.
Torsten
2023 年 1 月 22 日
Except the second to last.
Antonio Cassano
2023 年 1 月 22 日
編集済み: Matt J
2023 年 1 月 23 日
Torsten
2023 年 1 月 22 日
If I counted correctly, you have 15 unknowns and 15 equality constraints.
So you can be happy if you even get a solution for your problem. Bound constraints on the solution can not be imposed.
Antonio Cassano
2023 年 1 月 23 日
編集済み: Antonio Cassano
2023 年 1 月 23 日
Antonio Cassano
2023 年 1 月 23 日
Matt J
2023 年 1 月 23 日
There is nothing more to say about how to solve the problem. The only question is, does the problem have a solution? The 15-variable fake problem apparently does not have a solution, but it might not matter in the end, because maybe your real problem does.
Incidentally, you could have had,
problem.Objective = Fv;
Antonio Cassano
2023 年 1 月 26 日
編集済み: Matt J
2023 年 1 月 26 日
Matt J
2023 年 1 月 26 日
Again, you appear to have more equaltity constraints than unknowns, so the problem is extremely likely to be infeasible.
Antonio Cassano
2023 年 1 月 29 日
Torsten
2023 年 1 月 29 日
5 unknows:
initialPoint.Fv = Fvt(j,i-1);
initialPoint.p0 = p0t(j,i-1);
initialPoint.x_k = x_kt(j,i-1);
initialPoint.y_k = y_kt(j,i-1);
initialPoint.f = ft(j,i-1);
6 equality constraints, 2 inequality constraints:
problem.Constraints.constraint1 = p01 >= 0;
problem.Constraints.constraint2 = F1eq == 0;
problem.Constraints.constraint3 = -densita*volume_oggetto*g*sin(angolo)+F2eq == 0;
problem.Constraints.constraint4 = Fv1 - 2*p01*pi*Re - densita*g*volume_oggetto*cos(angolo) == 0;
problem.Constraints.constraint5 = f1 <= fst(1,j);
problem.Constraints.constraint6 = F1eq.^2+F2eq.^2-f1.^2*(2*pi*p01*Re).^2 == 0;
problem.Constraints.constraint7 = F2eq ./ F1eq == -x_k1/y_k1;
problem.Constraints.constraint8 = -densita*volume_oggetto*g*G(1,1)*sin(angolo)+F3eq == 0 ;
Or did I interprete something wrong ?
Antonio Cassano
2023 年 1 月 30 日
Matt J
2023 年 1 月 30 日
Well, maybe it eventually will converge.
Antonio Cassano
2023 年 1 月 31 日
Matt J
2023 年 1 月 31 日
@Antonio Cassano I would post that as a new question. First of all, we don't know what your current code looks like, the one that produced that graph. Secondly, we don't know what you would consider an "improvement" to the current result. All that could and should go into a new post..
However you might also try looping backwards from n:-1:1 and initializing instead with,
initialPoint.Fv = Fvt(j,i+1);
initialPoint.p0 = p0t(j,i+1);
initialPoint.x_k = x_kt(j,i+1);
initialPoint.y_k = y_kt(j,i+1);
initialPoint.f = ft(j,i+1);
since the solutions seem to be more sensitive to the initial guess at lower i.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Solver Outputs and Iterative Display についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
