Linear Programming model, where constrain related to result

Hello programmer
I have a problem with linprog like this
constain B is
"B = [ -x(1) ; -x(2) ; -x(3) ; -x(4) ; -x(5) ; -x(6) ; -x(7) ; -x(8) ; -x(9) ; -x(10) ] ;
X = linprog (F,A,B,Aeq,Beq)"
Since in constrain B, there is "X" which X is the result itself, is there any coding that i can use to solve this problem? (constrain B related to X)
Constrain F,A,Aeq and Beq is already correct, the current problem just for constrain B
Thankyou

Réponses (1)

Matt J
Matt J le 13 Avr 2018
Modifié(e) : Matt J le 13 Avr 2018
It appears to be equivalent to the following linear program, and so can be solved with LINPROG directly
min F.'*X
s.t. Aeq*X=Beq
(A+I)*X<=0

2 commentaires

I'm sorry, i've tried to input the formula, but the result still didn't show. If i want to use the optimization tool box in matlab to solve this problem, what should I input in "B", since B is related to Objective function. Thankyou
Matt J
Matt J le 23 Avr 2018
Modifié(e) : Matt J le 23 Avr 2018

but the result still didn't show

What does that mean? Maybe you could attach the problem data in a .mat file so we can all play with it.

what should I input in "B", since B is related to Objective function

Since B=-I*X, then the constraint

A*X<=B

is the same as

(A+I)*X<=0

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by