CPLEX in MATLAB - Asking for Help

Hi
I am using CPLEX in MATLAB
I want to optimize the following
min ||Y|| where ||y|| the l1 norm of y
l1 norm of y = sum of abs(y)
S.t. A Y = 2B - A* 13n
Y is within the range of [-1,1]
for example
A=
1 2 4 0 0 0 0 0 0
1.5 2.5 4.5 0 0 0 0 0 0
3 5 9 0 0 0 0 0 0
0 0 0 1 2 4 0 0 0
0 0 0 1.5 2.5 4.5 0 0 0
0 0 0 3 5 9 0 0 0
0 0 0 0 0 0 1 2 4
0 0 0 0 0 0 1.5 2.5 4.5
0 0 0 0 0 0 3 5 9
1 0 0 1 0 0 1 0 0
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1
2B-A x 13n =
-5
-5.5
-11
-3
-3.5
-7
1
0.5
1
-1
-1
-1
so the value of y that solve the problem is y =
1
-1
-1
-1
1
-1
-1
-1
1
I did the above using excel solver
If I want to do it using CPLEX LP how this can be done , I want the to use the MATLAB CPLEX LP because of the huge amount of data that I have that Excel solver can't handle.
Where I reached is
[obj,x,lambda,status,colstat,it] = lp_cplex(c,A,b,l,u,le,ge,maxIter,optimizer)
[x,output]=lp_cplex(fa,Aeq,beq,lb,ub,10000,1)
fa=[1,1,1,1,1,1,1,1,1];
in order to sum the values of x ( the problem I want to some the values of |x| not x but don't know how to do that !!
lb and ub is lower and upper boundaries -1 and 1
Aeq=beq the equality constraints
Can Anyone tell me how to do the summation of the absolute value of x in MATLAB CPLEX function ?
Thank you in advance

回答 (0 件)

カテゴリ

質問済み:

2015 年 7 月 20 日

編集済み:

2015 年 7 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by