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:


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(
	at com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.render(
	at com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.display(
	at org.kinetic_jsprit.CostMatrixExample.main(

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.