Skip to content

Installation

Lithium-ION SIMulation BAttery Toolbox edited this page May 14, 2021 · 3 revisions

LIONSIMBA was developed under Matlab 2014b, and has been succesfully tested under newer versions of the software. Starting from LIONSIMBA 2.1, the support for Octave was added.

!! WARNING !!: before proceeding with the following steps, make sure to have gone through the requirements page to download and collect the required packages.

Preface

The Sundials 2.6.2 package discussed in the requirements section, involves a compilation procedure in order to provide the mex files for the IDA numerical solver. The package comes along with all the required scripts to support the compilation procedure. However, a proper setup of the scientific environment (i.e., Matlab or Octave) has to be carried out to allow the succesfull compilation of the code.

Thanks to JannBorlinghaus for pointing out the updated link to the sundials suite.

Linux machines

Most common distributions (e.g., Ubuntu) come already equipped with suitable C/C++ compilers and no specific efforts are required to properly compile Sundials either under Matlab or Octave.

Windows machines

If the user is working under Windows environment, then it is required to download suitable C/C++ compilers. For the purpose of compiling the Sundials suite, the following two compilers have been succesfully tested:

Is therefore freedom of the user to choose which one to pick. For simplicity and its lightweight structure, we do suggest to download MinGW.

Windows + Octave users

If you are targetting to use LIONSIMBA within the Octave environment under Windows OS, there is an extra step you are required to take in order to properly compile the Sundials suite.

The user needs to locate the install_STB.m file of Sundials and modify it as follows:

  1. Search in the file for the lines that execute the following code:

    eval(mex_cmd);

  2. For each of the lines found, add before the following command:

    mex_cmd = strrep(mex_cmd,'\','\\');

This will make sure that the compilation procedure under Octave will work properly.

Acknowledgements have to be madet to git-hub users sameer and pasinger for having highlighted this specific issue.

Installation video on different platforms

Note: The steps that are discussed for Matlab are the same required for Octave.

Before watching the videos, make sure to have read the requirements page and the above section "Preface".