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\java-cup-11a-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/java-cup-11a-runtime.jar galatea.gcompiler.G2Java SimpleTeller.g

5

To compile Java files execute:

Windows:

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

UNIX / Linux :

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

6

To run the Simple Teller model execute:

Windows:

      java -cp .;..\..\galatea.jar SimpleTeller

UNIX / Linux :

      java -cp .:../../galatea.jar SimpleTeller

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

      ARRIVE: At 0.0  there are 0 clients waiting
      ARRIVE: At 0.35297042343458224  there are 1 clients waiting
      ARRIVE: At 0.8880618422822584  there are 2 clients waiting
      ARRIVE: At 1.883912101800299  there are 3 clients waiting
      ARRIVE: At 2.7537697751706314  there are 4 clients waiting
      ARRIVE: At 3.5924340327328794  there are 5 clients waiting
      EXIT: At 4.108969502395377  there are 4 clients waiting
      ARRIVE: At 5.47806042440434  there are 5 clients waiting
      EXIT: At 6.274008250407743  there are 4 clients waiting
      ARRIVE: At 9.481019837013019  there are 5 clients waiting
      EXIT: At 9.565752362418394  there are 4 clients waiting
      ARRIVE: At 10.063077995247422  there are 5 clients waiting
      ARRIVE: At 11.481750305469447  there are 6 clients waiting
      EXIT: At 12.850102015255821  there are 5 clients waiting
      ARRIVE: At 14.570189325707847  there are 6 clients waiting

Exploring demos

8

To see the parameters of the model execute:

Windows:

      java -cp .;..\..\galatea.jar SimpleTeller -h

UNIX / Linux :

      java -cp .:../../galatea.jar SimpleTeller -h

9

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

Windows:

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

UNIX / Linux :

      java -cp .:../../galatea.jar SimpleTeller 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]