[Freeciv-Dev] City sort algorithm
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Mika Korhonen wrote:
> The simple Freeciv Real City Rate R that implements the specification is
> obtained by the following formulation
>
> R = log P + log (A/1000)
>
> or R = log P + log A - log 1000
>
> where P is the current population and A the age in year 2000 (when Freeciv
> usually ends, right). And that's how I ordered the cities :-) Hence, a city
> founded in 1999 and 1000 people gets zero rate.
Hi,
I have implemented a small perl program to sort the cities via this
formula.
If anybody wants to use it, here it is.
The expected format is approximately
city::year:population
city::year:population
...
"city",
"city",
...
Example of the input is in the archive
If anybody wants to place it in ftp or cvs or /dev/null, feel free to do
it.
Edheldil
sort_cities.tar.gz
Description: GNU Zip compressed data
|
|