stressmodel

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package stressmodel generates large SysML v2 models of a stated shape and size, so the toolchain's cost can be measured against a model that looks like one a systems engineer would write rather than against one repeated declaration.

The satellite network is a constellation of fully modeled spacecraft: every satellite declares its own subsystems and their components with as-built attribute values, the power and data connections between them, a mass and a power budget, the requirements it satisfies and the mode machine it exhibits. Satellites are cross-linked to their neighbours in the same orbital plane and in the adjacent plane, and every satellite has a downlink to a ground station.

The network is written either as a `part def` per satellite or, in the fleet form, as `part sats : Block[N]` over a few blocks whose as-built values are defaults.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name, Source string
}

File is one document of a network split across files.

type SatelliteNetwork

type SatelliteNetwork struct {
	// Planes is the number of orbital planes; Satellites is the number in each.
	Planes, Satellites int
	// GroundStations is the number of ground stations the constellation downlinks to.
	GroundStations int
	// Fleet declares each plane as occurrences of one spacecraft block rather
	// than one definition per satellite; see the package documentation.
	Fleet bool
}

SatelliteNetwork sizes the generated constellation.

func (SatelliteNetwork) Generate

func (n SatelliteNetwork) Generate(w io.Writer) (Stats, error)

Generate writes the network to w and reports what it declared.

func (SatelliteNetwork) Source

func (n SatelliteNetwork) Source() (string, Stats)

Source returns the generated network as a string.

func (SatelliteNetwork) Split

func (n SatelliteNetwork) Split() ([]File, Stats)

Split generates the network Generate writes as one document per orbital plane beside the shared library and the constellation joining the planes. Each plane imports the library by qualified name, so a file resolves against the others. The fleet form declares its planes inside the network, so it splits into the library and the constellation alone.

type Stats

type Stats struct {
	// Satellites is the number of spacecraft in the constellation, whichever
	// form declares them; GroundStations the number of ground stations.
	Satellites, GroundStations int
	// Definitions is the number of spacecraft definitions declared: one per
	// satellite in the single-definition form, one per block in the fleet form.
	Definitions int
	// Units is the number of satellites stating as-built values of their own:
	// every satellite in the single-definition form, the diverging units in the fleet form.
	Units int
	// Components is the number of leaf components declared across the spacecraft
	// definitions, the diverging units and the stations.
	Components int
	// Connections is the number of interface usages, inside satellites and between them.
	Connections int
	// Requirements is the number of requirement usages; Assertions the number of
	// satisfy assertions, one per requirement plus one per diverging unit in fleet form.
	Requirements int
	Assertions   int
	// Elements is the number of declarations the model makes, library included.
	Elements int
	// Bytes is the length of the generated source.
	Bytes int
}

Stats counts what a generated network declares.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL