M.R. Martens
Visual activities for Delphi using TOMAS
Computer program,
Report 2004.TL.6854, Transport Engineering and Logistics.
TOMAS is a library for Borland's Delphi providing non-graphical
elements that can be used to simulate time related cases. However modern
Integrated Development Environments like Delphi give the advantage to
quickly develop graphical applications. The goal is to give TOMAS this
same advantage.
This means that if the user wants to add a new simulation element (called
a "class" in Delphi) the source-code of this class must be
automatically generated and the class added to the palette of Delphi. The
tasks for the user are to place instances of simulation elements on the
form, assigning properties and relations with other elements, and
implement the Process method to define simulation characteristics.
The source-code generator will be an external program or a program within
Delphi that communicates with the interface of Delphi. An experiment is
started to show how the source-code looks like generally and how complex
it will be to automatically generate this code.
This experiment uses the activity class. An activity is an element in a
certain tree of activities (called a project) that takes some time to
complete. After that the next activity in the tree is started.
A Delphi package is made to add the functionality of activities to a
Delphi application. Design and simulation of the activity network work the
same way as a standard application, i.e. the project is setup during
design-time and simulated during runtime.
The development of the graphical activity class showed that in general the
source-code that has to be generated automatically consists of
registration statements to let Delphi know new classes are present, a
visual Delphi class, a non-visual TOMAS class and forms to interact with
the user to change property values. As for the complexity of the
source-code, two major problems were encountered.
First, to generate source-code for both a visual and a non-visual class
that interact with each other is very hard, it is highly advisable to
develop a general graphical TOMAS class so the two classes will be
combined to one class.
Secondly, problems were encountered with property values that are objects
(not integers, strings, etc.). The generation of forms so the user can
edit such a property as well the generation of source-code to store object
property values in form-files is very complex. Routines should be
developed to take care of these problems with object property values in a
general matter.
A final problem is that adding new visual classes to Delphi is not very
user-friendly, because a change in the package that provides these classes
requires a restart of Delphi. So while these three problems are not solved
it is not recommended to proceed further with the plan for a complete
visual TOMAS. However, the visual activity classes work rather well and it
is recommended to develop more graphical elements to gain more knowledge of
a one day complete visual TOMAS.
Reports on Transport Engineering and Logistics (in Dutch)
Modified: 2004.05.12;
logistics@3mE.tudelft.nl
, TU Delft
/ 3mE
/ TT
/ LT.