Is it possible to use lookup tables in optimization problem formulation in YALMIP?
I want to determine an electric motor efficiency based on its speed and torque. The motor torque is an optimization variable and I have the efficiency in a 2D lookup table.
I tried to use the interp2 function ( Efficiency = interp2(xi,yi,zi, xv, yv)) to determine the efficiency, but it gives me the following error:
Error using sdpvar/model (line 66)
Failed when trying to create a model for the "interp2_internal" operator
Error in expandrecursive (line 19)
[properties,F_graph,arguments,fcn] = model(variable,method,options,allExtStruct(ext_index),w);
Error in expandmodel>expand (line 416)
[F_expand,failure,cause] =
expandrecursive(recover(variables(i)),F_expand,extendedvariables,monomtable,variabletype,where,level+1,options,method,[],'convex',allExtStruct,w);
Error in expandmodel (line 282)
[F_expand,failure,cause] =
expand(index_in_extended,variables,-sdpvar(Fconstraint),F_expand,extendedvariables,monomtable,variabletype,['constraint
#' num2str(constraint)],0,options,method,[],allExtStructs,w);
Error in compileinterfacedata (line 116)
[F,failure,cause,operators] = expandmodel(F,h,options);
Error in solvesdp (line 231)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics] =
compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);
Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});