For different situation, you will need to use different constraint/relations among variables.
It is this kind of process during creating simulation which will help you think more in depth into physics and logic.
Keep up the good work.

I am not fully understand what do you mean about the "input system of (xp,yp)"?