Welcome to our community

Be a part of something great, join today!

compare trips based upon price

tylerdurdan

New member
May 16, 2019
1
Im writting an algorithm to compare travel trips. A trip is a combination of a 1) flight and 2) an accommodation. For now I´m only looking at the prices. I want to find the "best" trip based upon the price. The problem is that the flight price is a static value which doesn´t increase by the amount of nights you spend. Vise versa the accommodation price does increases each time the amount of nights increases.

na6FF.jpg

Obviously formulas like those might solve the question but they dont:

q = flight_price+accommodation_price --> short trips are favored
q = (flight_price+accommodation_price)/nights ---> long trips are favored

So what would be an appropriate indicator to say that a trip is "better"? This indicator doesn´t need to provide a "real" price. It should rather give a value to compare the trips and put them in relation. Thank you.