LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
matlab
lib
kpctoolbox
dmap
dmap_isfeasible.m
1
function
bool
= dmap_isfeasible(DMAP)
2
% Check
if
the DMAP representation
is
feasible
3
% DMAP
is
a cell
array
{D0, D1}
4
D0 = DMAP{1};
5
D1 = DMAP{2};
6
bool
=
true
;
7
if
size(D0,1) ~= size(D0,2) || size(D1,1) ~= size(D1,2)
8
bool = false; return;
9
end
10
if size(D0,1) ~= size(D1,1)
11
bool
= false; return;
12
end
13
if any(D0(:) < -1e-10) || any(D1(:) < -1e-10)
14
bool
= false; return;
15
end
16
P
= D0 + D1;
17
rs = sum(
P
, 2);
18
if any(abs(rs - 1) > 1e-6)
19
bool
= false; return;
20
end
21
d1rs = sum(D1, 2);
22
if any(d1rs < -1e-10)
23
bool
= false; return;
24
end
25
end
P
Definition
fj_cs_multi_visits.m:29
array
Definition
pfqn_conv.m:31
is
Definition
qsys_mg1_prio.m:10
Generated by
1.9.8