Error in using implies_internal

48 views
Skip to first unread message

Emma W

unread,
Jun 28, 2015, 11:47:01 PM6/28/15
to yal...@googlegroups.com
Dear Mr. Lofberg,

First, thanks for your hard-working in developing YALMIP, it really helps me a lot!

I am using the YALMIP to solve a variant problem of VRPTW (vehicle routing problem with Time Window), and I figure out that one of constraints that I coded with 'implies' output some errors, the constraint is as follows
for k = 1:Cno
    for i = 1:2*Cst+1
        for j = 2:2*Cst+2
            F=[F,implies(X(i,j,k)==1,Ub(j,k)<=Ub(i,k)-dmd(j)*X(i,j,k))];% indicate loading capacity between an edge
        end
    end
end

And the output errors are as follows:

Error in implies_internal (line 3)
X = varargin{1};

Output argument "varargout" (and maybe others) not assigned during call to "E:\yalmip\operators\implies_internal.m>implies_internal".

Error in implies (line 78)
        varargout{1} = implies_internal(varargin{3:end});

Error in lmi/expandmeta (line 6)
    Fnew = [Fnew, feval(F.clauses{i}.data{1},'expand',[],F.clauses{i}.data{2:end})];

Error in expandmodel (line 35)
        F = expandmeta(F);

Error in compileinterfacedata (line 113)
    [F,failure,cause,operators] = expandmodel(F,h,options);

Error in solvesdp (line 261)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics] =
compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);

Error in optimize (line 34)
varargout{:} = solvesdp(varargin{:});

Error in LRP_Test3_0629 (line 193)
sol2 = optimize(F,f)

If you don't mind, could you provide your mail, so that I can send my codes to you?  thanks a lot!

VO Nhat Vinh

unread,
Jan 9, 2018, 4:33:16 AM1/9/18
to YALMIP
Hello,

I have the same problem when using implies.

Could any one tell me the reason please?

With x(i,t) and y(i,t) are decision variables:

            cons = cons + [d(1,i,t)+d(2,i,t)==1];
            A = (sum(x(i,1:(t-1)))+startx(i)==desx(i));
            B = (sum(y(i,1:(t-1)))+starty(i)==desy(i));
            C = (x(i,t)==0);
            D = (y(i,t)==0);
            cons = cons + [implies(d(1,i,t),[A&B,C&D])];
            C =(-1<=x(i,t)<=1);
            D =(-1<=y(i,t)<=0);
            E =(x(i,t)+y(i,t)>=-1);
            F =(x(i,t)-y(i,t)<=1);
            cons = cons + [implies(d(2,i,t),[~A|~B,C|D|E|F])];


           cons = cons + [c(1,i,j,t)+c(2,i,j,t)==1];
            A = (sum(y(i,1:(t-1))) +starty(i)==sum(y(j,1:(t-1))) +starty(j));
            B = (sum(x(i,1:(t-1))) +startx(i)+l(i)<=sum(x(j,1:(t-1))) +startx(j));
            C = (sum(x(j,1:(t-1))) +startx(j)+l(j)<=sum(x(i,1:(t-1))) +startx(i));
            cons = cons + [implies(c(1,i,j,t),[A,B|C])];
            B = (sum(y(i,1:(t-1))) +starty(i)>=desy(i));
            cons = cons + [implies(c(2,i,j,t),[~A,B])];


Johan Löfberg

unread,
Jan 9, 2018, 5:02:47 AM1/9/18
to YALMIP
we cannot run your code
Reply all
Reply to author
Forward
0 new messages