meson setup -Dbuild_sgt_sim=true build # Use build_sgt_sim=false to omit optional SgtSim library
cd build
ninja -j4
sudo ninja install# You may be able to omit sudo, try without if in doubt.
@@ -93,10 +93,10 @@ cd ..
```
## Using SmartGridToolbox in your C++ code
SmartGridToolbox is bundled as two libraries: `SgtCore`, and `SgtSim`. To use SmartGridToolbox, your program should include the headers from these libraries. Most headers can be included with the two following `#include` statements:
SmartGridToolbox is bundled as two libraries: `SgtCore`, and optional `SgtSim`. To use SmartGridToolbox, your program should include the headers from these libraries. Most headers can be included with the two following `#include` statements:
```c++
#include<SgtCore.h>
#include<SgtSim.h>
#include<SgtSim.h> // Optional - to use SgtSim additional functionality
```
If you wish to include individual headers, you can do the following, e.g.:
option('build_sgt_sim',type:'boolean',value:false,description:'Build optional SgtSim library in addition to SgtCore.')
option('enable_opf',type:'boolean',value:false,description:'Compile with OPF enabled.')
option('linear_solver',type:'combo',choices:['klu','arma_superlu'],value:'klu',description:'Linear solver for Newton-Raphson solver, klu or arma_superlu')
option('test_timeout',type:'integer',value:240,description:'Time (in seconds) after which a test case is considered failed')