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

basic-example

  • Clone with SSH
  • Clone with HTTPS
  • Basic example of using Davis

    Install dependencies locally

    ./gradlew downloadAndUnzipFile
    ./gradlew installJBotsim

    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 helloejcim

    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.

    Docs

    See also documentation for davis.