Interface: JsModel

June 12, 2024 ยท View on GitHub

@sdeverywhere/runtime / JsModel

Interface: JsModel

An interface that exposes the functions of a JavaScript model generated by the SDEverywhere transpiler. This allows for running the model with a given set of input values, which will produce a set of output values.

This is a low-level interface that most developers will not need to interact with directly. Developers should instead use the ModelRunner interface to interact with a generated model. Use createSynchronousModelRunner to create a synchronous ModelRunner, or spawnAsyncModelRunner to create an asynchronous ModelRunner.

NOTE: The properties and methods exposed in this interface are meant for internal use only, and are subject to change in coordination with the code generated by the @sdeverywhere/compile package.

Properties

kind

Readonly kind: "js"


outputVarIds

Readonly outputVarIds: string[]


outputVarNames

Readonly outputVarNames: string[]


modelListing

Optional Readonly modelListing: any