Cost Matrix Example - cannot create plot

Greetings! I am new with jsprit library, and currently trying to work with examples. Currently, I got stuck on CostMatrixExample.

So far, I’ve managed to execute code and got result:

[costs=132.0]
[#vehicles=2]

Then, example code attempts to create png in /output directory:

new Plotter(vrp, Solutions.bestOf(solutions)).plot(“output/yo.png”, “po”);

Unfortunately, plot did not appear in output folder.
No exception was caught in try / catch block. However, when I tried to display solution in graph, it resulted in NullPointerException:

new GraphStreamViewer(vrp, Solutions.bestOf(solutions)).labelWith(Label.NO_LABEL).setRenderDelay(200).display();

Exception in thread "main" java.lang.NullPointerException
	at com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.renderVehicle(GraphStreamViewer.java:530)
	at com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.render(GraphStreamViewer.java:376)
	at com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.display(GraphStreamViewer.java:272)
	at org.kinetic_jsprit.CostMatrixExample.main(CostMatrixExample.java:118)

Java ver. - 1.8.0_121; jsprit ver. - 1.8.
Can someone please share what can be reason behind this?

Thank you very much in advance!

EDIT: output directory exists (just in case)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.