This software is to validate an extension of SysML for physical interaction and signal flow simulation by translation between extended SysML models and Simulink®, Simscape™, and Modelica® and simulation files.

This ZIP file contains the following:
- sysphs.jar: the translator as a standalone JAR file
- sysphs-sources.zip: the source code
- samples: directory containing various sample SysML models and simulation files generated from these models.

The generated simulation files have been tested with OpenModelica and Simulink/Simscape R2016a.

The README.md file in the source code contains additional information regarding the compilation and testing of the source code.
The source code itself is organized as follows:
- The metamodels for Modelica, Simulink, and Simscape were created in Ecore. These metamodels are located in "sysphs/models/" 
- The translation code is located in "sysphs/src/main/java/com/engisis/sysphs/translation/(language)".
- The serialization code is located in "sysphs/src/main/java/com/engisis/sysphs/serialization/(language)".
- The deserialization code is located in "sysphs/src/main/java/com/engisis/sysphs/deserialization/(language)".
- The preprocessing code is located in "sysphs/src/main/java/com/engisis/sysphs/util/SysMLPreProcessor.java".

To use the translator, run the standalone JAR file with Java. You can provide the following optional arguments:
-path path
    paths in which XMI dependencies are looked for, separated by the operating system's path separator
-reverse
    perform a reverse translation, from simulation files to SysML
-target platform
    target platform, 'modelica' or 'simulink'
-sfunction type
    type of S-Function for Simulink, 'level1', 'level2', or 'simscape'
-format format
    format of generated Simulink files, 'xml' or 'text'
-domains domains
    whether Simscape domains are reused or created, 'reuse' or 'create'
-preproc
    pre-processing the SysML model before translation
filename
    file name of the model to translate
rootelement
    root element within the file.

If the arguments and the options do not provide enough information to translate the source file, a GUI is shown to assist the user.

This software is a U.S. Government work.  It is based in part on work supported by U.S. National Institute of Standards and Technology (NIST, http://www.nist.gov) contract SB1341-13-RQ-0709 and grant award 70NANB14H249 to Engisis, LLC, and in part on work supported by the NIST-ARRA Measurement Science and Engineering Fellowship Program award 70NANB10H026, through the University of Maryland, and in part on work supported by NIST grant award 70NANB11H148 to the University of Maryland.

NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.

This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified.  We would appreciate acknowledgement if the software is used.

Disclaimer: Certain commercial firms and trade names are identified in this document in order to specify the installation and usage procedures adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology <http://www.nist.gov/> , nor is it intended to imply that related products are necessarily the best available for the purpose.
