From 0102cf8bdf5c0f7feca96f41bc0ef85226668e01 Mon Sep 17 00:00:00 2001 From: Stefan Schroeder <4sschroeder@gmail.com> Date: Thu, 26 Jun 2014 12:58:33 +0200 Subject: [PATCH] replace createOutputFolder by code in examples.SimpleExample --- .../src/main/java/jsprit/examples/SimpleExample.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java index 11e549b1..af5e8693 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java @@ -16,6 +16,7 @@ ******************************************************************************/ package jsprit.examples; +import java.io.File; import java.util.Collection; import jsprit.analysis.toolbox.GraphStreamViewer; @@ -46,7 +47,13 @@ public class SimpleExample { /* * some preparation - create output folder */ - Examples.createOutputFolder(); + 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 one capacity dimension, i.e. weight, and capacity dimension value of 2