Installation of FhSim and model libraries

Contents

Installing FhSim for running existing models

NOTE: If you wish to install FhSim for model development, skip to the next section.

To install FhSim with user privileges, simply run the FhSim Installer (e.g. FhSim-vs14_amd64_Installer.exe) which can be downloaded from Artifactory. If you do not have access to this site, please contact the Marine ICT group in SINTEF Ocean.

This installer must be run with administrator privileges since it has the option of adding FhSim to the PATH environmental variable on your computer. After accepting the agreement when running the installer, the installer lets you choose what to install, as shown in the figure below.


Figure showing the different components that can be installed

  • FhSimBaseLibraryPlayPen contains the basic SimObject library. This library contains SimObjects for which the source code and documentation may be available to persons outside SINTEF Ocean.
  • Add to Path adds the FhSim executables to the user path on the computer.
  • Visual Studio Redistributables installs the Visual Studio 14 2015 redistributables needed to run FhSim, since FhSim has been compiled using Visual Studio 14 2015. If Visual Studio is installed, this component can be neglected.
  • Documentation contains a thorough documentation of FhSim and the SimObject-library in html.

It is recommended to check all the boxes. If you have the Visual Studio redistributables installed already the installer will find out and alert you.

Installing FhSim for model development

To install FhSim for model development purposes, it is required that you satisfy the following requirements before continuing this installation guide:

Additionally, it is recommended to install

1. Obtaining and installing the BuildScripts

a. To download the BuildScripts from stash, navigate to the chosen install folder and run the following command in your command prompt

git clone ssh://git@git.code.sintef.no/sfhbas/buildscripts.git

b. To install the BuildScripts, simply set SFH_BUILDSCRIPTS_DIR as an environmental variable to point to the buildscripts folder. Also set the environmental variable SFH_DEV_DIR, which decides where downloaded thirdparty dependencies and installation of own code will be placed.

2. Obtaining and building the SimObject development environment

a. The FhSim Tutorial folder used for developing SimObjects can be downloaded from stash using git. Navigate to the chosen installation folder and execute the following git-command:

git clone ssh://git@git.code.sintef.no/fhsim/fhsimtutorial.git

Note that it is possible to rename the folder, but carefully follow the instructions in the README.md file inside the folder1.

b. To build the SimObjects in the FhSimTutorial-folder, simply run the following commands2

mkdir build  
cd build  
cmake -G "Visual Studio 14 2015 Win64" ..  
cmake --build . --config <OPTION> --target install  

where <OPTION> is set to debug or release. Also note that the install-target installs the compiled SimObjects in the FhSim working environment.

NOTE: To learn how to develop new SimObjects, see the tutorials.


1: This requires Cygwin when working in Windows.
2: Note that -G "Visual Studio 14 2015 Win64" is not necessary to add if Visual Studio 14 2015 is the default compiler. As for now VS14 must be used since the buildscripts depend on it.