Skip to content
Select theme

Builds

AI agent getting started? Read Agents: start here first.

A build uses saved objects to describe the work and its inputs. Functions, steps, cases, output declarations and Modelica components are ordinary objects in the connected model.

ObjectWhat it describes
FunctionOne runtime and one entry, such as modelica-compile or modelica-simulate on the OpenModelica runtime, or python-run on the python-sci runtime.
StepOne function, with either one case or named inputs. A named input can bind a case, an output or one property of an object; a property binding is a data-input edge.
CaseThe components in a network, its boundary conditions, experiment settings and sweep parameters.
Output declarationAn output’s name and kind, opaque or indexed. An indexed declaration also names each variable’s member, variable path, unit and reduction (final, min or max).
Modelica componentModelica source in definition, its className, a library pin, portUsages and parameterBindings.

An output declaration holds no value and cannot change once saved. Direct updates and deletes are refused. To change a declaration, create a new output object.

A component can model a part through a refinement relationship. Each parameter binding reads a numeric property from that part and converts its schema unit to the parameter’s unit. A component with bindings needs exactly one refinement. A reference component such as ground can have none when it binds no parameters.

Each port usage names a port and its Modelica connector class. A connection joins two components and names their sourcePort and targetPort. These endpoint names do not give the connection a flow direction. Two components can have several connections between different port pairs.

A function whose runtime is python-sci and whose entry is python-run holds a Python body. The body holds one module-level function decorated with @step (from oe2_engine import step). The platform calls it with the step’s arguments by keyword. It returns a dict from each declared output’s name to its value: a dict of numbers for an indexed output, and bytes, text or a path for an opaque output.

When you start a build, the platform reads that function’s typed signature and checks each step’s arguments against it. An unknown argument, a missing required argument or a value of the wrong type is refused binding-mismatch. A python-run entry declares no input slots, because its arguments come from the function’s own signature.

python-sci is registered in the test organisation first. Until it is registered in your organisation, a function that names it cannot run there.

A case’s membership relationships select the Modelica components in its network. Its experiment settings are named numeric values. All members must use the same library pin: an exact library name and version available in the runtime image. Boundary classes come from that library too.

A boundary condition names an open port on a member, a library class, that class’s port and numeric parameter values. Every member port needs a connection to another member’s known port or exactly one boundary condition. A connection to a component outside the case leaves the member’s port open for this check. Ground is a component with its own connections, rather than a boundary condition.

A sweep parameter names a member, a Modelica parameter, a unit and a list of numeric values. Several sweep parameters expand as every combination of their values. For example, two resistance values and three capacitance values produce six points. The sweep limit counts those six combinations.

Use the objects SDK’s checkCase operation to check a saved case. It reports violations against the affected object and port, with a field where one applies. A violation includes objectId, port (or null), rule and an optional field. Identical violations are reported once; distinct rule or field violations can refer to the same object and port. The same case produces the same ordered list.

The check covers membership and ports, boundary conditions, the common library pin, numeric parameter bindings and unit conversions, sweeps, output variable declarations, field grammar and size limits. For example, an unconnected port, an unavailable library version or a binding with incompatible units produces a violation.

A case that fails the check cannot build: it is refused with case-invalid, meaning “The case check has violations.” A passing check does not validate the Modelica source or connector compatibility; the compiler makes those checks.

The objects SDK’s saveStep(client, selector, input) creates a step and its output declarations in one save. Supply the engine, function, case or named input bindings, output declarations, correlation and type versions. A named input that binds one property of an object is a data-input edge. The helper creates the step, output objects and their declaration relationships together. It creates new objects; it does not revise existing declarations. Inspect the returned batch outcome before treating the save as successful.

Use seedCase(client, selector, input) to copy a saved object set’s members into an existing case once. Supply the case and set identifiers, correlation and membership relationship type version. Members must be Modelica components in the case’s project. A partial set snapshot or a member from another project is refused without writing.

Seeding adds membership relationships. Later edits to the saved set do not change the case, and another fresh seed call can add parallel membership relationships. Inspect the returned batch outcome to confirm the save.

A result key names its value. A Modelica value is named by its component and variable, and its key carries source: "component", with componentId and variable. A Python step’s value is named by its variable alone, with no component, and its key carries source: "step". Both keys carry the sweep point as sweep.

The content key identifies the inputs to the work: the project, function entry, runtime image, output declarations, resource limits and input contributions. Equal inputs give an equal key on any branch; the branch name and step identifier are absent. Each sweep point contributes its own values, so changing some points leaves the other points’ keys equal and allows their work to be reused. For example, changing 38 of 50 sweep values leaves the other 12 keys unchanged.

When the deployment runs no engine, the refusal reads:

Builds are unavailable on this deployment. Ask your administrator.

Save the step and immutable output declarations with saveStep, then call checkCase with { selector: { projectId, ref }, input: { caseId } }. Start through startBuild with the same selector and one target: { kind: "outputs", outputIds: [outputId] }, { kind: "case", caseId }, or { kind: "build", buildId }. The server follows output dependencies upstream. A hidden connection refuses the whole request without naming hidden objects. A binding { name, objectId, property } reads that property of the object at the ref, and a bound value is at most 1 MiB. The shipped engine entry modelica-compile declares no property input, so such a binding answers binding-mismatch until an entry declares one. Case and output bindings are supported; functions name a runtime key and entry, never an image digest.

A start is refused build-too-large when the plan would create more than 20 new step runs. The limit is fixed for each request, so split the request. A start is refused build-limit-reached when the organisation is at its limit.

A successful start is { kind: "started", buildRunId, stepRunIds }. If any requested output is current and no choice was supplied, outputs-already-current returns current/stale counts and starts nothing. Ask the user to choose run-all or run-stale, then send that choice explicitly. run-all reruns every expanded step. run-stale skips current targets and reuses complete upstream results when available. A wholly current selection returns { kind: "unchanged", current, stale } with no build identifier. Replaying a started build preserves its result; replaying an unchanged start returns only { kind: "unchanged" }, without the first response’s current and stale counts because they are not stored.

Reuse remains within the project, may cross refs, and retains the source run and exact output in provenance. Keys depend on producing content keys rather than ref heads or output digests. A compile step can run once while simulation expands the case’s sweep points. Cancel with cancelBuild({ selector: { projectId }, input: { buildRunId } }). Cancellation ends the live step tokens and asks dispatch to cancel the recorded executions. An unconfigured dispatch service refuses before changing build rows.

Read a build with readBuildRun({ selector: { projectId }, input: { buildRunId } }). Its state is running while any step run is unfinished; then canceled if a person cancelled any, complete if every step run completed, partial if some did, and failed otherwise. Read one step run, with its spec, provenance and error, through readStepRun({ selector: { projectId }, input: { stepRunId } }), and its log through readStepLog with the same input: the log is plain text with a truncated flag, or { kind: "not-written" }. A step run waiting for its upstream shows as QUEUED. A build or step run you cannot read answers not-found, the same as one that does not exist. A read also ends step runs past their deadline as SYSTEM_ERROR, and a read by a caller who may start builds (a person, an application client or an applying agent) starts any queued step run that no execution holds.