public static void main(String[] args) throws IOException {	
		GardenSize size = new GardenSize(10,10, 5);
		
		// Read the type of the garden user wants.
		IGMVGardenType type = ExcelReader.readGardenType(gardenTypeFile, size);
		// Read the data from the data file. It contains information
		// about the variety.
		Set<IGMVVariety> varieties = ExcelReader.readData(dataFile, size);
		
		writeToDataBase(type, varieties);
		// Populate all the vegetables in the type with the data.
		// the data will be what all varieties are available
		// and for each of the variety minimum row length,
		// required experience etc.
		for (IGMVVegetable veg : type.getVegetables()) {
			for (IGMVVariety v : varieties) {
				if (v.getVegetableName().equals(veg.getName())) {
					veg.addVariety(v);
				}
			}
		}
		System.out.println("The Garden type is : \n" + type + " total veg " + type.getVegetables().size());
		System.exit(0);
		// Create the first garden by populating varieties with more than minimum
		// row length required
		// It should have all the vegetables from the plan which have required=true

		GardenPlan initialPlan = new GardenPlan(userExp, size, type.getVegetables());
		
		System.out.println(" The intital plan is \n"
				+ initialPlan
				+ " the heuristic value is "
				+ new IdealGardenHeuristicFunction()
						.getHeuristicValue(initialPlan));
		
		GardenPlanGoalTest goalTest = new GardenPlanGoalTest(type, userExp);
		//System.out.println(goalTest.isGoalState(initialPlan));
		
		GardenPlanSuccessorFunction f = new GardenPlanSuccessorFunction();
		List<Successor> su = f.getSuccessors(initialPlan);
		
		System.out.println("Successor is "
				+ ((Successor) su.get(0)).getState()
				+ " the heuristic value is "
				+ new IdealGardenHeuristicFunction()
						.getHeuristicValue(((Successor) su.get(0)).getState()));
		
		try {
			Problem problem = new Problem(initialPlan,
					new GardenPlanSuccessorFunction(),
					new GardenPlanGoalTest(type,userExp), new IdealGardenHeuristicFunction());
			SimulatedAnnealingSearch search = new SimulatedAnnealingSearch();
			SearchAgent agent = new SearchAgent(problem, search);
			
			printActions(agent.getActions());
			System.out.println("Search Outcome=" + search.getOutcome());
			System.out.println("Final State=\n" + search.getLastSearchState());
			printInstrumentation(agent.getInstrumentation());
			
			System.out.println("Last state is "
			+ " the heuristic value is "
			+ new IdealGardenHeuristicFunction()
					.getHeuristicValue(search.getLastSearchState()));
			
			System.out.println("It is valid : " + ((GardenPlan)(search.getLastSearchState())).isValid());
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		
	}