refactored performance plot data storage

This commit is contained in:
2025-11-30 22:32:17 -08:00
parent 7c87458b66
commit f296fd2803
6 changed files with 15 additions and 28 deletions

View File

@@ -25,8 +25,8 @@ function obj = run(obj, domain, partitioning, t)
S(partitionMask) = sensorValues;
% Find agent's performance
C = S.* F; % try gradient on this directly
obj.performance = [obj.performance sum(C(~isnan(C)))];
C = S.* F;
obj.performance = [obj.performance, sum(C(~isnan(C)))];
% Compute gradient on agent's performance
[gradSensorPerformanceX, gradSensorPerformanceY] = gradient(S, domain.objective.discretizationStep); % grad S_n