Skip to content

SimulationVuer

SimulationVuer

Props

NameDescriptionTypeRequiredDefault
apiLocationThe URL of a running copy of the SPARC API.Stringtrue-
idEither:
  • the id of a SPARC simulation-based dataset (as a Number, e.g., 135);
  • the PMR path to an OMEX file (as a String, e.g., workspace/b7c/rawfile/e0ae8d2d56aaaa091e23e1ee7e84cacbda1dfb6b/135.omex);
  • the direct URL to an OMEX file (as a String, e.g., https://raw.githubusercontent.com/opencor/webapp/refs/heads/main/tests/models/ui/135.omex); or
  • a raw OMEX file (as a Uint8Array).
  • Number / String / Uint8Arraytrue-

    Methods

    MethodDescriptionParameters
    plotMetadataGenerate the metadata associated with the plot which index is given.index
    manageFileManage the file associated with the given url and fileContents.url fileContents
    runSimulationRun a PMR-based COMBINE archive using libOpenCOR.-
    buildSimulationUiBuild the simulation UI using simulationUiInfo, a JSON object that describes the contents of the simulation UI.simulationUiInfo
    extractAndBuildSimulationUiExtract the simulation UI JSON file from the given file contents and build the simulation UI.libopencor fileContents
    runOnOsparcRun 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.-
    viewDatasetView the simulation-based dataset on the SPARC portal. The simulation UI has a View Dataset button which, when clicked, calls this method.-
    viewWorkspaceView the simulation-based dataset on PMR. The simulation UI has a View Workspace button which, when clicked, calls this method.-
    parametersDataData needed to set a model's parameters.-
    outputDataData needed to specify the model output.-
    retrieveRequestCreate the request that is going to be used by startSimulation to ask oSPARC to start the simulation.-
    processSimulationResultsProcess the simulation results retrieved by checkSimulation. The simulation results are post-processed, if needed, and then readied for use by PlotVuer.results
    showHttpIssueShow an HTTP issue using the given xmlhttp.xmlhttp
    checkSimulationCheck 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
    startSimulationStart the simulation associated with the simulation-based dataset. The simulation UI has a Run Simulation button which, when clicked, calls this method.-