From: Stefan F. (web.de) <ste...@we...> - 2010-04-12 17:50:38
|
There is a first working version for revenue calculation in CVS. The interface is minimal and added to the graph view: Thus in the ORWindow select Info => NetworkInfo and the public company. Then the graph is displayed and the optimal revenue result and the vertexes run for each train for the result. After this one can add additional trains and the optimization restarts. For available traintypes (currently default (including diesel), +, E and D trains) check the addTrainByString method in RevenueAdapter. BE CAREFUL: 1) It generates a lot of debug in the 18xx.log if the logging level is set to DEBUG (as it is the default). If one tests complicated cases it can fill up the hd quite quickly. Better have an own properties with debug level set to INFO. 2) I cannot guarantee that it will not run into a deadlock, thus it can freeze the UI and generate lots of debug output. Again see 1) and kill the program after around 5 minutes latest. But for reasonable (up to moderate difficult) networks it will give results nearly immediately. This is still not the algorithm of Alex, which has pretty amazing running times, but a simple brute force algorithm on the current (moderately optimized) network graph. Stefan |