Skip to content
Snippets Groups Projects
Select Git revision
  • a77ec046121613c93499740fc3121d688fb96ec3
  • master default protected
  • helloworld
  • al-dev
  • denis
5 results

basic-example

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Emmanuel Godard authored
    a77ec046
    History

    Basic example of using Davis

    Install Dependencies locally

    ./gradlew getJBotsim

    Without IDE

    1. Write your java algorithm into the src folder : MyAlgo.java
    2. Modify commandLine parameters for task davis in build.gradle.
    3. Run
    ./gradlew davis

    You can collect all your examples in scenario file

    1. Open scr/scenario file and add a line with 5 parameters : <scenarioName> <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>
    2. 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.

    Write new algorithm

    1. Write your java algorithm into the src folder : MyAlgo.java
    2. Open scenario file and add a line with 5 parameters : <testName> <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>
    3. Refresh gradle panel.
    4. In Tasks/application of the gradle panel you should see your testName as a gradle task named "runtestName"
    5. Click to execute.