From: Stefan F. (web.de) <ste...@we...> - 2010-04-13 23:01:50
|
Hi Alex and all others... ... discussing revenue calculation. It seems to spur a lot of interest. Sorry for the long post (if one includes the text document), but I try to answer most of the asked and some of the not-yet asked questions. And it seems that the algorithms already improve from the fruitful discussion. Some talk about the concepts are in the attached text document, that was easier to edit. This is the good thing of commit early and often. One of its disadvantages are the embarrassing errors in the early releases. I list those at the end of the attachment and hopefully it will clarify some of the problems you ran into. Good news first: * Running Times After hunting them down and adding a new concept (the revenue prediction - see attachment) evaluation time is now down to 1-2 seconds for a 8 and 10 train on the A scenario on my laptop. Without revenue prediction it runs for 1-2 minutes. Both runs have identical results. * Optimal Solution (?) The other thing is that my implementation suggests a (slightly) different path than Alex' which results in an increase of revenue. The change is that the 8 train does not have the 10 - 30 - 30 ( that is Alexandria and Baton Rouge in 1870, the right bottom in Alex graph - it is rotated) in the end, but the 10 - 30 - 50 (that is Austin and SouthWest on the map, the right top in Alex graph). Thus it runs for 20 more. It now pays off that we have independent algorithms running, that can find flaws in each others (like you did for mine). Stefan |