Requirements

In order to compile JPScore you need to install the following three software

Moreover, JPScore depends on some libraries:

  • Boost: Needed for Voronoi calculations
  • Zlib (optional): Needed if the functionality of JPSfire is used (interaction with FDS)
  • CGAL (optional): Needed if AI-Router is used (experimental)

In this tutorial we show how to install boost using NuGet from within Visual Studio 2017.

Get the code and create a VS-project

 git clone https://gitlab.version.fz-juelich.de/jupedsim/jpscore
 cd jpscore
 cmake .

Visual Studio: Preparation

Before you proceed make sure your Visual Studio 2017 has some features installed.

In our case we need NuGet. So if it’s not already installed then click

Tools --> Get Tools and Features

This will start Visual Studio Installer and ask to make changes in Visual Studio. Choose the appropriate packages and proceed.

Visual Studio: Compilation

With Visual Studio 2017 open the created JPScore solution (JPScore.sln) and do the following

  1. Right click on the Solution --> Restore NuGet Packages

    Maybe Visual Studio 2017 will offer you to restore the packages automatically. See in the following screenshot. In this case you click on Restore (and be patient …)

  2. The project jpscore should be marked bold (important for running the code later on). If this is not the case, then right click on jpscore --> Set as startup Project

    After this step the project will appear bold (jpscore).

  3. View --> Other Windows --> Open Package Manager Console

    and type the following

     Update-Package -reinstall -ProjectName core
    

    and

     Update-Package -reinstall -ProjectName jpscore
    

  4. Build --> Build Solution

    If this step is successful then proceed to the next step and run the code

  5. Debug –> Start Without Debugging

    This will run jpscore in debug mode.

    Important! Note that this step although it runs jpscore, the later will complain about a missing inifile. So you have to specify an inifile for `jpscore`.
  6. Debug --> jpscore Properties --> Debugging --> Command Arguments

    and type the full path to a demo file. For example:

     C:\Users\here full path\demos\scenario_1_corridor\corridor_ini.xml
    

Result

This snippet shows the logs for this tutorial on a Windows 10 machine and the following screenshot the execution result

(optional) Zlib

If working with the smoke sensor and JPSfire is needed, then you’ll have to

  • Rerun cmake as follows cmake JPSFIRE=true .

  • Install grpc.dependencies.zlib using NuGet:

    Right click on jpscore in the solution explorer --> Manage NuGet Packages

  • and go back to step 3.