What wrong with this linear simlp(f, A, b) problem?
3 次查看(过去 30 天)
显示 更早的评论

This is my code for the above problem but the answer seems wrong? Can anyone tell me the problems?
f = [-0.4, -0.45];
A = [1, 1; -100 -150; -750, -700; -1 0; 0 -1];
b = [7; -650; -4000; 0; 0];
simlp(f,A,b)
ans =
0.0000
7.0000
1 个评论
Walter Roberson
2021-6-10
simlp() appears to be an undocumented internal Simulink function, that has nothing to do with linear programming ?
回答(1 个)
Walter Roberson
2021-6-10
Linear programming is typically coded in terms of minimization. You want to minimize the costs. But you have expressed your costs as negative, so if simlp() is like most linear programming solvers, you are effectively asking to maximize the costs.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linearization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!