y_petri 2.4.8 → 2.4.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3837 @@
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 YPetri and YNelson
78
+ \end_layout
79
+
80
+ \begin_layout Part*
81
+
82
+ \family typewriter
83
+ YPetri
84
+ \family default
85
+ and
86
+ \family typewriter
87
+ YNelson
88
+ \end_layout
89
+
90
+ \begin_layout Standard
91
+
92
+ \family typewriter
93
+ \color blue
94
+ YPetri
95
+ \family default
96
+ \color inherit
97
+ is a Ruby library (gem) for specification and simulation of Petri nets.
98
+
99
+ \family typewriter
100
+ \color blue
101
+ YNelson
102
+ \family default
103
+ \color inherit
104
+ is a gem for specification and simulation of
105
+ \emph on
106
+ \color green
107
+ Nelson nets
108
+ \emph default
109
+ \color inherit
110
+ .
111
+ A
112
+ \emph on
113
+ \color green
114
+ Nelson net
115
+ \emph default
116
+ \color inherit
117
+ is a cross between a
118
+ \emph on
119
+ Petri net
120
+ \emph default
121
+ , and a
122
+ \emph on
123
+ \color green
124
+ ZZ structure
125
+ \emph default
126
+ \color inherit
127
+ .
128
+ For formal definition of the ZZ structure, see
129
+ \begin_inset CommandInset citation
130
+ LatexCommand citet
131
+ key "Dattolo2009fdz"
132
+
133
+ \end_inset
134
+
135
+ .
136
+ Apart from
137
+ \family typewriter
138
+ YPetri
139
+ \family default
140
+ providing Petri nets,
141
+ \family typewriter
142
+ YNelson
143
+ \family default
144
+ has another dependency:
145
+ \family typewriter
146
+ \color blue
147
+ Yzz
148
+ \family default
149
+ \color inherit
150
+ gem that provides ZZ structures.
151
+ At the moment,
152
+ \family typewriter
153
+ YNelson
154
+ \family default
155
+ presents almost the same interface (up to minor extensions) as
156
+ \family typewriter
157
+ YPetri
158
+ \family default
159
+ and this document is applicable to both.
160
+ \end_layout
161
+
162
+ \begin_layout Standard
163
+ You should also take a look at the tutorial,
164
+ \emph on
165
+ Introduction_to_YPetri_and_YNelson
166
+ \emph default
167
+ .
168
+ Unlike the tutorial, which focuses on giving the basic usage examples,
169
+ this document attempts somewhat more exhaustive description of
170
+ \family typewriter
171
+ YPetri
172
+ \family default
173
+ object model.
174
+ For
175
+ \family typewriter
176
+ YPetri
177
+ \family default
178
+ /
179
+ \family typewriter
180
+ YNelson
181
+ \family default
182
+ , you need to have Ruby 2.3 or newer installed on your computer.
183
+ Afterwards, you can install both gems and their dependencies by typing
184
+
185
+ \family typewriter
186
+ gem install y_nelson
187
+ \family default
188
+ in your command prompt.
189
+ (
190
+ \family typewriter
191
+ YPetri
192
+ \family default
193
+ and its 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
+ – 4th order method for nets with only T transitions.
2601
+ Mixin:
2602
+ \family typewriter
2603
+ Core::Timed::RungeKutta
2604
+ \family default
2605
+ .
2606
+ \end_layout
2607
+
2608
+ \begin_layout Part*
2609
+
2610
+ \family typewriter
2611
+ State
2612
+ \family default
2613
+ class
2614
+ \end_layout
2615
+
2616
+ \begin_layout Standard
2617
+ The state of a Petri net is entirely given by marking of its places.
2618
+
2619
+ \family typewriter
2620
+ Simulation
2621
+ \family default
2622
+ instances maintain their own marking vector holding the net state, but
2623
+ the net instance also has it's own state class, a PS of
2624
+ \family typewriter
2625
+ YPetri::Net::State
2626
+ \family default
2627
+ <
2628
+ \family typewriter
2629
+ Array
2630
+ \family default
2631
+ .
2632
+
2633
+ \family typewriter
2634
+ State
2635
+ \family default
2636
+ class is thus commonly used as a PS dependent on a
2637
+ \family typewriter
2638
+ Net
2639
+ \family default
2640
+ instance, whose array positions correspond to the net's places.
2641
+ This net is available as a public class method on the
2642
+ \family typewriter
2643
+ State
2644
+ \family default
2645
+ PS:
2646
+ \end_layout
2647
+
2648
+ \begin_layout Itemize
2649
+
2650
+ \family typewriter
2651
+ #net
2652
+ \family default
2653
+ – returns the net on which this State PS depends.
2654
+ \end_layout
2655
+
2656
+ \begin_layout Standard
2657
+ Each such
2658
+ \family typewriter
2659
+ State
2660
+ \family default
2661
+ PS in turn owns 2 dependent parametrized subclasses:
2662
+ \end_layout
2663
+
2664
+ \begin_layout Itemize
2665
+
2666
+ \family typewriter
2667
+ #Feature
2668
+ \family default
2669
+ – getter of
2670
+ \family typewriter
2671
+ @Feature
2672
+ \family default
2673
+ , containing a PS of
2674
+ \family typewriter
2675
+ State::Feature
2676
+ \family default
2677
+ .
2678
+ When called with arguments, acts as alias of
2679
+ \family typewriter
2680
+ #feature
2681
+ \family default
2682
+ .
2683
+ \end_layout
2684
+
2685
+ \begin_layout Itemize
2686
+
2687
+ \family typewriter
2688
+ #Features
2689
+ \family default
2690
+ – getter of
2691
+ \family typewriter
2692
+ @Features
2693
+ \family default
2694
+ , containing a PS of
2695
+ \family typewriter
2696
+ State::Features
2697
+ \family default
2698
+ .
2699
+ When called with a single array argument, this message acts as a feature
2700
+ set constructor / validator.
2701
+ \end_layout
2702
+
2703
+ \begin_layout Standard
2704
+ Other public class methods include:
2705
+ \end_layout
2706
+
2707
+ \begin_layout Itemize
2708
+
2709
+ \family typewriter
2710
+ #feature
2711
+ \family default
2712
+
2713
+ \family typewriter
2714
+ @Feature
2715
+ \family default
2716
+ instance identifier.
2717
+ \end_layout
2718
+
2719
+ \begin_layout Itemize
2720
+
2721
+ \family typewriter
2722
+ #features
2723
+ \family default
2724
+
2725
+ \family typewriter
2726
+ @Features
2727
+ \family default
2728
+ instance constructor.
2729
+ (See the class documentation for its full description.)
2730
+ \end_layout
2731
+
2732
+ \begin_layout Standard
2733
+ Instance methods include:
2734
+ \end_layout
2735
+
2736
+ \begin_layout Itemize
2737
+
2738
+ \family typewriter
2739
+ #to_record
2740
+ \family default
2741
+ – given clamped places, it returns a
2742
+ \family typewriter
2743
+ Record
2744
+ \family default
2745
+ instance containing the marking of the free places.
2746
+ If no set of clamped places is supplied, it is considered empty.
2747
+ \end_layout
2748
+
2749
+ \begin_layout Itemize
2750
+
2751
+ \family typewriter
2752
+ #marking
2753
+ \family default
2754
+ – returns the marking of a single given place in this
2755
+ \family typewriter
2756
+ State
2757
+ \family default
2758
+ instance.
2759
+ \end_layout
2760
+
2761
+ \begin_layout Itemize
2762
+
2763
+ \family typewriter
2764
+ #markings
2765
+ \family default
2766
+ – expects an arbitrary number of places, returns a plain array of their
2767
+ markings.
2768
+ If no arguments are given, returns all of them.
2769
+ \end_layout
2770
+
2771
+ \begin_layout Part*
2772
+
2773
+ \family typewriter
2774
+ Feature
2775
+ \family default
2776
+ class
2777
+ \end_layout
2778
+
2779
+ \begin_layout Standard
2780
+ A feature defines a measurement which can be performed on a net in some
2781
+ state to extract the feature's value.
2782
+ In
2783
+ \family typewriter
2784
+ YPetri
2785
+ \family default
2786
+ ,
2787
+ \family typewriter
2788
+ Net::State::Feature
2789
+ \family default
2790
+ class is used as a PS dependent on a
2791
+ \family typewriter
2792
+ State
2793
+ \family default
2794
+ PS (not on a
2795
+ \family typewriter
2796
+ State
2797
+ \family default
2798
+ instance):
2799
+ \end_layout
2800
+
2801
+ \begin_layout Itemize
2802
+
2803
+ \family typewriter
2804
+ #State
2805
+ \family default
2806
+ – the
2807
+ \family typewriter
2808
+ State
2809
+ \family default
2810
+ PS by which this
2811
+ \family typewriter
2812
+ Feature
2813
+ \family default
2814
+ PS was parametrized.
2815
+ \end_layout
2816
+
2817
+ \begin_layout Standard
2818
+ In the present implementation, this class serves as a mother class for more
2819
+ specialized feature classes:
2820
+ \family typewriter
2821
+ Marking
2822
+ \family default
2823
+ ,
2824
+ \family typewriter
2825
+ Firing
2826
+ \family default
2827
+ ,
2828
+ \family typewriter
2829
+ Flux
2830
+ \family default
2831
+ ,
2832
+ \family typewriter
2833
+ Gradient
2834
+ \family default
2835
+ ,
2836
+ \family typewriter
2837
+ Delta
2838
+ \family default
2839
+ and
2840
+ \family typewriter
2841
+ Assignment
2842
+ \family default
2843
+ .
2844
+ These are defined as
2845
+ \family typewriter
2846
+ Feature
2847
+ \family default
2848
+ subclasses on the namespace of
2849
+ \family typewriter
2850
+ Feature
2851
+ \family default
2852
+ itself, but at the same time, a PS of each of them is owned by the Feature
2853
+ PS:
2854
+ \end_layout
2855
+
2856
+ \begin_layout Itemize
2857
+
2858
+ \family typewriter
2859
+ #Marking
2860
+ \family default
2861
+ ,
2862
+ \family typewriter
2863
+ #Firing
2864
+ \family default
2865
+ ,
2866
+ \family typewriter
2867
+ #Flux
2868
+ \family default
2869
+ ,
2870
+ \family typewriter
2871
+ #Gradient
2872
+ \family default
2873
+ ,
2874
+ \family typewriter
2875
+ #Delta
2876
+ \family default
2877
+ ,
2878
+ \family typewriter
2879
+ #Assignment
2880
+ \family default
2881
+ – these public class methods defined on a PS of Feature returns the dependent
2882
+ parametrized subclasses for the classes of the same name (
2883
+ \family typewriter
2884
+ Feature::Marking
2885
+ \family default
2886
+ ,
2887
+ \family typewriter
2888
+ Feature::Firing
2889
+ \family default
2890
+ , etc.)
2891
+ \end_layout
2892
+
2893
+ \begin_layout Standard
2894
+ Instance methods are defined inside these specialized feature subclasses,
2895
+ such as:
2896
+ \end_layout
2897
+
2898
+ \begin_layout Itemize
2899
+
2900
+ \family typewriter
2901
+ #extract_from
2902
+ \family default
2903
+ – extracts the receiver feature from the target object, returning the feature's
2904
+ value.
2905
+ \end_layout
2906
+
2907
+ \begin_layout Itemize
2908
+
2909
+ \family typewriter
2910
+ #type
2911
+ \family default
2912
+ – feature type
2913
+ \end_layout
2914
+
2915
+ \begin_layout Itemize
2916
+
2917
+ \family typewriter
2918
+ #label
2919
+ \family default
2920
+ – feature label (for use in graphics etc.)
2921
+ \end_layout
2922
+
2923
+ \begin_layout Part*
2924
+
2925
+ \family typewriter
2926
+ Features
2927
+ \family default
2928
+ class – feature set
2929
+ \end_layout
2930
+
2931
+ \begin_layout Standard
2932
+ A collection of features is called a feature set.
2933
+ Measurement performed for a particular feature set results in a record.
2934
+ In
2935
+ \family typewriter
2936
+ YPetri
2937
+ \family default
2938
+ ,
2939
+ \family typewriter
2940
+ Net::State::Features
2941
+ \family default
2942
+ is a subclass of
2943
+ \family typewriter
2944
+ Array
2945
+ \family default
2946
+ , representing an array of features.
2947
+ Originally, it was named
2948
+ \family typewriter
2949
+ FeatureSet
2950
+ \family default
2951
+ , but
2952
+ \family typewriter
2953
+ Features
2954
+ \family default
2955
+ is shorter.
2956
+ It is used as a PS dependent on a
2957
+ \family typewriter
2958
+ State
2959
+ \family default
2960
+ PS (
2961
+ \emph on
2962
+ not
2963
+ \emph default
2964
+ on a
2965
+ \family typewriter
2966
+ State
2967
+ \family default
2968
+ instance).
2969
+ It's owning
2970
+ \family typewriter
2971
+ State
2972
+ \family default
2973
+ PS can be accessed via
2974
+ \family typewriter
2975
+ #State
2976
+ \family default
2977
+ class method.
2978
+ Such
2979
+ \family typewriter
2980
+ Features
2981
+ \family default
2982
+ PS in turn owns subclasses of
2983
+ \family typewriter
2984
+ Net::State::Features::Record
2985
+ \family default
2986
+ and
2987
+ \family typewriter
2988
+ Net::Dataset
2989
+ \family default
2990
+ , which can be accessed via
2991
+ \family typewriter
2992
+ #Record
2993
+ \family default
2994
+ and
2995
+ \family typewriter
2996
+ #Dataset
2997
+ \family default
2998
+ class methods.
2999
+ Other class methods include:
3000
+ \end_layout
3001
+
3002
+ \begin_layout Itemize
3003
+
3004
+ \family typewriter
3005
+ #Marking
3006
+ \family default
3007
+ ,
3008
+ \family typewriter
3009
+ #Firing
3010
+ \family default
3011
+ ,
3012
+ \family typewriter
3013
+ #Flux
3014
+ \family default
3015
+ ,
3016
+ \family typewriter
3017
+ #Assignment
3018
+ \family default
3019
+ – constructors of a set of marking features, accepting single array argument.
3020
+ \end_layout
3021
+
3022
+ \begin_layout Itemize
3023
+
3024
+ \family typewriter
3025
+ #marking
3026
+ \family default
3027
+ ,
3028
+ \family typewriter
3029
+ #firing
3030
+ \family default
3031
+ ,
3032
+ \family typewriter
3033
+ #flux
3034
+ \family default
3035
+ ,
3036
+ \family typewriter
3037
+ #assignment
3038
+ \family default
3039
+ – versions of the above constructors, that accept any number of arguments,
3040
+ and return full corresponding feature sets if no arguments are given.
3041
+ \end_layout
3042
+
3043
+ \begin_layout Itemize
3044
+
3045
+ \family typewriter
3046
+ #Gradient
3047
+ \family default
3048
+ – constructor of a set of gradient features, accepting an array and an
3049
+ optional :transitions named argument.
3050
+ \end_layout
3051
+
3052
+ \begin_layout Itemize
3053
+
3054
+ \family typewriter
3055
+ #gradient
3056
+ \family default
3057
+ – version of the above constructor accepting any number of ordered arguments,
3058
+ and returning full gradient feature set if no ordered arguments are given.
3059
+ \end_layout
3060
+
3061
+ \begin_layout Itemize
3062
+
3063
+ \family typewriter
3064
+ #Delta
3065
+ \family default
3066
+ – constructor of a set of delta features, accepting an array and an optional
3067
+ :transitions named argument.
3068
+ \end_layout
3069
+
3070
+ \begin_layout Itemize
3071
+
3072
+ \family typewriter
3073
+ #delta
3074
+ \family default
3075
+ – version of the above constructor accepting any number of ordered arguments,
3076
+ and returning full delta feature set if no ordered arguments are given.
3077
+ \end_layout
3078
+
3079
+ \begin_layout Itemize
3080
+
3081
+ \family typewriter
3082
+ #[]
3083
+ \family default
3084
+ – constructor that takes either an arbitrary number of ordered arguments,
3085
+ or a field of named arguments (
3086
+ \family typewriter
3087
+ :marking
3088
+ \family default
3089
+ ,
3090
+ \family typewriter
3091
+ :firing
3092
+ \family default
3093
+ ,
3094
+ \family typewriter
3095
+ :gradient
3096
+ \family default
3097
+ ,
3098
+ \family typewriter
3099
+ :flux
3100
+ \family default
3101
+ ,
3102
+ \family typewriter
3103
+ :delta
3104
+ \family default
3105
+ ,
3106
+ \family typewriter
3107
+ :assignment
3108
+ \family default
3109
+ ), identifying a (possibly) mixed set of features.
3110
+ \end_layout
3111
+
3112
+ \begin_layout Standard
3113
+ Furthermore, class method
3114
+ \family typewriter
3115
+ #new
3116
+ \family default
3117
+ is tweaked to make the returned instances own a PS of
3118
+ \family typewriter
3119
+ Record
3120
+ \family default
3121
+ and a PS of
3122
+ \family typewriter
3123
+ DataSet
3124
+ \family default
3125
+
3126
+ \emph on
3127
+ doubly parametrized
3128
+ \emph default
3129
+ by the instance.
3130
+ Therefore, also instance methods include:
3131
+ \end_layout
3132
+
3133
+ \begin_layout Itemize
3134
+
3135
+ \family typewriter
3136
+ #Record
3137
+ \family default
3138
+ – a PS of
3139
+ \family typewriter
3140
+ Features.Record
3141
+ \family default
3142
+ PS parametrized by the
3143
+ \family typewriter
3144
+ Features
3145
+ \family default
3146
+ instance.
3147
+ \end_layout
3148
+
3149
+ \begin_layout Itemize
3150
+
3151
+ \family typewriter
3152
+ #DataSet
3153
+ \family default
3154
+ – a PS of
3155
+ \family typewriter
3156
+ Features.DataSet
3157
+ \family default
3158
+ PS parametrized by the
3159
+ \family typewriter
3160
+ Features
3161
+ \family default
3162
+ instance.
3163
+ \end_layout
3164
+
3165
+ \begin_layout Standard
3166
+ Other instance methods are:
3167
+ \end_layout
3168
+
3169
+ \begin_layout Itemize
3170
+
3171
+ \family typewriter
3172
+ #load
3173
+ \family default
3174
+ – delegated to the
3175
+ \family typewriter
3176
+ Record
3177
+ \family default
3178
+ PS owned by the instance.
3179
+ \end_layout
3180
+
3181
+ \begin_layout Itemize
3182
+
3183
+ \family typewriter
3184
+ #extract_from
3185
+ \family default
3186
+ – extracts a feature set from the target object, returning a record.
3187
+ \end_layout
3188
+
3189
+ \begin_layout Itemize
3190
+
3191
+ \family typewriter
3192
+ #Record
3193
+ \family default
3194
+ alias
3195
+ \family typewriter
3196
+ #load
3197
+ \family default
3198
+ – constructs an instance from an array of values.
3199
+ The values must corresponds to the receiver feature set.
3200
+ \end_layout
3201
+
3202
+ \begin_layout Itemize
3203
+
3204
+ \family typewriter
3205
+ #+
3206
+ \family default
3207
+ ,
3208
+ \family typewriter
3209
+ #-
3210
+ \family default
3211
+ ,
3212
+ \family typewriter
3213
+ #*
3214
+ \family default
3215
+ – addition, subtraction,
3216
+ \family typewriter
3217
+ Array
3218
+ \family default
3219
+ -like multiplication for feature sets.
3220
+ \end_layout
3221
+
3222
+ \begin_layout Itemize
3223
+
3224
+ \family typewriter
3225
+ #labels
3226
+ \family default
3227
+ – array of feature labels.
3228
+ \end_layout
3229
+
3230
+ \begin_layout Itemize
3231
+
3232
+ \family typewriter
3233
+ #reduce_features
3234
+ \family default
3235
+ – expects an argument identifying a set of features that is a subset of
3236
+ the receiver feature set, and returns that feature subset.
3237
+ \end_layout
3238
+
3239
+ \begin_layout Itemize
3240
+
3241
+ \family typewriter
3242
+ #Marking
3243
+ \family default
3244
+ ,
3245
+ \family typewriter
3246
+ #Firing
3247
+ \family default
3248
+ ,
3249
+ \family typewriter
3250
+ #Flux
3251
+ \family default
3252
+ ,
3253
+ \family typewriter
3254
+ #Assignment
3255
+ \family default
3256
+ – selectors of a subset of the receiver feature set, accepting single array
3257
+ argument.
3258
+ \end_layout
3259
+
3260
+ \begin_layout Itemize
3261
+
3262
+ \family typewriter
3263
+ #marking
3264
+ \family default
3265
+ ,
3266
+ \family typewriter
3267
+ #firing
3268
+ \family default
3269
+ ,
3270
+ \family typewriter
3271
+ #flux
3272
+ \family default
3273
+ ,
3274
+ \family typewriter
3275
+ #assignment
3276
+ \family default
3277
+ – versions of the above selectors, that accept any number of arguments,
3278
+ and return full corresponding subsets if no arguments given.
3279
+ \end_layout
3280
+
3281
+ \begin_layout Itemize
3282
+
3283
+ \family typewriter
3284
+ #Gradient
3285
+ \family default
3286
+ ,
3287
+ \family typewriter
3288
+ #Delta
3289
+ \family default
3290
+ ,
3291
+ \family typewriter
3292
+ #gradient
3293
+ \family default
3294
+ ,
3295
+ \family typewriter
3296
+ #delta
3297
+ \family default
3298
+ – selectors analogical to the above mentioned, but also accepting an optional
3299
+ named argument
3300
+ \family typewriter
3301
+ :transitions
3302
+ \family default
3303
+ qualifying the features to select.
3304
+ \end_layout
3305
+
3306
+ \begin_layout Standard
3307
+ Furthermore,
3308
+ \family typewriter
3309
+ :Record
3310
+ \family default
3311
+ message is overloaded in such way, that when sent with an argument, it
3312
+ acts as an alias of
3313
+ \family typewriter
3314
+ #load
3315
+ \family default
3316
+ record constructor.
3317
+ \end_layout
3318
+
3319
+ \begin_layout Part*
3320
+
3321
+ \family typewriter
3322
+ Record
3323
+ \family default
3324
+ class
3325
+ \end_layout
3326
+
3327
+ \begin_layout Standard
3328
+ A record is basically an array, that remembers the features to which its
3329
+ values correspond.
3330
+
3331
+ \family typewriter
3332
+ Net::State::Features::Record
3333
+ \family default
3334
+ class is typically used as doubly parametrized PS, dependent firstly on
3335
+ a
3336
+ \family typewriter
3337
+ Features
3338
+ \family default
3339
+ PS, and then on its particular instance.
3340
+ The owning feature set is accessible via
3341
+ \family typewriter
3342
+ #features
3343
+ \family default
3344
+ class and instance method.
3345
+ Other class methods include:
3346
+ \end_layout
3347
+
3348
+ \begin_layout Itemize
3349
+
3350
+ \family typewriter
3351
+ #load
3352
+ \family default
3353
+ – constructs a record from a given collection of values.
3354
+ \end_layout
3355
+
3356
+ \begin_layout Standard
3357
+ Other instance methods include:
3358
+ \end_layout
3359
+
3360
+ \begin_layout Itemize
3361
+
3362
+ \family typewriter
3363
+ #dump
3364
+ \family default
3365
+ – converts the record to a plain array, with optional :precision named
3366
+ argument.
3367
+ \end_layout
3368
+
3369
+ \begin_layout Itemize
3370
+
3371
+ \family typewriter
3372
+ #print
3373
+ \family default
3374
+ – pretty prints the record with feature names.
3375
+ \end_layout
3376
+
3377
+ \begin_layout Itemize
3378
+
3379
+ \family typewriter
3380
+ #fetch
3381
+ \family default
3382
+ – returns a feature.
3383
+ \end_layout
3384
+
3385
+ \begin_layout Itemize
3386
+
3387
+ \family typewriter
3388
+ #state
3389
+ \family default
3390
+ – constructs a state, using the receiver record, and a set of complementary
3391
+ marking clamps supplied in the argument.
3392
+ \end_layout
3393
+
3394
+ \begin_layout Itemize
3395
+
3396
+ \family typewriter
3397
+ #reconstruct
3398
+ \family default
3399
+ – reconstructs a simulation from the receiver record.
3400
+ \end_layout
3401
+
3402
+ \begin_layout Itemize
3403
+
3404
+ \family typewriter
3405
+ #Marking
3406
+ \family default
3407
+ ,
3408
+ \family typewriter
3409
+ #Firing
3410
+ \family default
3411
+ ,
3412
+ \family typewriter
3413
+ #Flux
3414
+ \family default
3415
+ ,
3416
+ \family typewriter
3417
+ #Assignment
3418
+ \family default
3419
+ – selects the values of the specified feature subsets from the receiver
3420
+ record.
3421
+ Expects a single array-type argument.
3422
+ \end_layout
3423
+
3424
+ \begin_layout Itemize
3425
+
3426
+ \family typewriter
3427
+ #marking
3428
+ \family default
3429
+ ,
3430
+ \family typewriter
3431
+ #firing
3432
+ \family default
3433
+ ,
3434
+ \family typewriter
3435
+ #flux
3436
+ \family default
3437
+ ,
3438
+ \family typewriter
3439
+ #assignment
3440
+ \family default
3441
+ – the versions of the above methods accepting any number of feature-identifying
3442
+ arguments.
3443
+ \end_layout
3444
+
3445
+ \begin_layout Itemize
3446
+
3447
+ \family typewriter
3448
+ #Gradient
3449
+ \family default
3450
+ ,
3451
+ \family typewriter
3452
+ #Delta
3453
+ \family default
3454
+ ,
3455
+ \family typewriter
3456
+ #gradient
3457
+ \family default
3458
+ ,
3459
+ \family typewriter
3460
+ #delta
3461
+ \family default
3462
+ – selectors analogical to the above mentioned, but also accepting an optional
3463
+ named argument
3464
+ \family typewriter
3465
+ :transitions
3466
+ \family default
3467
+ qualifying the features to select.
3468
+ \end_layout
3469
+
3470
+ \begin_layout Itemize
3471
+
3472
+ \family typewriter
3473
+ #euclidean_distance
3474
+ \family default
3475
+ – takes another record of the same feature set as an argument and computes
3476
+ the Euclidean distance to it.
3477
+ \end_layout
3478
+
3479
+ \begin_layout Part*
3480
+
3481
+ \family typewriter
3482
+ DataSet
3483
+ \family default
3484
+ class
3485
+ \end_layout
3486
+
3487
+ \begin_layout Standard
3488
+
3489
+ \family typewriter
3490
+ YPetri::Net::DataSet
3491
+ \family default
3492
+ represents a sequence of records sampled from the underlying net using
3493
+ certain feature set.
3494
+ It is a subclass of
3495
+ \family typewriter
3496
+ Hash
3497
+ \family default
3498
+ , whose keys represent sampling events, and whose values are plain arrays,
3499
+ from which corresponding
3500
+ \family typewriter
3501
+ Record
3502
+ \family default
3503
+ instances can be fully reconstructed (via
3504
+ \family typewriter
3505
+ Record.load
3506
+ \family default
3507
+ method).
3508
+ It is typically used as doubly parametrized PS, dependent firstly on a
3509
+
3510
+ \family typewriter
3511
+ Features
3512
+ \family default
3513
+ PS, and then on its particular instance.
3514
+ The owning feature set is accessible via
3515
+ \family typewriter
3516
+ #features
3517
+ \family default
3518
+ class and instance method.
3519
+ Other class methods include:
3520
+ \end_layout
3521
+
3522
+ \begin_layout Itemize
3523
+
3524
+ \family typewriter
3525
+ #events
3526
+ \family default
3527
+ – alias for
3528
+ \family typewriter
3529
+ Hash#keys
3530
+ \family default
3531
+ – dataset keys represent sampling events.
3532
+ \end_layout
3533
+
3534
+ \begin_layout Itemize
3535
+
3536
+ \family typewriter
3537
+ #reduce_features
3538
+ \family default
3539
+ – selects certain columns (features) of a dataset.
3540
+ \end_layout
3541
+
3542
+ \begin_layout Itemize
3543
+
3544
+ \family typewriter
3545
+ #timed?
3546
+ \family default
3547
+ – inquirer whether the dataset is timed
3548
+ \end_layout
3549
+
3550
+ \begin_layout Itemize
3551
+
3552
+ \family typewriter
3553
+ #record
3554
+ \family default
3555
+ – reconstructs the
3556
+ \family typewriter
3557
+ Record
3558
+ \family default
3559
+ instance corresponding to the given event.
3560
+ \end_layout
3561
+
3562
+ \begin_layout Itemize
3563
+
3564
+ \family typewriter
3565
+ #floor
3566
+ \family default
3567
+ – the nearest event smaller or equal to the argument.
3568
+ \end_layout
3569
+
3570
+ \begin_layout Itemize
3571
+
3572
+ \family typewriter
3573
+ #ceiling
3574
+ \family default
3575
+ – the nearest event greater or equal than the argument.
3576
+ \end_layout
3577
+
3578
+ \begin_layout Itemize
3579
+
3580
+ \family typewriter
3581
+ #records
3582
+ \family default
3583
+ – returns an array of
3584
+ \family typewriter
3585
+ Record
3586
+ \family default
3587
+ instances revived from the receiver's values.
3588
+ \end_layout
3589
+
3590
+ \begin_layout Itemize
3591
+
3592
+ \family typewriter
3593
+ #reconstruct
3594
+ \family default
3595
+ – recreates the simulation at the given event.
3596
+ \end_layout
3597
+
3598
+ \begin_layout Itemize
3599
+
3600
+ \family typewriter
3601
+ #interpolate
3602
+ \family default
3603
+ – interpolates the recording at the given point (event).
3604
+ Return value is the Record class instance.
3605
+ \end_layout
3606
+
3607
+ \begin_layout Itemize
3608
+
3609
+ \family typewriter
3610
+ #resample
3611
+ \family default
3612
+ – resamples the recording.
3613
+ \end_layout
3614
+
3615
+ \begin_layout Itemize
3616
+
3617
+ \family typewriter
3618
+ #distance
3619
+ \family default
3620
+ – computes the distance to another dataset.
3621
+ \end_layout
3622
+
3623
+ \begin_layout Itemize
3624
+
3625
+ \family typewriter
3626
+ #series
3627
+ \family default
3628
+ – returns the data series for the specified features.
3629
+ \end_layout
3630
+
3631
+ \begin_layout Itemize
3632
+
3633
+ \family typewriter
3634
+ #reduce_features
3635
+ \family default
3636
+ – reduces the dataset into another dataset with a different set of features.
3637
+ Reduction to a subset of features is always possible.
3638
+ Reduction to a set of features that is not a subset of the receiver's set
3639
+ of features is only possible if the former can be inferred from the latter.
3640
+ Generally, this is the case if net state can be reconstructed from a receiver's
3641
+ record.
3642
+ From this net state, the desired new feature set is then extracted.
3643
+ \end_layout
3644
+
3645
+ \begin_layout Itemize
3646
+
3647
+ \family typewriter
3648
+ #Marking
3649
+ \family default
3650
+ ,
3651
+ \family typewriter
3652
+ #Firing
3653
+ \family default
3654
+ ,
3655
+ \family typewriter
3656
+ #Flux
3657
+ \family default
3658
+ ,
3659
+ \family typewriter
3660
+ #Assignment
3661
+ \family default
3662
+ – selects the values of the specified feature subsets from the receiver
3663
+ record.
3664
+ Expects a single array-type argument.
3665
+ \end_layout
3666
+
3667
+ \begin_layout Itemize
3668
+
3669
+ \family typewriter
3670
+ #marking
3671
+ \family default
3672
+ ,
3673
+ \family typewriter
3674
+ #firing
3675
+ \family default
3676
+ ,
3677
+ \family typewriter
3678
+ #flux
3679
+ \family default
3680
+ ,
3681
+ \family typewriter
3682
+ #assignment
3683
+ \family default
3684
+ – the versions of the above methods accepting any number of feature-identifying
3685
+ arguments.
3686
+ \end_layout
3687
+
3688
+ \begin_layout Itemize
3689
+
3690
+ \family typewriter
3691
+ #Gradient
3692
+ \family default
3693
+ ,
3694
+ \family typewriter
3695
+ #Delta
3696
+ \family default
3697
+ ,
3698
+ \family typewriter
3699
+ #gradient
3700
+ \family default
3701
+ ,
3702
+ \family typewriter
3703
+ #delta
3704
+ \family default
3705
+ – selectors analogical to the above mentioned, but also accepting an optional
3706
+ named argument
3707
+ \family typewriter
3708
+ :transitions
3709
+ \family default
3710
+ qualifying the features to select.
3711
+ \end_layout
3712
+
3713
+ \begin_layout Itemize
3714
+
3715
+ \family typewriter
3716
+ #to_csv
3717
+ \family default
3718
+ – outputs the dataset in the CSV format.
3719
+ \end_layout
3720
+
3721
+ \begin_layout Itemize
3722
+
3723
+ \family typewriter
3724
+ #plot
3725
+ \family default
3726
+ – plots the dataset.
3727
+ \end_layout
3728
+
3729
+ \begin_layout Part*
3730
+
3731
+ \family typewriter
3732
+ Agent
3733
+ \family default
3734
+ class
3735
+ \end_layout
3736
+
3737
+ \begin_layout Standard
3738
+
3739
+ \family typewriter
3740
+ YPetri::Agent
3741
+ \family default
3742
+ /
3743
+ \family typewriter
3744
+ YNelson::Agent
3745
+ \family default
3746
+ are dumb agents that represent and assist the user.
3747
+ Originally, this class was named
3748
+ \family typewriter
3749
+ Manipulator
3750
+ \family default
3751
+ , but
3752
+ \family typewriter
3753
+ Agent
3754
+ \family default
3755
+ is shorter.
3756
+
3757
+ \family typewriter
3758
+ Agent
3759
+ \family default
3760
+ does provide textual user interface, but it does not completely encapsulate
3761
+
3762
+ \family typewriter
3763
+ YPetri
3764
+ \family default
3765
+ (
3766
+ \family typewriter
3767
+ YNelson
3768
+ \family default
3769
+ ) interface.
3770
+ Rather, it defines a number of top-level DSL commands (methods) available
3771
+ upon calling '
3772
+ \family typewriter
3773
+ include YPetri
3774
+ \family default
3775
+ ' / '
3776
+ \family typewriter
3777
+ include YNelson
3778
+ \family default
3779
+ '.
3780
+
3781
+ \family typewriter
3782
+ Agent
3783
+ \family default
3784
+ is not a part of the core object model of
3785
+ \family typewriter
3786
+ YPetri
3787
+ \family default
3788
+ /
3789
+ \family typewriter
3790
+ YNelson
3791
+ \family default
3792
+ , and it is hotter than other parts of
3793
+ \family typewriter
3794
+ YPetri
3795
+ \family default
3796
+ /
3797
+ \family typewriter
3798
+ YNelson
3799
+ \family default
3800
+ .
3801
+ For basic use, see the tutorial (
3802
+ \begin_inset Quotes eld
3803
+ \end_inset
3804
+
3805
+ Introduction to
3806
+ \family typewriter
3807
+ YNelson
3808
+ \family default
3809
+
3810
+ \begin_inset Quotes erd
3811
+ \end_inset
3812
+
3813
+ ).
3814
+ For detailed description of
3815
+ \family typewriter
3816
+ Agent
3817
+ \family default
3818
+ 's assets, see the class documentation.
3819
+ \end_layout
3820
+
3821
+ \begin_layout LyX-Code
3822
+
3823
+ \end_layout
3824
+
3825
+ \begin_layout LyX-Code
3826
+ \begin_inset CommandInset bibtex
3827
+ LatexCommand bibtex
3828
+ bibfiles "/home/boris/b/8oav/hos/hos"
3829
+ options "plainnat"
3830
+
3831
+ \end_inset
3832
+
3833
+
3834
+ \end_layout
3835
+
3836
+ \end_body
3837
+ \end_document