Modeling Language (SedaroML)
SedaroML is a type-safe language for representing complex, multi-physical systems of systems for simulation and model-based systems engineering use cases. It operates across the entire Sedaro Platform and allows for world-class re-use and composability.
End-users of SedaroML are able to build and iterate on complex models quickly, with version control and static analysis as their super powers.
Introduction
SedaroML's design philosophy prioritizes abstraction and delegation of reliability to the framework itself, which enables engineers to rapidly assemble trusted, vetted components rather than developing custom solutions from scratch. This architectural approach drives the marginal cost of enterprise implementations to near zero by ensuring that capabilities are written once, thoroughly QA'd, and then reliably composed across arbitrary customer solutions.
The language also empowers efficient simulation by codifying knowledge that can be exploited for both runtime and buildtime optimizations. Such knowledge includes:
- Efficient input change detection
- Inter-agent communications
SedaroML is declarative, logical, relational, and flexible. It is well-typed and programming language agnostic. See Sedaro Type System (SedaroTS) for additional details on the type system behind the type-safety and portability of the language.
Yet Another Modeling Language?
The problem of modeling statically typed ontologies isn't new and we don't aim to reinvent the wheel with SedaroML but rather cherry picking all the best-in-show technologies to assemble a solution for the demands of modern day.
What's Representable in SedaroML?
SedaroML can represent the following system information:
- Descriptive system attributes
- Descriptive system relationships which define:
- Flows (e.g., data, propellant, electrical current, etc.)
- Composition (e.g., Component A is bolted to Component B)
- System or ontological constraints
- Attribute types
- Logical value constraints (e.g. max string length,
3<x<=12,if y > 7: z must be undefined, etc.)
- System behaviors
- System interfaces (i.e., abstractly, how can the system be interfaced with?)
- Examples: communications, mechanical
Ontologies
Sedaro Ontologies are the fundamental building blocks of SedaroML. They represent elements of a simulation and contain all of the relevant descriptive attributes, relationships, constraints, and behaviors. Documentation is built-in to the language and is a first-class citizen of the Ontology, ensuring that all information about the system is captured in a single, cohesive unit.
The example below shows a simple minimal Ontology representing a pendulum. This ontology details the configuration of the pendulum, requirements for the system to be physically realizable, and the behavior of the system over time.
class Pendulum(Ontology):
"""A simple pendulum"""
length: float
"""Length of the Pendulum"""
angle: float = 0.0
"""Current angle of the Pendulum"""
@validator
def verify_length(self):
assert self.length > 0, "Pendulum length must be positive"
@statemanager(
consumed="(length, prev!(angle), time)",
produced="angle"
)
def propagate(self, length, angle, time):
...
Ontologies can be opinionated about the rate at which time advances in the simulation and can individually enforce that accuracy is maintained in any context in which the Ontology is used. While this example notionally uses a propagation method that is accurate regardless of the time step, other Ontologies may use numerical integration methods that require small time steps to maintain accuracy or need to react to discrete events produced by other Ontology behaviors. By encoding this information in the Ontology itself, Sedaro simulations can automatically determine the appropriate time step for each component of the simulation, ensuring both accuracy and efficiency.
From Ontologies we can derive a Sedaro simulator that can propagate the state of a Pendulum forward in time. On top
of these simulations, we build higher-level Workflows that can execute complex analysis, generate detailed interactive
dashboards, produce custom reports, and more.
Model Composability
Ontologies are designed to be composable to be combined to create more complex models and used in different contexts without modification.
Consider a model representing an Engineering team. We might construct Ontologies representing an Employee, Task, and
a Team.
alice = Employee(name="Alice", role="Software Engineer", experience=5)
bob = Employee(name="Bob", role="Software Engineer", experience=3)
task = Task(name="Write a Report", effort=8)
engineering_team = Team(name="Engineering")
engineering_team.add(alice, bob, task)
In this context, the engineering_team is an independent simulatable object and could be executed to see how the attributes of the
engineering_team and its members evolve over time. However, we could also take the same team and make it part of a
broader Company Ontology, which also includes other teams.
company = Company(name="Tech Co.")
company.add(engineering_team, sales_team, hr_team)
In this new model, company is a simulatable object that includes the engineering_team as a component. The
engineering_team retains all of its attributes, relationships, constraints, and behaviors, but can be simulated in the
context of the Company model without modification.
Ontologies can reference other elements in their hierarchy, imposing requirements on the structures they are inserted
into and using information from other elements to drive their own behavior. For example, the Team Ontology might require that it is only ever composed into a Company Ontology and might use information about the Company (e.g., its budget) to determine how much effort it can put into its tasks.
Open
All Platform Content represented in SedaroML is open and available for export to human-readable formats. In Sedaro, there is no vendor lock.