Mission summary¶
Mission.summary returns a structured snapshot of
a loaded mission: resources grouped by type, declared output resources, and
the top-level mission-sequence outline. The same snapshot backs the notebook
reprs on Mission and Results —
ending a cell on a bare mission reference renders the table inline instead
of the default <gmat_run.mission.Mission object at 0x…> form.
The walk is name-only and one level deep into branch commands. It does not
materialise field values (use mission["Sat.SMA"] for that) and it does not
render deeper nesting as a tree — a Target containing several Vary
commands each containing a Propagate shows the Varys and a count of the
deeper descendants.
from gmat_run import Mission
mission = Mission.load("flyby.script")
summary = mission.summary()
print(summary)
# MissionSummary('flyby.script')
#
# Resources
# Spacecraft (1): Sat
# ForceModel (1): FM
# Propagator (1): Prop
# ReportFile (1): RF
#
# Outputs
# ReportFile: RF
#
# Mission sequence (2 commands)
# 1. Propagate — Propagate Prop(Sat) {Sat.ElapsedDays = 1};
# 2. Maneuver — Maneuver TOI(Sat);
Schema¶
MissionSummary
dataclass
¶
MissionSummary(
script_name: str,
resource_groups: tuple[ResourceGroup, ...],
output_resources: tuple[ResourceGroup, ...],
commands: tuple[CommandOutline, ...],
)
Read-only snapshot of a loaded mission's structure.
Returned by :meth:gmat_run.mission.Mission.summary. Backs both
:meth:gmat_run.mission.Mission.__repr__ (one-line text) and
:meth:gmat_run.mission.Mission._repr_html_ (notebook table).
Attributes:
| Name | Type | Description |
|---|---|---|
script_name |
str
|
|
resource_groups |
tuple[ResourceGroup, ...]
|
One :class: |
output_resources |
tuple[ResourceGroup, ...]
|
Subset of |
commands |
tuple[CommandOutline, ...]
|
Top-level mission-sequence commands in declaration order. |
ResourceGroup
dataclass
¶
One resource category and the resource names that fall under it.
Names appear in the order GMAT returns them from
Moderator.GetListOfObjects for the matching enum, which corresponds to
declaration order in the loaded .script.
CommandOutline
dataclass
¶
CommandOutline(
type_name: str,
summary: str,
children: tuple[CommandOutline, ...] = (),
nested_count: int = 0,
)
One node in the mission-sequence outline.
children is the depth-1 expansion of a branch command (If,
For, While, Target, Optimize, BeginScript, ...).
Deeper nesting is not materialised; nested_count is the number of
descendants past the first nested level so the caller can tell that, e.g.,
a Target with three Vary children each containing a Propagate
has 3 nested commands beyond what children shows.
summary is the first non-blank line of the command's
GetGeneratingString output, truncated. It is "" when the engine
returns nothing useful — some plugin commands simply don't implement that
method.