Init control (EventController)

Click this and select a Method object in the dialog Dialog Items of the Objects. Enter the source code of the init control. Plant Simulation calls this control once at the beginning of the simulation run during the init phase before the objects are initialized and before init methods are executed.

You can also initialize attributes which affect event generation, for example the availability. Here the init controls are executed before events are generated. The normal init methods are executed after the calculation of the initial events.

Note:

To open the dialog of the object, whose name you entered into the text box, click in the text box, and press the F2 key.

Instead, you can also right-click in the text box. Then, select Create Control on the context menu to create a control method, which is a user-defined attribute of data type method of this object:

  • Enter a meaningful name into the text box and select Create Control. Plant Simulation then inserts self.Name_you_entered_for_the_control. Or

  • Select Create Control. Plant Simulation then inserts self.OnInit.

    Enter the source code of this control into the Method that opens.

  • To delete this control, delete the user-defined attribute; deleting the name from the text box just deletes the name, but keeps the user-defined attribute.

SimTalk:

InitCtrl

Related Topic

Define How Many Workers Are Created When the Model is Initialized