archive-org.com » ORG » C » CPNTOOLS.ORG

Total: 415

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Hierarchical protocol example << CPN Tools Homepage
    book Book creator Remove this page from your book Show modify book 6 page s Help Hierarchical protocol example This example shows how the CP net from Simple Protocol can be turned into a hierarchical CP net with separate pages subnets for the Sender the Network and the Receiver part The protocol is modified to accommodate multiple Receivers The files for this net can be found in a subdir of

    Original URL path: http://cpntools.org/documentation/examples/hierarchical_protocol (2016-04-26)
    Open archived version from archive


  • IP Network << CPN Tools Homepage
    a given IP network is composed of submodels of IP routers and terminal customer networks for generating traffic Terminal networks provide random pairs of sender and receiver IP addresses into the specified address space Static routing tables are used See also the model MPLS Network The model is described in Zaitsev D A Sakun A L An Evaluation of MPLS Efficacy using Colored Petri Net Models In Proc of of

    Original URL path: http://cpntools.org/documentation/examples/ip_network (2016-04-26)
    Open archived version from archive

  • MPLS Network << CPN Tools Homepage
    as inspiration The model of a given MPLS network is composed of submodels of LSR LER routers and terminal customer networks for generating traffic Static FEC LSP allocation and label switching tables are used See also the model IP Network The model is described in Zaitsev D A Sakun A L An Evaluation of MPLS Efficacy using Colored Petri Net Models In Proc of of International Middle Eastern Multiconference on

    Original URL path: http://cpntools.org/documentation/examples/mpls_network (2016-04-26)
    Open archived version from archive

  • Protocol with timer << CPN Tools Homepage
    book Show modify book 6 page s Help Protocol with timer This example shows how the CP net from Simple Protocol can be modified so that the retransmission of messages is controlled by a simple timer modeled by means of two places and two transitions The CP net is not using time stamps and hence it should not be confused with the Timed protocol example The files for this net

    Original URL path: http://cpntools.org/documentation/examples/protocol_with_timer (2016-04-26)
    Open archived version from archive

  • Provider Backbone Bridge << CPN Tools Homepage
    thru them in too much detail so listing does not imply that we endorse them or any papers listed only that we provide them as inspiration This model implements a Provider Backbone Bridge PBB network PBB interior switch PBB edge switch with the dynamic filling up of address tables This model is described in P P Vorobiyenko K D Guliaiev D A Zaitsev T R Shmeleva PBB Efficiency Evaluation via

    Original URL path: http://cpntools.org/documentation/examples/provider_backbone_bridge (2016-04-26)
    Open archived version from archive

  • Queue system example << CPN Tools Homepage
    integer value The type of model time values is described on the help page for simulator functions The function newJob returns a value from the color set Job The JobType ran is a color set function that returns a random value from the color set JobType i e it will return either A or B when it is invoked The value of the AT field is set using the intTime function which is used to store the model time at which the job was created MONITOR DECLS globref longdelaytime 200 globref fileid NONE TextIO outstream option fun getfid this will raise Option exception if fileid NONE Option valOf fileid fun initfile let val filename OS Path concat Output getSimOutputDir Trans Log File txt in Output initSimOutputDir fileid SOME TextIO openOut filename end The reference variable longdelaytime is used to indicate the lower limit for what will be considered long waiting times for jobs in the queue The reference variable fileid is used in a user defined monitor that is described on the help page for Queue System Miscellaneous Monitors The variable is a reference to a TextIO outstream option For more information about TextIO outstream and option values see the online help pages for the TextIO structure and the Option structure in the SML Basis Library The function getfid will return the file identifier that fileid refers to assuming that fileid does not refer to the value NONE The function initfile initializes a file that a user defined monitor will update during simulations The name of the file is Trans Log File txt and it will be saved in a simulation output directory The name of the simulation output directory is accessed via the function Output getSimOutputDir which is one of the output management functions Model overview The System page provides the most abstract representation of the queue system The system consists of two modules that are modeled by the two substitution transitions Arrivals and Server These two modules are described in detail below The place Queue models the queue of jobs The color set of the place is a list color set There is a single token on the place in the initial marking of the net and there is be a single token on the place in every reachable marking The single token on the place represents the queue of jobs In the initial marking the list is empty i e the queue of jobs is empty in the initial marking Jobs are added to the queue in the Arrivals module and jobs are removed from the queue in the Server module Job arrivals The arrival of jobs to the system is modeled on the page Arrivals A token on the place Next is used to determine when new jobs arrive The color set for the place is a timed color set and the time stamp of the token on the place will determine when the Arrive transition can occur There is no token on the place in

    Original URL path: http://cpntools.org/documentation/examples/queue_system (2016-04-26)
    Open archived version from archive

  • Queue system configuration example << CPN Tools Homepage
    n setTwoServers CPN Replications nreplications n end Values from the ProcDist color set will be used to determine the probability distribution for server processing times The DISCRETE and EXP values represent that the server processing times should be drawn from a discrete uniform distribution and an exponential distribution respectively The reference variables num of servers and avg proc time will be used to determine the number of servers in the system and the average processing time for a server respectively The initial values for these variables are 4 and 360 respectively The procdist reference variable will be used to determine the probability distribution of server processing times during a simulation The initial value of the variable is EXP It is important to note that the contents of the reference variables are never changed when transitions occur in the model The values of these variables should only be changed immediately before a simulation is started The initServers function is used to generate a multi set of server values from the Server color set shown for the Queue system example The number of server elements in the multi set is determined by the contents of the num of servers reference variable The genProcTime function is used to generate server processing times The contents of the procdist reference variable will determine whether the processing times will be exponentially or uniformly distributed In either case the average processing time is determined by the avg proc time reference variable If the contents of procdist is the value EXP then the server processing times will be generated by the exponential random variate generator which is called in the expTime function as defined for the Queue system example Similarly if the contents of procdist is the value DISCRETE then the server processing times will be generated by the the discrete random variate generator and the values will be drawn from the interval avg proc time 10 avg proc time 10 The function simulateConfigs is used to define and simulate a number of different configurations of the model The function is not used in the model itself An example of how the function can be used is described below The functions setOneServer and setTwoServers are used to change the values of the reference variables num of servers and avg proc time The first function defines a configuration representing a queuing system with one relatively fast server The second function determines a configuration with two slower servers The expressions procdist EXP and procdist DISCRETE in the body of simulateConfigs determine that in some simulations the server processing times should be exponentially distributed and in other simulations the processing times should be uniformly distributed The function CPN Replications nreplications is a simulator function that is used to execute a given number of simulation replications Model This model contains 3 pages with net structure System Arrivals and Server The System and Arrivals pages are the same as in the Queue system example example The Server page for this example is somewhat

    Original URL path: http://cpntools.org/documentation/examples/queue_system_configuratio (2016-04-26)
    Open archived version from archive

  • Queue System Miscellaneous Monitors << CPN Tools Homepage
    end Place content bp Server Completed 1 This is a Place Contents breakpoint monitor It can be used to stop a simulation when the Completed place on the page Server contains at least one token i e when the marking is not empty The index entry for this monitor is dimmed indicating that the monitor has been disabled When the monitor is disabled it will not be able to stop a simulation If the monitor is enabled again then it will stop a simulation when the appropriate conditions are fulfilled For more about disabling and enabling monitors see the help page about how to Edit a monitor Save arrival info This is a write in file monitor that is used to save information about the jobs that arrive during a simulation The monitor is associated with the Arrive transition Here is an example of a file that was generated by this monitor Initialization function The initialization function adds some header like information to the file before a simulation starts fun init Job arrivals n n Predicate function The predicate function returns true each time the Arrive transition occurs fun pred bindelem let fun predBindElem Arrivals Arrive 1 jobs job true predBindElem false in predBindElem bindelem end Observation function The observation function returns a string each time the predicate function returns true i e each time the Arrive transition occurs The first part of the string is a counter indicating how many jobs have arrived This number is accessed via the count function for the Count trans occur Arrivals Arrive 1 monitor The second part of the string is a string representation of the job that just arrived i e the job that is bound to the variable job when the Arrive transition occurred The mkstr function is one of the color set functions fun obs bindelem let fun obsBindElem Arrivals Arrive 1 jobs job Int toString Count trans occur Arrivals Arrive 1 count Job mkstr job n obsBindElem in obsBindElem bindelem end Stop function The stop function returns a string that is added to the file when simulation stop criteria are fulfilled The string contains information about how many jobs arrived during the simulation and the number of steps that were executed during the simulation The step function is one of the simulator functions fun stop n nA total of Int toString Count trans occur Arrivals Arrive 1 count jobs arrived during the IntInf toString step steps of this simulation n User defined log file This is a user defined monitor that creates and updates a file Normally a write in file monitor would be used for this purpose but this monitor is included just to show an example of how a user defined monitor can be used The monitor is associated with almost all of the transitions in the net The monitor is not associated with the Init transition on the Arrivals page Here is an example of a file that was generated by this monitor Initialization function The

    Original URL path: http://cpntools.org/documentation/examples/queue_system_miscellaneou (2016-04-26)
    Open archived version from archive



  •