An Pharo based implementation of Discrete Event System Specification - formalism for modelling and simulation by B. Ziegler.
Install Pharo latest stable version e.g. from command line:
wget -O- https://get.pharo.org/64 | bash
Run in Pharo Playground:
Metacello new
baseline: 'PharoDEVS';
repository: 'github://ApptiveGrid/PharoDEVS:main/src';
load
TODO
Current implementation is Pharo port and continuation of original SmallDEVS library implemented in Squeak 4.3 at Department of Intelligent Systems on FIT BUT (namely doc. Ing. Vladimír Janoušek Ph.D., Ing. Elöd Kironský).
This is list of changes compared to original SmallDEVS implementation:
- removed all squeak and repository/proto object code
- cleaned core and made class prefixes etc. consistent
- removed all SIXX and storage dependencies
- added a project baseline
- initial unit tests added, fixed bugs/inconsistencies
- added github actions to run tests on commits
- added a simple traffic system simulation that enabled me to understand
- removed all Transcript based logging and introduced events
- inspector extension for a simulation logger can be used to have a decent log of everything happened
- separate roles of solver, model and coordinator
- clarify DEVSnDESS code that is there
- parallel stuff looks too naive and needs improvement
- Bloc based UI?
- DES is more straightforward and is widely used for simpler systems where events are the primary drivers of change.
- DEVS is a more rigorous and flexible framework, suitable for complex systems requiring modularity and hierarchical organization.
DES (Discrete Event Simulation) and DEVS (Discrete Event System Specification) are both approaches to modeling and simulation, but they have different focuses and structures:
Aspect | DES | DEVS |
---|---|---|
Focus | Event scheduling and processing. | Modular, hierarchical system specification. |
Time Management | Event-driven (time jumps between events). | Event-driven with explicit time advance functions. |
Modeling Approach | Informal, system-specific implementations. | Formal, mathematical framework. |
Structure | Flat, centralized event list. | Hierarchical composition of atomic and coupled models. |
Reusability | Limited modularity, typically system-specific. | High modularity and reusability. |
Applications | Queueing, logistics, manufacturing systems. | Complex, hierarchical systems like distributed simulations. |
- Concept:
- DES is a simulation approach where the state of the system changes only at specific points in time, triggered by events.
- Time advances by jumping from one event to the next (event-driven).
- Characteristics:
- Events are instantaneous and cause state transitions.
- Typically used to model queueing systems, manufacturing processes, and other systems where changes occur at discrete points (e.g., arrival of a customer, completion of a task).
- Often implemented using event lists, where events are processed chronologically.
- Example Applications:
- Customer service systems (banks, call centers).
- Production lines in factories.
- Computer network packet transfers.
- Concept:
- DEVS is a formal modeling framework for discrete event systems, developed by Bernard Zeigler.
- It provides a modular and hierarchical way to specify systems using a well-defined mathematical structure.
- Characteristics:
- Consists of two main types of models:
- Atomic Models: The basic building blocks defining state variables, inputs, outputs, internal and external transitions, and time advances.
- Coupled Models: Compositions of multiple atomic and/or coupled models, defining how they interact.
- Supports modularity and reusability, making it easier to build complex systems from simpler components.
- Formalism allows rigorous analysis, validation, and verification of the models.
- Consists of two main types of models:
- Example Applications:
- Complex system simulations, such as transportation systems, military simulations, and distributed systems.
- Hierarchical and modular systems, e.g., smart cities, IoT systems.