GALATEA Quick Start Guide

[GALATEA Home]


Short introduction

GALATEA is software to model and simulate DEVs, continuous, combined and multi-agent systems written in Java. Due to that the Graphic User Interface of GALATEA (GGUI) is under construction, we show in this page how to use GALATEA to write, translate, compile and run a classical model, the Teller. As GALATEA is has developed on Java, it is possible use it on any systems that has installed Java Development Kit!

Installing GALATEA

1 Following this link you can download GALATEA from the sourceforge site. You also can use this link to get to the list of available GALATEA versions and files. To be sure you get the full installation download galatea-installer.jar file that includes a instalation wizard and third party libraries. If you know how to install the third party libraries and develop an application with Java we recommend to download the last version of galatea.jar.
2 Once galatea-installer.jar is downloaded excecute it and follow the wizard instructions. That's all!
3 If you explore the directory where Galatea was installed, that we call galateaDir, you should find some subdirectories and files. One of them, galatea.jar, is the GALATEA library. As GALATEA have some dependency with external libraries in the directory lib you can find all of them. In order to probe GALATEA (Steps 4, 5 and 6) you also have the file SimpleTeller.g that is a GALATEA model that we will use to test the instalation.

Translating, Compiling and Running the Teller example

4

To translate a GALATEA model to Java language do:

Windows: Execute the cmd, and change your working directory to galateaDir. Then execute the following command:

      cd demos\1stDemo

      java -cp ..\..\galatea.jar;..\..\lib\javacup-runtime.jar galatea.gcompiler.G2Java SimpleTeller.g

UNIX / Linux : Go to the command line and change your working directory to galateaDir. Then execute the following command:

      cd demos/1stDemo

      java -cp ../../galatea.jar:../../lib/javacup-runtime.jar galatea.gcompiler.G2Java SimpleTeller.g

5

To compile Java files execute:

Windows:

      javac -cp ..\..\galatea.jar simpleteller\*.java

UNIX / Linux :

      javac -cp ../../galatea.jar simpleteller/*.java

6

To run the Simple Teller model execute:

Windows:

      java -cp .;..\..\galatea.jar;..\..\lib\jcommon-1.0.15.jar;..\..\lib\jfreechart-1.0.12.jar simpleteller.Model

UNIX / Linux :

      java -cp .:../../galatea.jar:../../lib/jcommon-1.0.15.jar:../../lib/jfreechart-1.0.12.jar simpleteller.Model

A window will appear. You click the run button and ...

That's it! On your console there should appear something like:

ARRIVE: 0.000000 there are 0 clients waiting
ARRIVE: 0.352970 there are 1 clients waiting
ARRIVE: 0.888062 there are 2 clients waiting
ARRIVE: 1.883912 there are 3 clients waiting
ARRIVE: 2.753770 there are 4 clients waiting
ARRIVE: 3.592434 there are 5 clients waiting
EXIT: 4.108970 there are 4 clients waiting
ARRIVE: 5.478060 there are 5 clients waiting
EXIT: 6.274008 there are 4 clients waiting
ARRIVE: 9.481020 there are 5 clients waiting
EXIT: 9.565752 there are 4 clients waiting

To finish, click on the exit button

Exploring demos

8

To see the parameters of the model execute:

Windows:

      java -cp .;..\..\galatea.jar simpleteller.Model -h

UNIX / Linux :

      java -cp .:../../galatea.jar simpleteller.Model -h

9

Now you can run the model with other parameters, for example:

Windows:

      java -cp .;..\..\galatea.jar simpleteller.Model tSim=20 InArrTime=2.0 seed0=547

UNIX / Linux :

      java -cp .:../../galatea.jar simpleteller.Model tSim=20 InArrTime=2.0 seed0=547

10

We suggest to investigate into the SimpleTeller.g file. Also you can find many examples under demos directory. It really might help studying the example models to understand how to use GALATEA to make models.

11

If Java-based build tool Ant is installed in you computer we suggest use it. In order to translate, compile and run any demo, change your working directory to galateaDir/demos/exampleXX and execute:

      ant

Problems, bugs, questions?

12

If you still have problems downloading, installing, or ussing GALATEA, don't hesitate posting your question to the GALATEA forum here! Or look at the main page of this site to get further contact information.


[GALATEA Home]