public static Result process(InputStream input,
			SolutionAcceptor solutionAcceptor, final int time,
			final int iterations, final boolean messing) {
		final Warehouse warehouse = new Warehouse();
		try {
			warehouse.readData(input);
		} catch (final Exception e) {
			e.printStackTrace();
			return null;
		}

		final Processing processing = new Processing(warehouse);

		for (int th = 0; th < processing.N_THREADS; th++) {
			new Thread(new Runnable() {

				@Override
				public void run() {
					CarriersCollection collection = new CarriersCollection(
							warehouse.getPallets(), warehouse.getPackages());

					int iterationsCount = 0;
					do {
						ArrayList<Package> list = new ArrayList<>(
								processing.currentOrder);
						if (messing && ((iterationsCount + 3) % 6 == 0)) {
							collection.random(list, 1);
						}
						Result result = collection.process(list,
								processing.currentTemp, time);

						processing.setResult(result);

						processing.waitThread();
					} while (!processing.end);
				}
			}).start();
		}

		float N_ITER = iterations;
		float temp = 1;
		for (int i = 1; i <= N_ITER; i++) {
			processing.sync(solutionAcceptor, temp, i == N_ITER);
			temp *= 0.8f;
		}

		return processing.bestResult;
	}