没有合适的资源?快使用搜索试试~ 我知道了~
首页em_plant simTALK教程
资源详情
资源评论
资源推荐

Strategies
错误!未定义样式。
1-1
Last printed: 10/26/2008 2:03:00 PM
Last saved: 2/19/2004 1:54:00 PM
Chapter 1
Strategies
About This Chapter
This chapter provides basic information about methods and how they
can be used for effective modeling. This chapter contains the
following lessons:
LESSON 1: INTRODUCTION TO THE OBJECT METHOD..........................................1-3
LESSON 2: SYNTAX FOR WRITING A METHOD ....................................................1-7
LESSON 3: THE METHOD DEBUGGER..............................................................1-12
LESSON 4: NAMES, IDENTIFIERS AND PATHS.....................................................1-16
LESSON 5: ANONYMOUS INDENTIFIERS ...........................................................1-19
LESSON 6: SCHEDULING METHOD CALLS .......................................................1-24
LESSON 7: ENTRANCE AND EXIT CONTROLS....................................................1-26
LESSON 7: ATTRIBUTES..................................................................................1-38
LESSON 8: CONDITIONAL STATEMENTS ...........................................................1-41
LESSON 9: TABLES AND GLOBAL VARIABLES ...................................................1-44
LESSON 10: OPERATIONS CONVERTING DATA TYPES.......................................1-55
LESSON 11: LOOPS .....................................................................................1-59
LESSON 12: CONDITIONAL SUSPENSIONS – WAITUNTIL AND STOPUNTIL................1-63
LESSON 13: THE CONTENTS OF AN OBJECT LOADING AND UNLOADING............1-65
LESSON 14: CALLING METHODS; TRIGGER AND FRAME CONTROLS ..................1-77
LESSON 15: RESOURCE OBJECTS ..................................................................1-83
LESSON 16: MISCELLANEOUS FEATURES .........................................................1-88
CHAPTER SUMMARY....................................................................................1-95

eM-Plant Advanced Topics Training Guide
1-2
Last printed: 10/26/2008 2:03:00 PM
Last saved: 2/19/2004 1:54:00 PM

Strategies
错误!未定义样式。
1-3
Last printed: 10/26/2008 2:03:00 PM
Last saved: 2/19/2004 1:54:00 PM
Lesson 1: Introduction to the
Object Method
Introduction
A Method is a small program, comparable to a procedure
or a function in the programming languages Basic, Pascal
or C++.
SimTalk, the programming language of eM-Plant, is based
on the programming language Eiffel. It resembles other
programming languages.
You can program a Method to read the attributes of the
objects you inserted into your model and change these
attributes. Select an object and then select Objects > Show
Attributes and Methods to show all built-in attributes and
methods that object provides.
In addition you can define any number of user-defined,
custom attributes. The object Method is fully integrated into
the object-oriented concept of eM-Plant. Enter your source
code into the object Method. Then the built-in Interpreter
processes these statements during the simulation run.
A Method can:
React to certain events during a simulation run.
Get and set conditions.
Execute statements.
Modify and extend the behavior of objects.
Prepare a model for new users with custom dialogs.

eM-Plant Advanced Topics Training Guide
1-4
It allows you to:
Implement different approaches, adapt your model to
your needs.
Increase the efficiency of your simulation model.
Increase the flexibility of your simulation model
The Object Method
Use the Method to program controls that other objects start
and execute during the simulation run.
Properties:
Capacity: 0
Information flow object
Body
of the
method
When you insert the instance of a Method into your model,
eM-Plant activates Inherit Source Code (from the class).
Before you deactivate it, check if you want to change the
source code in the class or in the instance.
Last printed: 10/26/2008 2:03:00 PM
Last saved: 2/19/2004 1:54:00 PM

Strategies
错误!未定义样式。
1-5
Last printed: 10/26/2008 2:03:00 PM
Last saved: 2/19/2004 1:54:00 PM
Toolbar of the method
Debugger
Run
Drill Up one
level
A
pply Change
s
Inherit Source Code
Bookmarks
Editor
Select Tools -> Options
in the TUNE window to choose settings for the Method Editor.
It is recommend to activate Display line numbers
This allows to quickly change to the line that contains wrong
source code in the Method Debugger.
剩余95页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论10