public IntPair setHolders(IngredientList compatibleIngredientList, IntPair holderAndPos, HolderList holderList) throws RobotDriverException {
// give to each used ingredient a Holder and a position in Holder
HolderList inputHolderList = holderList.getInputHolders();
int holderNumber = holderAndPos.first;
Holder inputHolder = inputHolderList.get(holderNumber);
int maxPosition = inputHolder.xSize() * inputHolder.ySize(); // to handle position in holder
int currentPosition = holderAndPos.second; // to handle position in holder
for (Ingredient aIngredient : compatibleIngredientList) {
if (aIngredient.chemical().pipettingInfo().holder().name().equals("FREE")) {
if (currentPosition <= maxPosition) {
aIngredient.chemical().pipettingInfo().setHolder(inputHolder);