Groups
Groups
Sign in
Groups
Groups
YALMIP
Conversations
Labels
About
Send feedback
Help
How to define a cut constraint like ..
16 views
constraint
function
yalmip
Skip to first unread message
tcsnwgl
unread,
Sep 26, 2015, 1:09:48 PM
9/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to YALMIP
Hi guys,
Say I want to define a function of variables x in yalmip as follows:
$\sum\limits_{i<j} q_ij abs{x_i - x_j} < = C$....
What should I do ?
Best Regards
Johan Löfberg
unread,
Sep 26, 2015, 2:21:53 PM
9/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to YALMIP
Nothing special as far as I can see. Simple for-loop is one way
lhs
=
0
;
for
i
=
1
:
N
for
j
=
1
:
i
-
1
lhs
=
lhs
+
q
(
i
,
j
)*
abs
(
x
(
i
)-
x
(
j
));
end
end
Model
=
lhs
<=
C
;
If q is non-negative, you get LP constraints, if some q is negative, YALMIP will have to do MILP modelling
Reply all
Reply to author
Forward
0 new messages