Elevators
Examples


Purpose of this Example

This example assumes that you have gone through the Hello World example.

The Model

The "model" is just a couple ML-expressions to evaluate.

elevators_inscriptions.gif

Queries

The New page page contains 6 queries.

The first query loads the stub functors required to use the Elevator Java class.

The second and third querien create two contexts, and the fourth and fifth query initialises the contexts; elevator1 is able to visualise two elavators in a 6 story building, and elevator2 is able to visualise 4 elevators in a 15 story building.

The last (3-line) query moves two elevators in the first context and one elevator in the second. Notice how the query returns immdiately. For fun try evaluating elevator1.setPosition(1, 1); elevator1.setPosition(1, 6); a couple times immediately after each other.

Also, try resizing the main window while the elevators are moving.

Simulation

elevators_2x6.gif elevators_4x15.gif

Download

Next Step

Use this with your model

Version 5, Thu 15 Jun 2006 12:50:49 [tveon] - created Tue 03 Aug 2004 19:14:42 [mw]