📄 convertlogics.m
字号:
function [F,changed] = convertlogics(F)
%CONVERTLOGICS Internal function to convert logic constraints to mixed integer constraints
% Author Johan L鰂berg
% $Id: convertlogics.m,v 1.8 2005/04/29 16:28:03 joloef Exp $
changed = 0;
if length(F)>0
extvariables = yalmip('logicextvariables');
if ~isempty(extvariables)
for i = 1:length(F)
if is(F(i),'elementwise')
Fi = sdpvar(F(i));
Fv =getvariables(Fi);
if length(Fv)==1
xb = getbase(Fi);
if isequal(xb,[0 1])
if ismember(Fv,extvariables)
F(i) = set(Fi >= 1);
end
end
end
end
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -