two problems of yalmip

35 views
Skip to first unread message

guoxi zhao

unread,
Apr 7, 2015, 11:56:43 PM4/7/15
to yal...@googlegroups.com
Hello, Johan:

  I find that YALMIP may be not as convinient as imagine, so   I write a piece of  I LP  to test the yalmip, Pardon my ignorance.  

Min z=x1+x2+...+x100;
  1)   x_i  is integer for i=1,2, ...,100;
 
  2)   x_i>0  for i=1,2, ...,100;
 
  3)    x_i<=x_{i+1}+x_{i+2} , i=1,2,...,98                                     (z_min=100)

I write the following precedures by yalmip:
   x=intvar(1,100);

 A=ones(100,1);f=A*X';

 F=set(x>0)+set( );    solvesdp(F,-f);  double(f);  double(x)

My questions are that : (1) can  we use for-lop in the "set(                )''?
                                     (2) how to definite the  constraints condition conviniently.
Thanks!

     

Johan Löfberg

unread,
Apr 8, 2015, 1:45:46 AM4/8/15
to yal...@googlegroups.com
Have you looked at the examples?

http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Tutorials.Basics

Standard matlab coding applies, so for-loops can of course be used.

guoxi zhao

unread,
Apr 8, 2015, 2:33:46 AM4/8/15
to yal...@googlegroups.com
Great!!!!
Thabk you!
Reply all
Reply to author
Forward
0 new messages