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
|
|
@ -20,6 +20,7 @@
|
|||
******************************************************************************/
|
||||
package examples;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import util.Coordinate;
|
||||
|
|
@ -42,6 +43,16 @@ import basics.route.VehicleTypeImpl;
|
|||
public class SimpleExample {
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
/*
|
||||
* get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue