diff --git a/@miSim/updateAdjacency.m b/@miSim/updateAdjacency.m index fb595fa..cbc3dba 100644 --- a/@miSim/updateAdjacency.m +++ b/@miSim/updateAdjacency.m @@ -17,19 +17,8 @@ function obj = updateAdjacency(obj) A(ii, jj) = false; % comm range violation continue; end - - % % Check that agents do not have their line of sight obstructed - % for kk = 1:size(obj.obstacles, 1) - % if obj.obstacles{kk}.containsLine(obj.agents{jj}.pos, obj.agents{ii}.pos) - % A(ii, jj) = false; - % end - % end end end obj.adjacency = A & A'; - - if any(obj.adjacency - obj.constraintAdjacencyMatrix < 0, 'all') - warning("Eliminated network connections that were necessary"); - end end \ No newline at end of file diff --git a/@miSim/validate.m b/@miSim/validate.m index b20d3d3..3b66ac6 100644 --- a/@miSim/validate.m +++ b/@miSim/validate.m @@ -5,8 +5,15 @@ function validate(obj) arguments (Output) end + %% Communications Network Validators if max(conncomp(graph(obj.adjacency))) ~= 1 warning("Network is not connected"); end + if any(obj.adjacency - obj.constraintAdjacencyMatrix < 0, 'all') + warning("Eliminated network connections that were necessary"); + end + + %% + end diff --git a/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEd.xml b/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEd.xml new file mode 100644 index 0000000..378b613 --- /dev/null +++ b/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEp.xml b/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEp.xml new file mode 100644 index 0000000..3747540 --- /dev/null +++ b/resources/project/FI0gxbH-PhwjE_riDQGHPyYMHks/jMxqi1-UdFyFMXqowBRZrZ8JeFEp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/test/parametricTestSuite.m b/test/parametricTestSuite.m new file mode 100644 index 0000000..1e6eb8e --- /dev/null +++ b/test/parametricTestSuite.m @@ -0,0 +1,19 @@ +classdef parametricTestSuite < matlab.unittest.TestCase + + methods (TestClassSetup) + % Shared setup for the entire test class + end + + methods (TestMethodSetup) + % Setup for each test + end + + methods (Test) + % Test methods + + function unimplementedTest(testCase) + testCase.verifyFail("Unimplemented test"); + end + end + +end \ No newline at end of file diff --git a/test/test_miSim.m b/test/test_miSim.m index 6d79e89..d3a6a0a 100644 --- a/test/test_miSim.m +++ b/test/test_miSim.m @@ -503,8 +503,7 @@ classdef test_miSim < matlab.unittest.TestCase tc.testClass.run(); end function test_obstacle_avoidance(tc) - % Right now this seems to prove that the communications - % constraints are working, but the result is dissatisfying + % Right now, the communications constraint is violated here % Fixed single obstacle % Fixed two agents initial conditions