WebSim - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

WebSim

Description:

WebSim is a Java Applet allowing one or more players to access a simulation ... Ladies and Gentlemen fasten your seat belts because here comes the. Beer Game Simulator ... – PowerPoint PPT presentation

Number of Views:259
Avg rating:3.0/5.0
Slides: 30
Provided by: jbjo3
Category:
Tags: websim | fasten

less

Transcript and Presenter's Notes

Title: WebSim


1
WebSim
  • Introduction to Multi-user Web simulators
  • By
  • Murteza Salemi
  • Jørgen Bjones
  • Under supervision of
  • Prof. Jose J. Gonzalez

2
Contents
  • What are WebSims?
  • Demonstration of a multi-user simulator
  • How to make a WebSim?
  • Tools needed to make a WebSim
  • Focus on multi-user simulators
  • Showing the Java structure for the multi-user
    simulator Beer Game

3
What is WebSim?
  • WebSim is a Java Applet allowing one or more
    players to access a simulation model through a
    web browser.

Server
Client
4
Why use a WebSim?
  • Publish a simulation model on the web
  • Distribute models via an Intranet or the Internet
  • Many players can participate on the same model at
    the same time

5
WebSim
  • Examples of WebSim applications
    (http//www.powersim.no)
  • The Beer Game
  • The OilFund Simulator
  • Employee Training

6
The Beer Game
  • Classic simulation developed at Massachusetts
    Institute of Technologys Sloan School of
    Management in the 1960s. http//web.mit.edu/afs/at
    hena.mit.edu/org/s/sloan/www/
  • Simulation model used to illustrate delays in
    supply chain management

7
Beer Game Demonstration
  • Ladies and Gentlemen fasten your seat belts
    because here comes the

Beer Game Simulator
8
How WebSim structure is built?
Server
Client
WebServer
JBuilder, Visual J
Java Applet
Web Browser
Metro Server
Powersim Exporter
Powersim Constructor
Model
9
How to make a WebSim?
  • Following tools must be used
  • Powersim Constructor
  • Powersim Metro Server
  • WebServer
  • Powersim Exporter
  • Java programming tool (JBuilder)

10
Powersim Constructor
  • An example of a simulating model built with
    Powersim Constructor tool.

11
Powersim Metro Server
  • Windows Socket based server, which allows client
    applications to access a running simulation
    across a network.
  • Capable of running both single- and multi-user
    simulations.

Port nr. which the server and the client
communicate over
Clients IP address
12
Some essential parts of Metro Server
The model Beer.sim
Session
Sessions label
Sessions identifier
Slot
Slots label
Slots Identifier
13
Due to security restrictions in Java, Metro
Server has to run on the same computer as the web
server where the WebSim is published. The WebSim
front-end lies embedded in a web page on the
server, and the model that is to be used, lies in
the folder where Metro Server expects to find it
the Model Folder. The connection between the
WebSim and the Metro Server is done automatically
by the front-end, and there is therefore no other
actions that need to be done in order to set up
the WebSim. The Metro Server can be set up in
different ways. By default, the server listens to
communication port 7777, but if that port is used
by another service, another port can be assigned.
It may also be useful to test a new version of
Metro Server by setting the new version to listen
to a different "test" port.
14
The System Administrator can examine the current
status of the server. This allows him to monitor
how many sessions are active, how many simulation
streams are in use, etc. The System Administrator
can also examine various historical data about
the serving of WebSims, through the Event
Log. Metro Server provides a window for managing
sessions. Each session can be examined, showing
how many clients are connected, when the last
activity happened, how long the simulation model
has been run, etc. Sessions can also be
controlled by the system administrator. For
example, the system administrator may want to
delete a session that has had no activity for a
few hours.
15
Finally, Metro Server provides a window to manage
connections. Each connection can be examined,
showing the IP address of the connected client,
and the average transfer time between the Metro
Server and the client. System administrators can
often diagnose problems by examining individual
connections in more detail.
16
Metro Server gives the following possibilities
  • Concurrent simulations
  • Simulators with levels of difficulty
  • Simulators with different user roles

17
Concurrent simulations
Running the same simulation model
Several instances
18
Simulators with levels of difficulty
Advanced
Intermediate
Beginner
19
Simulators with different user roles
Sales Manager
Human Resources
Production Manager
20
Multi-user simulations
Users
21
Distributed simulations
22
Web Server
  • The web server holds the applet.
  • The Metro Server must run at the same computer as
    the web server where the WebSim is published.

Personal WebServer
23
Powersim Exporter
  • A tool to bind together the model and the Metro
    Server

Metro Server
Exporter
Model
24
Powersim Exporter
  • Model Variables
  • a model can have a lot of variables
  • Public Variables
  • but you want the user to see or manipulate some
    of them
  • Slot Collection
  • and possibly let different users access the
    simulation in different ways (through different
    slots)

25
Powersim Exporter
Slot Collection. One slot is an entry point to
the model and each role in the model has its own
slot
A lot of model variables
A selection is made public
26
Powersim Exporter
  • Defines properties of public variables
  • Read only
  • Read/write
  • Units
  • Range
  • etc

27
Powersim Exporter
  • Slot Collection
  • Contains all slots that are available to the
    model
  • A slot is an entry point to the model and each
    role in the model has its own slot
  • Each slot contains information about what
    variables each player should have access to

28
Powersim Exporter
  • Slot Collection options
  • Destroy when any player leaves
  • Destroy when all players leave
  • Destroy manually

29
Powersim Exporter
  • Slot
  • A slot is an entry point to the model
  • Each slot allows to play one role in the model
  • Metro Server allows many roles to play different
    games simultaneous

30
Powersim Exporter
  • Each slot has the following option field
  • Optional
  • Optional Rejoinable
  • Optional Initially
  • Optional Initially Rejoinable
  • Required
  • Required Rejoinable

31
Powersim Exporter
  • Optional
  • The slot must be joined initially
  • It can be left at any time
  • The simulation can continue without it

32
Powersim Exporter
  • Optional Rejoinable
  • The slot can be joined and left at any time
  • The simulation will be able to continue

33
Powersim Exporter
  • Optional Initially
  • The slot may or may not be joined
  • If a slot is left, the simulation will stop
  • If a slot is not joined it gets blocked during
    simulation

34
Powersim Exporter
  • Optional Initially Rejoinable
  • The slot may or may not be joined
  • If a slot is left, the simulation will freeze
    until the slot is joined again
  • If a slot is not joined it gets blocked during
    simulation

35
Powersim Exporter
  • Required
  • The slot must be joined
  • If a slot is left, the simulation will stop

36
Powersim Exporter
  • Required Rejoinable
  • The slot must be joined
  • If it is left, the simulation will freeze until
    the slot it is rejoined by a player

37
WebSim an extended Java applet
  • A Java programming tool (e.g. JBuilder) is used
    to program
  • the Java GUI using Java AWT an/or JavaBeans
  • and more GUI using objects from Powersim Metro
    Java API
  • and communication between the GUI and the Metro
    Server (i.e. the simulation model)
  • and optionally communication between the players
    using functions in the API package

38
Java Applet
  • The Java Metro API packages
  • Contains classes to create a WebSim
  • Creating the GUI
  • Communication to the Metro Server
  • Event handling

39
Object
Component
Container
Panel
Window
Frame
Applet
PsWizardClientPanel
GameFrame
WizardFrame
BeerApplet
wizClient1
wizClient2
wizClient3
wizClient4
40
BeerApplet
WizardFrame
Connect to Metro Server
Initializes the wizards

Back to BeerApplet to show the wizards
41

Back to BeerApplet to show the wizards
wizClient1
wizClient2
wizClient3
wizClient4
GameFrame
GameFrame
42
GameFrame
Join Game Constructor
New Game Constructor


Showing the main Window
Showing the main Window
43
GameFrame
PsJoinListener
PsMessageListener
PsAdvanceListener
PsLeaveListener
44
Thank you for your attention.
45
WebSim Structure
Client
WebServer
JBuilder
Java Applet
Web Browser
Metro Server
Powersim Constructor
Exporter
Model
46
Beer Game package that holds most of the beer
game classes
Creating an instance of WizardFrame
47
Here we connect to Metro server
Failure in the connection is detected here
A dialogbox shown to the user informing him
about the failure
48
Initializing the Wizards
49
The wizards is shown to the user here
50
Slot Label
51
(No Transcript)
52
Session Label
The role that the player will play
53
(No Transcript)
54
(No Transcript)
55
New session is created
The session gets the chosen slot (role)
The slot is joined here
Asks the simulation to start
56
The constructor gets the exiting session
Asks the simulation to play
The chosen slot is joined
57
Catches the event
Handles the event after its kind
58
Gets the userId who wants to join the game
Gets the slot (role) that the user wants to join
59
The main window is initialized when the
simulation advances
60
Catches the userId that wants to leave the game
Write a Comment
User Comments (0)
About PowerShow.com