fixed and verified communications constraint

This commit is contained in:
2026-01-06 12:24:42 -08:00
parent 4fe897455d
commit 1e7540226e
11 changed files with 89 additions and 34 deletions

View File

@@ -13,7 +13,7 @@ function obj = updateAdjacency(obj)
for ii = 2:size(A, 1)
for jj = 1:(ii - 1)
% Check that agents are not out of range
if norm(obj.agents{ii}.pos - obj.agents{jj}.pos) > min([obj.agents{ii}.comRange, obj.agents{jj}.comRange]);
if norm(obj.agents{ii}.pos - obj.agents{jj}.pos) > min([obj.agents{ii}.commsGeometry.radius, obj.agents{jj}.commsGeometry.radius])
A(ii, jj) = false; % comm range violation
continue;
end
@@ -31,6 +31,5 @@ function obj = updateAdjacency(obj)
if any(obj.adjacency - obj.constraintAdjacencyMatrix < 0, 'all')
warning("Eliminated network connections that were necessary");
keyboard
end
end