'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function c = agentsCrowdObjective(objective, positions, protectedRange)
|
||||
arguments (Input)
|
||||
objective (1, 1) {mustBeA(objective, 'sensingObjective')};
|
||||
objective (1, 1) {mustBeA(objective, "sensingObjective")};
|
||||
positions (:, 3) double; % this could be expanded to handle n obstacles in 1 call
|
||||
protectedRange (1, 1) double;
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function mustBeGeometry(geometry)
|
||||
validGeometries = ["rectangularPrism"; "spherical"];
|
||||
if isa(geometry, 'cell')
|
||||
if isa(geometry, "cell")
|
||||
for ii = 1:size(geometry, 1)
|
||||
assert(any(arrayfun(@(x) isa(geometry{ii}, x), validGeometries)), "Geometry in index %d is not a valid geometry class", ii);
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function mustBeSensor(sensorModel)
|
||||
validSensorModels = ["fixedCardinalSensor"; "sigmoidSensor";];
|
||||
if isa(sensorModel, 'cell')
|
||||
if isa(sensorModel, "cell")
|
||||
for ii = 1:size(sensorModel, 1)
|
||||
assert(any(arrayfun(@(x) isa(sensorModel{ii}, x), validSensorModels)), "Sensor in index %d is not a valid sensor class", ii);
|
||||
end
|
||||
|
||||
@@ -8,9 +8,9 @@ function c = domainContainsObstacle(domain, obstacle)
|
||||
end
|
||||
|
||||
switch class(domain)
|
||||
case 'rectangularPrism'
|
||||
case "rectangularPrism"
|
||||
switch class(obstacle)
|
||||
case 'rectangularPrism'
|
||||
case "rectangularPrism"
|
||||
c = all(domain.minCorner <= obstacle.minCorner) && all(domain.maxCorner >= obstacle.maxCorner);
|
||||
otherwise
|
||||
error("%s not implemented for obstacles of class %s", coder.mfunctionname, class(domain));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function c = obstacleCoversObjective(objective, obstacle)
|
||||
arguments (Input)
|
||||
objective (1, 1) {mustBeA(objective, 'sensingObjective')};
|
||||
objective (1, 1) {mustBeA(objective, "sensingObjective")};
|
||||
obstacle (1, 1) {mustBeGeometry}; % this could be expanded to handle n obstacles in 1 call
|
||||
end
|
||||
arguments (Output)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function c = obstacleCrowdsObjective(objective, obstacle, protectedRange)
|
||||
arguments (Input)
|
||||
objective (1, 1) {mustBeA(objective, 'sensingObjective')};
|
||||
objective (1, 1) {mustBeA(objective, "sensingObjective")};
|
||||
obstacle (1, 1) {mustBeGeometry}; % this could be expanded to handle n obstacles in 1 call
|
||||
protectedRange (1, 1) double;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user