public void run() {

		String[] args = {"res/problem.dat"};

		try {

			if (args.length != 1) {
				System.out.println("Usage: java GeneralizedAssignmentProblem <filename>");
				System.exit(1);
			}
			init(args[0]);

			// makes GUI after initialization of graph
			GUI = new ACOApp(graph, wait1);

			synchronized(wait1) {
				if (verbosity >=1)
					System.out.println("Made it to first wait before initial solution");
				wait1.wait();
			}
			
			int i = 0; // run counter
			/*while (((solution > threshold || solution == 0) && 
					// checks for zero (cost zero if solution infeasible)
					i < MAX_NUMBER_OF_RUNS) || i < MIN_NUMBER_OF_RUNS) {*/
			while (true) {

				synchronized (wait1) {
					solution = findASolution(graph, assigned); // main loop
					
					if (solution < best_solution) {
						best_solution = solution;
						assigned_solution = Arrays.copyOf(assigned,assigned.length);

						if (mode.m == 2) {
							GUI.drawSolution(assigned_solution, capacities, CAPACITY_VALUE, mode, solution, best_solution);
							wait1.wait();
						}
					}
					if (verbosity >= 1)
						System.out.println("Made it to second wait after obtaining initial solution");
					
					if (verbosity >= 1) 
						System.out.println("Solution cost currently " + solution + ", best solution is " + best_solution);
					i++;
					
					/*if (mode.m == 2)
						GUI.drawSolution(assigned, capacities, CAPACITY_VALUE, mode);*/
					
					if (mode.m == 1) {
						GUI.drawSolution(assigned, capacities, CAPACITY_VALUE, mode, solution, best_solution);
						wait1.wait();
					}
					if (mode.m == 3)
						mode.m = 1;
				}
			}
			//printSolution();

		} catch (Exception e) {
			System.err.println("\n" + e.getMessage());
			e.printStackTrace();
			System.exit(1);
		}
	}