private Operator chooseOperator (Predicate pred, State s, ArrayList<Operator> plan)
	{
		ArrayList<Operator> candidates = new ArrayList<Operator>();
		
		for (Operator op : opsList)
		{
			for (Predicate p : op.getAddList())
			{
				if (p.getName().equals(pred.getName()))
				{
					if(p.getName().equals("USED-RAILWAYS")){
						// Only if both "USED-RAILWAYS" have the same variable "n-1", "n+1" or "n", then they are valid.
						if(p.getVariables().get(0).getName().equals(pred.getVariables().get(0).getName())){
							candidates.add(op);
							break;
						}
					} else {
						candidates.add(op);
						break;
					}
				}				
			}
		}
		
		return chooseCandidate(candidates, pred, s, plan);
	}