1 / 9

Advantages of Modular Models

Advantages of Modular Models. Safe experiments Optimization of efficiency Easy reconfigurability Reuse of modules. Module. Modules. A module handles elements A channel connects two modules A channel is used for exchanging either Elements or Events. Channel. Module. Module.

sovann
Download Presentation

Advantages of Modular Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advantages of Modular Models • Safe experiments • Optimization of efficiency • Easy reconfigurability • Reuse of modules

  2. Module Modules • A module handles elements • A channel connects two modules • A channel is used for exchanging either • Elements or • Events Channel Module Module Module Channel Channel

  3. Abstract Module Types • A module is either • Active • Active link • Active consumer • Passive • Passive link • Passive consumer Active Module Passive Module Get Element Active Module Element Event Element

  4. Specialized Module Types • Passive • Conveyer (parameterized length) • Press • Active • Robot (parameterized behavior)

  5. System Structure

  6. C2 Conveyer S S ActiveConsumer Channel B Channel P Environment R S Robot Press S C1 A A/B Channel B Conveyer Channel Channel S Modular model of case study

  7. Initializing the model(Static configuration) system CS instancevariables publicstatic conveyer1 : Conveyer := new Conveyer(); publicstatic conveyer2 : Conveyer := new Conveyer(); publicstatic robot1 : Robot := new Robot(); publicstatic press1 : Press := new Press(); publicstatic consumer1 : ActiveConsumer := new ActiveConsumer(); publicstatic attachments : seqof Global`Attachment := [ mk_Global`Attachment(conveyer1,<p2>,robot1,<p4>), mk_Global`Attachment(robot1,<p2>,press1,<p1>), mk_Global`Attachment(press1,<p1>,robot1,<p2>), mk_Global`Attachment(robot1,<p1>,conveyer2,<p1>), mk_Global`Attachment(conveyer2,<p2>,consumer1,<p1>) ]; cpu1 : CPU := new CPU(<FCFS>,1E06); cpu2 : CPU := new CPU(<FCFS>,1E06); cpu3 : CPU := new CPU(<FCFS>,1E06); […] bus1 : BUS := new BUS(<FCFS>,1E06,{cpu1,cpu2,cpu3,cpu4,cpu5,cpu6,cpu7}); operations public CS: () ==> CS CS() == ( cpu1.deploy(conveyer1); cpu2.deploy(robot1); cpu3.deploy(press1); cpu4.deploy(conveyer2); cpu7.deploy(consumer1); ); end CS

  8. Initializing the model(Dynamic initialization) dcl ms:setof Module := {}; ( for a in CS`attachments do ( a.Source.attach(a.SourcePos, a.Sink, a.SinkPos); ms := ms union {a.Sink,a.Source} ); forall m inset ms do start(m) );

  9. Measuring Delay • Timestamps are added to elements • Input time • Output time • A sequence of elements are fed to the first module CS`conveyer1.putElement(mk_Global`ElementData(1, time, 0)); duration(1000)skip; CS`conveyer1.putElement(mk_Global`ElementData(2, time, 0)); duration(1000)skip; CS`conveyer1.putElement(mk_Global`ElementData(3, time, 0)); • Outgoing elements are logged by consumer module • Logfile: [ mk_Global`ElementData( 1, 2444, 11013 ), mk_Global`ElementData( 2, 3812, 16765 ), mk_Global`ElementData( 3, 5142, 23105 ) ]

More Related