Tutorials/CloudSim/task

Managing Simulation tasks ==

This tutorial describes how to:


 * Add and remove simulation tasks to a running CloudSim constellation

Prerequisites ==

For this tutorial, you will need to have access to a running constellation (e.g., a `Simulator-stable`, as described in the [| launch tutorial]). You will also need to be logged in as either a "simulation officer" or "admin" user.

Please familiarize yourself with the following tutorials:
 * AWS account and keys (to get started with AWS)
 * CloudSim setup and installation (to launch your CloudSim machine(s) in the Cloud)
 * CloudSim administration (to setup users inside your CloudSim web app)

Introduction ==

CloudSim's purpose is to allow users to run simulations in the cloud. In that context, running a simulation involves more than starting a simulator process. The simulation run encompasses:


 * Loading simulated virtual world with objects and physics
 * The software
 * Monitoring the execution of the run (scoring, pass/fail)
 * Regulating the access to the simulation (bandwidth, data cap, latency)

Also, a constellation has to be able to handle multiple simulation runs.

CloudSim introduces the concept of simulation task to manage this.

Tasks panel ==

Constellations that support simulators have a "Simulation tasks" panel in their Constellation UI. This panel allows the user to view the current list of tasks for this constellation.



Creating a task ==

Note: this operation requires "Simulation Officer" or "Admin" user privileges

In the `Simulation tasks` panel, click the `Create task...` button. A dialog will appear, similar to this:



Fill in a title for the task (e.g., `My task`), leave everything else as it is, and click the `Create` button. Your new task will appear in the panel, marked `Ready to run`.

Starting and stopping a task ==

To start a task, click the `Start` button for that task. Note that only one task can be running at a time. To stop the running task (if there is one), click the `Stop current task` button.

View, update or duplicate a task ==

Each task has an '...' button that allows the user to see the task content or change values
 * Everyone can view a task
 * The update operation requires "Simulation Officer" or "Admin" user privileges
 * Non "Simulation Officer" users cannot view a task before it is started



Deleting a task ==

Each task has an 'X' button that allows the user to delete it from the list.

Task configuration ==

Each task has a title to help manage tasks. Multiple tasks can have the same title. Furthermore, the task dialog is organized in tabs with the following properties:

Simulation tab:
 * ROS package: the ROS package to launch when the "start task" button is pressed.
 * Launch file: the ROS launch file inside the package.
 * Maximum time: this is the time elapsed before the task times out. This feature is awaiting support in DRCSim

Networking tab:
 * Minimum latency: this is the minimum delay between the OCU computer (Operator Control Unit) and the Field computer(s). CloudSim will measure the current true latency every second and add the missing delay. Note that it is only possible to add extra latency on top of the normal latency incurred by the Internet.
 * Uplink cap: this is the maximum number of bits that will be allowed to transfer between the OCU and the Field computer(s) during the simulation task. After this limit has been reached, uplink of new data is deactivated.
 * Downlink cap: this is the maximum number of bits that will be allowed to transfer between the Field computer(s) and the OCU during the simulation task. After this limit has been reached, downlink of new data is deactivated.

Availability tab:
 * Valid from (UTC): the date from which the task will be visible to users (admin and officers see all tasks).
 * Valid until (UTC): the date until when the task will be visible to users (admin and officers see all tasks).

Environment tab:
 * Bash script to source environment: a bash script to be sourced before running the task (i.e. the ros setup.bash)
 * Tag 1 (Misc info for external use): additional text for user specific data
 * Tag 2 (Misc info for external use): additional text for user specific data

Next ===
 * Running Simulation tasks: How to start and abort simulation tasks