Main Content

cancelGenerate

Class: matlab.DiscreteEventSystem
Package: matlab

Cancel previously scheduled entity generation event

Syntax

event=cancelGenerate(storageID,tag)

Description

event=cancelGenerate(storageID,tag) cancels a previously scheduled generation event. You can then schedule this event by returning it as the output argument when implementing an event action method, such as entry or exit.

Input Arguments

expand all

Storage index of the to-be-cancelled entity generation event.

Tag of the to-be-cancelled entity generation event.

Output Arguments

expand all

Event for cancelling an entity generation.

Examples

expand all

Cancel a previously scheduled entity generation event.

function [entity,event] = entry(obj,storage,entity,src)
    % Cancel a previously scheduled entity generation event. The event
    % was scheduled for storage element 3, with a custom tag 'seed'.
    event = obj.cancelGenerate(3, 'seed');
end    
Introduced in R2016a