Thanks to visit codestin.com
Credit goes to github.com

Skip to content

StatsTracker example - Existing FabriRechtExample fails to run #40

@hannesdm

Description

@hannesdm

RinSim version: 4.3.0
I would like to request an additional example/tutorial on how to retrieve statistics after running a RinSim experiment or simulation.
The only example using StatsTracker seems to be FabriRechtExample, which at the moment of writing fails to run.
A few remarks on the FabriRechtExample:

  • The main method is called 'main2'
  • The line
    new File("../scenario-util/files/test/fabri-recht/lc101.scenario"),
    throws a FileNotFoundException.
    Likely this is an issue with me using IntelliJ instead of Eclipse, which can use a different execution root when running a file from inside the IDE. Changing the file path to "scenario-util/files/test/fabri-recht/lc101.scenario" fixes this problem.
  • When running the example after fixing the issues above above another exception is thrown:
Exception in thread "main" java.lang.IllegalArgumentException: A provider for interface com.github.rinde.rinsim.pdptw.common.StatisticsProvider already exists: Dependency-StatsTracker.builder().
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
	at com.github.rinde.rinsim.core.model.DependencyResolver.add(DependencyResolver.java:75)
	at com.github.rinde.rinsim.core.model.ModelManager$Builder.doAdd(ModelManager.java:231)
	at com.github.rinde.rinsim.core.model.ModelManager$Builder.add(ModelManager.java:212)
	at com.github.rinde.rinsim.core.Simulator$Builder.addModel(Simulator.java:324)
	at com.github.rinde.rinsim.examples.fabrirecht.simple.FabriRechtExample.main(FabriRechtExample.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

I do not know how to resolve this last issue.
Would it be possible to write a tutorial on how to use the StatsTracker or is there another way to retrieve and calculate statistics, evaluation results, etc. in RinSim?
The reason for this is that it would be extremely useful to get access to statistics after an experiment (using the RinSim experiment API) or other simulation has been completed. Statistics such as throughput, latency, package distribution, etc. would be very helpful in the evaluation of multi agent systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions