Vixen
caa30e12
csharp
public readonly record struct AgentSchedule

Who gets to think this tick, and what that cost.

Read the guide page for this →

Remarks

A window rather than a list, because the list is derivable and the window is eight bytes. A plan that enumerated its agents would allocate once a frame per world, which is the one thing this subsystem's exit criterion forbids.

⚠ The report is the deliverable, not a diagnostic. A governor that quietly halved everybody's reaction time is a frame budget met by an AI nobody agreed to. OverBudget and Interval are what a project reads to find out what the number it set actually bought, and ToString is written to be pasted into a bug report.

Fields and properties (8)

  • public long Tick

    The tick this plan is for.

  • public int Population

    How many agents there are.

  • public int Start

    The first agent index in the window.

  • public int Count

    How many agents are in it.

  • public int Budget

    What the governor was allowed.

  • public int Interval

    How many ticks it takes for the window to come back round to an agent — the floor an agent is actually getting.

  • public bool OverBudget

    Whether the plan spends more than it was allowed.

  • public int Skipped

    How many agents do not get a slot this tick.

Methods (3)

  • public AgentSchedule(long Tick, int Population, int Start, int Count, int Budget, int Interval)

    Who gets to think this tick, and what that cost.

  • public bool Includes(int index)

    Whether an agent is in this tick's window.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (7)

  • AgentGovernorTestsVixen.Ai.Tests
  • AiSchedulingTestsVixen.Ai.Tests
  • AiSystemVixen.Ai
  • AiSystemTestsVixen.Ai.Tests
  • IAgentGovernorVixen.Ai
  • RoundRobinGovernorVixen.Ai
  • UnboundedGovernorVixen.Ai