made video writing optional for performance benefits

This commit is contained in:
2025-12-23 11:50:26 -08:00
parent 557d8fe63c
commit 33036c95fd
4 changed files with 27 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
function obj = initialize(obj, domain, objective, agents, timestep, partitoningFreq, maxIter, obstacles)
function obj = initialize(obj, domain, objective, agents, timestep, partitoningFreq, maxIter, obstacles, makeVideo)
arguments (Input)
obj (1, 1) {mustBeA(obj, 'miSim')};
domain (1, 1) {mustBeGeometry};
@@ -8,11 +8,15 @@ function obj = initialize(obj, domain, objective, agents, timestep, partitoningF
partitoningFreq (:, 1) double = 0.25
maxIter (:, 1) double = 1000;
obstacles (:, 1) cell {mustBeGeometry} = cell(0, 1);
makeVideo (1, 1) logical = true;
end
arguments (Output)
obj (1, 1) {mustBeA(obj, 'miSim')};
end
% enable/disable video writer
obj.makeVideo = makeVideo;
% Define simulation time parameters
obj.timestep = timestep;
obj.maxIter = maxIter - 1;