Skip navigation.
Home

Cloud Based Parameter Sweeping of a Repast Simphony Simulation Model - GUI Mode

1 Introduction

Agent-based modeling is a powerful simulation modeling technique that has seen a number of applications in the last few years, including applications to real-world business problems. It has a symbiotic relationship with computing technology. As the technology has grown in power, the scale and sophistication of the software available for modelers has increased. For example, both ASCAPE and REPAST are excellent for simulations. However, all of the existing tools are designed primarily to assist the builders of models. The facilities for other phases of a model’s life cycle, model evaluation, model maintenance, and many types of model use are rather limited at this time.

In this paper, we introduce a way to distribute a parameter sweep model developed in REPAST with good performance. A typical parameter sweep application model is a parameterized application model which has to be executed independently large number of times, to locate a particular point in the parameter space that satisfies certain criteria. It takes a lot of time to run, especially for Monte Carlo simulation. We must apply it to distributed system. From the perspective of domain scientists, the complexity of underlying grid environment should be hidden so that domain scientists can focus on their main concern on performing their experiments. As a result, we use Cloud computing platform.

The parameter sweep application model has emerged as a ‘killer application model’ for composing high-throughput computing (HTC) applications for processing on global Grids. We use a new set of scheduling algorithms developed within Aneka enterprise clouds---cost-optimization, time-optimization, and conservative time-optimization scheduling algorithms. We introduce its distributed implementation by using Aneka, which is a platform developed for cloud computing.

2 Background

2.1 Agent-based modeling

Agent-based modeling and simulation (ABMS), a way to simulate a large number of choices by individual actors, is one of the most exciting practical developments in business modeling since the invention of relational databases. It represents a new way to understand data and generate information that has never been available before--a way for businesses to view the future and to understand and anticipate the likely effects of their decisions on their markets and industries. It thus promises to have far-reaching effects on the way that businesses in many areas use computers to support practical decision-making.

2.2 Aneka

Aneka is a market oriented Cloud development and management platform with rapid application development and workload distribution capabilities. Aneka is an integrated middleware package which allows you to seamlessly build and manage an interconnected network in addition to accelerating development, deployment and management of distributed applications using Microsoft .NET frameworks on these networks. It is market oriented since it allows you to build, schedule, provision and monitor results using pricing, accounting, QoS/SLA services in private and/or public (leased) network environments.

2.2.1 Parameter Sweeping Support within Aneka

In the case of Aneka the parameter sweeping applications are expressed by using the Parameter Sweeping Model (PSM) that is modeled on top of the Task Programming Model. The task programming model structures a distributed application as a collection of independent tasks that can be executed in any order. A task is a generic execution unit that can have input and output files, these files are automatically moved in and out of the Aneka cloud when needed.

The Aneka Parameter sweeping for Repast Simphony users architecture is shown below:

This figure describes the common scenario in which the Design Explorer is used. A user interact with the user interface provided with the Design Explorer, composes the parameter sweeping application and then submits the collection of jobs that represent the application to the Aneka Cloud. By using the same interface the user can control the execution of the application and control the status of the jobs.

The Aneka PSM APIs provide a set of ready to use commands that can be used to compose the template task of the application. These are:

  • Copy command: makes a copy of a file on the remote node.
  • Delete command: deletes a file on the remote node.
  • Execute command: executes a command on the remote node.
  • Substitute command: substitutes the occurrences of the parameters with their run time values into a file.
  • Environment command: sets a collection of environment variables in the shell used to execute the template task on the remote node.

3 Implementation

3.1 Design Explorer

The Design Explorer is integrated environment for quickly prototyping Parameter Sweeping applications, controlling and monitoring their execution on Aneka Clouds. It is an environment where user can create, open and save a project representing their Parameter Sweeping applications. By using a simple step by step wizard users can visually prototype the structure of the template task that will be used to generate all the jobs run on the Aneka Cloud. The template can be saved into a project and run within the environment itself, through which it is possible to monitor its execution and collect some useful statistics.

3.2 Implementing the REPAST model

There are several steps to do this:

3.2.1 Prepare run environment for Repast (Simphony) batch runs.

  1. Copy required libs on each machines.
  2. Copy deployment of the Repast project to each slave nodes.

    Deploy the project on own machine and test if it runs correctly. Make a batch file (for example, name it ‘batch_start.bat’) which contains:

    a) all required libraries' class paths and source route

    b) the batchMain method entrance

    c) parameter file route

    Note:

    • If you met any problem when creating a batch running in Repast Simphony, please see Repast Simphony : Parameter Sweeper Walkthrough and Basic batch running.
    • You also have to implement a method to create ‘batch_params.groovy’ from Aneka parameters for Repast Simphony Parameter Sweeping.
      Use the same method to deploy the project on other machines and test them.

3.2.2 Prepare ANEKA environment

  1. Run installation wizard on each machine.
  2. Configure ANEKA on each machine.



tips: When configuring ANEKA on the slave node/machine, define the Execution Directory to Repast Simphony working root.

3.2.3 Use ANEKA Design Explorer to create ANEKA job

In order to create a new Parameter Sweeping application it is necessary to create a new project.

  1. Configure Application Information
  2. Define Parameters

    There are four types of parameters:

    • Single: one single value.
    • Random: a random value within a range limited by a lower and an upper bound.
    • Range: a discrete set of values within a limited range and that are generated by starting from the lower bound and adding a step.
    • Enum: a discrete set of values that are defined by the user.

    The parameters should be the same as Repast Simphony batch run parameter xml/groovy files', so that at least one range parameter should be named ‘runs’ and should be in the first order.

  3. Configure Shared Files

    The Design Explorer provides the facility of specifying a collection of files that can of different nature (executable, data files, scripts, etc…) and that are required for executing every job instance.

    • Shared files should contain all used files for starting each Repast Simphony simulation task.
  4. Identify Input and Output Files
    Differently from the shared files, input and output files can be specialized with parameters. This means that the real name of the file is generated and checked at runtime by the PSM engine.

    • Output files name should be the same as the Repast S output files name, and the paths should also be contained.
    • The files' names also can use the parameters defined above.
  5. Create Task Template Commands
    • Add an executable Command: here is ‘batch_start.bat’.
    • Args: runs($runs) and the same as other arguments.

  6. Finalize the Task Template

    Save the task template into an XML file.

3.2.4 Run ANEKA Design Explorer Job

  1. If something goes wrong, it would be displayed in the Output console and Error console.
  2. You can get the desired result in the local work space folders.
  • Jobs Visualization

    The Jobs Tab is the main view of the application running. It gives you a complete view of all the jobs generated by the application and shows their current status.

  • Analyzing the Console

    The bottom pane provides user with access to two consoles: Output Console and Error Console.

    The Output Console is used to log the interaction of the Design Explorer with the Aneka Cloud while running the application, while the Error Console is used to trace all the errors that occur during the interaction. The user can switch between the two console by clicking the corresponding buttons at the bottom of the pane.The Output Console logs the interaction of the Design Explorer with Aneka. In particular what is interesting is the tracking the status change of the different jobs while they are executed in the Aneka Cloud. Figure 22 shows the an example of the content of the Output Console. While the Jobs and Stats tabs provide a visual information about the execution of the application, the console shows detailed text information about state transitions and the identifier of the nodes where each of the job is executed. This information can then be saved to file by pressing the Save button, while the Clear button can be used to clean the console.



    The Error Console mostly traces exception occurred during execution and error messages. The information displayed about exceptions are the following:

    • Exception type: the .NET type of the exception occurred at program level.
    • Exception message: informative message describing the nature of the exception.
    • Stack trace: the exact point in the execution stack where the exception has occurred.

    This information, except for the exception message, are not of a great help but can be used to provide an helpful feedback to the Aneka development team for dealing with the problem.

4 References

[1] Agent-based modeling: methods and techniques for simulating human systems., Bonabeau, Eric , Proceedings of the National Academy of Sciences of the United States of America, May, Volume 99 Suppl 3, p.7280–7287, (2002)

[2] Platforms and methods for agent-based modeling., Gilbert, N.; Bankes, S. , Proc Natl Acad Sci U S A, May, Volume 99 Suppl 3, Centre for Research on Simulation in the Social Sciences, University of Surrey, Guildford GU2 7XH, United Kingdom. n.gilbert@soc.surrey.ac.uk, p.7197–7198, (2002)

[3] Scheduling parameter sweep applications on global Grids: a deadline and budget constrained cost-time optimization algorithm, Buyya, Rajkumar; Murshed, Manzur; Abramson, David; Venugopal, Srikumar , Softw. Pract. Exper., Volume 35, Number 5, New York, NY, USA, p.491–512, (2005)

[4] High Performance Parametric Modeling with Nimrod/G: Killer Application for the Global Grid?, , IPDPS '00: Proceedings of the 14th International Symposium on Parallel and Distributed Processing, Washington, DC, USA, (2000)

[5] http://www.manjrasoft.com

[6] http://old.nabble.com/Basic-batch-running-td25662384.html#a25662384

[7] http://repast.sourceforge.net/

need help asap...

i'm currently doing a final year project on aneka platform, developing the task aneka model on for a distributed app. ive managed to develop the app but the result is unexpected. it was supposed to decrease the time to calculate large number of matrix on a 3 nodes compared to a standalone pc. yet, my result shows the opposite. it increases the time. when i did timespan, it showed that the most time consuming is the assigning the task to aneka instances. can somebody help me out here? thanks alot..

Latest image