界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

model-core

model-core

【效率与协作】Build and run Mesa core models with agents, activation, time advancement, lifecycle, and event scheduling.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: model-core description: "Build and run Mesa core models with agents, activation, time advancement, lifecycle, and event scheduling." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Model Core

Use this sub-skill when the task is about Mesa's core modeling layer: Model, Agent, AgentSet, GroupBy, automatic registration, activation patterns, reproducible RNG, lifecycle/removal, and event scheduling.

Start here:

  • API reference for verified signatures, object relationships, and gotchas.
  • Workflows for copyable first-model, activation, event, lifecycle, and RNG recipes.
  • Troubleshooting for common failure modes and quick fixes.
  • Smoke script for a safe runtime check against an installed Mesa package.

Do:

  • Build agents with mesa.Agent and models with mesa.Model.
  • Create agents with Agent.create_agents or Agent.from_dataframe.
  • Activate agents with model.agents.do(...), shuffle_do(...), or model.agents_by_type[...].
  • Advance simulations with run_for, run_until, or run_model.
  • Schedule one-off and recurring work with schedule_event and schedule_recurring.
  • Remove agents with agent.remove() and clear a model with remove_all_agents().
  • Use rng= or a Scenario instance for reproducible randomness.

Route elsewhere when needed:

Keep this sub-skill focused on core model mechanics; do not fold in space, analysis, or visualization workflows here.

我的收藏