Skip to main content

Outline

System​

In this tutorial, we model a vending machine as a bigraphical reactive system. The machine has two main parts:

  • Front-end panel — accepts user input, such as selecting a drink or inserting coins.
  • Brewer/dispensing unit — processes the order, prepares the drink, and delivers it to the user.

The model captures both the structural configuration (panel, brewer, inventory, coins) and the reactive behaviour (coin insertion, drink selection, brewing, dispensing).

By the end of this tutorial, you will see how to:

  • Specify the machine’s controls and initial configuration
  • Encode each user action and machine response as a reaction rule
  • Simulate the system to explore possible interaction sequences

The complete example project can be found here: bigraphs-by-examples.vendingmachine-webservice