View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

T-Mass: A Tool for Multi-agent System Simulation

Introduction


Creating MAS Model

To create a T-Mass model means to specify
These can be specifiet in one or more text files. Main model file should have extension '.tml' as it is the default extension for the T-Mass GUI model loader. It is recomended to create a new blank text file in a text editor with some filename and the extension, for exampl 'mymodel.tml'. First of all a model name can be specified. The syntax is
'model:' ID ';'
ID is a model name.
Example: Model that will be defined below this name specification will hold name 'myFirstMode'.
model: myFirstModel;

Model source specification is important for determination which file or which structure may be used for model element realization. Version (X) allows to specify agent and platform sources. The second may be specifiend inline in the .tml file, but the agent must be specified in an individual file. Label 'sources' start the source declaration sections and then the sources are defined inside composed brackets. Syntax:
'sources' '{' <B>element_sources</B> '}'';'

Example: Two sources are defined below. One agent which code is written in file 'ag1.alll' and one platform, that is defined in file 'pltf.pd'. Notice that agent source names must be mentioned directly behind the file specifications, platform sources are named inside the source files as we will see later in this text.
	
sources{
agents: file: ag1.alll agent1;
platforms: file: pltf.pd;
};

Inline definition of platform source is written inside composed brackets and finished with semicolon.
	
paltrormSpec: 'name'':'  name=ID ';'
	      ('slots' ':' 'environments' '=' noOfEnvironmentSlots ',' 'agents' '=' noOfAgentSlots ';')?
              ('services' ':' ('[' svcName svcClass ']')+ ';')?
	      ('variables' ':' ( varName=ID ('=' varValue=generalList)?)+)?