exponenta event banner

simTerminating

Класс: симевенты. SimulationObserver
Пакет: симевенты

Определение поведения наблюдателя при завершении моделирования

Синтаксис

simTerminating(obj)

Описание

simTerminating(obj) определяет поведение при завершении моделирования. Переопределите эту функцию, чтобы задать поведение визуализации при завершении моделирования, как определено SimulationStatus параметр.

Входные аргументы

развернуть все

Объект класса М Наблюдатель

Примеры

развернуть все

Вызовите этот метод при завершении моделирования.

function simTerminating(this)
            % Called when simulation is terminating
            %
            % After the simulation terminates, in order to support clicking
            % on entity to see attributes, we gather up all of the entities
            % that exist in the model and save their attribute information
            
            ents = this.mEntityGlyphs.keys;
            for idx = 1 : length(ents)
                ent = ents{idx};
                try
                    enStruct = this.mEntities(ent);
                    str = evalc('disp(enStruct.Attributes)');
                    this.mCachePostRun(ent) = str;
                catch me
                end
            end
            
            % If animation timer is still running, schedule a stop
            if strcmp(this.mTimer.Running, 'on')
                this.mTimerRequestStop = true;
            else
                % If timer is not running, delete it
                delete(this.mTimer);
            end
        end
Представлен в R2016a