From SeSAm-Wiki

Jump to: navigation, search


Installation / Start-Up Problems / Plugin Loading

Windows 7

SeSAm refuses to load some plugins without throwing an error. This does not happen when I run SeSAm under Windows XP, etc. This is a Java problem, we will soon (Feb 2010) make a version with Java 1.6 available, then it also work on Windows 7


SeSAm installer refuses to install SeSAm on my system running vista (home) telling me, it can't create several .exe or .bat files? Switch off the "Benutzerkontensteuerung" (english word may be something like user account control - that new security thing that demands pushing an ok button for every file system action). This applies also to Windows 7!


The SeSAm installer just shows a blank window or the SeSAm window does not update when you resize it? According to this, it is a general problem with most Swing applications and window managers like Beryl or Compiz. The AWT toolkit has errors with them. The installer can be run normally either by disabling desktop effects, or by setting the AWT_TOOLKIT environment variable to "MToolkit" so AWT uses the Motif library. (Execute "export AWT_TOOLKIT=MToolkit" prior to running the installer and SeSAm or put this line into the "SeSAm" startup script file.)

Mouse double click speed in the Java Virtual Machine is very fast. This is very annoying and may be lack of usability. This is a problem with java using the 200msXWindow system default. You have to adapt the multiClickTime. Open a terminal window in your home directory and have an own value merged into your X settings.

Execute this: ~$ echo *multiClickTime: 400--.Xresources or for the old method: ~$ echo *multiClickTime: 400--.Xdefaults

Logout and login, then it should work. For further details look here: [1] [2]

The function editor's performance slows down significantly (i.e.-30sec lag to close a function) with a clipboard manager (glipper) running. A workaround is shutting down the clipboard manager while working with SeSAm .

SeSAm 2.3. issues:

SeSAm doesn't start when using Linux as OS. The installer makes a little mistake in the startup Script-File called "SeSAm". Directly under the #!/bin/sh-line add a line to change into the path where your SeSAm is located. Example:cd /home/user/SeSAm. Starting via command line should never be a problem.

Can't activate the Spatial-Map-Feature in my worlds. I get also an error message trying to load model that uses the Spatial-Map-Feature. Change into the SeSAm -directory ( not into the directory where the links are located!) and start SeSAm like that: ./SeSAm&. The & is important in that case.


SeSAm does not start. The applications gives the following error: java.lang.NoClassDefFoundError: ZeroGgb That's a problem with the installer used. See the Linux-section for an answer (quick: start via command line). You could also try to start SeSAm by clicking the .jar -file in the SeSAm -directory. This should cause Java to load the app, too.

Runtime issues

Slow reaction

SeSAm suddenly starts to become so slow that it does hardly react, dialogs close extremely slowly? What is happening? The initial setup of memory usage is quite low; if SeSAm is fast again after restarting, this indicates that SeSAm gets too little memory. How to change that? See next point.

More Memory

Is there a way to increase the amount of ram used by SeSAm ? It seems to hit a maximum of approximately 108mb. There is a way to pass arguments to the virtual machine in order to increase the maximum amount of available memory. Add the following arguments to your call of SeSAm.exe: SeSAm.exe -J-Xmx1024M . This example increases the maximum memory size to 1024m = 1GB. Of course you can choose any other convenient memory size instead. How to do that? For Windows: create shortcut of SeSAm.exe, open the properties dialog and edit the "target" entry. For Mac OS: the configuration is stored in the info.plist file that you can access after opening your application package. Here you can change the options for the Java Virtual Machine ("VMOptions"). "-Xmx128M" is the one responsible for heap size; Depending on the available memory increase the number.

General startup

SeSAm doesn't start. The Error-message says something about Variable "Assert.AssERTION_ON" not defined. This may happen if there is a JUnit-Package in your Classpath. Please remove it temporarily from there for using SeSAm .

Startup error after system crashed

SeSAm doesn't start anymore after the system crashed while SeSAm was running. The Error-message may say something like "org.xml.sax.SAXException: Parsing Error" and hang in a loop. This may happen if the hidden configuration file "SeSAmConfiguration.xml" in your home folder (toplevel and hidden) is corrupted. You just need to find and delete the file, it will be correctly generated the next time when you startup SeSAm again.

Saving models

I can't save my model. I've used the 'Model Graph'-feature from the 'model'-menu and get a java.lang.NullPointerException refering to: sesam.mas.xml.writer.XMLModelWriter.createXMLUmlLayout


Have a look at the edited screenshot. Open the list of UMLGraphs by clicking on this tiny arrow pointing to the right. Then select the Graph that is faulty (most of the times there will be only one to select anyhow) and remove it with the button at the bottom.

Loading models

I can't load my previously saved model. What's wrong how can I prevent this errors Unfortunately it's possible in some cases to save corrupt models. This often happens if a value inside a function call is still initialized by null e.g. GetVariable(null, MyVariable). It's possible to fix such errors in the xml-file, but this requires a rather good understanding (guessing) of the xml-Schema. We recommend to save often and to keep old versions (Settings -> General -> Enable versioning). In the current SeSAm version there is also an option to load corrupt models (Settings -> General -> Debug). If you use it, the problematic calls are marked and you should correct them before saving again. However - be careful also with this option.

Modelling issues

Simulation does not work

My simulation hangs during execution, it stops at a certain tick but the system load is constantly very high. Sometimes this happens if you declare a activity as instantly, but the exit rule condition gets never true. That is why the simulation hangs in an endless loop. Look at the current activity of all agents (including the world) and if the activities are instantly.

Sending Messages to many Agents in one tick

I want to realize a contract net protocol. How can I model the Initiator so that CFP's are issued to all participants. The primitive ForElementsallows you to send a message to a couple of Agents. See FAQContractNet

Using a Hashtable with SpatialInfo as key

I want to use a Hashtable with SpatialInfo as key, but the model produces just errors then. You have to use 'Position' as key and all works fine then.

Tutorial: Maximize does not provide "<" as argument.

When I want to implement the tutorial model I got stuck at page 36. It is not possible to select the function "<" as an argument. Due to a bug in SeSAm 1.8, it is not possible to select system functions as arguments. There is a simple workaround!


What does "radius" of an agent mean? It is the extension of an entity (agent or ressource object): Using the continuous map, the shape of an entity is a circle. This affects the perception of other agents. If you are not using circle as the shape form of your agent, the radius information is irrelevant.


How can an agent perceive other entities (agents, ressources) in its surroundings? There is a primitive called ObserveObjectsOnPosition that returns an iterator with all entities within a certain radius (argument) from the point of view of position (another argument). This list/iterator can be processed by the agent: You may filter objects using the select primitive, collect variable values using the map primitive or aggregate values using a combination of map and aggregate... The primitive ObserveObjectsInDirection is similar to ObserveObjectsOnPosition, it just returns entities in a given perception sector defined by direction and angle.


Is there a function to ask all your neighbors around you? You need such functionality, e.g. in IPD or other grid-based models.

  1. You should give the agents a variable that may contain the list of neighbors,
  2. Then the agent searches for all surrounding agents (see ObserveObjectsOnPosition, the radius is critical) and stores that list in its variable.
  3. Actually asking may take two forms depending on what you want to do. If you want to
  • find the neighbor with the highest/lowest/specific value of one of its variables - use the maximize primitive and apply it on the neighbors list
  • collect values from all neighbors can be formulated using the map primitive applied to the neighbors list with a function that collects the value from the individual neighbor agents
  • actually sending a message to all neighbors: ForElementsFunction=(Push-message-(getVariable var=-message-list-simObject= neighbor)) list=(getvariable neighbors, argument for function = neighbor)

Enum Datatypes

How can I add a new item to a enum data type without destroying my model? Basically, it is not so problematic to adapt the item list that defines the range of a enum data type. Adding is only problematic if you are using the switch statement in your code:

  1. Open the primitive call with the switch statement - i.e. open the activity dialog or the rule, user function, etc.
  2. Adapt the item list of the enum -
  3. use "Add Child" to add the new item to the switch statement....

Deleting items may cause severe problems, therefore please avoid.

Endless Loop

When I run my model, it crashes with "Maybe endless loop in activity graph of agent..."? Probably you are using "instant" activities - those this the crossed-out clock. The action sequence of these activities are repeated again and again as long as one of the rule that terminate this activity fires. If no rule is firing --error. Do not use that activities without proper definitions of termination rules.


How to address other agents for accessing values of their variables? GetVariableFrom is a primitive that allows one agent to read the contents of the variable of another agent or the global world entity. If the variable that you would like to read is not appearing in the selection dialog, it has either the wrong type or is not declared as open ("external" see definition of variable). The second argument is the SimObject of that the information should be taken. As there is only one global world object, it can be accessed quite easily using getWorld. If you are using the primitive in a user function and want to use the currently updated agent, then use getCurrentSimObject. For any other case you must somehow use a primitive call that returns the entity which variable you want to read. There are several possibilities for that: for example if you want to adress the entity of a certain type with the smallest distance, you could use something like maximize (fun(x1,x2) if dist(pos(x1), myPos)-dist(pos(x2), myPos), then:x1 else x2) over (allObjectOfType xxx) -- this was not SeSAm syntax, but I think you know what is meant. If the agent often accesses variables of one agent, it makes sense to create a variable of type simObject that contains this other entity (like storing the adress of the other entity - this also supports debugging as you can check which entity actually was accessed) OBS: do NOT use findSimObject - this is an obsolete primitive with potentially random behavior!

Personal tools