This is another formulation of the 3-jug problem (see jug. It uses the integrated shortest path algorithm (“Graph.SPath”) to find the path in the graph. (This algorithm is only for small graphs.)
[1] MatMod. Homepage for Learning Mathematical Modeling : https://matmod.ch.