maximization problem , linprog optimization

6 visualizaciones (últimos 30 días)
xu
xu el 26 de Mzo. de 2023
Comentada: Matt J el 27 de Mzo. de 2023
Hello,
I'm trying to solve this maximization problem with matlab.

Respuestas (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 26 de Mzo. de 2023
Here is a nice documentation showing several examples how to apply linprog() fcn of MATLAB to solve such exercises:
  6 comentarios
Matt J
Matt J el 27 de Mzo. de 2023
You should have,
ub=[220;70; +inf];
but that won't make a difference to the result.
Matt J
Matt J el 27 de Mzo. de 2023
You can double check things with the problem-based approach:
lam=optimvar('lambda',1,'Lower',0);
x=optimvar('x',[2,1],'Lower',[160,10],'Upper',[220,70]);
Con.Con1=0.0123*x(2)-0.738*lam>=0.123;
Con.Con2=-0.0069*sum(x)-0.828*lam>=-2.001;
prob=optimproblem('Objective',lam,'ObjectiveSense','max','Constraints',Con);
sol=solve(prob)
Solving problem using linprog. Optimal solution found.
sol = struct with fields:
lambda: 0.6667 x: [2×1 double]

Iniciar sesión para comentar.

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by