Basic example of using Davis
Install dependencies locally
./gradlew downloadAndUnzipFile
./gradlew installJBotsim
Getting started without IDE
- Write your java algorithm into the
src
folder :MyAlgo.java
- Configure your
PATH
variable
export PATH=$PATH:`pwd`/davis/bin
- Execute in the
src
directory
udavis <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>
gradle
Working with - Modify
commandLine
parameters for taskdavis
inbuild.gradle
. - Run
./gradlew helloejcim
You can also collect all your examples in a scenario
file
- Open
scr/scenario
file and add a line with 5 parameters :<scenarioName> <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>
- Execute in a terminal with
./gradlew runscenarioName
Getting started with Intellij
Open IntelliJ and load project :
File/Open
Choose the basic-example
folder and click ok for auto-import.
gradle
Working with Intellij and - Write your java algorithm into the
src
folder :MyAlgo.java
- Open
src/scenario
file and add a line with 5 parameters :<testName> <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>
- Refresh gradle panel.
- In
Tasks/application
of the gradle panel you should see your testName as a gradle task named "runtestName" - Click to execute.
Docs
See also documentation for davis.