SimulationVuer
SimulationVuer
Props
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
| apiLocation | The URL of a running copy of the SPARC API. | String | true | - |
| id | Either:Number, e.g., 135);String, e.g., workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/135.omex);String, e.g., https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/135.omex); orUint8Array). | Number / String / Uint8Array | true | - |
Events
| Event Name | Description | Parameters |
|---|---|---|
| externalData | - | - |
| file | - | - |
| data-notification | - | - |
| simulationData | - | - |
Methods
| Method | Description | Parameters |
|---|---|---|
| addDataSubscription | Add a data subscription. | subscription |
| addExternalData | Add external data to the OpenCOR simulation. | csv A CSV string or URL for the external data. voiExpression Optional VOI expression to map the data. modelParameters An array of model parameter identifiers. |
| removeDataSubscription | Remove a data subscription. | subscriptionId |
| onExternalData | Let the outside world know that we have received some external data from OpenCOR by emitting an externalData event. | event |
| onFile | Let the outside world know that we have received a file from OpenCOR by emitting a file event. | event |
| onSimulationData | Let the outside world know that we have received some simulation data from OpenCOR by emitting a simulationData event, as well as a data-notification event. | event |
| plotMetadata | Generate the metadata associated with the plot which index is given. | index |
| buildSimulationUi | Build the simulation UI using simulationUiInfo, a JSON object that describes the contents of the simulation UI. | simulationUiInfo |
| runOnOsparc | Run the simulation-based dataset directly on oSPARC. Not all simulation-based datasets can be run directly on oSPARC, but for those that can the simulation UI shows a Run on oSPARC button which, when clicked, calls this method. | - |
| viewDataset | View the simulation-based dataset on the SPARC portal. The simulation UI has a View Dataset button which, when clicked, calls this method. | - |
| viewWorkspace | View the simulation-based dataset on PMR. The simulation UI has a View Workspace button which, when clicked, calls this method. | - |
| parametersData | Data needed to set a model's parameters. | - |
| outputData | Data needed to specify the model output. | - |
| retrieveRequest | Create the request that is going to be used by startSimulation to ask oSPARC to start the simulation. | - |
| processSimulationResults | Process the simulation results retrieved by checkSimulation. The simulation results are post-processed, if needed, and then readied for use by PlotVuer. | results |
| showHttpIssue | Show an HTTP issue using the given xmlhttp. | xmlhttp |
| checkSimulation | Check the progress of the simulation using the given data, a JSON object that contains the simulation job ID, as well as the solver name and version. This method is first called by startSimulation and then every second by itself until the simulation is finished. | data |
| startSimulation | Start the simulation associated with the simulation-based dataset. The simulation UI has a Run Simulation button which, when clicked, calls this method. | - |