[QUOTE=Boballoo;473987]I am not sure who to ask or where to go with this, but if this is the wrong place, please tell me where to go (politely please ) OR better yet, if you know of someone who can do this for me on my web site, please refer me to them or them to me. I am happy to pay someone to accomplish what I need.
I need to create a formula to decide how much it will cost my customers to display my painted logos/signs on company car doors (for example). There are several criteria and each one depends on other criteria. It gets complicated and is beyond my grade 12 math skills of many years ago so I need some help. I also need to change this into computer code so that the client can calculate their cost online in real time depending on the criteria they enter.
There is an UN-CALCULATED BASE RATE (let's say $0.25 per mile), but this will need to be adjusted from time to time. The CALCULATED BASE RATE will depend on the following:
1) Type of route on which the art work travels.
a) Urban (higher cost per mile — base rate x 1.5)
b) Rural (lower cost per mile — base rate x 0.
There's something missing here. At first I though you were saying that there was no cost for for rural driving but then you say that Freeway driving is lowest. Was this 1.0 times your base rate?
It's really just a matter of doing carefully what you wrote above. The base rate is .25/mile. Urban rate is "base rate x 1.5" so the urban rate is (.25)(1.5)= .375/mile. Rural rate is R*.25, whatever the missing rural rate, R, is. Freeway rate is .25(0.6)= 0.15. If the sign is driven x miles urban, y miles rural, z miles freeway, then the milage cost is .375x+ .25Ry+ 0.15z.c) Freeway (lowest cost per mile — base rate x .6)
d) Mix (determined by the percentage mix of all of the above
= CALCULATED BASE RATE 1
2) The length of time when the artwork is being displayed during specific times of the day
a) rush hour travel (7 AM – 10 AM and 4 PM – 7PM) will cost more per mile = base rate x 2
b) Daylight hours other than rush hours = base rate x 1.5
c) Night hours other than rush hours = base rate x 1
1) x 2) = CALCULATED BASE RATE 2 (not sure if this should be 'X" or "+" )
3) The distance the artwork travels.
distance x above CALCULATED BASE RATE 2
So, for example if a client's sign travels 100 miles (10 miles urban, 30 miles rural, 60 miles freeway) for 7 hours (3 rush hours, 3 daylight hours and 1 night hour) what will the rate per mile be? How much will it cost in total?
Please feel free to ask any questions or comments. Thank you for your help in advance.
Assuming the "uncalculated base rate" is still that .25, then for time, the cost is 2(.25)= .5 on rush hour, 1.5(.25)= .375 on daylight, 1(.25)= .25 hour on night. If there are u hours of rush hour, v hours of non-rush hour day, w hours of non-rush hour night, the total for time is .5u+ .375v+ .25w.
Now, for (3) are you saying that the rate calculated on time is then multiplied by the entire length of the trip, x+ y+ z? If so, that charge would be (.5u+ .375v+ .25w)(x+ y+ z)
The total charge (add them, don't multiply- if you multiply you get units of "square dollars" which makes no sense) would be .375x+ .25Ry+ 0.15z+ (.5u+ .375v+ .25w)(x+ y+ z).