Cosimulation Studio VS Code ExtensionThe Cosimulation Studio VS Code Extension seamlessly integrates with the INTO-CPS Maestro cosimulation orchestration engine and provides FMU-aware autocompletion and linting, enhancing the experience of authoring cosimulation configurations within Visual Studio Code. Quickstart guideTo quickly get the extension up and running, begin here. Installing the extensionThe most recent stable version of the extension is always available in the VS Code Marketplace as a one-click installation. Setting up MaestroThe extension does not automatically install or orchestrate the Maestro application. If you plan on using the Maestro integration, download the latest release of
This will expose the API on port Editing cosimulation configuration filesWith the extension installed, you're ready to create your first cosimulation configuration file. By default, any file named FMUs definitions can either use absolute paths or relative paths to reference FMU files. Relative paths are relative to the workspace root. ⚠️ NOTE: For maximum portability of projects, it is generally recommended to use relative paths. However, you can choose to use absolute paths if your specific situation warrants it.
FeaturesLintingThe linter catches errors in cosimulation files as you're writing them, and importantly before they reach the Maestro engine. The editor will generate an error if an FMU definition contains a reference to a file that doesn't exist. Defining connections with incorrect causality will be detected as an error. AutocompletionWhen the configuration contains references to FMUs that the extension can resolve, the editor provides smart completions of input and output variables. Integration with MaestroAssuming there's a Maestro instance running, launching simulations directly from within VS Code is very easy. Whenever a cosimulation configuration file is open in the editor, a button to run simulations will appear in the editor toolbar. Pressing the button will send the configuration currently being edited to Maestro, and upon completion, the results will be populated in a new CSV file. Developing the extensionFor a more in-depth guide on setting up the development environment and building and installing a development version of the extension, refer to the developer guide. |