Effacer les filtres
Effacer les filtres

What wrong with this linear simlp(f, A, b) problem?

2 vues (au cours des 30 derniers jours)
Nguyen Vinh
Nguyen Vinh le 10 Juin 2021
Commenté : Nguyen Vinh le 12 Juin 2021
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 commentaire
Walter Roberson
Walter Roberson le 10 Juin 2021
simlp() appears to be an undocumented internal Simulink function, that has nothing to do with linear programming ?

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 10 Juin 2021
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.

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by