I have a binary variable x = binvar(n_files, n_nodes), which determines whether a file is cached in a node or not. There are a set of requesting files and each is allocated with a forwarding path (i.e., a sequence of nodes). If a certain file is not cached in a node, then forward to the next node and add the weight between the two nodes to the cost of that file. Then, the objective function is the maximal cost of all files.
The mathematical expression of the problem is shown as
$obj = \max_{f\in F} \{ \sum_{m=1}^{p_f} w_{p_{m+1}p_m} \prod_{m'=1}^{m} (1-x(f,m')) \}$
With YALMIP, the code is written as follows:
x = binvar(n_files,n_nodes);
delay_files = zeros(n_files,1);
for i = 1:n_files
path = path_seq{i};
weights = weights_seq{i};
for j = 1:length(path)
delay_files(i) = delay_files(i) + implies(sum(x((files(i),path(1:j)))==0,weights(j));
end
end
obj = max(delay_files);
Then, there is an error saying that "Error using lmi/double (line 12) Double not applicable on list of constraints". How can I solve this problem?