mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
modify examples according to issue #24, i.e. if output-folder does not
exist, it is created.
This commit is contained in:
parent
8950d49e5a
commit
03e95c74a9
6 changed files with 66 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package examples;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
|
|
@ -29,6 +30,16 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
if (!dir.exists()){
|
||||
System.out.println("creating directory ./output");
|
||||
boolean result = dir.mkdir();
|
||||
if(result) System.out.println("./output created");
|
||||
}
|
||||
|
||||
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue