RSS

Category Archives: Repast

Installing Repast Simphony in Linux – Step by Step


Published on: March 24, 2013
Last Modification: April 28, 2013

Unfortunately the IT department of my University decided to change my Operating System from a Gnome 32-bits to a 64-bits version. Thanks to that Eclipse did not work anymore and I had to install all the software again in the corresponding 64-bits version. As a revision of the process I am going to show step by step how to do it based on the information given in the official page of Repast Simphony.

First of all we should find the proper version of Eclipse. In my case I know that Helios works fine. Since is an older version I am going to run it locally and not to install it from the package manager. I downloaded and decompressed the corresponding package for linux (in my case the 64-bits version) in a folder where I store all the software installed locally.

HeliosEclipse

Once this is done, we should install the following plug-ins and libraries:

  • Groovy
  • Eclipse XML Editors and Tools

Read the rest of this entry »

 
2 Comments

Posted by on March 24, 2013 in Agent-Based System, Eclipse, Repast, Repast Simphony

 

Tags: , ,

Create a copy of a Repast project in Eclipse and run it with another name


Published on: May 7, 2012
Last Modification: April 16, 2013

Some days ago I needed to make a copy of my current simulation in Eclipse, perform some minor changes in the code and run it to gather new additional data. It seems simple, but of course with Repast is not.

First of all I copied the project that I wanted to duplicate using the right-button menu in Eclipse environment and when I pasted in the same environment, Eclipse showed me a window where I could choose the new name of the project. Something like that:

Form: copy the project

Read the rest of this entry »

 
3 Comments

Posted by on May 7, 2012 in Eclipse, Repast

 

Tags: ,

New release: a stable version of Repast Simphony 2.0


Published on: Mar 15, 2012

On 5 March 2012, the developer team of Repast Simphony released the new stable version 2.0.

According to the documentation the major change between both versions is that the data collection architecture and its GUI has changed from 2.0 beta to 2.0. However, at a first sigh,t the program seems the same, except the lattice which represents my city is properly centred on the panel 🙂

Installation in Linux

For linux users, the Eclipse version should be updated from Eclipse Helios 3.6.2 to Eclipse Helios 3.7.1 Classic Edition. Here is when we find the first problem: the most updated version of Eclipse Helios is 3.6.2 as we can see here, meanwhile the updated version of Eclipse Indigo is 3.7.2.

Read the rest of this entry »

 
1 Comment

Posted by on March 15, 2012 in Repast

 

How to stop and pause the model in Repast Simphony


Published on: Mar 7, 2012

The problem can be seen from different perspectives. Firstly, the model can be stopped because the simulation holds a determined condition, like for instance, if the simulation achieves a determined tick of the clock or if the total number of agents allocated in the lattice is greater than a certain number. The first of the cases can be programmed using the method of the class schedule called schedule.getTickCount(). The second one is shown in the following code:

@ScheduledMethod( start=1, interval=1,priority=ScheduleParameters.FIRST_PRIORITY )
public void spacer(){
    totalPopulation = context.getObjects( Agent.class ).size();
    //Stop the simulator
    if(totalPopulation > 100){
        if(schedule != null){
            System.err.println("Population more than 100. Stopping the system");
        }else{
            schedule.executeEndActions();
            RunEnvironment.getInstance().endRun();
        }
    }

Read the rest of this entry »

 
2 Comments

Posted by on March 7, 2012 in Repast

 

Tags:

Click automatically the play button in Repast from a script


Published on: Mar 1, 2012

This post belongs to a series of posts which allows me to start Repast Simphony automatically from a script. Please take first a look to:

Once I have fulfill to start Repast automatically from a script (click here for more info about that), I am going to use the library xdotool to click in the play button of Repast to start the simulation. Xdotool is a tool that simulate keyboard input and mouse activity, move and resize windows, etc..

First of all, I included the libraries of xdotool in the environment. In my case this is done with the following lines of code:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u1/pg/mv59/Software/xdotool-2.20110530.1
export LD_LIBRARY_PATH
/u1/pg/mv59/Software/xdotool-2.20110530.1/xdotool

Read the rest of this entry »

 
1 Comment

Posted by on March 1, 2012 in Repast

 

Repast Simphony 2.0 beta and Java 7 in Linux


Published on: Mar 1, 2012

It was a very happy day when I arrived to my University and I tried to run the simulation as usually without success. When I though that the nightmare would continue I discovered that my normal IDE version failed as well. The error was the following:

Cannot construct repast.simphony.engine.schedule.ScheduleParameters as it does not have a no-args constructor

When I googled on that, I found this information here:

It looks like this is probably an issue with the xstream library that we use for serialization and Java 7. Are you using Java 7? If so, can you try with Java 6? Apparently the latest xstream fixes the issue so you could also download that replace the xstream jar in:

X/eclipse/plugins/repast.simphony.runtime_2.0.0/lib

Read the rest of this entry »

 
Leave a comment

Posted by on March 1, 2012 in Java, Repast

 

Run the launcher of Repast Simphony in Eclipse from a Script


Published on: Mar 1, 2012

Working to make Repast more flexible in the minimun space of time (I need to create a paper for the 7th of March) I need to run Repast Simphony automatically from a script. When I googled for that information I found the next post that really make me feel scared. It seems very complicated due to the lack of information.

Then, I decided make the things easier and I avoid to modify the Repast code. Luckily in another post I found how to copy the script that Eclipse use to start Repast. To do that we should start Repast with the corresponding launcher, then we should go to the Debug perspective and there, in the list of process, select the one that is currently running and in properties you can copy the information.

Read the rest of this entry »

 
2 Comments

Posted by on March 1, 2012 in Eclipse, Java, Repast

 

Tags: , ,

 
%d bloggers like this: