-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_inequalities_planeService_1.m
65 lines (50 loc) · 1.3 KB
/
setup_inequalities_planeService_1.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function [ A,b ] = setup_inequalities_planeService_1( M_i,N_j,K, serviceTime )
%SETUP_INEQUALITIES_PLANESERVICE Summary of this function goes here
% Detailed explanation goes here
serviceTime
A = zeros(0, size(M_i,1)*size(N_j,1)*K);
for j=1:size(N_j,1)
nogate = [];
for j_=1:j-1
nogate = cat(1,nogate,zeros(K,1));
end
arr = zeros(K,1);
arr(1:serviceTime) = ones(serviceTime,1);
nogate = cat(1,nogate,arr);
for j_=j:size(N_j,1)-1
nogate = cat(1,nogate,zeros(K,1));
end
aux = [];
for i=1:size(M_i,1)
aux = cat(1,aux,nogate);
end
A(end+1,:) = aux';
for k=1:K-serviceTime
A(end+1,:) = [ 0 A(end,1:(end-1))];
end
end
% for j=1:size(N_j,1)
% nogate = [];
% for j_=1:j-1
% nogate = cat(1,nogate,zeros(K,1));
% end
%
% arr = zeros(K,1);
% arr(k:k+serviceTime-1) = ones(serviceTime,1);
% nogate = cat(1,nogate,arr);
%
% for j_=j:size(N_j,1)-1
% nogate = cat(1,nogate,zeros(K,1));
% end
%
% aux = [];
% for i=1:size(M_i,1)
% aux = cat(1,aux,nogate);
% end
%
% A(end+1,:) = aux';
% end
% whos A
% end
b = ones(size(A,1),1);
end