y_nelson 2.3.7 → 2.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Introduction_to_Ruby_for_YPetri_and_YNelson_Users.pdf +0 -0
- data/Introduction_to_YPetri_and_YNelson.pdf +0 -0
- data/Object_model_of_YPetri_and_YNelson.pdf +0 -0
- data/lib/y_nelson.rb +0 -1
- data/lib/y_nelson/agent.rb +12 -1
- data/lib/y_nelson/version.rb +1 -1
- data/test/y_nelson_test.rb +1 -1
- metadata +2 -5
- data/Introduction_to_Ruby_for_YPetri_and_YNelson_Users.lyx +0 -3265
- data/Introduction_to_YPetri_and_YNelson.lyx +0 -3593
- data/Object_model_of_YPetri_and_YNelson.lyx +0 -3842
@@ -1,3842 +0,0 @@
|
|
1
|
-
#LyX 2.1 created this file. For more info see http://www.lyx.org/
|
2
|
-
\lyxformat 474
|
3
|
-
\begin_document
|
4
|
-
\begin_header
|
5
|
-
\textclass article
|
6
|
-
\use_default_options false
|
7
|
-
\maintain_unincluded_children false
|
8
|
-
\language english
|
9
|
-
\language_package default
|
10
|
-
\inputencoding auto
|
11
|
-
\fontencoding global
|
12
|
-
\font_roman default
|
13
|
-
\font_sans default
|
14
|
-
\font_typewriter default
|
15
|
-
\font_math auto
|
16
|
-
\font_default_family default
|
17
|
-
\use_non_tex_fonts false
|
18
|
-
\font_sc false
|
19
|
-
\font_osf false
|
20
|
-
\font_sf_scale 100
|
21
|
-
\font_tt_scale 100
|
22
|
-
\graphics default
|
23
|
-
\default_output_format default
|
24
|
-
\output_sync 0
|
25
|
-
\bibtex_command default
|
26
|
-
\index_command default
|
27
|
-
\paperfontsize default
|
28
|
-
\spacing single
|
29
|
-
\use_hyperref false
|
30
|
-
\papersize default
|
31
|
-
\use_geometry true
|
32
|
-
\use_package amsmath 1
|
33
|
-
\use_package amssymb 1
|
34
|
-
\use_package cancel 1
|
35
|
-
\use_package esint 1
|
36
|
-
\use_package mathdots 1
|
37
|
-
\use_package mathtools 1
|
38
|
-
\use_package mhchem 1
|
39
|
-
\use_package stackrel 1
|
40
|
-
\use_package stmaryrd 1
|
41
|
-
\use_package undertilde 1
|
42
|
-
\cite_engine natbib
|
43
|
-
\cite_engine_type authoryear
|
44
|
-
\biblio_style plainnat
|
45
|
-
\use_bibtopic false
|
46
|
-
\use_indices false
|
47
|
-
\paperorientation portrait
|
48
|
-
\suppress_date false
|
49
|
-
\justification true
|
50
|
-
\use_refstyle 0
|
51
|
-
\index Index
|
52
|
-
\shortcut idx
|
53
|
-
\color #008000
|
54
|
-
\end_index
|
55
|
-
\leftmargin 2.2cm
|
56
|
-
\topmargin 3cm
|
57
|
-
\rightmargin 2.2cm
|
58
|
-
\bottommargin 3cm
|
59
|
-
\secnumdepth 3
|
60
|
-
\tocdepth 3
|
61
|
-
\paragraph_separation indent
|
62
|
-
\paragraph_indentation default
|
63
|
-
\quotes_language english
|
64
|
-
\papercolumns 1
|
65
|
-
\papersides 1
|
66
|
-
\paperpagestyle default
|
67
|
-
\tracking_changes false
|
68
|
-
\output_changes false
|
69
|
-
\html_math_output 0
|
70
|
-
\html_css_as_file 0
|
71
|
-
\html_be_strict false
|
72
|
-
\end_header
|
73
|
-
|
74
|
-
\begin_body
|
75
|
-
|
76
|
-
\begin_layout Title
|
77
|
-
Object model of YNelson and YPetri
|
78
|
-
\end_layout
|
79
|
-
|
80
|
-
\begin_layout Part*
|
81
|
-
|
82
|
-
\family typewriter
|
83
|
-
YNelson
|
84
|
-
\family default
|
85
|
-
and
|
86
|
-
\family typewriter
|
87
|
-
YPetri
|
88
|
-
\end_layout
|
89
|
-
|
90
|
-
\begin_layout Standard
|
91
|
-
|
92
|
-
\family typewriter
|
93
|
-
\color blue
|
94
|
-
YNelson
|
95
|
-
\family default
|
96
|
-
\color inherit
|
97
|
-
is a Ruby library (gem) providing a domain model and a simulator of
|
98
|
-
\emph on
|
99
|
-
\color green
|
100
|
-
Nelson nets
|
101
|
-
\emph default
|
102
|
-
\color inherit
|
103
|
-
.
|
104
|
-
A
|
105
|
-
\emph on
|
106
|
-
\color green
|
107
|
-
Nelson net
|
108
|
-
\emph default
|
109
|
-
\color inherit
|
110
|
-
is a cross between a
|
111
|
-
\emph on
|
112
|
-
\color green
|
113
|
-
Petri net
|
114
|
-
\emph default
|
115
|
-
\color inherit
|
116
|
-
, and a
|
117
|
-
\emph on
|
118
|
-
\color green
|
119
|
-
ZZ structure
|
120
|
-
\emph default
|
121
|
-
\color inherit
|
122
|
-
.
|
123
|
-
For formal definition of the ZZ structure, see
|
124
|
-
\begin_inset CommandInset citation
|
125
|
-
LatexCommand citet
|
126
|
-
key "Dattolo2009fdz"
|
127
|
-
|
128
|
-
\end_inset
|
129
|
-
|
130
|
-
.
|
131
|
-
|
132
|
-
\family typewriter
|
133
|
-
YNelson
|
134
|
-
\family default
|
135
|
-
has two major dependencies:
|
136
|
-
\family typewriter
|
137
|
-
\color blue
|
138
|
-
YPetri
|
139
|
-
\family default
|
140
|
-
\color inherit
|
141
|
-
gem that provides Petri nets and
|
142
|
-
\family typewriter
|
143
|
-
\color blue
|
144
|
-
Yzz
|
145
|
-
\family default
|
146
|
-
\color inherit
|
147
|
-
gem that provides ZZ structures.
|
148
|
-
|
149
|
-
\family typewriter
|
150
|
-
YNelson
|
151
|
-
\family default
|
152
|
-
provides the same interface as
|
153
|
-
\family typewriter
|
154
|
-
YPetri
|
155
|
-
\family default
|
156
|
-
, so this document is (except for
|
157
|
-
\family typewriter
|
158
|
-
Yzz
|
159
|
-
\family default
|
160
|
-
features) applicable also to
|
161
|
-
\family typewriter
|
162
|
-
YPetri
|
163
|
-
\family default
|
164
|
-
.
|
165
|
-
\end_layout
|
166
|
-
|
167
|
-
\begin_layout Standard
|
168
|
-
You should also take a look at the tutorial,
|
169
|
-
\begin_inset Quotes eld
|
170
|
-
\end_inset
|
171
|
-
|
172
|
-
Introduction_to_YNelson_and_YPetri
|
173
|
-
\begin_inset Quotes erd
|
174
|
-
\end_inset
|
175
|
-
|
176
|
-
.
|
177
|
-
However, the tutorial is a hands-on guide, while this document describes
|
178
|
-
the abstraction of
|
179
|
-
\family typewriter
|
180
|
-
YPetri
|
181
|
-
\family default
|
182
|
-
/
|
183
|
-
\family typewriter
|
184
|
-
YNelson
|
185
|
-
\family default
|
186
|
-
.
|
187
|
-
The described gems need Ruby 2.3 or newer and can be installed by typing
|
188
|
-
|
189
|
-
\family typewriter
|
190
|
-
gem install y_nelson
|
191
|
-
\family default
|
192
|
-
in your command prompt.
|
193
|
-
(The dependencies will install automatically.)
|
194
|
-
\end_layout
|
195
|
-
|
196
|
-
\begin_layout Part*
|
197
|
-
Functional Petri nets
|
198
|
-
\end_layout
|
199
|
-
|
200
|
-
\begin_layout Standard
|
201
|
-
Petri nets were described by C.
|
202
|
-
A.
|
203
|
-
Petri in the middle of 20th century.
|
204
|
-
A Petri net can be used to represent various
|
205
|
-
\begin_inset Quotes eld
|
206
|
-
\end_inset
|
207
|
-
|
208
|
-
wiring diagrams
|
209
|
-
\begin_inset Quotes erd
|
210
|
-
\end_inset
|
211
|
-
|
212
|
-
– production lines, railway networks, electronic circuits, computer architectur
|
213
|
-
es, parallel execution diagrams, or chemical systems.
|
214
|
-
In fact, Petri himself has designed Petri nets with chemical systems in
|
215
|
-
mind.
|
216
|
-
\end_layout
|
217
|
-
|
218
|
-
\begin_layout Standard
|
219
|
-
A Petri net consists of
|
220
|
-
\emph on
|
221
|
-
\color green
|
222
|
-
places
|
223
|
-
\emph default
|
224
|
-
\color inherit
|
225
|
-
,
|
226
|
-
\emph on
|
227
|
-
\color green
|
228
|
-
transitions
|
229
|
-
\emph default
|
230
|
-
\color inherit
|
231
|
-
, and
|
232
|
-
\emph on
|
233
|
-
\color green
|
234
|
-
arcs
|
235
|
-
\emph default
|
236
|
-
\color inherit
|
237
|
-
.
|
238
|
-
Places are typically drawn as circles, transitions as rectangles.
|
239
|
-
Places and transitions are connected by arcs, drawn as lines or arrows.
|
240
|
-
Places may contain
|
241
|
-
\emph on
|
242
|
-
\color green
|
243
|
-
tokens
|
244
|
-
\emph default
|
245
|
-
\color inherit
|
246
|
-
.
|
247
|
-
The amount of tokens in a place(s) is called
|
248
|
-
\emph on
|
249
|
-
\color green
|
250
|
-
marking
|
251
|
-
\emph default
|
252
|
-
\color inherit
|
253
|
-
.
|
254
|
-
When a transition operates (
|
255
|
-
\emph on
|
256
|
-
\color green
|
257
|
-
fires
|
258
|
-
\emph default
|
259
|
-
\color inherit
|
260
|
-
), tokens are added to or removed from its connected places.
|
261
|
-
|
262
|
-
\emph on
|
263
|
-
\color green
|
264
|
-
State
|
265
|
-
\emph default
|
266
|
-
\color inherit
|
267
|
-
of a Petri net is fully expressed by the places' marking.
|
268
|
-
\end_layout
|
269
|
-
|
270
|
-
\begin_layout Standard
|
271
|
-
Classical Petri nets are
|
272
|
-
\emph on
|
273
|
-
\color green
|
274
|
-
timeless
|
275
|
-
\emph default
|
276
|
-
\color inherit
|
277
|
-
.
|
278
|
-
In timeless Petri nets, firing of a transition is a discrete event, whose
|
279
|
-
exact timing is not specified.
|
280
|
-
Instead, conditions are specified, under which the transition is allowed
|
281
|
-
or prohibited to fire (
|
282
|
-
\emph on
|
283
|
-
\color green
|
284
|
-
enabled
|
285
|
-
\emph default
|
286
|
-
\color inherit
|
287
|
-
or
|
288
|
-
\emph on
|
289
|
-
\color green
|
290
|
-
disabled
|
291
|
-
\emph default
|
292
|
-
\color inherit
|
293
|
-
).
|
294
|
-
Typically, transitions are enabled when their input arcs have sufficient
|
295
|
-
amount of tokens left.
|
296
|
-
However, different firing conditions may be specified.
|
297
|
-
Timeless Petri nets are used to study concurrency – race conditions, network
|
298
|
-
congestions, state reachability etc.
|
299
|
-
Interaction with timeless Petri nets is called
|
300
|
-
\emph on
|
301
|
-
\color green
|
302
|
-
token game
|
303
|
-
\emph default
|
304
|
-
\color inherit
|
305
|
-
.
|
306
|
-
\end_layout
|
307
|
-
|
308
|
-
\begin_layout Standard
|
309
|
-
In
|
310
|
-
\emph on
|
311
|
-
\color green
|
312
|
-
timed Petri nets
|
313
|
-
\emph default
|
314
|
-
\color inherit
|
315
|
-
, it is specified when (or how rapidly) firing of the transitions occurs.
|
316
|
-
Timed nets are thus not interactive and can be autonomously
|
317
|
-
\emph on
|
318
|
-
\color green
|
319
|
-
executed
|
320
|
-
\emph default
|
321
|
-
\color inherit
|
322
|
-
in time.
|
323
|
-
Timed Petri nets actually represent a wiring diagram of a dynamic system.
|
324
|
-
Under certain conditions, a set of differential equations (DE) describing
|
325
|
-
the system can be extracted from this wiring diagram.
|
326
|
-
Execution of a such Petri net is equivalent to numeric integration of its
|
327
|
-
DE system.
|
328
|
-
\family typewriter
|
329
|
-
YPetri
|
330
|
-
\family default
|
331
|
-
object model
|
332
|
-
\end_layout
|
333
|
-
|
334
|
-
\begin_layout Standard
|
335
|
-
Brief hands-on demonstration of the interface can be found in the document
|
336
|
-
|
337
|
-
\emph on
|
338
|
-
Introduction to YNelson
|
339
|
-
\emph default
|
340
|
-
.
|
341
|
-
The purpose of this chapter is to describe the Petri net object model of
|
342
|
-
|
343
|
-
\family typewriter
|
344
|
-
YPetri
|
345
|
-
\family default
|
346
|
-
gem in more detail.
|
347
|
-
\end_layout
|
348
|
-
|
349
|
-
\begin_layout Part*
|
350
|
-
Aspects of
|
351
|
-
\family typewriter
|
352
|
-
YPetri
|
353
|
-
\end_layout
|
354
|
-
|
355
|
-
\begin_layout Standard
|
356
|
-
|
357
|
-
\family typewriter
|
358
|
-
YPetri
|
359
|
-
\family default
|
360
|
-
has two main mutually intertwined concerns:
|
361
|
-
\end_layout
|
362
|
-
|
363
|
-
\begin_layout Enumerate
|
364
|
-
To provide active object model of Petri nets.
|
365
|
-
\end_layout
|
366
|
-
|
367
|
-
\begin_layout Enumerate
|
368
|
-
To provide simulation for the dynamic systems expressed as Petri nets.
|
369
|
-
\end_layout
|
370
|
-
|
371
|
-
\begin_layout Standard
|
372
|
-
Correspondingly,
|
373
|
-
\family typewriter
|
374
|
-
YPetri
|
375
|
-
\family default
|
376
|
-
has 2 aspects catering to its 2 concerns:
|
377
|
-
\end_layout
|
378
|
-
|
379
|
-
\begin_layout Enumerate
|
380
|
-
Petri net aspect.
|
381
|
-
\end_layout
|
382
|
-
|
383
|
-
\begin_layout Enumerate
|
384
|
-
Simulation aspect.
|
385
|
-
\end_layout
|
386
|
-
|
387
|
-
\begin_layout Standard
|
388
|
-
Major classes of the Petri net aspect are
|
389
|
-
\family typewriter
|
390
|
-
Place
|
391
|
-
\family default
|
392
|
-
,
|
393
|
-
\family typewriter
|
394
|
-
Transition
|
395
|
-
\family default
|
396
|
-
and
|
397
|
-
\family typewriter
|
398
|
-
Net
|
399
|
-
\family default
|
400
|
-
.
|
401
|
-
Places have their own marking attribute, transitions know their connectivity,
|
402
|
-
their functions, and they can be triggered to fire and modify marking of
|
403
|
-
their connected places.
|
404
|
-
|
405
|
-
\family typewriter
|
406
|
-
Net
|
407
|
-
\family default
|
408
|
-
is basically a specialized collection of places and transitions.
|
409
|
-
\end_layout
|
410
|
-
|
411
|
-
\begin_layout Standard
|
412
|
-
Simulation aspect is catered for by
|
413
|
-
\family typewriter
|
414
|
-
Simulation
|
415
|
-
\family default
|
416
|
-
class, representing a simulation run, and
|
417
|
-
\family typewriter
|
418
|
-
Core
|
419
|
-
\family default
|
420
|
-
class representing a simulator – a machine that runs the calculations needed
|
421
|
-
to perform the simulation steps.
|
422
|
-
\end_layout
|
423
|
-
|
424
|
-
\begin_layout Standard
|
425
|
-
Workspace (
|
426
|
-
\family typewriter
|
427
|
-
World
|
428
|
-
\family default
|
429
|
-
class, where places, transitions and nets live), and manipulator (
|
430
|
-
\family typewriter
|
431
|
-
Agent
|
432
|
-
\family default
|
433
|
-
class that represents and assists the user) are straddled across both aspects
|
434
|
-
of
|
435
|
-
\family typewriter
|
436
|
-
YPetri
|
437
|
-
\family default
|
438
|
-
.
|
439
|
-
\end_layout
|
440
|
-
|
441
|
-
\begin_layout Part*
|
442
|
-
|
443
|
-
\family typewriter
|
444
|
-
Place
|
445
|
-
\family default
|
446
|
-
class
|
447
|
-
\end_layout
|
448
|
-
|
449
|
-
\begin_layout Standard
|
450
|
-
|
451
|
-
\family typewriter
|
452
|
-
YPetri::Place
|
453
|
-
\family default
|
454
|
-
class represents Petri net places.
|
455
|
-
It includes
|
456
|
-
\family typewriter
|
457
|
-
NameMagic
|
458
|
-
\family default
|
459
|
-
and is normally used as a parametrized subclass (PS) depending on
|
460
|
-
\family typewriter
|
461
|
-
YPetri::World
|
462
|
-
\family default
|
463
|
-
.
|
464
|
-
The key attribute of a place is its marking (variable
|
465
|
-
\family typewriter
|
466
|
-
@marking
|
467
|
-
\family default
|
468
|
-
).
|
469
|
-
Interface related to marking is:
|
470
|
-
\end_layout
|
471
|
-
|
472
|
-
\begin_layout Itemize
|
473
|
-
|
474
|
-
\family typewriter
|
475
|
-
#m
|
476
|
-
\family default
|
477
|
-
, alias
|
478
|
-
\family typewriter
|
479
|
-
#value
|
480
|
-
\family default
|
481
|
-
– getter of
|
482
|
-
\family typewriter
|
483
|
-
@marking
|
484
|
-
\family default
|
485
|
-
instance variable.
|
486
|
-
\end_layout
|
487
|
-
|
488
|
-
\begin_layout Itemize
|
489
|
-
|
490
|
-
\family typewriter
|
491
|
-
#marking
|
492
|
-
\family default
|
493
|
-
– convenience method that acts as
|
494
|
-
\family typewriter
|
495
|
-
@marking
|
496
|
-
\family default
|
497
|
-
getter without arguments, but can be used to define guards if block is
|
498
|
-
supplied to it.
|
499
|
-
\end_layout
|
500
|
-
|
501
|
-
\begin_layout Itemize
|
502
|
-
|
503
|
-
\family typewriter
|
504
|
-
#marking=
|
505
|
-
\family default
|
506
|
-
, alias
|
507
|
-
\family typewriter
|
508
|
-
#value=
|
509
|
-
\family default
|
510
|
-
, alias
|
511
|
-
\family typewriter
|
512
|
-
#m=
|
513
|
-
\family default
|
514
|
-
– setter of
|
515
|
-
\family typewriter
|
516
|
-
@marking
|
517
|
-
\family default
|
518
|
-
.
|
519
|
-
\end_layout
|
520
|
-
|
521
|
-
\begin_layout Itemize
|
522
|
-
|
523
|
-
\family typewriter
|
524
|
-
#add
|
525
|
-
\family default
|
526
|
-
and
|
527
|
-
\family typewriter
|
528
|
-
#subtract
|
529
|
-
\family default
|
530
|
-
that change the value of
|
531
|
-
\family typewriter
|
532
|
-
@marking
|
533
|
-
\family default
|
534
|
-
.
|
535
|
-
\end_layout
|
536
|
-
|
537
|
-
\begin_layout Itemize
|
538
|
-
|
539
|
-
\family typewriter
|
540
|
-
#default_marking
|
541
|
-
\family default
|
542
|
-
,
|
543
|
-
\family typewriter
|
544
|
-
#default_marking=
|
545
|
-
\family default
|
546
|
-
– getter and setter of place's default marking (
|
547
|
-
\family typewriter
|
548
|
-
@default_marking
|
549
|
-
\family default
|
550
|
-
variable).
|
551
|
-
\end_layout
|
552
|
-
|
553
|
-
\begin_layout Itemize
|
554
|
-
|
555
|
-
\family typewriter
|
556
|
-
#has_default_marking?
|
557
|
-
\family default
|
558
|
-
– informs whether the place has default marking defined (
|
559
|
-
\family typewriter
|
560
|
-
@has_default_marking
|
561
|
-
\family default
|
562
|
-
variable).
|
563
|
-
\end_layout
|
564
|
-
|
565
|
-
\begin_layout Itemize
|
566
|
-
|
567
|
-
\family typewriter
|
568
|
-
#reset_marking
|
569
|
-
\family default
|
570
|
-
– sets
|
571
|
-
\family typewriter
|
572
|
-
@marking
|
573
|
-
\family default
|
574
|
-
to the default value.
|
575
|
-
\end_layout
|
576
|
-
|
577
|
-
\begin_layout Standard
|
578
|
-
Another important group of methods are those related to the place's connectivity
|
579
|
-
– arcs.
|
580
|
-
They are defined in the
|
581
|
-
\family typewriter
|
582
|
-
YPetri::Place::Arcs
|
583
|
-
\family default
|
584
|
-
mixin included by
|
585
|
-
\family typewriter
|
586
|
-
YPetri::Place
|
587
|
-
\family default
|
588
|
-
.
|
589
|
-
In Petri net diagrams, arcs are the lines that connect places and transitions.
|
590
|
-
In YPetri, there is no real
|
591
|
-
\begin_inset Quotes eld
|
592
|
-
\end_inset
|
593
|
-
|
594
|
-
arc
|
595
|
-
\begin_inset Quotes erd
|
596
|
-
\end_inset
|
597
|
-
|
598
|
-
object.
|
599
|
-
For places,
|
600
|
-
\family typewriter
|
601
|
-
#arcs
|
602
|
-
\family default
|
603
|
-
method simply returns the connected transitions, and vice versa, for transition
|
604
|
-
s,
|
605
|
-
\family typewriter
|
606
|
-
#arcs
|
607
|
-
\family default
|
608
|
-
method returns connected places.
|
609
|
-
Overview of the most important
|
610
|
-
\family typewriter
|
611
|
-
Place
|
612
|
-
\family default
|
613
|
-
instance methods inherited from the
|
614
|
-
\family typewriter
|
615
|
-
Arcs
|
616
|
-
\family default
|
617
|
-
mixin is here:
|
618
|
-
\end_layout
|
619
|
-
|
620
|
-
\begin_layout Itemize
|
621
|
-
|
622
|
-
\family typewriter
|
623
|
-
#upstream_arcs
|
624
|
-
\family default
|
625
|
-
, alias
|
626
|
-
\family typewriter
|
627
|
-
#upstream_transitions
|
628
|
-
\family default
|
629
|
-
– getter of
|
630
|
-
\family typewriter
|
631
|
-
@upstream_arcs
|
632
|
-
\family default
|
633
|
-
.
|
634
|
-
\end_layout
|
635
|
-
|
636
|
-
\begin_layout Itemize
|
637
|
-
|
638
|
-
\family typewriter
|
639
|
-
#downstream_arcs
|
640
|
-
\family default
|
641
|
-
, alias
|
642
|
-
\family typewriter
|
643
|
-
#downstream_transitions
|
644
|
-
\family default
|
645
|
-
– getter of
|
646
|
-
\family typewriter
|
647
|
-
@downstream_arcs
|
648
|
-
\family default
|
649
|
-
.
|
650
|
-
\end_layout
|
651
|
-
|
652
|
-
\begin_layout Itemize
|
653
|
-
|
654
|
-
\family typewriter
|
655
|
-
#arcs
|
656
|
-
\family default
|
657
|
-
– a union of upstream transitions and downstream transitions.
|
658
|
-
\end_layout
|
659
|
-
|
660
|
-
\begin_layout Itemize
|
661
|
-
|
662
|
-
\family typewriter
|
663
|
-
#aa
|
664
|
-
\family default
|
665
|
-
– names of the connected transitions.
|
666
|
-
\end_layout
|
667
|
-
|
668
|
-
\begin_layout Itemize
|
669
|
-
|
670
|
-
\family typewriter
|
671
|
-
#precedents
|
672
|
-
\family default
|
673
|
-
– precedents in the spreadsheet sense.
|
674
|
-
Places whose marking directly influences firing of the upstream transitions
|
675
|
-
of this place.
|
676
|
-
\end_layout
|
677
|
-
|
678
|
-
\begin_layout Itemize
|
679
|
-
|
680
|
-
\family typewriter
|
681
|
-
#dependents
|
682
|
-
\family default
|
683
|
-
– dependents in the spreadsheet sense.
|
684
|
-
Places whose marking is changed by firing of the downstream transitions
|
685
|
-
of this place.
|
686
|
-
\end_layout
|
687
|
-
|
688
|
-
\begin_layout Standard
|
689
|
-
For the remaining methods, see the class documentation.
|
690
|
-
Place can also have guards, statements that validate the marking and limit
|
691
|
-
it to only certain values.
|
692
|
-
At the moment, guards are not fully handled by the
|
693
|
-
\family typewriter
|
694
|
-
Simulation
|
695
|
-
\family default
|
696
|
-
class.
|
697
|
-
\end_layout
|
698
|
-
|
699
|
-
\begin_layout Part*
|
700
|
-
|
701
|
-
\family typewriter
|
702
|
-
Transition
|
703
|
-
\family default
|
704
|
-
class
|
705
|
-
\end_layout
|
706
|
-
|
707
|
-
\begin_layout Standard
|
708
|
-
|
709
|
-
\family typewriter
|
710
|
-
YPetri::Transition
|
711
|
-
\family default
|
712
|
-
class represents Petri net transitions.
|
713
|
-
They are
|
714
|
-
\begin_inset Quotes eld
|
715
|
-
\end_inset
|
716
|
-
|
717
|
-
functional
|
718
|
-
\begin_inset Quotes erd
|
719
|
-
\end_inset
|
720
|
-
|
721
|
-
in the sense that they may have mathematical functions attached to them,
|
722
|
-
that govern their firing according to the current marking of the Petri
|
723
|
-
net places.
|
724
|
-
(Term
|
725
|
-
\begin_inset Quotes eld
|
726
|
-
\end_inset
|
727
|
-
|
728
|
-
functional
|
729
|
-
\begin_inset Quotes erd
|
730
|
-
\end_inset
|
731
|
-
|
732
|
-
has also been used in other meanings in conjunction with Petri nets.)
|
733
|
-
\family typewriter
|
734
|
-
YPetri::Transition
|
735
|
-
\family default
|
736
|
-
class utilizes
|
737
|
-
\family typewriter
|
738
|
-
NameMagic
|
739
|
-
\family default
|
740
|
-
mixin.
|
741
|
-
|
742
|
-
\family typewriter
|
743
|
-
YPetri::Transition
|
744
|
-
\family default
|
745
|
-
class is normally used as a parametrized subclass (PS) depending on
|
746
|
-
\family typewriter
|
747
|
-
YPetri::World
|
748
|
-
\family default
|
749
|
-
.
|
750
|
-
The most prominent attribute of a
|
751
|
-
\family typewriter
|
752
|
-
Transition
|
753
|
-
\family default
|
754
|
-
instance is its function.
|
755
|
-
There are 4 basic types of transitions in
|
756
|
-
\family typewriter
|
757
|
-
YPetri
|
758
|
-
\family default
|
759
|
-
:
|
760
|
-
\end_layout
|
761
|
-
|
762
|
-
\begin_layout Itemize
|
763
|
-
|
764
|
-
\family typewriter
|
765
|
-
ts
|
766
|
-
\family default
|
767
|
-
– timeless nonstoichiometric
|
768
|
-
\end_layout
|
769
|
-
|
770
|
-
\begin_layout Itemize
|
771
|
-
|
772
|
-
\family typewriter
|
773
|
-
tS
|
774
|
-
\family default
|
775
|
-
– timeless stoichiometric
|
776
|
-
\end_layout
|
777
|
-
|
778
|
-
\begin_layout Itemize
|
779
|
-
|
780
|
-
\family typewriter
|
781
|
-
Ts
|
782
|
-
\family default
|
783
|
-
– timed nonstoichiometric
|
784
|
-
\end_layout
|
785
|
-
|
786
|
-
\begin_layout Itemize
|
787
|
-
|
788
|
-
\family typewriter
|
789
|
-
TS
|
790
|
-
\family default
|
791
|
-
– timed stoichiometric
|
792
|
-
\end_layout
|
793
|
-
|
794
|
-
\begin_layout Standard
|
795
|
-
They arise by combining 2 basic qualities:
|
796
|
-
\end_layout
|
797
|
-
|
798
|
-
\begin_layout Itemize
|
799
|
-
|
800
|
-
\emph on
|
801
|
-
timedness
|
802
|
-
\end_layout
|
803
|
-
|
804
|
-
\begin_layout Itemize
|
805
|
-
|
806
|
-
\emph on
|
807
|
-
stoichiometricity
|
808
|
-
\end_layout
|
809
|
-
|
810
|
-
\begin_layout Standard
|
811
|
-
You can find more information in the documentation of
|
812
|
-
\family typewriter
|
813
|
-
YPetri::Transition
|
814
|
-
\family default
|
815
|
-
class.
|
816
|
-
\end_layout
|
817
|
-
|
818
|
-
\begin_layout Part*
|
819
|
-
|
820
|
-
\family typewriter
|
821
|
-
Net
|
822
|
-
\family default
|
823
|
-
class
|
824
|
-
\end_layout
|
825
|
-
|
826
|
-
\begin_layout Standard
|
827
|
-
|
828
|
-
\family typewriter
|
829
|
-
YPetri::Net
|
830
|
-
\family default
|
831
|
-
class represents functional Petri nets.
|
832
|
-
It includes
|
833
|
-
\family typewriter
|
834
|
-
NameMagic
|
835
|
-
\family default
|
836
|
-
and is normally used as a PS depending on
|
837
|
-
\family typewriter
|
838
|
-
YPetri::World
|
839
|
-
\family default
|
840
|
-
.
|
841
|
-
It is basically a specialized collection of
|
842
|
-
\family typewriter
|
843
|
-
Place
|
844
|
-
\family default
|
845
|
-
instances and
|
846
|
-
\family typewriter
|
847
|
-
Transition
|
848
|
-
\family default
|
849
|
-
instances.
|
850
|
-
A transition may only be included in a net if all the places connected
|
851
|
-
to it belong to the same net.
|
852
|
-
|
853
|
-
\family typewriter
|
854
|
-
Net
|
855
|
-
\family default
|
856
|
-
instances own 2 parametrized subclasses:
|
857
|
-
\end_layout
|
858
|
-
|
859
|
-
\begin_layout Itemize
|
860
|
-
|
861
|
-
\family typewriter
|
862
|
-
#State
|
863
|
-
\family default
|
864
|
-
– getter of
|
865
|
-
\family typewriter
|
866
|
-
@State
|
867
|
-
\family default
|
868
|
-
, a PS of
|
869
|
-
\family typewriter
|
870
|
-
YPetri::Net::State
|
871
|
-
\end_layout
|
872
|
-
|
873
|
-
\begin_layout Itemize
|
874
|
-
|
875
|
-
\family typewriter
|
876
|
-
#Simulation
|
877
|
-
\family default
|
878
|
-
– getter of
|
879
|
-
\family typewriter
|
880
|
-
@Simulation
|
881
|
-
\family default
|
882
|
-
, a PS of
|
883
|
-
\family typewriter
|
884
|
-
YPetri::Simulation
|
885
|
-
\family default
|
886
|
-
.
|
887
|
-
\end_layout
|
888
|
-
|
889
|
-
\begin_layout Standard
|
890
|
-
Important instance methods include:
|
891
|
-
\end_layout
|
892
|
-
|
893
|
-
\begin_layout Itemize
|
894
|
-
|
895
|
-
\family typewriter
|
896
|
-
#include_place
|
897
|
-
\family default
|
898
|
-
– adds a place to the net
|
899
|
-
\end_layout
|
900
|
-
|
901
|
-
\begin_layout Itemize
|
902
|
-
|
903
|
-
\family typewriter
|
904
|
-
#include_transition
|
905
|
-
\family default
|
906
|
-
– adds a transition to the net
|
907
|
-
\end_layout
|
908
|
-
|
909
|
-
\begin_layout Itemize
|
910
|
-
|
911
|
-
\family typewriter
|
912
|
-
#exclude_place
|
913
|
-
\family default
|
914
|
-
– removes a place from the net
|
915
|
-
\end_layout
|
916
|
-
|
917
|
-
\begin_layout Itemize
|
918
|
-
|
919
|
-
\family typewriter
|
920
|
-
#exclude_transition
|
921
|
-
\family default
|
922
|
-
– removes a transition from the net
|
923
|
-
\end_layout
|
924
|
-
|
925
|
-
\begin_layout Itemize
|
926
|
-
|
927
|
-
\family typewriter
|
928
|
-
#include_net
|
929
|
-
\family default
|
930
|
-
alias
|
931
|
-
\family typewriter
|
932
|
-
#merge!
|
933
|
-
\family default
|
934
|
-
– includes another net in this net
|
935
|
-
\end_layout
|
936
|
-
|
937
|
-
\begin_layout Itemize
|
938
|
-
|
939
|
-
\family typewriter
|
940
|
-
#exclude_net
|
941
|
-
\family default
|
942
|
-
– removes the elements of another net from this net
|
943
|
-
\end_layout
|
944
|
-
|
945
|
-
\begin_layout Itemize
|
946
|
-
|
947
|
-
\family typewriter
|
948
|
-
#<<
|
949
|
-
\family default
|
950
|
-
– includes an element in the net
|
951
|
-
\end_layout
|
952
|
-
|
953
|
-
\begin_layout Itemize
|
954
|
-
|
955
|
-
\family typewriter
|
956
|
-
#+
|
957
|
-
\family default
|
958
|
-
– returns a new net containing the union of the operands' elements
|
959
|
-
\end_layout
|
960
|
-
|
961
|
-
\begin_layout Itemize
|
962
|
-
|
963
|
-
\family typewriter
|
964
|
-
#-
|
965
|
-
\family default
|
966
|
-
– returns a new net containing the elements of the receiver minus the operand
|
967
|
-
\end_layout
|
968
|
-
|
969
|
-
\begin_layout Itemize
|
970
|
-
|
971
|
-
\family typewriter
|
972
|
-
#functional?
|
973
|
-
\family default
|
974
|
-
– inquirer whether the net is functional
|
975
|
-
\end_layout
|
976
|
-
|
977
|
-
\begin_layout Itemize
|
978
|
-
|
979
|
-
\family typewriter
|
980
|
-
#timed?
|
981
|
-
\family default
|
982
|
-
– inquirer whether the net is timed
|
983
|
-
\end_layout
|
984
|
-
|
985
|
-
\begin_layout Itemize
|
986
|
-
|
987
|
-
\family typewriter
|
988
|
-
#simulation
|
989
|
-
\family default
|
990
|
-
– constructor of a new simulation of this net
|
991
|
-
\end_layout
|
992
|
-
|
993
|
-
\begin_layout Standard
|
994
|
-
A
|
995
|
-
\family typewriter
|
996
|
-
Net
|
997
|
-
\family default
|
998
|
-
instance has its own state, and can be asked about place marking, transiton
|
999
|
-
flux etc.
|
1000
|
-
It is also capable of drawing a diagram with Graphviz, using
|
1001
|
-
\family typewriter
|
1002
|
-
#visualize
|
1003
|
-
\family default
|
1004
|
-
method.
|
1005
|
-
For full listing of methods, see the class documentation.
|
1006
|
-
\end_layout
|
1007
|
-
|
1008
|
-
\begin_layout Part*
|
1009
|
-
|
1010
|
-
\family typewriter
|
1011
|
-
World
|
1012
|
-
\family default
|
1013
|
-
class
|
1014
|
-
\end_layout
|
1015
|
-
|
1016
|
-
\begin_layout Standard
|
1017
|
-
|
1018
|
-
\family typewriter
|
1019
|
-
YPetri::World
|
1020
|
-
\family default
|
1021
|
-
is the space where places, transitions and nets live.
|
1022
|
-
Originally, this class was named
|
1023
|
-
\family typewriter
|
1024
|
-
Workspace
|
1025
|
-
\family default
|
1026
|
-
, but
|
1027
|
-
\family typewriter
|
1028
|
-
World
|
1029
|
-
\family default
|
1030
|
-
is shorter.
|
1031
|
-
Owns PS of
|
1032
|
-
\family typewriter
|
1033
|
-
Place
|
1034
|
-
\family default
|
1035
|
-
,
|
1036
|
-
\family typewriter
|
1037
|
-
Transition
|
1038
|
-
\family default
|
1039
|
-
and
|
1040
|
-
\family typewriter
|
1041
|
-
Net
|
1042
|
-
\family default
|
1043
|
-
, stored respectively in
|
1044
|
-
\family typewriter
|
1045
|
-
@Place
|
1046
|
-
\family default
|
1047
|
-
,
|
1048
|
-
\family typewriter
|
1049
|
-
@Transition
|
1050
|
-
\family default
|
1051
|
-
and
|
1052
|
-
\family typewriter
|
1053
|
-
@Net
|
1054
|
-
\family default
|
1055
|
-
instance variables.
|
1056
|
-
Their instances can be constructed with:
|
1057
|
-
\end_layout
|
1058
|
-
|
1059
|
-
\begin_layout Itemize
|
1060
|
-
|
1061
|
-
\family typewriter
|
1062
|
-
#Place
|
1063
|
-
\family default
|
1064
|
-
– constructor of instances of
|
1065
|
-
\family typewriter
|
1066
|
-
Place
|
1067
|
-
\family default
|
1068
|
-
PS.
|
1069
|
-
\end_layout
|
1070
|
-
|
1071
|
-
\begin_layout Itemize
|
1072
|
-
|
1073
|
-
\family typewriter
|
1074
|
-
#Transition
|
1075
|
-
\family default
|
1076
|
-
– constructor of instances of
|
1077
|
-
\family typewriter
|
1078
|
-
Transition
|
1079
|
-
\family default
|
1080
|
-
PS.
|
1081
|
-
\end_layout
|
1082
|
-
|
1083
|
-
\begin_layout Itemize
|
1084
|
-
|
1085
|
-
\family typewriter
|
1086
|
-
#Net
|
1087
|
-
\family default
|
1088
|
-
constructor – constructor of instances of
|
1089
|
-
\family typewriter
|
1090
|
-
Net
|
1091
|
-
\family default
|
1092
|
-
PS.
|
1093
|
-
\end_layout
|
1094
|
-
|
1095
|
-
\begin_layout Standard
|
1096
|
-
World assets are divided into two mixins:
|
1097
|
-
\family typewriter
|
1098
|
-
YPetri::World::PetriNetAspect
|
1099
|
-
\family default
|
1100
|
-
and
|
1101
|
-
\family typewriter
|
1102
|
-
YPetri::World::SimulationAspect
|
1103
|
-
\family default
|
1104
|
-
.
|
1105
|
-
Important instance methods of PetriNetAspect are:
|
1106
|
-
\end_layout
|
1107
|
-
|
1108
|
-
\begin_layout Itemize
|
1109
|
-
|
1110
|
-
\family typewriter
|
1111
|
-
#place
|
1112
|
-
\family default
|
1113
|
-
–
|
1114
|
-
\family typewriter
|
1115
|
-
Place
|
1116
|
-
\family default
|
1117
|
-
PS instance finder.
|
1118
|
-
\end_layout
|
1119
|
-
|
1120
|
-
\begin_layout Itemize
|
1121
|
-
|
1122
|
-
\family typewriter
|
1123
|
-
#transition
|
1124
|
-
\family default
|
1125
|
-
–
|
1126
|
-
\family typewriter
|
1127
|
-
Transition
|
1128
|
-
\family default
|
1129
|
-
PS instance finder.
|
1130
|
-
\end_layout
|
1131
|
-
|
1132
|
-
\begin_layout Itemize
|
1133
|
-
|
1134
|
-
\family typewriter
|
1135
|
-
#net
|
1136
|
-
\family default
|
1137
|
-
–
|
1138
|
-
\family typewriter
|
1139
|
-
Net
|
1140
|
-
\family default
|
1141
|
-
PS instance finder.
|
1142
|
-
\end_layout
|
1143
|
-
|
1144
|
-
\begin_layout Itemize
|
1145
|
-
|
1146
|
-
\family typewriter
|
1147
|
-
#places
|
1148
|
-
\family default
|
1149
|
-
– returns all
|
1150
|
-
\family typewriter
|
1151
|
-
Place
|
1152
|
-
\family default
|
1153
|
-
PS instances.
|
1154
|
-
\end_layout
|
1155
|
-
|
1156
|
-
\begin_layout Itemize
|
1157
|
-
|
1158
|
-
\family typewriter
|
1159
|
-
#transitions
|
1160
|
-
\family default
|
1161
|
-
– returns all
|
1162
|
-
\family typewriter
|
1163
|
-
Transition
|
1164
|
-
\family default
|
1165
|
-
PS instances.
|
1166
|
-
\end_layout
|
1167
|
-
|
1168
|
-
\begin_layout Itemize
|
1169
|
-
|
1170
|
-
\family typewriter
|
1171
|
-
#nets
|
1172
|
-
\family default
|
1173
|
-
– returns all
|
1174
|
-
\family typewriter
|
1175
|
-
Net
|
1176
|
-
\family default
|
1177
|
-
PS instances.
|
1178
|
-
\end_layout
|
1179
|
-
|
1180
|
-
\begin_layout Standard
|
1181
|
-
Important instance methods of SimulationAspect are:
|
1182
|
-
\end_layout
|
1183
|
-
|
1184
|
-
\begin_layout Itemize
|
1185
|
-
|
1186
|
-
\family typewriter
|
1187
|
-
#new_simulation
|
1188
|
-
\family default
|
1189
|
-
– constructor of simulations.
|
1190
|
-
\end_layout
|
1191
|
-
|
1192
|
-
\begin_layout Itemize
|
1193
|
-
|
1194
|
-
\family typewriter
|
1195
|
-
#simulation
|
1196
|
-
\family default
|
1197
|
-
–
|
1198
|
-
\family typewriter
|
1199
|
-
Simulation
|
1200
|
-
\family default
|
1201
|
-
instance finder.
|
1202
|
-
\end_layout
|
1203
|
-
|
1204
|
-
\begin_layout Itemize
|
1205
|
-
|
1206
|
-
\family typewriter
|
1207
|
-
#simulations
|
1208
|
-
\family default
|
1209
|
-
– getter of
|
1210
|
-
\family typewriter
|
1211
|
-
@simulations
|
1212
|
-
\family default
|
1213
|
-
, a hash of simulation instances and their settings.
|
1214
|
-
\end_layout
|
1215
|
-
|
1216
|
-
\begin_layout Standard
|
1217
|
-
|
1218
|
-
\family typewriter
|
1219
|
-
World
|
1220
|
-
\family default
|
1221
|
-
instance has also 3 instance variables useful for simulations,
|
1222
|
-
\family typewriter
|
1223
|
-
@clamp_collections
|
1224
|
-
\family default
|
1225
|
-
,
|
1226
|
-
\family typewriter
|
1227
|
-
@initial_marking_collections
|
1228
|
-
\family default
|
1229
|
-
and
|
1230
|
-
\family typewriter
|
1231
|
-
@simulation_settings_collections
|
1232
|
-
\family default
|
1233
|
-
.
|
1234
|
-
Each simulation requires an initial marking collection, a clamp collection,
|
1235
|
-
and a hash of simulation settings.
|
1236
|
-
In a world, these collections / settings can be named and stored in the
|
1237
|
-
above mentioned instance variables for later use in simulations.
|
1238
|
-
See the class documentation for more details and the accessor methods of
|
1239
|
-
these instance variables.
|
1240
|
-
\end_layout
|
1241
|
-
|
1242
|
-
\begin_layout Part*
|
1243
|
-
|
1244
|
-
\family typewriter
|
1245
|
-
Simulation
|
1246
|
-
\family default
|
1247
|
-
class
|
1248
|
-
\end_layout
|
1249
|
-
|
1250
|
-
\begin_layout Standard
|
1251
|
-
While
|
1252
|
-
\family typewriter
|
1253
|
-
YPetri
|
1254
|
-
\family default
|
1255
|
-
places have their own marking and the transitions make it possible to play
|
1256
|
-
the token game interactively, for many reasons, it is desirable to be able
|
1257
|
-
to execute Petri nets automatically.
|
1258
|
-
|
1259
|
-
\family typewriter
|
1260
|
-
YPetri::Simulation
|
1261
|
-
\family default
|
1262
|
-
class represents such simulations.
|
1263
|
-
|
1264
|
-
\family typewriter
|
1265
|
-
Simulation
|
1266
|
-
\family default
|
1267
|
-
instances do not operate directly on the Petri nets from which they were
|
1268
|
-
constructed.
|
1269
|
-
Instead, they form a representation (
|
1270
|
-
\begin_inset Quotes eld
|
1271
|
-
\end_inset
|
1272
|
-
|
1273
|
-
mental image
|
1274
|
-
\begin_inset Quotes erd
|
1275
|
-
\end_inset
|
1276
|
-
|
1277
|
-
) of the places and transitions of the underlying net.
|
1278
|
-
|
1279
|
-
\family typewriter
|
1280
|
-
Simulation
|
1281
|
-
\family default
|
1282
|
-
instances do not change the state owned by the underlying net.
|
1283
|
-
Instead, they have their own marking vector, which they modify using a
|
1284
|
-
chosen simulation method in the way that simulates firing of the transitions.
|
1285
|
-
A simulation owns multiple parametrized subclasses:
|
1286
|
-
\end_layout
|
1287
|
-
|
1288
|
-
\begin_layout Itemize
|
1289
|
-
|
1290
|
-
\family typewriter
|
1291
|
-
#Place
|
1292
|
-
\family default
|
1293
|
-
– getter of
|
1294
|
-
\family typewriter
|
1295
|
-
@Place
|
1296
|
-
\family default
|
1297
|
-
, a PS of
|
1298
|
-
\family typewriter
|
1299
|
-
Simulation::PlaceRepresentation
|
1300
|
-
\end_layout
|
1301
|
-
|
1302
|
-
\begin_layout Itemize
|
1303
|
-
|
1304
|
-
\family typewriter
|
1305
|
-
#Transition
|
1306
|
-
\family default
|
1307
|
-
– getter of
|
1308
|
-
\family typewriter
|
1309
|
-
@Transition, a
|
1310
|
-
\family default
|
1311
|
-
PS of
|
1312
|
-
\family typewriter
|
1313
|
-
Simulation::TransitionRepresentation
|
1314
|
-
\end_layout
|
1315
|
-
|
1316
|
-
\begin_layout Itemize
|
1317
|
-
|
1318
|
-
\family typewriter
|
1319
|
-
#Places
|
1320
|
-
\family default
|
1321
|
-
– getter of
|
1322
|
-
\family typewriter
|
1323
|
-
@Places
|
1324
|
-
\family default
|
1325
|
-
, a PS of
|
1326
|
-
\family typewriter
|
1327
|
-
Simulation::Places
|
1328
|
-
\family default
|
1329
|
-
, representing a collection of place representations.
|
1330
|
-
\end_layout
|
1331
|
-
|
1332
|
-
\begin_layout Itemize
|
1333
|
-
|
1334
|
-
\family typewriter
|
1335
|
-
#Transitions
|
1336
|
-
\family default
|
1337
|
-
– getter of
|
1338
|
-
\family typewriter
|
1339
|
-
@Transitions
|
1340
|
-
\family default
|
1341
|
-
, a PS of
|
1342
|
-
\family typewriter
|
1343
|
-
Simulation::Transitions
|
1344
|
-
\family default
|
1345
|
-
, representing a collection of place representations.
|
1346
|
-
\end_layout
|
1347
|
-
|
1348
|
-
\begin_layout Itemize
|
1349
|
-
|
1350
|
-
\family typewriter
|
1351
|
-
#Elements
|
1352
|
-
\family default
|
1353
|
-
– getter of
|
1354
|
-
\family typewriter
|
1355
|
-
@Places
|
1356
|
-
\family default
|
1357
|
-
, a PS of
|
1358
|
-
\family typewriter
|
1359
|
-
Simulation::Elements
|
1360
|
-
\family default
|
1361
|
-
, representing a collection of element (either place or transition) representati
|
1362
|
-
ons.
|
1363
|
-
\end_layout
|
1364
|
-
|
1365
|
-
\begin_layout Itemize
|
1366
|
-
|
1367
|
-
\family typewriter
|
1368
|
-
#PlaceMapping
|
1369
|
-
\family default
|
1370
|
-
– getter of
|
1371
|
-
\family typewriter
|
1372
|
-
@PlaceMapping
|
1373
|
-
\family default
|
1374
|
-
, a PS of
|
1375
|
-
\family typewriter
|
1376
|
-
Simulation::PlaceMapping
|
1377
|
-
\family default
|
1378
|
-
, a specialized
|
1379
|
-
\family typewriter
|
1380
|
-
Hash
|
1381
|
-
\family default
|
1382
|
-
that maps the simulation's places to a set of some values.
|
1383
|
-
\end_layout
|
1384
|
-
|
1385
|
-
\begin_layout Itemize
|
1386
|
-
|
1387
|
-
\family typewriter
|
1388
|
-
#InitialMarking
|
1389
|
-
\family default
|
1390
|
-
– getter of
|
1391
|
-
\family typewriter
|
1392
|
-
@InitialMarking
|
1393
|
-
\family default
|
1394
|
-
, a PS of
|
1395
|
-
\family typewriter
|
1396
|
-
Simulation::InitialMarking
|
1397
|
-
\family default
|
1398
|
-
, which in turn is a subclass of
|
1399
|
-
\family typewriter
|
1400
|
-
PlaceMapping
|
1401
|
-
\family default
|
1402
|
-
.
|
1403
|
-
\end_layout
|
1404
|
-
|
1405
|
-
\begin_layout Itemize
|
1406
|
-
|
1407
|
-
\family typewriter
|
1408
|
-
#MarkingClamps
|
1409
|
-
\family default
|
1410
|
-
– getter of
|
1411
|
-
\family typewriter
|
1412
|
-
@MarkingClamps
|
1413
|
-
\family default
|
1414
|
-
, a PS of
|
1415
|
-
\family typewriter
|
1416
|
-
Simulation::MarkingClamps
|
1417
|
-
\family default
|
1418
|
-
, which in turn is a subclass of
|
1419
|
-
\family typewriter
|
1420
|
-
PlaceMapping
|
1421
|
-
\family default
|
1422
|
-
.
|
1423
|
-
\end_layout
|
1424
|
-
|
1425
|
-
\begin_layout Standard
|
1426
|
-
Simulation can be of two types: Timed or timeless.
|
1427
|
-
These two types are defined in two mixins,
|
1428
|
-
\family typewriter
|
1429
|
-
Simulation::Timed
|
1430
|
-
\family default
|
1431
|
-
and
|
1432
|
-
\family typewriter
|
1433
|
-
Simulation::Timeless
|
1434
|
-
\family default
|
1435
|
-
, with which the simulation instance is conditionally extended during its
|
1436
|
-
initialization, depending on its type.
|
1437
|
-
Simulation has a number of specialized instance methods defined in several
|
1438
|
-
mixins located inside the
|
1439
|
-
\family typewriter
|
1440
|
-
Simulation
|
1441
|
-
\family default
|
1442
|
-
namespace (
|
1443
|
-
\family typewriter
|
1444
|
-
Places::Access
|
1445
|
-
\family default
|
1446
|
-
,
|
1447
|
-
\family typewriter
|
1448
|
-
Transitions::Access
|
1449
|
-
\family default
|
1450
|
-
,
|
1451
|
-
\family typewriter
|
1452
|
-
Elements::Access
|
1453
|
-
\family default
|
1454
|
-
,
|
1455
|
-
\family typewriter
|
1456
|
-
InitialMarking::Access
|
1457
|
-
\family default
|
1458
|
-
,
|
1459
|
-
\family typewriter
|
1460
|
-
MarkingClamps::Access
|
1461
|
-
\family default
|
1462
|
-
,
|
1463
|
-
\family typewriter
|
1464
|
-
MarkingVector::Access
|
1465
|
-
\family default
|
1466
|
-
).
|
1467
|
-
You can find their complete listing in the class documentation.
|
1468
|
-
Some of the instance methods are:
|
1469
|
-
\end_layout
|
1470
|
-
|
1471
|
-
\begin_layout Itemize
|
1472
|
-
|
1473
|
-
\family typewriter
|
1474
|
-
#reset!
|
1475
|
-
\family default
|
1476
|
-
– resets the simulation.
|
1477
|
-
\end_layout
|
1478
|
-
|
1479
|
-
\begin_layout Itemize
|
1480
|
-
|
1481
|
-
\family typewriter
|
1482
|
-
#run!
|
1483
|
-
\family default
|
1484
|
-
– runs the simulation.
|
1485
|
-
\end_layout
|
1486
|
-
|
1487
|
-
\begin_layout Itemize
|
1488
|
-
|
1489
|
-
\family typewriter
|
1490
|
-
#run_upto
|
1491
|
-
\family default
|
1492
|
-
– runs the simulation to a given time (same can be achieved by
|
1493
|
-
\begin_inset Quotes eld
|
1494
|
-
\end_inset
|
1495
|
-
|
1496
|
-
|
1497
|
-
\family typewriter
|
1498
|
-
run( upto: ...
|
1499
|
-
)
|
1500
|
-
\family default
|
1501
|
-
|
1502
|
-
\begin_inset Quotes erd
|
1503
|
-
\end_inset
|
1504
|
-
|
1505
|
-
).
|
1506
|
-
\end_layout
|
1507
|
-
|
1508
|
-
\begin_layout Itemize
|
1509
|
-
|
1510
|
-
\family typewriter
|
1511
|
-
#step!
|
1512
|
-
\family default
|
1513
|
-
– steps the simulation.
|
1514
|
-
\end_layout
|
1515
|
-
|
1516
|
-
\begin_layout Itemize
|
1517
|
-
|
1518
|
-
\family typewriter
|
1519
|
-
#settings
|
1520
|
-
\family default
|
1521
|
-
– returns all the settings for this simulation.
|
1522
|
-
\end_layout
|
1523
|
-
|
1524
|
-
\begin_layout Itemize
|
1525
|
-
|
1526
|
-
\family typewriter
|
1527
|
-
#core
|
1528
|
-
\family default
|
1529
|
-
– simulator currently in use.
|
1530
|
-
\end_layout
|
1531
|
-
|
1532
|
-
\begin_layout Itemize
|
1533
|
-
|
1534
|
-
\family typewriter
|
1535
|
-
#recorder
|
1536
|
-
\family default
|
1537
|
-
– recorder instance currently in use.
|
1538
|
-
\end_layout
|
1539
|
-
|
1540
|
-
\begin_layout Itemize
|
1541
|
-
|
1542
|
-
\family typewriter
|
1543
|
-
#tS_SM
|
1544
|
-
\family default
|
1545
|
-
– stoichiometric matrix for tS transitions.
|
1546
|
-
\end_layout
|
1547
|
-
|
1548
|
-
\begin_layout Itemize
|
1549
|
-
|
1550
|
-
\family typewriter
|
1551
|
-
#TS_SM
|
1552
|
-
\family default
|
1553
|
-
– stoichiometric matrix for TS transitions.
|
1554
|
-
\end_layout
|
1555
|
-
|
1556
|
-
\begin_layout Itemize
|
1557
|
-
|
1558
|
-
\family typewriter
|
1559
|
-
#dup
|
1560
|
-
\family default
|
1561
|
-
– duplicate of the receiver simulation, with the possibility to change
|
1562
|
-
time and/or other simulation settings.
|
1563
|
-
\end_layout
|
1564
|
-
|
1565
|
-
\begin_layout Standard
|
1566
|
-
Defined in
|
1567
|
-
\family typewriter
|
1568
|
-
Simulation::Places::Access
|
1569
|
-
\family default
|
1570
|
-
:
|
1571
|
-
\end_layout
|
1572
|
-
|
1573
|
-
\begin_layout Itemize
|
1574
|
-
|
1575
|
-
\family typewriter
|
1576
|
-
#include_place?
|
1577
|
-
\family default
|
1578
|
-
– inquirer whether the simulation includes a specified place.
|
1579
|
-
\end_layout
|
1580
|
-
|
1581
|
-
\begin_layout Itemize
|
1582
|
-
|
1583
|
-
\family typewriter
|
1584
|
-
#p
|
1585
|
-
\family default
|
1586
|
-
– net's place identified by the argument.
|
1587
|
-
\end_layout
|
1588
|
-
|
1589
|
-
\begin_layout Itemize
|
1590
|
-
|
1591
|
-
\family typewriter
|
1592
|
-
#Pp
|
1593
|
-
\family default
|
1594
|
-
– net's places, expects single array argument.
|
1595
|
-
\end_layout
|
1596
|
-
|
1597
|
-
\begin_layout Itemize
|
1598
|
-
|
1599
|
-
\family typewriter
|
1600
|
-
#pp
|
1601
|
-
\family default
|
1602
|
-
– net's places, arbitrary number of arguments.
|
1603
|
-
If called without arguments, returns all the net's places.
|
1604
|
-
\end_layout
|
1605
|
-
|
1606
|
-
\begin_layout Itemize
|
1607
|
-
|
1608
|
-
\family typewriter
|
1609
|
-
#Free_pp
|
1610
|
-
\family default
|
1611
|
-
, alias
|
1612
|
-
\family typewriter
|
1613
|
-
#free_Pp
|
1614
|
-
\family default
|
1615
|
-
– net's free places, single array argument.
|
1616
|
-
\end_layout
|
1617
|
-
|
1618
|
-
\begin_layout Itemize
|
1619
|
-
|
1620
|
-
\family typewriter
|
1621
|
-
#free_pp
|
1622
|
-
\family default
|
1623
|
-
– net's free places, arbitrary number of arguments.
|
1624
|
-
If called without arguments, returns all of them.
|
1625
|
-
\end_layout
|
1626
|
-
|
1627
|
-
\begin_layout Itemize
|
1628
|
-
|
1629
|
-
\family typewriter
|
1630
|
-
#Clamped_pp
|
1631
|
-
\family default
|
1632
|
-
, alias
|
1633
|
-
\family typewriter
|
1634
|
-
#clamped_Pp
|
1635
|
-
\family default
|
1636
|
-
– net's free places, single array argument.
|
1637
|
-
\end_layout
|
1638
|
-
|
1639
|
-
\begin_layout Itemize
|
1640
|
-
|
1641
|
-
\family typewriter
|
1642
|
-
#clamped_pp
|
1643
|
-
\family default
|
1644
|
-
– net's free places, arbitrary number of arguments.
|
1645
|
-
If called without arguments, returns all of them.
|
1646
|
-
\end_layout
|
1647
|
-
|
1648
|
-
\begin_layout Standard
|
1649
|
-
Defined in
|
1650
|
-
\family typewriter
|
1651
|
-
Simulation::Transitions::Access
|
1652
|
-
\family default
|
1653
|
-
:
|
1654
|
-
\end_layout
|
1655
|
-
|
1656
|
-
\begin_layout Itemize
|
1657
|
-
|
1658
|
-
\family typewriter
|
1659
|
-
#include_transition?
|
1660
|
-
\family default
|
1661
|
-
– inquirer whether the simulation includes a specified place.
|
1662
|
-
\end_layout
|
1663
|
-
|
1664
|
-
\begin_layout Itemize
|
1665
|
-
|
1666
|
-
\family typewriter
|
1667
|
-
#t
|
1668
|
-
\family default
|
1669
|
-
– net's transition identified by the argument.
|
1670
|
-
\end_layout
|
1671
|
-
|
1672
|
-
\begin_layout Itemize
|
1673
|
-
|
1674
|
-
\family typewriter
|
1675
|
-
#Tt
|
1676
|
-
\family default
|
1677
|
-
– net's transitions, expects array argument.
|
1678
|
-
\end_layout
|
1679
|
-
|
1680
|
-
\begin_layout Itemize
|
1681
|
-
|
1682
|
-
\family typewriter
|
1683
|
-
#tt
|
1684
|
-
\family default
|
1685
|
-
– net's transitions, arbitrary number of arguments.
|
1686
|
-
\end_layout
|
1687
|
-
|
1688
|
-
\begin_layout Itemize
|
1689
|
-
|
1690
|
-
\family typewriter
|
1691
|
-
#ts_Tt
|
1692
|
-
\family default
|
1693
|
-
,
|
1694
|
-
\family typewriter
|
1695
|
-
#tS_Tt
|
1696
|
-
\family default
|
1697
|
-
,
|
1698
|
-
\family typewriter
|
1699
|
-
#Ts_Tt
|
1700
|
-
\family default
|
1701
|
-
,
|
1702
|
-
\family typewriter
|
1703
|
-
#TS_Tt
|
1704
|
-
\family default
|
1705
|
-
,
|
1706
|
-
\family typewriter
|
1707
|
-
#A_Tt
|
1708
|
-
\family default
|
1709
|
-
etc.
|
1710
|
-
– net's transitions of the specified type.
|
1711
|
-
As signified by capitalized
|
1712
|
-
\begin_inset Quotes eld
|
1713
|
-
\end_inset
|
1714
|
-
|
1715
|
-
|
1716
|
-
\family typewriter
|
1717
|
-
Tt
|
1718
|
-
\family default
|
1719
|
-
|
1720
|
-
\begin_inset Quotes erd
|
1721
|
-
\end_inset
|
1722
|
-
|
1723
|
-
, these methods expects a single array argument.
|
1724
|
-
\end_layout
|
1725
|
-
|
1726
|
-
\begin_layout Itemize
|
1727
|
-
|
1728
|
-
\family typewriter
|
1729
|
-
#ts_tt
|
1730
|
-
\family default
|
1731
|
-
,
|
1732
|
-
\family typewriter
|
1733
|
-
#tS_tt
|
1734
|
-
\family default
|
1735
|
-
,
|
1736
|
-
\family typewriter
|
1737
|
-
#Ts_tt
|
1738
|
-
\family default
|
1739
|
-
,
|
1740
|
-
\family typewriter
|
1741
|
-
#TS_tt
|
1742
|
-
\family default
|
1743
|
-
,
|
1744
|
-
\family typewriter
|
1745
|
-
#A_tt
|
1746
|
-
\family default
|
1747
|
-
etc.
|
1748
|
-
– versions of tnet's transitions of the specified type.
|
1749
|
-
As signified by capitalized
|
1750
|
-
\begin_inset Quotes eld
|
1751
|
-
\end_inset
|
1752
|
-
|
1753
|
-
|
1754
|
-
\family typewriter
|
1755
|
-
Tt
|
1756
|
-
\family default
|
1757
|
-
|
1758
|
-
\begin_inset Quotes erd
|
1759
|
-
\end_inset
|
1760
|
-
|
1761
|
-
, these methods expects a single array argument.
|
1762
|
-
\end_layout
|
1763
|
-
|
1764
|
-
\begin_layout Standard
|
1765
|
-
Defined in
|
1766
|
-
\family typewriter
|
1767
|
-
Simulation::Elements::Access
|
1768
|
-
\family default
|
1769
|
-
(word
|
1770
|
-
\begin_inset Quotes eld
|
1771
|
-
\end_inset
|
1772
|
-
|
1773
|
-
element
|
1774
|
-
\begin_inset Quotes erd
|
1775
|
-
\end_inset
|
1776
|
-
|
1777
|
-
simply stands for etiher place, or transition):
|
1778
|
-
\end_layout
|
1779
|
-
|
1780
|
-
\begin_layout Itemize
|
1781
|
-
|
1782
|
-
\family typewriter
|
1783
|
-
#include?
|
1784
|
-
\family default
|
1785
|
-
– inquirer whether the simulation includes a specified place or transition.
|
1786
|
-
\end_layout
|
1787
|
-
|
1788
|
-
\begin_layout Itemize
|
1789
|
-
|
1790
|
-
\family typewriter
|
1791
|
-
#e
|
1792
|
-
\family default
|
1793
|
-
– net's element identified by the argument.
|
1794
|
-
\end_layout
|
1795
|
-
|
1796
|
-
\begin_layout Itemize
|
1797
|
-
|
1798
|
-
\family typewriter
|
1799
|
-
#Ee
|
1800
|
-
\family default
|
1801
|
-
– net's elements identified by a single array argument.
|
1802
|
-
\end_layout
|
1803
|
-
|
1804
|
-
\begin_layout Itemize
|
1805
|
-
|
1806
|
-
\family typewriter
|
1807
|
-
#ee
|
1808
|
-
\family default
|
1809
|
-
– net's elements, arbitrary number of arguments.
|
1810
|
-
\end_layout
|
1811
|
-
|
1812
|
-
\begin_layout Standard
|
1813
|
-
Defined in
|
1814
|
-
\family typewriter
|
1815
|
-
Simulation::InitialMarking::Access
|
1816
|
-
\family default
|
1817
|
-
:
|
1818
|
-
\end_layout
|
1819
|
-
|
1820
|
-
\begin_layout Itemize
|
1821
|
-
|
1822
|
-
\family typewriter
|
1823
|
-
#Initial_markings
|
1824
|
-
\family default
|
1825
|
-
, alias
|
1826
|
-
\family typewriter
|
1827
|
-
#initial_Markings
|
1828
|
-
\family default
|
1829
|
-
– initial markings of given
|
1830
|
-
\emph on
|
1831
|
-
free
|
1832
|
-
\emph default
|
1833
|
-
places, single array argument.
|
1834
|
-
\end_layout
|
1835
|
-
|
1836
|
-
\begin_layout Itemize
|
1837
|
-
|
1838
|
-
\family typewriter
|
1839
|
-
#initial_markings
|
1840
|
-
\family default
|
1841
|
-
, alias
|
1842
|
-
\family typewriter
|
1843
|
-
#initial_marking
|
1844
|
-
\family default
|
1845
|
-
– initial markings, arbitrary number of arguments identifying free places.
|
1846
|
-
\end_layout
|
1847
|
-
|
1848
|
-
\begin_layout Itemize
|
1849
|
-
|
1850
|
-
\family typewriter
|
1851
|
-
#Im
|
1852
|
-
\family default
|
1853
|
-
– starting markings of an array of
|
1854
|
-
\emph on
|
1855
|
-
any
|
1856
|
-
\emph default
|
1857
|
-
(not just free) places, as they appear right after reset.
|
1858
|
-
Expects a single array argument.
|
1859
|
-
\end_layout
|
1860
|
-
|
1861
|
-
\begin_layout Itemize
|
1862
|
-
|
1863
|
-
\family typewriter
|
1864
|
-
#im
|
1865
|
-
\family default
|
1866
|
-
– starting markings of any places, arbitrary number of arguments.
|
1867
|
-
\end_layout
|
1868
|
-
|
1869
|
-
\begin_layout Standard
|
1870
|
-
Defined in
|
1871
|
-
\family typewriter
|
1872
|
-
Simulation::MarkingClamps::Access
|
1873
|
-
\family default
|
1874
|
-
:
|
1875
|
-
\end_layout
|
1876
|
-
|
1877
|
-
\begin_layout Itemize
|
1878
|
-
|
1879
|
-
\family typewriter
|
1880
|
-
#Marking_clamps
|
1881
|
-
\family default
|
1882
|
-
, alias
|
1883
|
-
\family typewriter
|
1884
|
-
#marking_Clamps
|
1885
|
-
\family default
|
1886
|
-
– marking clamp values of given
|
1887
|
-
\emph on
|
1888
|
-
clamped
|
1889
|
-
\emph default
|
1890
|
-
places, single array argument.
|
1891
|
-
\end_layout
|
1892
|
-
|
1893
|
-
\begin_layout Itemize
|
1894
|
-
|
1895
|
-
\family typewriter
|
1896
|
-
#marking_clamps
|
1897
|
-
\family default
|
1898
|
-
– initial markings, arbitrary number of arguments.
|
1899
|
-
\end_layout
|
1900
|
-
|
1901
|
-
\begin_layout Itemize
|
1902
|
-
|
1903
|
-
\family typewriter
|
1904
|
-
#marking_clamp
|
1905
|
-
\family default
|
1906
|
-
– expects a single clamped place, returns its marking clamp.
|
1907
|
-
\end_layout
|
1908
|
-
|
1909
|
-
\begin_layout Standard
|
1910
|
-
Defined in
|
1911
|
-
\family typewriter
|
1912
|
-
Simulation::MarkingVector::Access
|
1913
|
-
\family default
|
1914
|
-
:
|
1915
|
-
\end_layout
|
1916
|
-
|
1917
|
-
\begin_layout Itemize
|
1918
|
-
|
1919
|
-
\family typewriter
|
1920
|
-
#M_vector
|
1921
|
-
\family default
|
1922
|
-
alias
|
1923
|
-
\family typewriter
|
1924
|
-
#m_Vector
|
1925
|
-
\family default
|
1926
|
-
– marking of the selected places returned as a column vector.
|
1927
|
-
Expects a single array argument.
|
1928
|
-
\end_layout
|
1929
|
-
|
1930
|
-
\begin_layout Itemize
|
1931
|
-
|
1932
|
-
\family typewriter
|
1933
|
-
#state
|
1934
|
-
\family default
|
1935
|
-
– getter of the simulation's state vector (
|
1936
|
-
\family typewriter
|
1937
|
-
@m_vector
|
1938
|
-
\family default
|
1939
|
-
instance variable).
|
1940
|
-
\end_layout
|
1941
|
-
|
1942
|
-
\begin_layout Itemize
|
1943
|
-
|
1944
|
-
\family typewriter
|
1945
|
-
#m_vector
|
1946
|
-
\family default
|
1947
|
-
– marking of the selected places returned as a column vector, any number
|
1948
|
-
of arguments.
|
1949
|
-
\end_layout
|
1950
|
-
|
1951
|
-
\begin_layout Itemize
|
1952
|
-
|
1953
|
-
\family typewriter
|
1954
|
-
#M
|
1955
|
-
\family default
|
1956
|
-
,
|
1957
|
-
\family typewriter
|
1958
|
-
#m
|
1959
|
-
\family default
|
1960
|
-
– array-returning varieties of
|
1961
|
-
\family typewriter
|
1962
|
-
#M_vector
|
1963
|
-
\family default
|
1964
|
-
and
|
1965
|
-
\family typewriter
|
1966
|
-
#m
|
1967
|
-
\family default
|
1968
|
-
.
|
1969
|
-
\end_layout
|
1970
|
-
|
1971
|
-
\begin_layout Itemize
|
1972
|
-
|
1973
|
-
\family typewriter
|
1974
|
-
#p_M
|
1975
|
-
\family default
|
1976
|
-
(alias
|
1977
|
-
\family typewriter
|
1978
|
-
#P_m
|
1979
|
-
\family default
|
1980
|
-
),
|
1981
|
-
\family typewriter
|
1982
|
-
#p_m
|
1983
|
-
\family default
|
1984
|
-
– hash-returning varieties of
|
1985
|
-
\family typewriter
|
1986
|
-
#M_vector
|
1987
|
-
\family default
|
1988
|
-
and
|
1989
|
-
\family typewriter
|
1990
|
-
#m
|
1991
|
-
\family default
|
1992
|
-
.
|
1993
|
-
\end_layout
|
1994
|
-
|
1995
|
-
\begin_layout Itemize
|
1996
|
-
|
1997
|
-
\family typewriter
|
1998
|
-
#Pm
|
1999
|
-
\family default
|
2000
|
-
,
|
2001
|
-
\family typewriter
|
2002
|
-
#pm
|
2003
|
-
\family default
|
2004
|
-
– pretty printing varieties of
|
2005
|
-
\family typewriter
|
2006
|
-
#M_vector
|
2007
|
-
\family default
|
2008
|
-
and
|
2009
|
-
\family typewriter
|
2010
|
-
#m
|
2011
|
-
\family default
|
2012
|
-
.
|
2013
|
-
\end_layout
|
2014
|
-
|
2015
|
-
\begin_layout Standard
|
2016
|
-
Defined in
|
2017
|
-
\family typewriter
|
2018
|
-
Simulation::Timed
|
2019
|
-
\family default
|
2020
|
-
and
|
2021
|
-
\family typewriter
|
2022
|
-
Simulation::Timeless
|
2023
|
-
\family default
|
2024
|
-
mixins:
|
2025
|
-
\end_layout
|
2026
|
-
|
2027
|
-
\begin_layout Itemize
|
2028
|
-
|
2029
|
-
\family typewriter
|
2030
|
-
#timed?
|
2031
|
-
\family default
|
2032
|
-
– inquirer whether the simulation is timed
|
2033
|
-
\end_layout
|
2034
|
-
|
2035
|
-
\begin_layout Itemize
|
2036
|
-
|
2037
|
-
\family typewriter
|
2038
|
-
#Recorder
|
2039
|
-
\family default
|
2040
|
-
– getter of
|
2041
|
-
\family typewriter
|
2042
|
-
@Recorder
|
2043
|
-
\family default
|
2044
|
-
, a PS of
|
2045
|
-
\family typewriter
|
2046
|
-
Petri::Simulation::Recorder
|
2047
|
-
\family default
|
2048
|
-
, an object that performs sampling and recording during simulation.
|
2049
|
-
\end_layout
|
2050
|
-
|
2051
|
-
\begin_layout Itemize
|
2052
|
-
|
2053
|
-
\family typewriter
|
2054
|
-
#Core
|
2055
|
-
\family default
|
2056
|
-
– getter of
|
2057
|
-
\family typewriter
|
2058
|
-
@Core
|
2059
|
-
\family default
|
2060
|
-
, a PS of
|
2061
|
-
\family typewriter
|
2062
|
-
YPetri::Core
|
2063
|
-
\family default
|
2064
|
-
, a machine abstraction class.
|
2065
|
-
\end_layout
|
2066
|
-
|
2067
|
-
\begin_layout Standard
|
2068
|
-
Defined in
|
2069
|
-
\family typewriter
|
2070
|
-
Simulation::Timed
|
2071
|
-
\family default
|
2072
|
-
mixin:
|
2073
|
-
\end_layout
|
2074
|
-
|
2075
|
-
\begin_layout Itemize
|
2076
|
-
|
2077
|
-
\family typewriter
|
2078
|
-
#time
|
2079
|
-
\family default
|
2080
|
-
– current simulation time
|
2081
|
-
\end_layout
|
2082
|
-
|
2083
|
-
\begin_layout Itemize
|
2084
|
-
|
2085
|
-
\family typewriter
|
2086
|
-
#initial_time
|
2087
|
-
\family default
|
2088
|
-
– initial time of the simulation
|
2089
|
-
\end_layout
|
2090
|
-
|
2091
|
-
\begin_layout Itemize
|
2092
|
-
|
2093
|
-
\family typewriter
|
2094
|
-
#target_time
|
2095
|
-
\family default
|
2096
|
-
– target time of the simulation (used when
|
2097
|
-
\family typewriter
|
2098
|
-
#run!
|
2099
|
-
\family default
|
2100
|
-
is called without arguments)
|
2101
|
-
\end_layout
|
2102
|
-
|
2103
|
-
\begin_layout Itemize
|
2104
|
-
|
2105
|
-
\family typewriter
|
2106
|
-
#time_range
|
2107
|
-
\family default
|
2108
|
-
– range-returning alternative for
|
2109
|
-
\family typewriter
|
2110
|
-
#initial_time
|
2111
|
-
\family default
|
2112
|
-
and
|
2113
|
-
\family typewriter
|
2114
|
-
#target_time
|
2115
|
-
\family default
|
2116
|
-
.
|
2117
|
-
\end_layout
|
2118
|
-
|
2119
|
-
\begin_layout Itemize
|
2120
|
-
|
2121
|
-
\family typewriter
|
2122
|
-
#step
|
2123
|
-
\family default
|
2124
|
-
,
|
2125
|
-
\family typewriter
|
2126
|
-
#step=
|
2127
|
-
\family default
|
2128
|
-
– getter and setter of the simulation step size
|
2129
|
-
\end_layout
|
2130
|
-
|
2131
|
-
\begin_layout Itemize
|
2132
|
-
|
2133
|
-
\family typewriter
|
2134
|
-
#default_sampling
|
2135
|
-
\family default
|
2136
|
-
– sampling period for the simulation
|
2137
|
-
\end_layout
|
2138
|
-
|
2139
|
-
\begin_layout Itemize
|
2140
|
-
|
2141
|
-
\family typewriter
|
2142
|
-
#Fluxes
|
2143
|
-
\family default
|
2144
|
-
– takes a single array of TS transitions and returns their fluxes under
|
2145
|
-
current marking.
|
2146
|
-
\end_layout
|
2147
|
-
|
2148
|
-
\begin_layout Itemize
|
2149
|
-
|
2150
|
-
\family typewriter
|
2151
|
-
#fluxes
|
2152
|
-
\family default
|
2153
|
-
, alias
|
2154
|
-
\family typewriter
|
2155
|
-
#flux
|
2156
|
-
\family default
|
2157
|
-
– like
|
2158
|
-
\family typewriter
|
2159
|
-
#Fluxes
|
2160
|
-
\family default
|
2161
|
-
, but takes an arbitrary number of arguments.
|
2162
|
-
If no arguments are supplied, returns all of them.
|
2163
|
-
\end_layout
|
2164
|
-
|
2165
|
-
\begin_layout Itemize
|
2166
|
-
|
2167
|
-
\family typewriter
|
2168
|
-
#T_fluxes
|
2169
|
-
\family default
|
2170
|
-
(alias
|
2171
|
-
\family typewriter
|
2172
|
-
#t_Fluxes
|
2173
|
-
\family default
|
2174
|
-
),
|
2175
|
-
\family typewriter
|
2176
|
-
#t_fluxes
|
2177
|
-
\family default
|
2178
|
-
(alias
|
2179
|
-
\family typewriter
|
2180
|
-
#t_flux
|
2181
|
-
\family default
|
2182
|
-
) – hash-returning varieties of
|
2183
|
-
\family typewriter
|
2184
|
-
#Fluxes
|
2185
|
-
\family default
|
2186
|
-
and
|
2187
|
-
\family typewriter
|
2188
|
-
#fluxes
|
2189
|
-
\family default
|
2190
|
-
.
|
2191
|
-
\end_layout
|
2192
|
-
|
2193
|
-
\begin_layout Itemize
|
2194
|
-
|
2195
|
-
\family typewriter
|
2196
|
-
#pflux
|
2197
|
-
\family default
|
2198
|
-
– pretty-printing variety of
|
2199
|
-
\family typewriter
|
2200
|
-
#t_flux
|
2201
|
-
\family default
|
2202
|
-
.
|
2203
|
-
\end_layout
|
2204
|
-
|
2205
|
-
\begin_layout Standard
|
2206
|
-
The above list of methods is not exhaustive.
|
2207
|
-
For full list of methods and their documentation, see the documentation
|
2208
|
-
of the
|
2209
|
-
\family typewriter
|
2210
|
-
Simulation
|
2211
|
-
\family default
|
2212
|
-
class.
|
2213
|
-
\end_layout
|
2214
|
-
|
2215
|
-
\begin_layout Part*
|
2216
|
-
|
2217
|
-
\family typewriter
|
2218
|
-
Simulation::Recorder
|
2219
|
-
\family default
|
2220
|
-
class
|
2221
|
-
\end_layout
|
2222
|
-
|
2223
|
-
\begin_layout Standard
|
2224
|
-
|
2225
|
-
\family typewriter
|
2226
|
-
YPetri::Simulation::Recorder
|
2227
|
-
\family default
|
2228
|
-
is a class used exclusively as a PS dependent on
|
2229
|
-
\family typewriter
|
2230
|
-
YPetri::Simulation
|
2231
|
-
\family default
|
2232
|
-
instances.
|
2233
|
-
Its has tow key attributes:
|
2234
|
-
\end_layout
|
2235
|
-
|
2236
|
-
\begin_layout Enumerate
|
2237
|
-
|
2238
|
-
\family typewriter
|
2239
|
-
#features
|
2240
|
-
\family default
|
2241
|
-
– getter of
|
2242
|
-
\family typewriter
|
2243
|
-
@features
|
2244
|
-
\family default
|
2245
|
-
, containing the feature set to be recorded.
|
2246
|
-
Its class is a PS of
|
2247
|
-
\family typewriter
|
2248
|
-
Net::State::Features
|
2249
|
-
\family default
|
2250
|
-
.
|
2251
|
-
It can be specified explicitly upon initialization or via
|
2252
|
-
\family typewriter
|
2253
|
-
#reset!
|
2254
|
-
\family default
|
2255
|
-
method.
|
2256
|
-
By default, markings of the free places are used.
|
2257
|
-
\end_layout
|
2258
|
-
|
2259
|
-
\begin_layout Enumerate
|
2260
|
-
|
2261
|
-
\family typewriter
|
2262
|
-
#recording
|
2263
|
-
\family default
|
2264
|
-
– getter of
|
2265
|
-
\family typewriter
|
2266
|
-
@recording
|
2267
|
-
\family default
|
2268
|
-
, containing the recording itself.
|
2269
|
-
Its class is a PS of
|
2270
|
-
\family typewriter
|
2271
|
-
Net::DataSet
|
2272
|
-
\family default
|
2273
|
-
.
|
2274
|
-
\end_layout
|
2275
|
-
|
2276
|
-
\begin_layout Standard
|
2277
|
-
In the course of simulation, the recorder performs sampling: Upon occurence
|
2278
|
-
of certain events, it records the feature set and stores it in the
|
2279
|
-
\family typewriter
|
2280
|
-
@recording
|
2281
|
-
\family default
|
2282
|
-
object.
|
2283
|
-
For timed simulations, events are typically specified by time (
|
2284
|
-
\family typewriter
|
2285
|
-
@next_time
|
2286
|
-
\family default
|
2287
|
-
variable).
|
2288
|
-
Timeless simulations are not handled in the current version of
|
2289
|
-
\family typewriter
|
2290
|
-
YPetri
|
2291
|
-
\family default
|
2292
|
-
, but it can already be said that events will be specified as conditions
|
2293
|
-
defined on the marking vector (
|
2294
|
-
\family typewriter
|
2295
|
-
@next_event
|
2296
|
-
\family default
|
2297
|
-
variable).
|
2298
|
-
Recorder's checking for whether the sampling condition is fulfilled is
|
2299
|
-
triggered by the
|
2300
|
-
\family typewriter
|
2301
|
-
:alert!
|
2302
|
-
\family default
|
2303
|
-
message.
|
2304
|
-
|
2305
|
-
\family typewriter
|
2306
|
-
Recorder.new
|
2307
|
-
\family default
|
2308
|
-
constructor takes the following named arguments:
|
2309
|
-
\end_layout
|
2310
|
-
|
2311
|
-
\begin_layout Itemize
|
2312
|
-
|
2313
|
-
\family typewriter
|
2314
|
-
features:
|
2315
|
-
\family default
|
2316
|
-
the feature set to record.
|
2317
|
-
\end_layout
|
2318
|
-
|
2319
|
-
\begin_layout Itemize
|
2320
|
-
|
2321
|
-
\family typewriter
|
2322
|
-
recording:
|
2323
|
-
\family default
|
2324
|
-
option to plug a pre-constructed dataset to the recorder.
|
2325
|
-
\end_layout
|
2326
|
-
|
2327
|
-
\begin_layout Standard
|
2328
|
-
In timed simulations,
|
2329
|
-
\family typewriter
|
2330
|
-
Recorder.new
|
2331
|
-
\family default
|
2332
|
-
also accepts:
|
2333
|
-
\end_layout
|
2334
|
-
|
2335
|
-
\begin_layout Itemize
|
2336
|
-
|
2337
|
-
\family typewriter
|
2338
|
-
sampling:
|
2339
|
-
\family default
|
2340
|
-
sampling period
|
2341
|
-
\end_layout
|
2342
|
-
|
2343
|
-
\begin_layout Itemize
|
2344
|
-
|
2345
|
-
\family typewriter
|
2346
|
-
next_time:
|
2347
|
-
\family default
|
2348
|
-
the next sampling time
|
2349
|
-
\end_layout
|
2350
|
-
|
2351
|
-
\begin_layout Standard
|
2352
|
-
Important instance methods of
|
2353
|
-
\family typewriter
|
2354
|
-
Recorder
|
2355
|
-
\family default
|
2356
|
-
are:
|
2357
|
-
\end_layout
|
2358
|
-
|
2359
|
-
\begin_layout Itemize
|
2360
|
-
|
2361
|
-
\family typewriter
|
2362
|
-
#new_recording
|
2363
|
-
\family default
|
2364
|
-
– constructs a new recording dependent on
|
2365
|
-
\family typewriter
|
2366
|
-
@features
|
2367
|
-
\family default
|
2368
|
-
.
|
2369
|
-
\end_layout
|
2370
|
-
|
2371
|
-
\begin_layout Itemize
|
2372
|
-
|
2373
|
-
\family typewriter
|
2374
|
-
#reset!
|
2375
|
-
\family default
|
2376
|
-
– resets
|
2377
|
-
\family typewriter
|
2378
|
-
@recording
|
2379
|
-
\family default
|
2380
|
-
and optionally changes
|
2381
|
-
\family typewriter
|
2382
|
-
@features
|
2383
|
-
\family default
|
2384
|
-
.
|
2385
|
-
\end_layout
|
2386
|
-
|
2387
|
-
\begin_layout Itemize
|
2388
|
-
|
2389
|
-
\family typewriter
|
2390
|
-
#alert!
|
2391
|
-
\family default
|
2392
|
-
– recorder expects this message whenever the system state changes.
|
2393
|
-
\end_layout
|
2394
|
-
|
2395
|
-
\begin_layout Itemize
|
2396
|
-
|
2397
|
-
\family typewriter
|
2398
|
-
#sample!
|
2399
|
-
\family default
|
2400
|
-
– private method that performs sampling
|
2401
|
-
\end_layout
|
2402
|
-
|
2403
|
-
\begin_layout Part*
|
2404
|
-
|
2405
|
-
\family typewriter
|
2406
|
-
Core
|
2407
|
-
\family default
|
2408
|
-
class
|
2409
|
-
\end_layout
|
2410
|
-
|
2411
|
-
\begin_layout Standard
|
2412
|
-
|
2413
|
-
\family typewriter
|
2414
|
-
YPetri::Core
|
2415
|
-
\family default
|
2416
|
-
class is the abstraction for the simulator machine.
|
2417
|
-
Originally, it was named
|
2418
|
-
\family typewriter
|
2419
|
-
Simulator
|
2420
|
-
\family default
|
2421
|
-
, but
|
2422
|
-
\family typewriter
|
2423
|
-
Core
|
2424
|
-
\family default
|
2425
|
-
is shorter.
|
2426
|
-
When a
|
2427
|
-
\family typewriter
|
2428
|
-
Simulation
|
2429
|
-
\family default
|
2430
|
-
instance wants to proceed in time to a next state, it relies on a
|
2431
|
-
\family typewriter
|
2432
|
-
Core
|
2433
|
-
\family default
|
2434
|
-
instance to perform the computation.
|
2435
|
-
|
2436
|
-
\family typewriter
|
2437
|
-
Core
|
2438
|
-
\family default
|
2439
|
-
was separated from
|
2440
|
-
\family typewriter
|
2441
|
-
Simulation
|
2442
|
-
\family default
|
2443
|
-
for the purpose of facilitating future use of different machines to run
|
2444
|
-
the simulation.
|
2445
|
-
At the moment, plain Ruby is used to compute the simulation steps.
|
2446
|
-
|
2447
|
-
\family typewriter
|
2448
|
-
Core
|
2449
|
-
\family default
|
2450
|
-
instance is generally not directly controlled by the user.
|
2451
|
-
|
2452
|
-
\family typewriter
|
2453
|
-
Core
|
2454
|
-
\family default
|
2455
|
-
provides certain some basic interface, on which its mixins defining the
|
2456
|
-
different simulation methods rely:
|
2457
|
-
\end_layout
|
2458
|
-
|
2459
|
-
\begin_layout Itemize
|
2460
|
-
|
2461
|
-
\family typewriter
|
2462
|
-
#flux_vector
|
2463
|
-
\family default
|
2464
|
-
– flux vector for the nets with only TS transitions.
|
2465
|
-
\end_layout
|
2466
|
-
|
2467
|
-
\begin_layout Itemize
|
2468
|
-
|
2469
|
-
\family typewriter
|
2470
|
-
#flux_vector_TS
|
2471
|
-
\family default
|
2472
|
-
– for mixed nets, returns flux vector for only TS transitions.
|
2473
|
-
\end_layout
|
2474
|
-
|
2475
|
-
\begin_layout Itemize
|
2476
|
-
|
2477
|
-
\family typewriter
|
2478
|
-
#firing_vector_tS
|
2479
|
-
\family default
|
2480
|
-
– firing vector of tS transitions.
|
2481
|
-
\end_layout
|
2482
|
-
|
2483
|
-
\begin_layout Itemize
|
2484
|
-
|
2485
|
-
\family typewriter
|
2486
|
-
#delta_tS
|
2487
|
-
\family default
|
2488
|
-
– delta state caused by tS transitions.
|
2489
|
-
\end_layout
|
2490
|
-
|
2491
|
-
\begin_layout Itemize
|
2492
|
-
|
2493
|
-
\family typewriter
|
2494
|
-
#delta_ts
|
2495
|
-
\family default
|
2496
|
-
– delta state caused by ts transitions.
|
2497
|
-
\end_layout
|
2498
|
-
|
2499
|
-
\begin_layout Itemize
|
2500
|
-
|
2501
|
-
\family typewriter
|
2502
|
-
#gradient
|
2503
|
-
\family default
|
2504
|
-
– total system gradient for free places.
|
2505
|
-
\end_layout
|
2506
|
-
|
2507
|
-
\begin_layout Itemize
|
2508
|
-
|
2509
|
-
\family typewriter
|
2510
|
-
#gradient_Ts
|
2511
|
-
\family default
|
2512
|
-
– gradient contribution by Ts transitions.
|
2513
|
-
\end_layout
|
2514
|
-
|
2515
|
-
\begin_layout Itemize
|
2516
|
-
|
2517
|
-
\family typewriter
|
2518
|
-
#gradient_TS
|
2519
|
-
\family default
|
2520
|
-
– gradient contribution by TS transitions.
|
2521
|
-
\end_layout
|
2522
|
-
|
2523
|
-
\begin_layout Standard
|
2524
|
-
For the purpose of controlling the marking vector,
|
2525
|
-
\family typewriter
|
2526
|
-
Core
|
2527
|
-
\family default
|
2528
|
-
provides 2 instance methods:
|
2529
|
-
\end_layout
|
2530
|
-
|
2531
|
-
\begin_layout Itemize
|
2532
|
-
|
2533
|
-
\family typewriter
|
2534
|
-
#assignment_transitions_all_fire!
|
2535
|
-
\family default
|
2536
|
-
– fires all A (assignment) transitions.
|
2537
|
-
\end_layout
|
2538
|
-
|
2539
|
-
\begin_layout Itemize
|
2540
|
-
|
2541
|
-
\family typewriter
|
2542
|
-
#increment_marking_vector
|
2543
|
-
\family default
|
2544
|
-
– expects a delta vector of the same size as the marking vector as its
|
2545
|
-
singe argument, and increments the marking vector by it.
|
2546
|
-
\end_layout
|
2547
|
-
|
2548
|
-
\begin_layout Standard
|
2549
|
-
Simulation method mixins take flux, gradient, delta etc., and based on them,
|
2550
|
-
compute the overall delta state, change the marking vector and fire assignment
|
2551
|
-
transitions as defined by the simulation method, alerting the recorder
|
2552
|
-
when the state changes.
|
2553
|
-
At the moment, simulation methods include:
|
2554
|
-
\end_layout
|
2555
|
-
|
2556
|
-
\begin_layout Itemize
|
2557
|
-
|
2558
|
-
\family typewriter
|
2559
|
-
:euler
|
2560
|
-
\family default
|
2561
|
-
– 1st order method for nets with only T (timed) transitions.
|
2562
|
-
Mixin:
|
2563
|
-
\family typewriter
|
2564
|
-
Core::Timed::Euler
|
2565
|
-
\family default
|
2566
|
-
.
|
2567
|
-
\end_layout
|
2568
|
-
|
2569
|
-
\begin_layout Itemize
|
2570
|
-
|
2571
|
-
\family typewriter
|
2572
|
-
:pseudo_euler
|
2573
|
-
\family default
|
2574
|
-
– Euler method adaptation for nets with timeless transitions.
|
2575
|
-
Mixin:
|
2576
|
-
\family typewriter
|
2577
|
-
Core::Timed::PseudoEuler
|
2578
|
-
\family default
|
2579
|
-
.
|
2580
|
-
\end_layout
|
2581
|
-
|
2582
|
-
\begin_layout Itemize
|
2583
|
-
|
2584
|
-
\family typewriter
|
2585
|
-
:gillespie
|
2586
|
-
\family default
|
2587
|
-
– For nets with only T transitions.
|
2588
|
-
Mixin:
|
2589
|
-
\family typewriter
|
2590
|
-
Core::Timed::Gillespie
|
2591
|
-
\family default
|
2592
|
-
.
|
2593
|
-
\end_layout
|
2594
|
-
|
2595
|
-
\begin_layout Itemize
|
2596
|
-
|
2597
|
-
\family typewriter
|
2598
|
-
:runge_kutta
|
2599
|
-
\family default
|
2600
|
-
– 5th order method for nets with only T transitions.
|
2601
|
-
Mixin:
|
2602
|
-
\family typewriter
|
2603
|
-
Core::Timed::RungeKutta
|
2604
|
-
\family default
|
2605
|
-
.
|
2606
|
-
(
|
2607
|
-
\emph on
|
2608
|
-
Not working at the moment!
|
2609
|
-
\emph default
|
2610
|
-
)
|
2611
|
-
\end_layout
|
2612
|
-
|
2613
|
-
\begin_layout Part*
|
2614
|
-
|
2615
|
-
\family typewriter
|
2616
|
-
State
|
2617
|
-
\family default
|
2618
|
-
class
|
2619
|
-
\end_layout
|
2620
|
-
|
2621
|
-
\begin_layout Standard
|
2622
|
-
The state of a Petri net is entirely given by marking of its places.
|
2623
|
-
|
2624
|
-
\family typewriter
|
2625
|
-
Simulation
|
2626
|
-
\family default
|
2627
|
-
instances maintain their own marking vector holding the net state, but
|
2628
|
-
the net instance also has it's own state class, a PS of
|
2629
|
-
\family typewriter
|
2630
|
-
YPetri::Net::State
|
2631
|
-
\family default
|
2632
|
-
<
|
2633
|
-
\family typewriter
|
2634
|
-
Array
|
2635
|
-
\family default
|
2636
|
-
.
|
2637
|
-
|
2638
|
-
\family typewriter
|
2639
|
-
State
|
2640
|
-
\family default
|
2641
|
-
class is thus commonly used as a PS dependent on a
|
2642
|
-
\family typewriter
|
2643
|
-
Net
|
2644
|
-
\family default
|
2645
|
-
instance, whose array positions correspond to the net's places.
|
2646
|
-
This net is available as a public class method on the
|
2647
|
-
\family typewriter
|
2648
|
-
State
|
2649
|
-
\family default
|
2650
|
-
PS:
|
2651
|
-
\end_layout
|
2652
|
-
|
2653
|
-
\begin_layout Itemize
|
2654
|
-
|
2655
|
-
\family typewriter
|
2656
|
-
#net
|
2657
|
-
\family default
|
2658
|
-
– returns the net on which this State PS depends.
|
2659
|
-
\end_layout
|
2660
|
-
|
2661
|
-
\begin_layout Standard
|
2662
|
-
Each such
|
2663
|
-
\family typewriter
|
2664
|
-
State
|
2665
|
-
\family default
|
2666
|
-
PS in turn owns 2 dependent parametrized subclasses:
|
2667
|
-
\end_layout
|
2668
|
-
|
2669
|
-
\begin_layout Itemize
|
2670
|
-
|
2671
|
-
\family typewriter
|
2672
|
-
#Feature
|
2673
|
-
\family default
|
2674
|
-
– getter of
|
2675
|
-
\family typewriter
|
2676
|
-
@Feature
|
2677
|
-
\family default
|
2678
|
-
, containing a PS of
|
2679
|
-
\family typewriter
|
2680
|
-
State::Feature
|
2681
|
-
\family default
|
2682
|
-
.
|
2683
|
-
When called with arguments, acts as alias of
|
2684
|
-
\family typewriter
|
2685
|
-
#feature
|
2686
|
-
\family default
|
2687
|
-
.
|
2688
|
-
\end_layout
|
2689
|
-
|
2690
|
-
\begin_layout Itemize
|
2691
|
-
|
2692
|
-
\family typewriter
|
2693
|
-
#Features
|
2694
|
-
\family default
|
2695
|
-
– getter of
|
2696
|
-
\family typewriter
|
2697
|
-
@Features
|
2698
|
-
\family default
|
2699
|
-
, containing a PS of
|
2700
|
-
\family typewriter
|
2701
|
-
State::Features
|
2702
|
-
\family default
|
2703
|
-
.
|
2704
|
-
When called with a single array argument, this message acts as a feature
|
2705
|
-
set constructor / validator.
|
2706
|
-
\end_layout
|
2707
|
-
|
2708
|
-
\begin_layout Standard
|
2709
|
-
Other public class methods include:
|
2710
|
-
\end_layout
|
2711
|
-
|
2712
|
-
\begin_layout Itemize
|
2713
|
-
|
2714
|
-
\family typewriter
|
2715
|
-
#feature
|
2716
|
-
\family default
|
2717
|
-
–
|
2718
|
-
\family typewriter
|
2719
|
-
@Feature
|
2720
|
-
\family default
|
2721
|
-
instance identifier.
|
2722
|
-
\end_layout
|
2723
|
-
|
2724
|
-
\begin_layout Itemize
|
2725
|
-
|
2726
|
-
\family typewriter
|
2727
|
-
#features
|
2728
|
-
\family default
|
2729
|
-
–
|
2730
|
-
\family typewriter
|
2731
|
-
@Features
|
2732
|
-
\family default
|
2733
|
-
instance constructor.
|
2734
|
-
(See the class documentation for its full description.)
|
2735
|
-
\end_layout
|
2736
|
-
|
2737
|
-
\begin_layout Standard
|
2738
|
-
Instance methods include:
|
2739
|
-
\end_layout
|
2740
|
-
|
2741
|
-
\begin_layout Itemize
|
2742
|
-
|
2743
|
-
\family typewriter
|
2744
|
-
#to_record
|
2745
|
-
\family default
|
2746
|
-
– given clamped places, it returns a
|
2747
|
-
\family typewriter
|
2748
|
-
Record
|
2749
|
-
\family default
|
2750
|
-
instance containing the marking of the free places.
|
2751
|
-
If no set of clamped places is supplied, it is considered empty.
|
2752
|
-
\end_layout
|
2753
|
-
|
2754
|
-
\begin_layout Itemize
|
2755
|
-
|
2756
|
-
\family typewriter
|
2757
|
-
#marking
|
2758
|
-
\family default
|
2759
|
-
– returns the marking of a single given place in this
|
2760
|
-
\family typewriter
|
2761
|
-
State
|
2762
|
-
\family default
|
2763
|
-
instance.
|
2764
|
-
\end_layout
|
2765
|
-
|
2766
|
-
\begin_layout Itemize
|
2767
|
-
|
2768
|
-
\family typewriter
|
2769
|
-
#markings
|
2770
|
-
\family default
|
2771
|
-
– expects an arbitrary number of places, returns a plain array of their
|
2772
|
-
markings.
|
2773
|
-
If no arguments are given, returns all of them.
|
2774
|
-
\end_layout
|
2775
|
-
|
2776
|
-
\begin_layout Part*
|
2777
|
-
|
2778
|
-
\family typewriter
|
2779
|
-
Feature
|
2780
|
-
\family default
|
2781
|
-
class
|
2782
|
-
\end_layout
|
2783
|
-
|
2784
|
-
\begin_layout Standard
|
2785
|
-
A feature defines a measurement which can be performed on a net in some
|
2786
|
-
state to extract the feature's value.
|
2787
|
-
In
|
2788
|
-
\family typewriter
|
2789
|
-
YPetri
|
2790
|
-
\family default
|
2791
|
-
,
|
2792
|
-
\family typewriter
|
2793
|
-
Net::State::Feature
|
2794
|
-
\family default
|
2795
|
-
class is used as a PS dependent on a
|
2796
|
-
\family typewriter
|
2797
|
-
State
|
2798
|
-
\family default
|
2799
|
-
PS (not on a
|
2800
|
-
\family typewriter
|
2801
|
-
State
|
2802
|
-
\family default
|
2803
|
-
instance):
|
2804
|
-
\end_layout
|
2805
|
-
|
2806
|
-
\begin_layout Itemize
|
2807
|
-
|
2808
|
-
\family typewriter
|
2809
|
-
#State
|
2810
|
-
\family default
|
2811
|
-
– the
|
2812
|
-
\family typewriter
|
2813
|
-
State
|
2814
|
-
\family default
|
2815
|
-
PS by which this
|
2816
|
-
\family typewriter
|
2817
|
-
Feature
|
2818
|
-
\family default
|
2819
|
-
PS was parametrized.
|
2820
|
-
\end_layout
|
2821
|
-
|
2822
|
-
\begin_layout Standard
|
2823
|
-
In the present implementation, this class serves as a mother class for more
|
2824
|
-
specialized feature classes:
|
2825
|
-
\family typewriter
|
2826
|
-
Marking
|
2827
|
-
\family default
|
2828
|
-
,
|
2829
|
-
\family typewriter
|
2830
|
-
Firing
|
2831
|
-
\family default
|
2832
|
-
,
|
2833
|
-
\family typewriter
|
2834
|
-
Flux
|
2835
|
-
\family default
|
2836
|
-
,
|
2837
|
-
\family typewriter
|
2838
|
-
Gradient
|
2839
|
-
\family default
|
2840
|
-
,
|
2841
|
-
\family typewriter
|
2842
|
-
Delta
|
2843
|
-
\family default
|
2844
|
-
and
|
2845
|
-
\family typewriter
|
2846
|
-
Assignment
|
2847
|
-
\family default
|
2848
|
-
.
|
2849
|
-
These are defined as
|
2850
|
-
\family typewriter
|
2851
|
-
Feature
|
2852
|
-
\family default
|
2853
|
-
subclasses on the namespace of
|
2854
|
-
\family typewriter
|
2855
|
-
Feature
|
2856
|
-
\family default
|
2857
|
-
itself, but at the same time, a PS of each of them is owned by the Feature
|
2858
|
-
PS:
|
2859
|
-
\end_layout
|
2860
|
-
|
2861
|
-
\begin_layout Itemize
|
2862
|
-
|
2863
|
-
\family typewriter
|
2864
|
-
#Marking
|
2865
|
-
\family default
|
2866
|
-
,
|
2867
|
-
\family typewriter
|
2868
|
-
#Firing
|
2869
|
-
\family default
|
2870
|
-
,
|
2871
|
-
\family typewriter
|
2872
|
-
#Flux
|
2873
|
-
\family default
|
2874
|
-
,
|
2875
|
-
\family typewriter
|
2876
|
-
#Gradient
|
2877
|
-
\family default
|
2878
|
-
,
|
2879
|
-
\family typewriter
|
2880
|
-
#Delta
|
2881
|
-
\family default
|
2882
|
-
,
|
2883
|
-
\family typewriter
|
2884
|
-
#Assignment
|
2885
|
-
\family default
|
2886
|
-
– these public class methods defined on a PS of Feature returns the dependent
|
2887
|
-
parametrized subclasses for the classes of the same name (
|
2888
|
-
\family typewriter
|
2889
|
-
Feature::Marking
|
2890
|
-
\family default
|
2891
|
-
,
|
2892
|
-
\family typewriter
|
2893
|
-
Feature::Firing
|
2894
|
-
\family default
|
2895
|
-
, etc.)
|
2896
|
-
\end_layout
|
2897
|
-
|
2898
|
-
\begin_layout Standard
|
2899
|
-
Instance methods are defined inside these specialized feature subclasses,
|
2900
|
-
such as:
|
2901
|
-
\end_layout
|
2902
|
-
|
2903
|
-
\begin_layout Itemize
|
2904
|
-
|
2905
|
-
\family typewriter
|
2906
|
-
#extract_from
|
2907
|
-
\family default
|
2908
|
-
– extracts the receiver feature from the target object, returning the feature's
|
2909
|
-
value.
|
2910
|
-
\end_layout
|
2911
|
-
|
2912
|
-
\begin_layout Itemize
|
2913
|
-
|
2914
|
-
\family typewriter
|
2915
|
-
#type
|
2916
|
-
\family default
|
2917
|
-
– feature type
|
2918
|
-
\end_layout
|
2919
|
-
|
2920
|
-
\begin_layout Itemize
|
2921
|
-
|
2922
|
-
\family typewriter
|
2923
|
-
#label
|
2924
|
-
\family default
|
2925
|
-
– feature label (for use in graphics etc.)
|
2926
|
-
\end_layout
|
2927
|
-
|
2928
|
-
\begin_layout Part*
|
2929
|
-
|
2930
|
-
\family typewriter
|
2931
|
-
Features
|
2932
|
-
\family default
|
2933
|
-
class – feature set
|
2934
|
-
\end_layout
|
2935
|
-
|
2936
|
-
\begin_layout Standard
|
2937
|
-
A collection of features is called a feature set.
|
2938
|
-
Measurement performed for a particular feature set results in a record.
|
2939
|
-
In
|
2940
|
-
\family typewriter
|
2941
|
-
YPetri
|
2942
|
-
\family default
|
2943
|
-
,
|
2944
|
-
\family typewriter
|
2945
|
-
Net::State::Features
|
2946
|
-
\family default
|
2947
|
-
is a subclass of
|
2948
|
-
\family typewriter
|
2949
|
-
Array
|
2950
|
-
\family default
|
2951
|
-
, representing an array of features.
|
2952
|
-
Originally, it was named
|
2953
|
-
\family typewriter
|
2954
|
-
FeatureSet
|
2955
|
-
\family default
|
2956
|
-
, but
|
2957
|
-
\family typewriter
|
2958
|
-
Features
|
2959
|
-
\family default
|
2960
|
-
is shorter.
|
2961
|
-
It is used as a PS dependent on a
|
2962
|
-
\family typewriter
|
2963
|
-
State
|
2964
|
-
\family default
|
2965
|
-
PS (
|
2966
|
-
\emph on
|
2967
|
-
not
|
2968
|
-
\emph default
|
2969
|
-
on a
|
2970
|
-
\family typewriter
|
2971
|
-
State
|
2972
|
-
\family default
|
2973
|
-
instance).
|
2974
|
-
It's owning
|
2975
|
-
\family typewriter
|
2976
|
-
State
|
2977
|
-
\family default
|
2978
|
-
PS can be accessed via
|
2979
|
-
\family typewriter
|
2980
|
-
#State
|
2981
|
-
\family default
|
2982
|
-
class method.
|
2983
|
-
Such
|
2984
|
-
\family typewriter
|
2985
|
-
Features
|
2986
|
-
\family default
|
2987
|
-
PS in turn owns subclasses of
|
2988
|
-
\family typewriter
|
2989
|
-
Net::State::Features::Record
|
2990
|
-
\family default
|
2991
|
-
and
|
2992
|
-
\family typewriter
|
2993
|
-
Net::Dataset
|
2994
|
-
\family default
|
2995
|
-
, which can be accessed via
|
2996
|
-
\family typewriter
|
2997
|
-
#Record
|
2998
|
-
\family default
|
2999
|
-
and
|
3000
|
-
\family typewriter
|
3001
|
-
#Dataset
|
3002
|
-
\family default
|
3003
|
-
class methods.
|
3004
|
-
Other class methods include:
|
3005
|
-
\end_layout
|
3006
|
-
|
3007
|
-
\begin_layout Itemize
|
3008
|
-
|
3009
|
-
\family typewriter
|
3010
|
-
#Marking
|
3011
|
-
\family default
|
3012
|
-
,
|
3013
|
-
\family typewriter
|
3014
|
-
#Firing
|
3015
|
-
\family default
|
3016
|
-
,
|
3017
|
-
\family typewriter
|
3018
|
-
#Flux
|
3019
|
-
\family default
|
3020
|
-
,
|
3021
|
-
\family typewriter
|
3022
|
-
#Assignment
|
3023
|
-
\family default
|
3024
|
-
– constructors of a set of marking features, accepting single array argument.
|
3025
|
-
\end_layout
|
3026
|
-
|
3027
|
-
\begin_layout Itemize
|
3028
|
-
|
3029
|
-
\family typewriter
|
3030
|
-
#marking
|
3031
|
-
\family default
|
3032
|
-
,
|
3033
|
-
\family typewriter
|
3034
|
-
#firing
|
3035
|
-
\family default
|
3036
|
-
,
|
3037
|
-
\family typewriter
|
3038
|
-
#flux
|
3039
|
-
\family default
|
3040
|
-
,
|
3041
|
-
\family typewriter
|
3042
|
-
#assignment
|
3043
|
-
\family default
|
3044
|
-
– versions of the above constructors, that accept any number of arguments,
|
3045
|
-
and return full corresponding feature sets if no arguments are given.
|
3046
|
-
\end_layout
|
3047
|
-
|
3048
|
-
\begin_layout Itemize
|
3049
|
-
|
3050
|
-
\family typewriter
|
3051
|
-
#Gradient
|
3052
|
-
\family default
|
3053
|
-
– constructor of a set of gradient features, accepting an array and an
|
3054
|
-
optional :transitions named argument.
|
3055
|
-
\end_layout
|
3056
|
-
|
3057
|
-
\begin_layout Itemize
|
3058
|
-
|
3059
|
-
\family typewriter
|
3060
|
-
#gradient
|
3061
|
-
\family default
|
3062
|
-
– version of the above constructor accepting any number of ordered arguments,
|
3063
|
-
and returning full gradient feature set if no ordered arguments are given.
|
3064
|
-
\end_layout
|
3065
|
-
|
3066
|
-
\begin_layout Itemize
|
3067
|
-
|
3068
|
-
\family typewriter
|
3069
|
-
#Delta
|
3070
|
-
\family default
|
3071
|
-
– constructor of a set of delta features, accepting an array and an optional
|
3072
|
-
:transitions named argument.
|
3073
|
-
\end_layout
|
3074
|
-
|
3075
|
-
\begin_layout Itemize
|
3076
|
-
|
3077
|
-
\family typewriter
|
3078
|
-
#delta
|
3079
|
-
\family default
|
3080
|
-
– version of the above constructor accepting any number of ordered arguments,
|
3081
|
-
and returning full delta feature set if no ordered arguments are given.
|
3082
|
-
\end_layout
|
3083
|
-
|
3084
|
-
\begin_layout Itemize
|
3085
|
-
|
3086
|
-
\family typewriter
|
3087
|
-
#[]
|
3088
|
-
\family default
|
3089
|
-
– constructor that takes either an arbitrary number of ordered arguments,
|
3090
|
-
or a field of named arguments (
|
3091
|
-
\family typewriter
|
3092
|
-
:marking
|
3093
|
-
\family default
|
3094
|
-
,
|
3095
|
-
\family typewriter
|
3096
|
-
:firing
|
3097
|
-
\family default
|
3098
|
-
,
|
3099
|
-
\family typewriter
|
3100
|
-
:gradient
|
3101
|
-
\family default
|
3102
|
-
,
|
3103
|
-
\family typewriter
|
3104
|
-
:flux
|
3105
|
-
\family default
|
3106
|
-
,
|
3107
|
-
\family typewriter
|
3108
|
-
:delta
|
3109
|
-
\family default
|
3110
|
-
,
|
3111
|
-
\family typewriter
|
3112
|
-
:assignment
|
3113
|
-
\family default
|
3114
|
-
), identifying a (possibly) mixed set of features.
|
3115
|
-
\end_layout
|
3116
|
-
|
3117
|
-
\begin_layout Standard
|
3118
|
-
Furthermore, class method
|
3119
|
-
\family typewriter
|
3120
|
-
#new
|
3121
|
-
\family default
|
3122
|
-
is tweaked to make the returned instances own a PS of
|
3123
|
-
\family typewriter
|
3124
|
-
Record
|
3125
|
-
\family default
|
3126
|
-
and a PS of
|
3127
|
-
\family typewriter
|
3128
|
-
DataSet
|
3129
|
-
\family default
|
3130
|
-
|
3131
|
-
\emph on
|
3132
|
-
doubly parametrized
|
3133
|
-
\emph default
|
3134
|
-
by the instance.
|
3135
|
-
Therefore, also instance methods include:
|
3136
|
-
\end_layout
|
3137
|
-
|
3138
|
-
\begin_layout Itemize
|
3139
|
-
|
3140
|
-
\family typewriter
|
3141
|
-
#Record
|
3142
|
-
\family default
|
3143
|
-
– a PS of
|
3144
|
-
\family typewriter
|
3145
|
-
Features.Record
|
3146
|
-
\family default
|
3147
|
-
PS parametrized by the
|
3148
|
-
\family typewriter
|
3149
|
-
Features
|
3150
|
-
\family default
|
3151
|
-
instance.
|
3152
|
-
\end_layout
|
3153
|
-
|
3154
|
-
\begin_layout Itemize
|
3155
|
-
|
3156
|
-
\family typewriter
|
3157
|
-
#DataSet
|
3158
|
-
\family default
|
3159
|
-
– a PS of
|
3160
|
-
\family typewriter
|
3161
|
-
Features.DataSet
|
3162
|
-
\family default
|
3163
|
-
PS parametrized by the
|
3164
|
-
\family typewriter
|
3165
|
-
Features
|
3166
|
-
\family default
|
3167
|
-
instance.
|
3168
|
-
\end_layout
|
3169
|
-
|
3170
|
-
\begin_layout Standard
|
3171
|
-
Other instance methods are:
|
3172
|
-
\end_layout
|
3173
|
-
|
3174
|
-
\begin_layout Itemize
|
3175
|
-
|
3176
|
-
\family typewriter
|
3177
|
-
#load
|
3178
|
-
\family default
|
3179
|
-
– delegated to the
|
3180
|
-
\family typewriter
|
3181
|
-
Record
|
3182
|
-
\family default
|
3183
|
-
PS owned by the instance.
|
3184
|
-
\end_layout
|
3185
|
-
|
3186
|
-
\begin_layout Itemize
|
3187
|
-
|
3188
|
-
\family typewriter
|
3189
|
-
#extract_from
|
3190
|
-
\family default
|
3191
|
-
– extracts a feature set from the target object, returning a record.
|
3192
|
-
\end_layout
|
3193
|
-
|
3194
|
-
\begin_layout Itemize
|
3195
|
-
|
3196
|
-
\family typewriter
|
3197
|
-
#Record
|
3198
|
-
\family default
|
3199
|
-
alias
|
3200
|
-
\family typewriter
|
3201
|
-
#load
|
3202
|
-
\family default
|
3203
|
-
– constructs an instance from an array of values.
|
3204
|
-
The values must corresponds to the receiver feature set.
|
3205
|
-
\end_layout
|
3206
|
-
|
3207
|
-
\begin_layout Itemize
|
3208
|
-
|
3209
|
-
\family typewriter
|
3210
|
-
#+
|
3211
|
-
\family default
|
3212
|
-
,
|
3213
|
-
\family typewriter
|
3214
|
-
#-
|
3215
|
-
\family default
|
3216
|
-
,
|
3217
|
-
\family typewriter
|
3218
|
-
#*
|
3219
|
-
\family default
|
3220
|
-
– addition, subtraction,
|
3221
|
-
\family typewriter
|
3222
|
-
Array
|
3223
|
-
\family default
|
3224
|
-
-like multiplication for feature sets.
|
3225
|
-
\end_layout
|
3226
|
-
|
3227
|
-
\begin_layout Itemize
|
3228
|
-
|
3229
|
-
\family typewriter
|
3230
|
-
#labels
|
3231
|
-
\family default
|
3232
|
-
– array of feature labels.
|
3233
|
-
\end_layout
|
3234
|
-
|
3235
|
-
\begin_layout Itemize
|
3236
|
-
|
3237
|
-
\family typewriter
|
3238
|
-
#reduce_features
|
3239
|
-
\family default
|
3240
|
-
– expects an argument identifying a set of features that is a subset of
|
3241
|
-
the receiver feature set, and returns that feature subset.
|
3242
|
-
\end_layout
|
3243
|
-
|
3244
|
-
\begin_layout Itemize
|
3245
|
-
|
3246
|
-
\family typewriter
|
3247
|
-
#Marking
|
3248
|
-
\family default
|
3249
|
-
,
|
3250
|
-
\family typewriter
|
3251
|
-
#Firing
|
3252
|
-
\family default
|
3253
|
-
,
|
3254
|
-
\family typewriter
|
3255
|
-
#Flux
|
3256
|
-
\family default
|
3257
|
-
,
|
3258
|
-
\family typewriter
|
3259
|
-
#Assignment
|
3260
|
-
\family default
|
3261
|
-
– selectors of a subset of the receiver feature set, accepting single array
|
3262
|
-
argument.
|
3263
|
-
\end_layout
|
3264
|
-
|
3265
|
-
\begin_layout Itemize
|
3266
|
-
|
3267
|
-
\family typewriter
|
3268
|
-
#marking
|
3269
|
-
\family default
|
3270
|
-
,
|
3271
|
-
\family typewriter
|
3272
|
-
#firing
|
3273
|
-
\family default
|
3274
|
-
,
|
3275
|
-
\family typewriter
|
3276
|
-
#flux
|
3277
|
-
\family default
|
3278
|
-
,
|
3279
|
-
\family typewriter
|
3280
|
-
#assignment
|
3281
|
-
\family default
|
3282
|
-
– versions of the above selectors, that accept any number of arguments,
|
3283
|
-
and return full corresponding subsets if no arguments given.
|
3284
|
-
\end_layout
|
3285
|
-
|
3286
|
-
\begin_layout Itemize
|
3287
|
-
|
3288
|
-
\family typewriter
|
3289
|
-
#Gradient
|
3290
|
-
\family default
|
3291
|
-
,
|
3292
|
-
\family typewriter
|
3293
|
-
#Delta
|
3294
|
-
\family default
|
3295
|
-
,
|
3296
|
-
\family typewriter
|
3297
|
-
#gradient
|
3298
|
-
\family default
|
3299
|
-
,
|
3300
|
-
\family typewriter
|
3301
|
-
#delta
|
3302
|
-
\family default
|
3303
|
-
– selectors analogical to the above mentioned, but also accepting an optional
|
3304
|
-
named argument
|
3305
|
-
\family typewriter
|
3306
|
-
:transitions
|
3307
|
-
\family default
|
3308
|
-
qualifying the features to select.
|
3309
|
-
\end_layout
|
3310
|
-
|
3311
|
-
\begin_layout Standard
|
3312
|
-
Furthermore,
|
3313
|
-
\family typewriter
|
3314
|
-
:Record
|
3315
|
-
\family default
|
3316
|
-
message is overloaded in such way, that when sent with an argument, it
|
3317
|
-
acts as an alias of
|
3318
|
-
\family typewriter
|
3319
|
-
#load
|
3320
|
-
\family default
|
3321
|
-
record constructor.
|
3322
|
-
\end_layout
|
3323
|
-
|
3324
|
-
\begin_layout Part*
|
3325
|
-
|
3326
|
-
\family typewriter
|
3327
|
-
Record
|
3328
|
-
\family default
|
3329
|
-
class
|
3330
|
-
\end_layout
|
3331
|
-
|
3332
|
-
\begin_layout Standard
|
3333
|
-
A record is basically an array, that remembers the features to which its
|
3334
|
-
values correspond.
|
3335
|
-
|
3336
|
-
\family typewriter
|
3337
|
-
Net::State::Features::Record
|
3338
|
-
\family default
|
3339
|
-
class is typically used as doubly parametrized PS, dependent firstly on
|
3340
|
-
a
|
3341
|
-
\family typewriter
|
3342
|
-
Features
|
3343
|
-
\family default
|
3344
|
-
PS, and then on its particular instance.
|
3345
|
-
The owning feature set is accessible via
|
3346
|
-
\family typewriter
|
3347
|
-
#features
|
3348
|
-
\family default
|
3349
|
-
class and instance method.
|
3350
|
-
Other class methods include:
|
3351
|
-
\end_layout
|
3352
|
-
|
3353
|
-
\begin_layout Itemize
|
3354
|
-
|
3355
|
-
\family typewriter
|
3356
|
-
#load
|
3357
|
-
\family default
|
3358
|
-
– constructs a record from a given collection of values.
|
3359
|
-
\end_layout
|
3360
|
-
|
3361
|
-
\begin_layout Standard
|
3362
|
-
Other instance methods include:
|
3363
|
-
\end_layout
|
3364
|
-
|
3365
|
-
\begin_layout Itemize
|
3366
|
-
|
3367
|
-
\family typewriter
|
3368
|
-
#dump
|
3369
|
-
\family default
|
3370
|
-
– converts the record to a plain array, with optional :precision named
|
3371
|
-
argument.
|
3372
|
-
\end_layout
|
3373
|
-
|
3374
|
-
\begin_layout Itemize
|
3375
|
-
|
3376
|
-
\family typewriter
|
3377
|
-
#print
|
3378
|
-
\family default
|
3379
|
-
– pretty prints the record with feature names.
|
3380
|
-
\end_layout
|
3381
|
-
|
3382
|
-
\begin_layout Itemize
|
3383
|
-
|
3384
|
-
\family typewriter
|
3385
|
-
#fetch
|
3386
|
-
\family default
|
3387
|
-
– returns a feature.
|
3388
|
-
\end_layout
|
3389
|
-
|
3390
|
-
\begin_layout Itemize
|
3391
|
-
|
3392
|
-
\family typewriter
|
3393
|
-
#state
|
3394
|
-
\family default
|
3395
|
-
– constructs a state, using the receiver record, and a set of complementary
|
3396
|
-
marking clamps supplied in the argument.
|
3397
|
-
\end_layout
|
3398
|
-
|
3399
|
-
\begin_layout Itemize
|
3400
|
-
|
3401
|
-
\family typewriter
|
3402
|
-
#reconstruct
|
3403
|
-
\family default
|
3404
|
-
– reconstructs a simulation from the receiver record.
|
3405
|
-
\end_layout
|
3406
|
-
|
3407
|
-
\begin_layout Itemize
|
3408
|
-
|
3409
|
-
\family typewriter
|
3410
|
-
#Marking
|
3411
|
-
\family default
|
3412
|
-
,
|
3413
|
-
\family typewriter
|
3414
|
-
#Firing
|
3415
|
-
\family default
|
3416
|
-
,
|
3417
|
-
\family typewriter
|
3418
|
-
#Flux
|
3419
|
-
\family default
|
3420
|
-
,
|
3421
|
-
\family typewriter
|
3422
|
-
#Assignment
|
3423
|
-
\family default
|
3424
|
-
– selects the values of the specified feature subsets from the receiver
|
3425
|
-
record.
|
3426
|
-
Expects a single array-type argument.
|
3427
|
-
\end_layout
|
3428
|
-
|
3429
|
-
\begin_layout Itemize
|
3430
|
-
|
3431
|
-
\family typewriter
|
3432
|
-
#marking
|
3433
|
-
\family default
|
3434
|
-
,
|
3435
|
-
\family typewriter
|
3436
|
-
#firing
|
3437
|
-
\family default
|
3438
|
-
,
|
3439
|
-
\family typewriter
|
3440
|
-
#flux
|
3441
|
-
\family default
|
3442
|
-
,
|
3443
|
-
\family typewriter
|
3444
|
-
#assignment
|
3445
|
-
\family default
|
3446
|
-
– the versions of the above methods accepting any number of feature-identifying
|
3447
|
-
arguments.
|
3448
|
-
\end_layout
|
3449
|
-
|
3450
|
-
\begin_layout Itemize
|
3451
|
-
|
3452
|
-
\family typewriter
|
3453
|
-
#Gradient
|
3454
|
-
\family default
|
3455
|
-
,
|
3456
|
-
\family typewriter
|
3457
|
-
#Delta
|
3458
|
-
\family default
|
3459
|
-
,
|
3460
|
-
\family typewriter
|
3461
|
-
#gradient
|
3462
|
-
\family default
|
3463
|
-
,
|
3464
|
-
\family typewriter
|
3465
|
-
#delta
|
3466
|
-
\family default
|
3467
|
-
– selectors analogical to the above mentioned, but also accepting an optional
|
3468
|
-
named argument
|
3469
|
-
\family typewriter
|
3470
|
-
:transitions
|
3471
|
-
\family default
|
3472
|
-
qualifying the features to select.
|
3473
|
-
\end_layout
|
3474
|
-
|
3475
|
-
\begin_layout Itemize
|
3476
|
-
|
3477
|
-
\family typewriter
|
3478
|
-
#euclidean_distance
|
3479
|
-
\family default
|
3480
|
-
– takes another record of the same feature set as an argument and computes
|
3481
|
-
the Euclidean distance to it.
|
3482
|
-
\end_layout
|
3483
|
-
|
3484
|
-
\begin_layout Part*
|
3485
|
-
|
3486
|
-
\family typewriter
|
3487
|
-
DataSet
|
3488
|
-
\family default
|
3489
|
-
class
|
3490
|
-
\end_layout
|
3491
|
-
|
3492
|
-
\begin_layout Standard
|
3493
|
-
|
3494
|
-
\family typewriter
|
3495
|
-
YPetri::Net::DataSet
|
3496
|
-
\family default
|
3497
|
-
represents a sequence of records sampled from the underlying net using
|
3498
|
-
certain feature set.
|
3499
|
-
It is a subclass of
|
3500
|
-
\family typewriter
|
3501
|
-
Hash
|
3502
|
-
\family default
|
3503
|
-
, whose keys represent sampling events, and whose values are plain arrays,
|
3504
|
-
from which corresponding
|
3505
|
-
\family typewriter
|
3506
|
-
Record
|
3507
|
-
\family default
|
3508
|
-
instances can be fully reconstructed (via
|
3509
|
-
\family typewriter
|
3510
|
-
Record.load
|
3511
|
-
\family default
|
3512
|
-
method).
|
3513
|
-
It is typically used as doubly parametrized PS, dependent firstly on a
|
3514
|
-
|
3515
|
-
\family typewriter
|
3516
|
-
Features
|
3517
|
-
\family default
|
3518
|
-
PS, and then on its particular instance.
|
3519
|
-
The owning feature set is accessible via
|
3520
|
-
\family typewriter
|
3521
|
-
#features
|
3522
|
-
\family default
|
3523
|
-
class and instance method.
|
3524
|
-
Other class methods include:
|
3525
|
-
\end_layout
|
3526
|
-
|
3527
|
-
\begin_layout Itemize
|
3528
|
-
|
3529
|
-
\family typewriter
|
3530
|
-
#events
|
3531
|
-
\family default
|
3532
|
-
– alias for
|
3533
|
-
\family typewriter
|
3534
|
-
Hash#keys
|
3535
|
-
\family default
|
3536
|
-
– dataset keys represent sampling events.
|
3537
|
-
\end_layout
|
3538
|
-
|
3539
|
-
\begin_layout Itemize
|
3540
|
-
|
3541
|
-
\family typewriter
|
3542
|
-
#reduce_features
|
3543
|
-
\family default
|
3544
|
-
– selects certain columns (features) of a dataset.
|
3545
|
-
\end_layout
|
3546
|
-
|
3547
|
-
\begin_layout Itemize
|
3548
|
-
|
3549
|
-
\family typewriter
|
3550
|
-
#timed?
|
3551
|
-
\family default
|
3552
|
-
– inquirer whether the dataset is timed
|
3553
|
-
\end_layout
|
3554
|
-
|
3555
|
-
\begin_layout Itemize
|
3556
|
-
|
3557
|
-
\family typewriter
|
3558
|
-
#record
|
3559
|
-
\family default
|
3560
|
-
– reconstructs the
|
3561
|
-
\family typewriter
|
3562
|
-
Record
|
3563
|
-
\family default
|
3564
|
-
instance corresponding to the given event.
|
3565
|
-
\end_layout
|
3566
|
-
|
3567
|
-
\begin_layout Itemize
|
3568
|
-
|
3569
|
-
\family typewriter
|
3570
|
-
#floor
|
3571
|
-
\family default
|
3572
|
-
– the nearest event smaller or equal to the argument.
|
3573
|
-
\end_layout
|
3574
|
-
|
3575
|
-
\begin_layout Itemize
|
3576
|
-
|
3577
|
-
\family typewriter
|
3578
|
-
#ceiling
|
3579
|
-
\family default
|
3580
|
-
– the nearest event greater or equal than the argument.
|
3581
|
-
\end_layout
|
3582
|
-
|
3583
|
-
\begin_layout Itemize
|
3584
|
-
|
3585
|
-
\family typewriter
|
3586
|
-
#records
|
3587
|
-
\family default
|
3588
|
-
– returns an array of
|
3589
|
-
\family typewriter
|
3590
|
-
Record
|
3591
|
-
\family default
|
3592
|
-
instances revived from the receiver's values.
|
3593
|
-
\end_layout
|
3594
|
-
|
3595
|
-
\begin_layout Itemize
|
3596
|
-
|
3597
|
-
\family typewriter
|
3598
|
-
#reconstruct
|
3599
|
-
\family default
|
3600
|
-
– recreates the simulation at the given event.
|
3601
|
-
\end_layout
|
3602
|
-
|
3603
|
-
\begin_layout Itemize
|
3604
|
-
|
3605
|
-
\family typewriter
|
3606
|
-
#interpolate
|
3607
|
-
\family default
|
3608
|
-
– interpolates the recording at the given point (event).
|
3609
|
-
Return value is the Record class instance.
|
3610
|
-
\end_layout
|
3611
|
-
|
3612
|
-
\begin_layout Itemize
|
3613
|
-
|
3614
|
-
\family typewriter
|
3615
|
-
#resample
|
3616
|
-
\family default
|
3617
|
-
– resamples the recording.
|
3618
|
-
\end_layout
|
3619
|
-
|
3620
|
-
\begin_layout Itemize
|
3621
|
-
|
3622
|
-
\family typewriter
|
3623
|
-
#distance
|
3624
|
-
\family default
|
3625
|
-
– computes the distance to another dataset.
|
3626
|
-
\end_layout
|
3627
|
-
|
3628
|
-
\begin_layout Itemize
|
3629
|
-
|
3630
|
-
\family typewriter
|
3631
|
-
#series
|
3632
|
-
\family default
|
3633
|
-
– returns the data series for the specified features.
|
3634
|
-
\end_layout
|
3635
|
-
|
3636
|
-
\begin_layout Itemize
|
3637
|
-
|
3638
|
-
\family typewriter
|
3639
|
-
#reduce_features
|
3640
|
-
\family default
|
3641
|
-
– reduces the dataset into another dataset with a different set of features.
|
3642
|
-
Reduction to a subset of features is always possible.
|
3643
|
-
Reduction to a set of features that is not a subset of the receiver's set
|
3644
|
-
of features is only possible if the former can be inferred from the latter.
|
3645
|
-
Generally, this is the case if net state can be reconstructed from a receiver's
|
3646
|
-
record.
|
3647
|
-
From this net state, the desired new feature set is then extracted.
|
3648
|
-
\end_layout
|
3649
|
-
|
3650
|
-
\begin_layout Itemize
|
3651
|
-
|
3652
|
-
\family typewriter
|
3653
|
-
#Marking
|
3654
|
-
\family default
|
3655
|
-
,
|
3656
|
-
\family typewriter
|
3657
|
-
#Firing
|
3658
|
-
\family default
|
3659
|
-
,
|
3660
|
-
\family typewriter
|
3661
|
-
#Flux
|
3662
|
-
\family default
|
3663
|
-
,
|
3664
|
-
\family typewriter
|
3665
|
-
#Assignment
|
3666
|
-
\family default
|
3667
|
-
– selects the values of the specified feature subsets from the receiver
|
3668
|
-
record.
|
3669
|
-
Expects a single array-type argument.
|
3670
|
-
\end_layout
|
3671
|
-
|
3672
|
-
\begin_layout Itemize
|
3673
|
-
|
3674
|
-
\family typewriter
|
3675
|
-
#marking
|
3676
|
-
\family default
|
3677
|
-
,
|
3678
|
-
\family typewriter
|
3679
|
-
#firing
|
3680
|
-
\family default
|
3681
|
-
,
|
3682
|
-
\family typewriter
|
3683
|
-
#flux
|
3684
|
-
\family default
|
3685
|
-
,
|
3686
|
-
\family typewriter
|
3687
|
-
#assignment
|
3688
|
-
\family default
|
3689
|
-
– the versions of the above methods accepting any number of feature-identifying
|
3690
|
-
arguments.
|
3691
|
-
\end_layout
|
3692
|
-
|
3693
|
-
\begin_layout Itemize
|
3694
|
-
|
3695
|
-
\family typewriter
|
3696
|
-
#Gradient
|
3697
|
-
\family default
|
3698
|
-
,
|
3699
|
-
\family typewriter
|
3700
|
-
#Delta
|
3701
|
-
\family default
|
3702
|
-
,
|
3703
|
-
\family typewriter
|
3704
|
-
#gradient
|
3705
|
-
\family default
|
3706
|
-
,
|
3707
|
-
\family typewriter
|
3708
|
-
#delta
|
3709
|
-
\family default
|
3710
|
-
– selectors analogical to the above mentioned, but also accepting an optional
|
3711
|
-
named argument
|
3712
|
-
\family typewriter
|
3713
|
-
:transitions
|
3714
|
-
\family default
|
3715
|
-
qualifying the features to select.
|
3716
|
-
\end_layout
|
3717
|
-
|
3718
|
-
\begin_layout Itemize
|
3719
|
-
|
3720
|
-
\family typewriter
|
3721
|
-
#to_csv
|
3722
|
-
\family default
|
3723
|
-
– outputs the dataset in the CSV format.
|
3724
|
-
\end_layout
|
3725
|
-
|
3726
|
-
\begin_layout Itemize
|
3727
|
-
|
3728
|
-
\family typewriter
|
3729
|
-
#plot
|
3730
|
-
\family default
|
3731
|
-
– plots the dataset.
|
3732
|
-
\end_layout
|
3733
|
-
|
3734
|
-
\begin_layout Part*
|
3735
|
-
|
3736
|
-
\family typewriter
|
3737
|
-
Agent
|
3738
|
-
\family default
|
3739
|
-
class
|
3740
|
-
\end_layout
|
3741
|
-
|
3742
|
-
\begin_layout Standard
|
3743
|
-
|
3744
|
-
\family typewriter
|
3745
|
-
YPetri::Agent
|
3746
|
-
\family default
|
3747
|
-
/
|
3748
|
-
\family typewriter
|
3749
|
-
YNelson::Agent
|
3750
|
-
\family default
|
3751
|
-
are dumb agents that represent and assist the user.
|
3752
|
-
Originally, this class was named
|
3753
|
-
\family typewriter
|
3754
|
-
Manipulator
|
3755
|
-
\family default
|
3756
|
-
, but
|
3757
|
-
\family typewriter
|
3758
|
-
Agent
|
3759
|
-
\family default
|
3760
|
-
is shorter.
|
3761
|
-
|
3762
|
-
\family typewriter
|
3763
|
-
Agent
|
3764
|
-
\family default
|
3765
|
-
does provide textual user interface, but it does not completely encapsulate
|
3766
|
-
|
3767
|
-
\family typewriter
|
3768
|
-
YPetri
|
3769
|
-
\family default
|
3770
|
-
(
|
3771
|
-
\family typewriter
|
3772
|
-
YNelson
|
3773
|
-
\family default
|
3774
|
-
) interface.
|
3775
|
-
Rather, it defines a number of top-level DSL commands (methods) available
|
3776
|
-
upon calling '
|
3777
|
-
\family typewriter
|
3778
|
-
include YPetri
|
3779
|
-
\family default
|
3780
|
-
' / '
|
3781
|
-
\family typewriter
|
3782
|
-
include YNelson
|
3783
|
-
\family default
|
3784
|
-
'.
|
3785
|
-
|
3786
|
-
\family typewriter
|
3787
|
-
Agent
|
3788
|
-
\family default
|
3789
|
-
is not a part of the core object model of
|
3790
|
-
\family typewriter
|
3791
|
-
YPetri
|
3792
|
-
\family default
|
3793
|
-
/
|
3794
|
-
\family typewriter
|
3795
|
-
YNelson
|
3796
|
-
\family default
|
3797
|
-
, and it is hotter than other parts of
|
3798
|
-
\family typewriter
|
3799
|
-
YPetri
|
3800
|
-
\family default
|
3801
|
-
/
|
3802
|
-
\family typewriter
|
3803
|
-
YNelson
|
3804
|
-
\family default
|
3805
|
-
.
|
3806
|
-
For basic use, see the tutorial (
|
3807
|
-
\begin_inset Quotes eld
|
3808
|
-
\end_inset
|
3809
|
-
|
3810
|
-
Introduction to
|
3811
|
-
\family typewriter
|
3812
|
-
YNelson
|
3813
|
-
\family default
|
3814
|
-
|
3815
|
-
\begin_inset Quotes erd
|
3816
|
-
\end_inset
|
3817
|
-
|
3818
|
-
).
|
3819
|
-
For detailed description of
|
3820
|
-
\family typewriter
|
3821
|
-
Agent
|
3822
|
-
\family default
|
3823
|
-
's assets, see the class documentation.
|
3824
|
-
\end_layout
|
3825
|
-
|
3826
|
-
\begin_layout LyX-Code
|
3827
|
-
|
3828
|
-
\end_layout
|
3829
|
-
|
3830
|
-
\begin_layout LyX-Code
|
3831
|
-
\begin_inset CommandInset bibtex
|
3832
|
-
LatexCommand bibtex
|
3833
|
-
bibfiles "/home/boris/b/8oav/hos/hos"
|
3834
|
-
options "plainnat"
|
3835
|
-
|
3836
|
-
\end_inset
|
3837
|
-
|
3838
|
-
|
3839
|
-
\end_layout
|
3840
|
-
|
3841
|
-
\end_body
|
3842
|
-
\end_document
|