Page 2 of 2
Re: Cost estimation
Posted: 29 Jul 2009 00:24
by Dustin
Blustuff wrote:I want to do cost estimation to guide the pathfinder, not to know how much money is necessary. It don't have to be perfect, but the imprecision must be controlled.
You can always do what Denver & Rio Grande does: Never build tunnels.
Otherwise: Check the source code and see how tunnel costs are computed and/or suggest a tunnel costing API in the API changes thread.
Re: Cost estimation
Posted: 29 Jul 2009 08:52
by Blustuff
Actually, the tunnels are just one of the problems I have to solve. Except bridges costs which can be retrived, I need every costs which is useful to estimate (approximatively but with a bounded and small imprecision) a path cost.
Re: Cost estimation
Posted: 29 Jul 2009 21:00
by Blustuff
The function AIBridge::GetPrice() return an amount of money which is dependent of the inflation but which is not the actual price of a bridge. What does this function ?
Is there a way to raise the number of lines the AI console keep ?
Re: Cost estimation
Posted: 29 Jul 2009 21:26
by Zutty
Blustuff wrote:Is there a way to raise the number of lines the AI console keep ?
If you start the game from the command line (or from a shortcut in Windows) add the switch "-d ai=5". All the debug output will go to a different window, which can have as much history as you configure it with.
Re: Cost estimation
Posted: 29 Jul 2009 21:49
by Yexo
Blustuff wrote:The function AIBridge::GetPrice() return an amount of money which is dependent of the inflation but which is not the actual price of a bridge. What does this function ?
It was depended on the price of a bridge, but it returned incorrect values. Fixed in r16986. If it returned strange values again in r16986 or newer, please report back.
Re: Cost estimation
Posted: 29 Jul 2009 22:17
by Blustuff
Thanks.