
Prerequisites
-------------
The required, recommended, and optional prerequisites for SimDiff Automation are 
listed here, along with an explanation of how SimDiff Automation uses each one.  
Except for MATLAB + Simulink, all prerequisites are free and open source.

[Required]
  * SimDiff Automation Linux is supported on CentOS, RedHat, and Ubuntu.
    If you require SimDiff Automation to run on a platform or architecture that is
    not listed above, please contact support@ensoftcorp.com for assistance.

  * GLIBC:  SimDiff Automation includes some native code (.so libraries) that 
    require a GLIBC version of 2.12 or higher
  
  * Shell:  SimDiff Automation is launched using a shell script.  'bash' is 
    recommended, but any shell compatible with '/bin/sh' should work

[Recommended]
  * MATLAB + Simulink:  A basic model comparison can be done without Simulink,
    but it is required to export a Peer Review file.  SimDiff Automation
    Linux supports MATLAB R2008a and higher.
  
[Recommended for headless installations (e.g. Docker containers)]

  * Xvfb:  Provides an X virtual framebuffer that enables inclusion of screenshots in
    reports. 

[Recommended as needed]
  * Disable SELinux:  To run SimDiff Automation, you may need to disable SELinux.
    To disable SELinux for the current session, execute the following command with 
    root permissions:
      /usr/sbin/setenforce

    To disable SELinux permanently for all login sessions, edit /etc/selinux/config
    with root permissions, changing the "SELINUX=enforcing" line to 
    "SELINUX=disabled"



Installation
------------
1. Unpacking

  To install SimDiff Automation, simply change to the directory in which you want 
  to install SimDiff Automation, then execute the following command below, 
  where "/path/to/" is the path to the .tar.gz installation file.
  
  For example, for 2026a:

	tar xzf /path/to/SimDiffAutomation-2026a-install-linux64.tar.gz

  This will create a "simdiff-automation" directory containing the complete 
  SimDiff Automation installation.  ENSOFT recommends installing SimDiff
  in a path without spaces.


2. Capturing Screenshots in a Headless Environment

  If you have installed MATLAB and Simulink in a headless environment
  such as a Docker container, you may be able to capture screenshots in reports 
  if you run an X virtual framebuffer (Xvfb):

  $ export DISPLAY=:99
  $ sudo Xvfb "$DISPLAY" -screen 0 1024x768x24 &
  $ sd4 -r right.mdl -l left.mdl -export /tmp/report.peerreview.html
  
  
4. SimDiff Automation Configuration

  To configure SimDiff Automation, template files are provided in the 
  configuration-templates directory.


4.1. License Setup

  For a Named-User Workgroup Float: 
  $ cp configuration-templates/license-wgf-named-user/license.ini ~/.simdiff-automation/license.ini

  For a Node-Locked Workgroup Float: 
  $ cp configuration-templates/license-wgf-node-locked/license.ini ~/.simdiff-automation/license.ini

  Edit license.ini - set the following keys to the server and port for your
  OLicense server.  If you selected a Named-User license, also set your email.

  license.email=
  license.serveraddress=10.0.0.1
  license.serverport=8080


4.2. MATLAB Setup

  ENSOFT recommends configuring SimDiff Automation to run Simulink tasks 
  through the MATLAB "-batch" command line option.  This requires MATLAB R2019a or later.

  Please contact ENSOFT for assistance if you need to configure SimDiff Automation to:
   - pass through the MATLAB Batch Licensing Executable (matlab-batch), 
   - use the MATLAB Engine API, for example for older MATLAB releases.
  
  To use Simulink, SimDiff needs a MATLAB installation that is compatible with
  the given models.  There are two ways for SimDiff to find an installation.
  
  1) By default, SimDiff will search the PATH for matlab.
  
  2) To specify a set of MATLAB installations, configure the MATLAB Batch Launch
  Configurations file.  Copy the template:

  $ cp configuration-templates/matlab/matlab-batch-launch-configurations.xml \
      ~/.simdiff-automation/matlab-batch-launch-configurations.xml

  Then, follow the instructions in the file to add valid MATLAB installations.


