Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13277) air units, fuel, and pathfinding (PF) / goto
Home

[Freeciv-Dev] (PR#13277) air units, fuel, and pathfinding (PF) / goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13277) air units, fuel, and pathfinding (PF) / goto
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Jun 2005 13:06:33 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13277 >

Currently PF doesn't handle fuel.  It handles air units but assumes that
fuel == 1 for all units, so all non-airbase positions are dangerous.
Basically this means that bombers aren't as efficient as they should be.

This can be fixed.  However it won't be especially easy.  There's
probably already a ticket for it actually, but I sure can't find it.

I believe the best suggestion so far is to fake it.  Basically if you
have a unit with fuel F1, and move rate M1 you transform it into a new
unit with fuel 1 and move rate M2=F1*M1.  Now you get the optimal path
using the same algorithm as before (that works with fuel 1) but certain
characteristics of the path are wrong.  For instance the turns and MP
for each position on the path are incorrect, so you have to do a reverse
of the transformation at the end to provide the correct values in each node.

-jason





[Prev in Thread] Current Thread [Next in Thread]