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

basic-example

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    arnaudlabourel authored and Emmanuel Godard committed
    cafae002
    History

    Basic example of using Davis

    Install dependencies locally

    ./gradlew downloadAndUnzipFile
    ./gradlew getJBotsim

    Getting started without IDE

    1. Write your java algorithm into the src folder : MyAlgo.java
    2. Configure your PATH variable
    export PATH=$PATH:`pwd`/davis/bin
    1. Execute in the src directory
    udavis <networkGeneratorFile> <scheme> <size> <algoFile : MyAlgo.java>

    Working with gradle

    1. Modify commandLine parameters for task davis in build.gradle.
    2. Run
    ./gradlew davis

    You can also collect all your examples in a 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.

    Working with Intellij and gradle

    1. Write your java algorithm into the src folder : MyAlgo.java
    2. Open src/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.