# HubNet Guide

NetLogo 5.0.3 User Manual

This section of the User Manual introduces the HubNet system and includes instructions to set up and run a HubNet activity.

HubNet is a technology that lets you use NetLogo to run participatory simulations in the classroom. In a participatory simulation, a whole class takes part in enacting the behavior of a system as each student controls a part of the system by using an individual device, such as a networked computer or Texas Instruments graphing calculator.

For example, in the Gridlock simulation, each student controls a traffic light in a simulated city. The class as a whole tries to make traffic flow efficiently through the city. As the simulation runs, data is collected which can afterwards be analyzed on a computer or calculator.

For more information on participatory simulations and their learning potential, please visit the Participatory Simulations Project web site.

## Understanding HubNet

### NetLogo

NetLogo is a programmable modeling environment. It comes with a large library of existing simulations, both participatory and traditional, that you can use and modify. Content areas include social science and economics, biology and medicine, physics and chemistry, and mathematics and computer science. You and your students can also use it to build your own simulations.

In traditional NetLogo simulations, the simulation runs according to rules that the simulation author specifies. HubNet adds a new dimension to NetLogo by letting simulations run not just according to rules, but by direct human participation.

Since HubNet builds upon NetLogo, we recommend that before trying HubNet for the first time, you become familiar with the basics of NetLogo. To get started using NetLogo models, see Tutorial #1: Running Models in the NetLogo Users Manual.

### HubNet Architecture

HubNet simulations are based on a client/server architecture. The activity leader uses the NetLogo application to run a HubNet activity. When NetLogo is running a HubNet activity, we refer to it as a HubNet server. Participants use a client application to log in and interact with the HubNet server.

There are two types of HubNet available. With Computer HubNet, participants run the HubNet Client application on computers connected by a regular computer network or they use a Java applet in a web browser. In Calculator HubNet, created in conjunction with Texas Instruments, participants use Texas Instruments graphing calculators as clients which communicate via the TI-Navigator system.

We hope to add support for other types of clients such as tablets and phones.

## Computer HubNet

### Activities

The following activities are available in the Models Library, in the HubNet Activities folder. Information on how to run the models and activities can be found in the Info tab of each model. Additional discussion of educational goals and ways to incorporate many of the activities into your classroom in the Participatory Simulations Guide on the Participatory Simulations Project web site.

- Bug Hunters Camouflage - students hunt bugs and camouflaging emerges.
- Dice Stalagmite HubNet - students roll dice and explore the space of dependent and independent events.
- Disease - A disease spreads through the simulated population of students.
- Disease Doctors - A slight modification to the Disease activity where some students can recover from the disease.
- Gridlock - Students use traffic lights to control the flow of traffic through a city.
- Polling - Ask students questions and plot their answers.
- Root Beer Game - An adaptation of a popular game created at MIT in the early 1960s that shows how small delays in a distribution system can create big problems.
- Sampler - Students engage in statistical analysis as individuals and as a classroom. Through these activities, students discover the meaning and use of basic concepts in statistics.
- Tragedy of the Commons - Students work as farmers sharing a common resource.

### Clients

There are two ways to use the client with computer HubNet, through the client application and as a Java applet. To use the client application you simply need to launch the HubNet client application that is bundled with NetLogo. To use the applet you will need to save the client as an applet and put it on a web server, more detailed instructions can be found in the applets section.

### Requirements

To use Computer HubNet, you need a networked computer with NetLogo installed for the server. When using the client application you will also need a networked computer with NetLogo installed for each participant. When using in classroom settings we also suggest an attached projector for the leader to project the entire simulation to the participants. When using client applets you will need to be running a web server on the same machine that you are running the HubNet server in NetLogo.

### Starting an activity

You'll find the HubNet activities in NetLogo's Models Library, in the HubNet Activities folder. We suggest doing a few practice runs of an activity before trying it in front of a class.

Open a Computer HubNet model. NetLogo will prompt you to enter the name of your new HubNet session. This is the name that participants will use to identify this activity. Enter a name and press Start.

NetLogo will open the HubNet Control Center, which lets you interact with the HubNet server.

You, as the leader, should then notify everyone that they may join. To join the activity, participants launch the HubNet Client application and enter their name. They should see your activity listed and can join your activity by selecting it and pressing Enter. If the activity you started is not listed the student can enter the server address manually which can be found in the HubNet Control Center.

### HubNet Control Center

The HubNet Control Center lets you interact with the HubNet server. It displays the name, activity, address and port number of your server. The "Mirror 2D View on clients" checkbox controls whether the HubNet participants can see the view on their clients, assuming there is a view in the client setup. The "Mirror plots on clients" checkbox controls whether participants will receive plot information.

The client list on the right displays the names of clients that are currently connected to you activity. To remove a participant from the activity, select their name in the list and press the Kick button. To launch your own HubNet client press the Local button, this is particularly useful when you are debugging an activity. The "Reset" button kicks out all currently logged in clients and reloads the client interface.

The lower part of the Control Center displays messages when a participant joins or leaves the activity. To broadcast a message to all the participants, click on the field at the bottom, type your message and press Broadcast Message.

### Client Applets

Client applets use the same client interface as the clients run in the HubNet application. Client applets and clients run through the HubNet application can be used at the same time in the same activity. In order to use a client applet you first have to save the client interface as an applet. You can do so by pressing the "Save Client As Applet..." button in the HubNet Client Editor toolbar.

To access the client over the Internet you need to put the generated html file and HubNet.jar (you do not need the model file) somewhere that is web accessible on the machine that you intend to run the server on. You must run the server on the same computer as you host the client applet or the client applet will not be able to connect to the server due to security restrictions.

### Troubleshooting

#### I started a HubNet activity, but when participants open a HubNet Client, my activity isn't listed.

On some networks, the HubNet Client cannot automatically detect a HubNet server. Tell your participants to manually enter the server address and port of your HubNet server, which appear in the HubNet Control Center.

Note: The technical details on this are as follows. In order for the client to detect the server, multicast routing must be available between them. Not all networks support multicast routing. In particular, networks that use the IPsec protocol typically do not support multicast. The IPsec protocol is used on many virtual private networks (VPNs).

#### When a participant tries to connect to an activity, nothing happens (the client appears to hang or gives an error saying that no server was found).

If your computer or network has a firewall, it may be impeding the HubNet server from communicating. Make sure that your computer and network are not blocking ports used by the HubNet server (ports 9173-9180).

#### The view on the HubNet client is gray.

- Verify that the "Mirror 2D view on clients" checkbox in the HubNet Control Center is selected.
- Make sure that the display switch in the model is on.
- If you have made changes to the size of the view on the server you may need to press the "Reset" button in the Control Center to ensure the clients get the new size.

#### There is no view on the HubNet client.

Some activities don't have a view on the client. If you want to add a view simply select "HubNet Client Editor" from the Tools Menu and add a view like any other widget. Make sure to press the "Reset" button before having clients log in.

#### I can't quit a HubNet client.

You will have to force the client to quit. On OS X, force quit the application by selecting Force Quit... in the Apple menu. On Windows, press Ctrl-Alt-Delete to open the Task Manager, select HubNet Client and press End Task.

#### My computer went to sleep while running a HubNet activity. When I woke the computer up, I got an error and HubNet wouldn't work anymore.

The HubNet server may stop working if the computer goes to sleep. If this happens, quit the NetLogo application and start over. Change the settings on your computer so it won't sleep again.

#### My problem is not addressed on this page.

See Contacting Us.

### Known Limitations

If HubNet malfunctions, see the bug reporting information at Contacting Us.

Please note that:

- HubNet has not yet been extensively tested with large numbers of clients (i.e. more than about 25). Unexpected results may occur with more clients.
- Out-of-memory conditions are not handled gracefully
- Sending large amounts of plotting messages to the clients can take a long time.
- NetLogo does not handle malicious clients in a robust manner (in other words, it is likely vulnerable to denial-of-service type attacks).
- Performance does not degrade gracefully over slow or unreliable network connections.
- If you are on a wireless network or sub-LAN, the IP address in the HubNet Control Center is not always the entire IP address of the server.
- Computer HubNet has only been tested on LANs, and not on dial-up connections or WANs.

## Calculator HubNet

### Calculator HubNet for TI-Navigator

The TI-Navigator Classroom Learning System is a wireless classroom network for TI graphing calculators. TI-Navigator users can install a free NetLogo extension, which integrates with TI-Navigator and allows the calculators to act as clients for participatory simulations like the ones that are available for Computer HubNet. The Calculator HubNet extension is available from Inquire Learning, LLC, in collaboration with Texas Instruments. Inquire Learning also offers support, curricular materials, and professional development for the Calculator HubNet system. For more information on the TI-Navigator system itself, please visit the Texas Instruments web site, at http://education.ti.com/navigator. For more information on the Calculator HubNet extension for TI-Navigator, please contact Inquire Learning, at calc-hubnet@inquirelearning.com, or visit http://www.inquirelearning.com/calc-hubnet.html.

## Teacher workshops

For information on upcoming workshops and NetLogo and HubNet use in the classroom, please contact us.

## HubNet Authoring Guide

To learn about authoring or modifying HubNet activities, see the HubNet Authoring Guide.

## Running HubNet in headless mode

To learn about running HubNet activities from the command line, with no GUI on the server, see the HubNet section in the Controlling Guide.

## Getting help

If you have any questions about HubNet or need help getting started, contact us.