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
d2b4726b
Commit
d2b4726b
authored
3 years ago
by
Keane Reynolds
Browse files
Options
Downloads
Patches
Plain Diff
Uploaded example 39 from the manual
parent
5d9e2c42
No related branches found
No related tags found
4 merge requests
!6
Keane branch
,
!5
Keane branch
,
!4
Keane branch
,
!3
Keane branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Example39_Merging_Root_Events_to_Reduce_Run_Time.mp
+46
-0
46 additions, 0 deletions
Example39_Merging_Root_Events_to_Reduce_Run_Time.mp
with
46 additions
and
0 deletions
Example39_Merging_Root_Events_to_Reduce_Run_Time.mp
0 → 100644
+
46
−
0
View file @
d2b4726b
/* Example39_Merging_Root_Events_to_Reduce_Run_Time.mp
Complex MP models may have large number of root events with several
coordination operations performed on clusters of roots. This may be
system’s architecture model with a large number of actors (components)
and interactions (connectors) between them. Usually coordination operations
will be placed in schema’s body following the corresponding root event
descriptions and performed during the derivation as described in Section
3. Derivation for such “heavy” MP models in Firebird may take too much
time even for scope 1. Fortunately, the “layered derivation” strategy
implemented in MP may help to speed up the trace derivation, and in
many cases makes it possible to work with a pretty large and complex
MP models. The idea is simple – organize the derivation as a hierarchy
of smaller derivations.
Here is an example of how to benefit from the “layered derivation”.
Schema S1 has several interacting root events, where roots B and C have
several coordination operations between them. These coordination operations
will be performed repeatedly each time when derivation process backtracks
and performs new top-down pass through schema’s code for the next trace
derivation.
B and C have two coordination operations between them: COORDINATE
and SHARE ALL. To delegate this “heavy” coordination to a separate
derivation task we introduce a separate root event B_and_C to
encapsulate the trace segment derivation (including the coordination)
for B and C.
*/
SCHEMA Merging_Root_Events_to_Reduce_Run_Time
ROOT A: (* ( work | send_to_B) *);
ROOT B: (*<1.. $$scope + 1>
( work | receive_from_A | send_to_C ) *);
COORDINATE $a: send_to_B,
$b: receive_from_A
DO ADD $a PRECEDES $b; OD;
ROOT C: (*<1.. $$scope + 1>
( work | receive_from_B | send_to_D ) *);
COORDINATE $a: send_to_C,
$b: receive_from_B
DO ADD $a PRECEDES $b; OD;
B, C SHARE ALL work;
ROOT D: (* (work | receive_from_C ) *);
COORDINATE $a: send_to_D,
$b: receive_from_C
DO ADD $a PRECEDES $b; OD;
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