Coder Social home page Coder Social logo

sample's Introduction

sample's People

Contributors

alim1369 avatar tkmnet avatar uranos-ait avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sample's Issues

The MessageTool can't send request message

I think it should be || in line 133 of MessageTool.java otherwise the program can't jump to this branch.
`
public void sendRequestMessages (AgentInfo agentInfo, WorldInfo worldInfo, ScenarioInfo scenarioInfo, MessageManager messageManager)
{

    if (agentInfo.me().getStandardURN() == AMBULANCE_TEAM
            && agentInfo.me().getStandardURN() == FIRE_BRIGADE)

`

adf-core.jar -compile is not working

I am running this command:
java -jar ./library/rescue/adf/adf-core.jar -compile
but I'm getting this error:
[ RCRS ADF Version 2.2.0 (build 20170213T054156Z) ]

[START ] Agent compile
[INFO ] Working directory: /home/hossein/rescue/adf-sample
[FINISH] Agent compile
[START ] Agent class check
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at adf.launcher.LaunchSupporter.checkAgentClass(LaunchSupporter.java:468)
at adf.launcher.LaunchSupporter.checkAgentClass(LaunchSupporter.java:496)
at adf.launcher.LaunchSupporter.checkAgentClass(LaunchSupporter.java:496)
at adf.launcher.LaunchSupporter.checkAgentClass(LaunchSupporter.java:496)
at adf.launcher.LaunchSupporter.checkAgentClass(LaunchSupporter.java:305)
at adf.launcher.LaunchSupporter.delegate(LaunchSupporter.java:97)
at adf.Main.main(Main.java:21)


java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Linux Ubuntu 16.04

Compile error due not found package adf.agent.utils

The latest sample code does not compile. You can find the error I get below. I think the problem is with the relocation of the class WorldViewLauncher. Its package is changed to adf.debug but sample code tries to reference it in the package adf.agent.utils that does not exist. Best,

okan@okan-cokat:/media/okan/depo/robotics/RCRS-ADF/roboAKUT$ ./compile.sh 
./adf/sample/tactics/SampleTacticsFireStation.java:10: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsAmbulanceCentre.java:10: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsPoliceOffice.java:10: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsPoliceForce.java:17: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsFireBrigade.java:14: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsAmbulanceTeam.java:19: error: package adf.agent.utils does not exist
import adf.agent.utils.WorldViewLauncher;
                      ^
./adf/sample/tactics/SampleTacticsFireStation.java:62: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireStation
./adf/sample/tactics/SampleTacticsFireStation.java:78: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireStation
./adf/sample/tactics/SampleTacticsFireStation.java:89: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireStation
./adf/sample/tactics/SampleTacticsAmbulanceCentre.java:61: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceCentre
./adf/sample/tactics/SampleTacticsAmbulanceCentre.java:78: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceCentre
./adf/sample/tactics/SampleTacticsAmbulanceCentre.java:89: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceCentre
./adf/sample/tactics/SampleTacticsPoliceOffice.java:61: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceOffice
./adf/sample/tactics/SampleTacticsPoliceOffice.java:79: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceOffice
./adf/sample/tactics/SampleTacticsPoliceOffice.java:90: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceOffice
./adf/sample/tactics/SampleTacticsPoliceForce.java:113: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceForce
./adf/sample/tactics/SampleTacticsPoliceForce.java:124: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceForce
./adf/sample/tactics/SampleTacticsPoliceForce.java:139: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsPoliceForce
./adf/sample/tactics/SampleTacticsFireBrigade.java:114: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireBrigade
./adf/sample/tactics/SampleTacticsFireBrigade.java:126: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireBrigade
./adf/sample/tactics/SampleTacticsFireBrigade.java:141: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsFireBrigade
./adf/sample/tactics/SampleTacticsAmbulanceTeam.java:116: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceTeam
./adf/sample/tactics/SampleTacticsAmbulanceTeam.java:127: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceTeam
./adf/sample/tactics/SampleTacticsAmbulanceTeam.java:142: error: cannot find symbol
            WorldViewLauncher.getInstance().showTimeStep(agentInfo, worldInfo, scenarioInfo);
            ^
  symbol:   variable WorldViewLauncher
  location: class SampleTacticsAmbulanceTeam

Compilation error: adf-core.jar file

Dear developer,

When I compile the adf-core.jar file, use command: java -jar ./library/rescue/adf/adf-core.jar -compile
there are some compilation errors.
*My java version "1.8.0_161". And Ubuntu version is 16.04 LTS.

[ RCRS ADF Version 2.2.0 (build 20170726T064111Z) ]

[START ] Agent compile
[INFO ] Working directory: /home/swha/RCRS/rcrs-server/adf-sample
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:68: error: illegal start of expression
.filter(e -> e instanceof Area && e.getStandardURN() != REFUGE)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:69: error: ')' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:69: error: ';' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:69: error: not a statement
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:69: error: ';' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScout.java:70: error: ';' expected
.collect(Collectors.toList())
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:78: error: illegal start of expression
.filter(e -> e instanceof Area && e.getStandardURN() != REFUGE)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:79: error: ')' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:79: error: ';' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:79: error: not a statement
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:79: error: ';' expected
.map(AbstractEntity::getID)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/centralized/CommandExecutorScoutPolice.java:80: error: ';' expected
.collect(Collectors.toList())
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:263: error: ')' expected
.filter(Blockade::isApexesDefined)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:263: error: illegal start of expression
.filter(Blockade::isApexesDefined)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:263: error: ';' expected
.filter(Blockade::isApexesDefined)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:388: error: ')' expected
.filter(Blockade::isApexesDefined)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:388: error: illegal start of expression
.filter(Blockade::isApexesDefined)
^
/home/swha/RCRS/rcrs-server/adf-sample/src/adf/sample/extaction/ActionExtClear.java:388: error: ';' expected
.filter(Blockade::isApexesDefined)
^
18 errors
[ERROR ] Compile failed

Would you help fix this compilation errors?
I would really appreciate it if you could help.

Best regards,
swha

Logging in adf-sample

How to log and trace our algorithms in the adf-sample.
Can you provide some sample code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.