public static void main(String[] args) {
		if (args.length != 6) {
			System.err.println("Parameters error!");
			System.exit(0);
		}
		String fja = args[0];
		int n = Integer.parseInt(args[1]);
		String vrsta = args[2];
		int maxiter = Integer.parseInt(args[3]);
		double oshare = Double.parseDouble(args[4]);
		double sigma = Double.parseDouble(args[5]);
		MOOPProblem problem = null;
		int decisionSize = 0;
		int objectiveSize = 0;
		if (fja.equals("1")) {
			decisionSize = 4;
			objectiveSize = 4;
			IFunction[] objectives = new IFunction[4];
			for (int i = 0; i < 4; i++) {
				objectives[i] = new Square(i);
			}
			double[] lbound = new double[4];
			for (int i = 0; i < 4; i++) {
				lbound[i] = -5;
			}
			double[] ubound = new double[4];
			for (int i = 0; i < 4; i++) {
				ubound[i] = 5;
			}
			problem = new Problem(objectives, lbound, ubound, true);
		} else if (fja.equals("2")) {
			decisionSize = 2;
			objectiveSize = 2;
			IFunction[] objectives = new IFunction[2];
			objectives[0] = new F1();
			objectives[1] = new F2();
			double[] lbound = new double[2];
			lbound[0] = 0.1;
			lbound[1] = 0.0;
			double[] ubound = new double[2];
			ubound[0] = 1;
			ubound[1] = 5;
			problem = new Problem(objectives, lbound, ubound, true);
		} else {
			System.err.println("Error!");
			System.exit(0);
		}
		IDistance distance = null;
		if (vrsta.equalsIgnoreCase("decision-space")) {
			distance = new DecisionDistance(decisionSize);
		} else if (vrsta.equalsIgnoreCase("objective-space")) {
			distance = new ObjectiveDistance(objectiveSize);
		} else {
			System.err.println("Error!");
			System.exit(0);
		}
		ISelection selection = new RouletteWheel();
		ICrossover crossover = new UniformCrossover();
		IMutation mutation = new NormalMutation(sigma);
		SH sh = new SH(oshare, ALPHA);
		IOptAlgorithm alg = new NSGA(selection, crossover, mutation, problem, distance , sh, initPopulation(n, decisionSize, objectiveSize), maxiter, n, M_FACTOR);
		List<List<Solution>> fronts = alg.run();
		printFronts(fronts);
	}