Skip to content

Example decision interrupt agent#309

Open
pragam-m25 wants to merge 8 commits intomesa:mainfrom
pragam-m25:example-decision-interrupt-agent
Open

Example decision interrupt agent#309
pragam-m25 wants to merge 8 commits intomesa:mainfrom
pragam-m25:example-decision-interrupt-agent

Conversation

@pragam-m25
Copy link

Thanks for opening a PR! Please click the Preview tab and select a PR template:

What this shows

  • Agents performing normal behavior
  • Long-running interruptions (e.g. arrest → release)
  • No manual counters or wrapper schedulers
  • Fully compatible with Mesa 3.4.x

Why this example

This pattern is common in ABMs (jail, cooldowns, delays, recovery),
and the example illustrates how event-based scheduling simplifies
agent logic and improves clarity.

Includes:

  • agents, model, run script
  • smoke test
  • docstrings and README

@EwoutH
Copy link
Member

EwoutH commented Jan 23, 2026

Sounds cool, going to look into it this weekend!

@pragam-m25
Copy link
Author

Thanks a lot, really appreciate you taking the time!
I’m happy to make any changes you suggest — especially if you think something should be better aligned with Mesa 4.

Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I feel this example would be more interesting with DEVS, especially if you cancel events already planned for Agents.

@pragam-m25
Copy link
Author

Thanks for the suggestion — that makes sense.

I agree that adding a DEVS-style variant (e.g. agents scheduling release events and cancelling/rescheduling them) would make the example more compelling and forward-looking, especially with Mesa 4 in mind.

I’m happy to extend this example in that direction if you think that would be useful, or alternatively keep this one simple and treat a DEVS-focused version as a follow-up example. Let me know what you’d prefer.

@EwoutH
Copy link
Member

EwoutH commented Jan 24, 2026

Maybe leave this one open and make a second PR for DEVS. Then we can compare them and decide how to move forward.

@pragam-m25
Copy link
Author

Thanks, that sounds good to me.

I’ll leave this PR as-is and open a separate follow-up PR with a DEVS-style version (including scheduling and cancelling agent events), so we can compare both approaches side by side.

That should also make it easier to decide what fits best going forward, especially with Mesa 4 in mind.

Thanks for the guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants