Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Preloaded Examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Monterey Phoenix
MP Model Collection
Preloaded Examples
Commits
ec1c12de
Commit
ec1c12de
authored
4 years ago
by
Giammarco, Kristin M
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
2f541794
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Example47_Elevator.mp
+43
-0
43 additions, 0 deletions
Example47_Elevator.mp
with
43 additions
and
0 deletions
Example47_Elevator.mp
0 → 100644
+
43
−
0
View file @
ec1c12de
/*Elevator Model
K.Giammarco circa 2011
This model demonstrates the modeling of situations and consequential events
in MP. The pattern is:
( SituationA do_one_thing |
SituationB do_another_thing )
in the case of this model,
( Elevator_works_fine Get_Off |
Emergency_Situation Call_for_help )
*/
SCHEMA ELEVATOR
ROOT Passenger : Request_Up_Service
( Available
Enter_Elevator
Request_floor
( Elevator_works_fine Get_Off |
Emergency_Situation Call_for_help ) |
Non_Available Elevator_works_fine Wait );
ROOT Elevator : (Available | Non_Available);
ROOT Maintenance_Personnel : ( Emergency_Situation
Instant_Response
Provide_Exit_Opportunity |
Elevator_works_fine
Do_Nothing );
COORDINATE $a: Call_for_help FROM Passenger,
$b: Instant_Response FROM Maintenance_Personnel
DO ADD $a PRECEDES $b; OD;
Passenger, Elevator SHARE ALL Available, Non_Available;
Passenger, Maintenance_Personnel SHARE ALL Emergency_Situation, Elevator_works_fine;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment