Setting Up the SH Planning System - PlanX-Universe/sh GitHub Wiki

Dependencies

Before setting up the SH planning system, ensure you have the following dependencies installed:

  1. JDK
  2. Scala
  3. sbt (compatible with the Scala version)

For SH v2.0.0, the specific versions are:

  1. JDK 1.8
  2. Scala 2.11.12
  3. sbt 1.5.0

Installation

To get started with SH, follow these steps:

  1. Download the source code - Clone or download the SH repository to your local machine.
  2. Build the project - Navigate to the project directory and execute sbt compile. This compiles the source code and prepares the codebase for use.

Libraries

SH relies on several Scala and Java libraries. The build.sbt file includes all necessary library dependencies with their respective versions. For SH v.20, the versions are:

Library Name Version
Spray json 1.3.6
Akka actor 2.5.32
Akka http core 10.1.15
Akka HTTP 10.1.15
Akka stream 2.5.32
Scalatest 3.3.0-SNAP3
Junit 4.13.2
grizzled-slf4j 1.3.4
Scala parser combinators 1.1.0

Java Executable Compilation

Package the SH planning system into a JAR file using sbt (sbt package) or an IDE. If using IntelliJ IDEA, refer to this guide: https://www.jetbrains.com/help/idea/compiling-applications.html#package_into_jar.

HTTP Server

Host the SH planning system as a Web service using an HTTP server. This will allow various API calls to SH to obtain planning results.

  • Start the server. Run sbt inside the services folder or run the HTTPServer object.
  • Configuration. The default server configuration is set in application.conf with host 127.0.0.1 and port 9090. These settings can be modified as needed.

Back Home