Skip to content

simlin-cli: add --rounds flag for systems format models #439

@bpowers

Description

@bpowers

Problem

The CLI's systems format path (in open_model, simlin-cli/src/main.rs) always translates models using DEFAULT_ROUNDS=10. There is no --rounds flag or any way to specify a different simulation horizon for systems format models.

This causes two concrete problems:

  1. simlin simulate always runs 10 steps regardless of what the reference data expects. If a reference .txt file has 50 time steps of data, the simulation still only produces 10.

  2. simlin debug comparisons silently truncate to the shorter of simulation output vs. reference data. When the reference has more steps than the simulation, the comparison quietly drops the extra reference data without warning, which can hide divergences that only appear later in the run.

Why It Matters

  • Correctness: Users cannot verify their models against reference data with horizons other than 10 steps.
  • Developer experience: Silent truncation in simlin debug makes it easy to miss real mismatches, giving a false sense of correctness.
  • Usability: The CLI should let users control simulation parameters for the formats that need them.

Components Affected

  • src/simlin-cli/src/main.rs -- open_model function and the simulate/debug subcommand argument parsing

Possible Approaches

  • Add a --rounds (or --steps) CLI flag to the simulate and debug subcommands, defaulting to 10 for backward compatibility.
  • Optionally, infer the round count from the reference data length when a reference file is provided in debug mode and no explicit --rounds is given.
  • Consider emitting a warning in simlin debug when reference data is longer than simulation output, so truncation is never silent.

Context

Identified during review of the simlin-cli systems format handling and the DEFAULT_ROUNDS constant usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions