Examples
Every runnable scenario is a self-contained folder: its Python script, a
README.md that explains the mechanism and reads out the measured results, the
settings/ it runs with, and an output/ folder for its CSVs. The table gives
the Java example each one mirrors, so a scenario can be compared across the two
implementations.
| Example | Shows | Settings | Java counterpart |
|---|---|---|---|
| extension_points | All eight set_custom_... hooks in one scenario |
extension_points/settings/ |
Example 1 |
| distributions_and_mobility | Distributions and a mobility model driven from Python | distributions_and_mobility/settings/ |
Example 2 |
| edge_cooperation | Edge data centers that cooperate through orchestrators | edge_cooperation/settings/ |
Example 3 |
| custom_computing_node | A custom computing node with its own events | custom_computing_node/settings/ |
Example 4 |
| custom_orchestrator | Replacing the placement policy with a subclass of Orchestrator |
custom_orchestrator/settings/ |
Example 5 |
| custom_settings_parallel | Custom settings files and a parallel sweep | custom_settings_parallel/settings/ |
Example 6 |
| clustering_and_caching | Clustering and cooperative container caching | clustering_and_caching/settings/ |
Example 7 |
| graph_partitioning | Cutting a service graph into balanced partitions with graph theory | graph_partitioning/settings/ |
Example 9 |
| genetic_partitioning | Searching the node of every subtask with a genetic algorithm | genetic_partitioning/settings/ |
Example 10 |
| q_learning | Tabular Q-learning orchestration | q_learning/settings/ |
Example 11 |
| multi_access_mec | Multi-access MEC with an access-aware orchestrator | multi_access_mec/settings/ |
Example 12 |
| fog_layers | Multi-layer fog for a smart home | fog_layers/settings/ |
Example 13 |
| mist_only_q_learning | Q-learning with the cloud and edge actions removed | mist_only_q_learning/settings/ |
Example 14 |
| edge_orchestrated_q_learning | Guided reinforcement learning over several layers | edge_orchestrated_q_learning/settings/ |
Example 15 |
| softmax_orchestrator | A Boltzmann policy over the same value table | softmax_orchestrator/settings/ |
Example 16 |
| contextaware_drl | Context-aware deep reinforcement offloading | contextaware_drl/settings/ |
Example 17 |
| ant_colony | Ant colony offloading over pheromone scores | ant_colony/settings/ |
Example 18 |
| priority_placement | Deadline-aware placement by task criticality | priority_placement/settings/ |
Example 19 |
| multi_objective | Multi-objective reinforcement learning | multi_objective/settings/ |
Example 20 |
| container_cache | Storage-aware container caching with LRU eviction | container_cache/settings/ |
Example 21 |
| self_clustering | Self-organizing device clusters with an elected head | self_clustering/settings/ |
Example 22 |
| custom_models | A custom nodes generator, task generator, topology creator and simulation manager | custom_models/settings/ |
Example 23 |
| dynamic_repartition | Repartitioning a service graph while the simulation runs | dynamic_repartition/settings/ |
Example 24 |
| trace_replay | Replaying a recorded production trace instead of drawing arrivals | trace_replay/settings/ |
Example 25 |
Java Example8 (fuzzy logic orchestration) has no Python counterpart: it needs the
jFuzzyLogic jar that the Java build bundles, and this package takes no third-party
dependency. custom_orchestrator exercises the same
injection point with a distance rule.
Two settings folders are shared rather than owned by an example:
default_settings/ is the reference scenario the CLI and the test fixtures load,
and partitioning_settings/ is the service-graph scenario the docs pages cite.
From the repository root, after pip install -e .:
python examples/q_learning/q_learning.py
The same scripts run without installing the package, as long as src is on the
path:
PYTHONPATH=src python examples/graph_partitioning/graph_partitioning.py
Add --parallel to sweep several scenarios at once, as
custom_settings_parallel does.
Start with extension_points for the structure of a simulation, edge_cooperation for edge coordination, and graph_partitioning with genetic_partitioning for service graphs. The main README documents the settings files, the distributions and the output columns; docs/ is the full manual.