Disponível somente no TrabalhosFeitos
  • Páginas : 20 (4756 palavras )
  • Download(s) : 0
  • Publicado : 15 de abril de 2011
Ler documento completo
Amostra do texto
Elevator Challenge Guide

The Elevator Challenge
The Fun Educational Resource for Object-Oriented Design and Programming
The goal of the Elevator Challenge is to provide students and hobbyists a chance to practice their programming skills by addressing a real-life problem – how to most efficiently control the elevators or lifts of a building. At the heart of the challenge is anelevator simulator which allows programmers to design, code and then test their implementation in efficiently managing elevators in different realworld scenarios. You also get the chance to test your skills by comparing results with others, including the option to submit results here to compete against other programmers from around the world. The Elevator Challenge has been accepted as an ACMSIGSCE educational resource. Subscribe now to receive news and updates.

This guide comprises three sections: 1. The Simulator. This section describes operation of the Elevator Challenge Simulator. 2. The Model. This section describes the underlying model of the Simulator. 3. The Code. This section gives an overview of the Simulator code and the development of the elevator groupController.

Quick Peek
To get a quick feel for what the Simulator looks like, simply install the Simulator and run the file challenge.bat. As long as you have Java installed, it will give you a chance to play with the functionality before creating your own control logic.

Version 0.4

Page 1

Elevator Challenge Guide

The Simulator
The Elevator Challenge is run using a Simulator which allowsfor the creation of a Scenario which describes a particular building and the characteristics of its occupants. Using the logic provided by in the Challenge class, the performance of the elevator group is measured in a Simulation. Once the logic of the elevator group Controller is programmed by the user, the Elevator Challenge Simulator does all the work!

Running the Simulator
The Simulator isrun either through a development environment, like Eclipse, or through the command line. Programming the Controller and running the simulator is described later in “The Code.” There are a few pre-requisites, specifically Windows and Java 1.6.

Scenario Creation
A Scenario is created by entering the characteristics of the building, elevator and occupants. New Scenarios can be created by selectingNew Scenario from the File menu of the Simulator. Once created, Scenarios can be saved and opened from the File menu. Once the Scenario window is opened, the necessary parameters can be entered. Note that initially, the New Scenario is created with default values that are then updated. At any point, the Scenario can be saved by accessing the Save Scenario command from the File Menu. To providegreater flexibility, changes entered into any of the fields of the Scenario are not applied until specifically chosen by the user as detailed below.

Scenario Toolbar
Each Scenario provides a toolbar for general commands: • Apply. This command applies changes in the various entry fields to the Scenario. Before running the simulation or saving a scenario, you will be prompted to accept or rejectand changes that have yet to be applied. Restore. This command restores the Scenario fields to values since the Scenario was loaded or since the last Apply. Run Sim. This command executes the Simulation engine as described later.

The Scenario window provides four parameter entry panes as described below.

Scenario Simulation Pane
The Simulation Pane describes overall parameters ofthe

Version 0.4

Page 2

Elevator Challenge Guide
simulation itself, including: Parameter Scenario Name Stages Description The Name of the Scenario. This is not necessarily the file name. The number of stages in the simulation. For each stage, there are specific passenger behaviors including arrival rates and exit floors. Multiple stages can be defined to reflect different times of day...
tracking img