Commit 72e25012 authored by ham's avatar ham
Browse files

Add support for linux shell scripts

parent d405634d
......@@ -16,8 +16,13 @@
__NOTE:__ _MontiSim_ is the directory, in which MontiSim-belonging projects should be clonned. It has to be manually created.
## Usage:
* go to `scripts` folder
* run `main.bat` __from there__ i.e. the script assumes that the working directory is `scripts`
Go to `scripts` folder
* For Windows users:
* run `windows/main.bat` __from there__ i.e. the script assumes that the working directory is `scripts`
* For Mac/Linux users:
* run `linux/compile.sh` __from there__.
Available one can find a [video example](https://github.com/MontiSim/EMAM-showcase/releases/download/webapp/example1.mp4) of using the model.
......@@ -39,3 +44,5 @@ The AutoPilot is desined to calculate simulation frames until a timeout expires,
In environment of shared simulator, which serves many simulations, such timeout cannot be used, thus either a _simulationDone_ flag has to be provided by the model or _lastNavigationTarget_ node has to be available.
In the distributed simulator, which is such an environment, the AutoPilot behaviour results into a non-stopping simulation, thus the simulation buffer used to store simulation frames is constantly kept full, until a user stops the scenario simulation.
#!/bin/bash
source ./variables.sh
g++ -shared -fPIC \
-I $JAVA_HOME/include/ \
-I $JAVA_HOME/include/darwin \
-I $ARMADILLO_HOME/include \
-o $AUTOPILOT_DLL_DIR/AutopilotAdapter.dll \
$AUTOPILOT_CPP_DIR/AutopilotAdapter.cpp \
#!/bin/bash
source "./variables.sh"
java -jar $AUTOPILOT_HOME/emam2cpp.jar \
--output-dir=$AUTOPILOT_CPP_DIR \
--models-dir=$AUTOPILOT_HOME/model \
--root-model=de.rwth.armin.modeling.autopilot.autopilot \
--flag-use-armadillo-backend \
--flag-generate-autopilot-adapter
\ No newline at end of file
cd ../..
AUTOPILOT_HOME="$(pwd)"
mkdir -p $AUTOPILOT_HOME/cpp
mkdir -p $AUTOPILOT_HOME/dll
# Replace it with your machine's java home path
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
SIMULATION_URL=http://localhost:8080/
TOMCAT_HOME=$AUTOPILOT_HOME/apache-tomcat-9.0.5
MINGW_HOME=$AUTOPILOT_HOME/mingw64
ARMADILLO_HOME=$AUTOPILOT_HOME/armadillo-8.400.0
AUTOPILOT_CPP_DIR=$AUTOPILOT_HOME/cpp
AUTOPILOT_DLL_DIR=$AUTOPILOT_HOME/dll
JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home"
\ No newline at end of file
pushd %~dp0
cd ..
cd ../..
set AUTOPILOT_HOME=%CD%
popd
set SIMULATION_URL=http://localhost:8080/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment