docs: public MCSData[] getOrderedMCSs(ConstraintNetwork peak)
  	{
  		
  		//System.out.println("PEAK SIZE: " + peak.getVariables().length);
  		
  		Vector<Variable[]> mcslist = new Vector<Variable[]>();
  		
  		Variable[] vars = peak.getVariables();
  		for (int i = 0; i < vars.length; i++) {
  			for (int j = i+1; j < vars.length; j++) {
  				Variable[] oneMcs = new Variable[2];
  				oneMcs[0] = vars[i];
  				oneMcs[1] = vars[j];
  				mcslist.add(oneMcs);
  			}
  		}
  
  		//MCSData[] mcsinfo = new MCSData[mcslist.size()];
  		Vector<MCSData> mcsinfo = new Vector<MCSData>();
  		
  		int index = 0;
  		boolean unresMCSFound = false;
  		//System.out.println("MCSINFO size: " + mcsinfo.length);
  		
  		while((!unresMCSFound) && (index < mcslist.size())) //Per ogni MCS
  		{
  			float pcmin = 1.0f; //Valore del pcmin
  			float pcminBad = 1.0f; //Valore del pcmin
  			float kReciprocal = 0.0f; //Reciproco di K (Ribaltare prima di uscire)
  			Variable actFrom = null;
  			Variable actTo = null;
  			int unresMCS = 0;
  			
  			Variable[] currentMcs = mcslist.elementAt(index);
  			//Vector che conterrà i valori dei commit
  			Vector<Float> pcVector = new Vector<Float>();
  			
  			int mcsSize = currentMcs.length;
  						
  			//Per ogni coppia di attività {Ag, Ah} dell'MCS
  			for (int g = 0; g < mcsSize; g++)
  			{
  				long est1 = ((Activity)currentMcs[g]).getTemporalVariable().getEST();
  				long eet1 = ((Activity)currentMcs[g]).getTemporalVariable().getEST();
  				long lst1 = ((Activity)currentMcs[g]).getTemporalVariable().getLST();
  				long let1 = ((Activity)currentMcs[g]).getTemporalVariable().getLET();
  			
  				for (int h = g+1; h < mcsSize; h++)
  				{
  					long est2 = ((Activity)currentMcs[h]).getTemporalVariable().getEST();
  					long eet2 = ((Activity)currentMcs[h]).getTemporalVariable().getEET();
  					long lst2 = ((Activity)currentMcs[h]).getTemporalVariable().getLST();
  					long let2 = ((Activity)currentMcs[h]).getTemporalVariable().getLET();
  
  					//Analisi coppia diretta
  					long dmin = est2 - let1;
  					long dmax = lst2 - eet1;
  
  					if(dmin > dmax)
  					{
  						logger.severe("Direct pair and dmin > dmax: IMPOSSIBLE");
  						System.exit(0);
  					}
  					
  					float pc = 0.0f; //pc corrente
  					if(dmin != dmax) 
  					{
  						pc = ((float)(Math.min(dmax, 0) - Math.min(dmin, 0)))/((float)(dmax - dmin));
  						pcVector.add(pc);
  												
  						if(pc < pcmin)
  						{
  							//System.out.println("ADDED DIRECT: " + pc);
  							pcmin = pc;
  							pcminBad = pcmin;
  							actFrom = currentMcs[g];
  							actTo = currentMcs[h];
  						}
  						else
  						{
  							unresMCS++;
  						}
  					}
  					else //If dmin == dmax, we can skip the analysis of the pair {Ag, Ah}
  					{
  						unresMCS++;
  					}
  										
  					//Analisi coppia inversa
  					dmin = est1 - let2;
  					dmax = lst1 - eet2;
  
  					if(dmin > dmax)
  					{
  						logger.severe("Inverse pair and dmin > dmax: IMPOSSIBLE");
  						System.exit(0);
  					}
  					
  					if(dmin != dmax) //Se dmin == dmax, possiamo skippare l'analisi della coppia {Ag, Ah}
  					{
  						pc = ((float)(Math.min(dmax, 0) - Math.min(dmin, 0)))/((float)(dmax - dmin));
  						pcVector.add(pc);
  						
  						if(pc < pcmin)
  						{
  							//System.out.println("ADDED INVERSE: " + pc);
  							pcmin = pc;
  							actFrom = currentMcs[h];
  							actTo = currentMcs[g];
  						}
  						else
  						{
  							unresMCS++;
  						}
  					}
  					else
  					{
  						unresMCS++;
  					}
  				}					
  			}
  			
  			//SE INCONTRIAMO UN MCS IRRISOLVIBILE POSSIAMO INTERROMPERE IL CICLO: LA SOLUZIONE E' IMPOSSIBILE
  			if(unresMCS < (mcsSize*(mcsSize-1)))
  			{
  				//Calcolo del K(MCS)
  				for(int g=0; g<pcVector.size(); g++)
  				{
  					//Dbg.printMsg("" + pcVector.elementAt(g), LogLvl.Normal);
  					kReciprocal += 1.0f/(1.0f + pcVector.elementAt(g) - pcmin);
  				}
  						
  				//mcsinfo[index] = new MCSData(pcmin, (Activity)actFrom, (Activity)actTo, (kReciprocal == 0.0f) ? 1 : 1.0f/kReciprocal);			
  				mcsinfo.add(new MCSData(pcmin, (Activity)actFrom, (Activity)actTo, (kReciprocal == 0.0f) ? 1 : 1.0f/kReciprocal));
  				mcsinfo.add(new MCSData(pcminBad, (Activity)actTo, (Activity)actFrom, (kReciprocal == 0.0f) ? 1 : 1.0f/kReciprocal));
  				index++;
  			}
  			else
  			{
  				unresMCSFound = true;
  			}
  		}
  
  		MCSData[] mcsinfoArray = mcsinfo.toArray(new MCSData[mcsinfo.size()]);
  		//Se abbiamo trovato una soluzione
  		if(!unresMCSFound)
  		{
  			//Arrays.sort(mcsinfo);		
  			Arrays.sort(mcsinfoArray);
  		}
  		else
  		{
  			//mcsinfo = null;
  			mcsinfoArray = null;
  		}
  		
  		//return mcsinfo;
  		return mcsinfoArray;
  	}