bingie
01-28-2008, 04:55 AM
I am looking at taking a trip and would like to employ some sort of decision-making equation to decide the trip with the best value for the dollar.
I have 9 options for my trip, with varying durations. The trips also have a different amount for the cost of the flight. The only constant is the trip_cost_per_day. This is approximatly $100.
So, the total cost for my trip would be calculated as total_cost = $_flight + #_days * trip_cost_per_day.
Now, here is my delimma. If the trip is (for example) 4 days long and the flight is $600 then the total trip cost is 1000, or if the trip is 7 days long and the flight is $300 then the total trip cost is 1000. Clearly the second trip is a better value as it is 3 days longer.
Clearly here (i think) I can just devide the total_cost by the #_days and determine the cost per day - the lower of which is a better deal (1000/4 = 250 vs 1000/7 = 142). This works for trips with the same number of days.
But, how do I employ this tactic on trips with DIFFERENT number of days?
Here is my data:
option #_days $_flight
3 8 489
10 8 750
4 9 553
7 9 489
1 10 383
6 10 695
8 10 383
2 11 413
5 11 498
9 12 489
I can easily determine the best option within the groups with the same number of days, but then to determin the best option between the results.
I was thinking along the line of:
$_flight2 - $_flight1 >= (#_days2 - #_days1)*trip_cost_per_day
and set rules based on if the equation evaluation to > < or =.
But if this is the correct method, i am unsure how to interpret the results.
Any thoughts?
Thanks =)
I have 9 options for my trip, with varying durations. The trips also have a different amount for the cost of the flight. The only constant is the trip_cost_per_day. This is approximatly $100.
So, the total cost for my trip would be calculated as total_cost = $_flight + #_days * trip_cost_per_day.
Now, here is my delimma. If the trip is (for example) 4 days long and the flight is $600 then the total trip cost is 1000, or if the trip is 7 days long and the flight is $300 then the total trip cost is 1000. Clearly the second trip is a better value as it is 3 days longer.
Clearly here (i think) I can just devide the total_cost by the #_days and determine the cost per day - the lower of which is a better deal (1000/4 = 250 vs 1000/7 = 142). This works for trips with the same number of days.
But, how do I employ this tactic on trips with DIFFERENT number of days?
Here is my data:
option #_days $_flight
3 8 489
10 8 750
4 9 553
7 9 489
1 10 383
6 10 695
8 10 383
2 11 413
5 11 498
9 12 489
I can easily determine the best option within the groups with the same number of days, but then to determin the best option between the results.
I was thinking along the line of:
$_flight2 - $_flight1 >= (#_days2 - #_days1)*trip_cost_per_day
and set rules based on if the equation evaluation to > < or =.
But if this is the correct method, i am unsure how to interpret the results.
Any thoughts?
Thanks =)