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

Answers (1)

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 Comments

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

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

Sign in to comment.

Asked:

on 13 Apr 2018

Edited:

on 23 Apr 2018

Community Treasure Hunt

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

Start Hunting!