One of the key components to accurate positional play and full of variables.
Distance CB to OB
Distance OB to Pocket
Distance CB to rail
English top, bottom, side
Explain your method, thought process (if any) or is it just a feel thing for you.
This is going to be a tough one to answer fully by anyone as the variables you mentioned and many more come down to each specific situation.
The ones you mentioned, plus the cloth speed, rail speed, etc.
Personally the first thing I take into account is the specific table situation. Especially the consistency between the rails and the cloth. Very common for rails to be "springy" and the cloth slow, or the rails "dead" and the cloth fast. I try to remember how each individual rail reacts and plan from there.
For example, I played on a table Monday in which one of the end rails played especially faster than the rest of the rails. I had to remember this anytime I knew I needed to go to that rail for position I must be cautious. I needed to either hit a shot with much less speed than the other rails to get my desired position without the use of extra rails, or I needed to take advantage of this rail to hit a shot a bit more firm and use it to go the extra rail or two. l also had to take into account how hard I needed to hit the object ball to make the pocket. Sometimes the decision would be made for me if hitting the shot softly to play 1 rail of this "springy" rail would not be enough to pocket the ball, I would have to go the extra rails.
Once I take this into account I typically look at how full I am hitting the object ball. Obviously from a physics standpoint, the more full you hit a ball the less the more energy is imparted on the object ball and less is retained by the cue ball and vice versa.
Next would be spin as this also effects how full I am hitting the object ball due to throw.
After that would be distance from the cue to the object ball and also total distance I want to travel after.
So I guess my routine would be something like:
Decide where I want the cue to end up
Table conditions
Fullness of hit
Spin
Distance
Except for the table conditions I do most of the other things "by feel" which basically means its just habit after many hours of consciously thinking about it. I do put actual conscious thought into table conditions though.