In looking at your project, I would suggest having 3 colors for your pumps and 3 different procedures for each pump. You'd be able to reduce the nested conditionals to only test for the color and the X coordinate. The 'else' part would not necessarily be needed. This way you'd be able to collect data for each pump and make comparisons.
Note: not all colors work equally. A pump color of white, yellow, black, magenta, lime and blue will all work.