Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1999:
[Freeciv-Dev] City sort algorithm
Home

[Freeciv-Dev] City sort algorithm

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] City sort algorithm
From: Jarda Benkovsky <pvt.benkovsk@xxxxxxxxx>
Date: Wed, 13 Oct 1999 10:58:26 +0200

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

Attachment: sort_cities.tar.gz
Description: GNU Zip compressed data


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