random agent placement in parametric testing
This commit is contained in:
@@ -14,8 +14,7 @@ function obj = initialize(obj, objectiveFunction, domain, discretizationStep, pr
|
||||
obj.discretizationStep = discretizationStep;
|
||||
|
||||
obj.sensorPerformanceMinimum = sensorPerformanceMinimum;
|
||||
|
||||
obj.groundAlt = domain.minCorner(3);
|
||||
|
||||
obj.protectedRange = protectedRange;
|
||||
|
||||
% Extract footprint limits
|
||||
|
||||
@@ -14,13 +14,13 @@ function f = plot(obj, ind, f)
|
||||
% Plot gradient on the "floor" of the domain
|
||||
if isnan(ind)
|
||||
hold(f.CurrentAxes, "on");
|
||||
o = surf(f.CurrentAxes, obj.X, obj.Y, repmat(obj.groundAlt, size(obj.X)), obj.values ./ max(obj.values, [], "all"), 'EdgeColor', 'none');
|
||||
o = surf(f.CurrentAxes, obj.X, obj.Y, zeros(size(obj.X)), obj.values ./ max(obj.values, [], "all"), 'EdgeColor', 'none');
|
||||
o.HitTest = 'off';
|
||||
o.PickableParts = 'none';
|
||||
hold(f.CurrentAxes, "off");
|
||||
else
|
||||
hold(f.Children(1).Children(ind(1)), "on");
|
||||
o = surf(f.Children(1).Children(ind(1)), obj.X, obj.Y, repmat(obj.groundAlt, size(obj.X)), obj.values ./ max(obj.values, [], "all"), 'EdgeColor', 'none');
|
||||
o = surf(f.Children(1).Children(ind(1)), obj.X, obj.Y, zeros(size(obj.X)), obj.values ./ max(obj.values, [], "all"), 'EdgeColor', 'none');
|
||||
o.HitTest = 'off';
|
||||
o.PickableParts = 'none';
|
||||
hold(f.Children(1).Children(ind(1)), "off");
|
||||
|
||||
@@ -2,7 +2,6 @@ classdef sensingObjective
|
||||
% Sensing objective definition parent class
|
||||
properties (SetAccess = private, GetAccess = public)
|
||||
label = "";
|
||||
groundAlt = NaN;
|
||||
groundPos = [NaN, NaN];
|
||||
discretizationStep = NaN;
|
||||
objectiveFunction = @(x, y) NaN; % define objective functions over a grid in this manner
|
||||
|
||||
Reference in New Issue
Block a user