Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification
Home

[Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification
From: "Brian Dunstan" <bdunstan149@xxxxxxxxx>
Date: Mon, 18 Apr 2005 17:33:24 -0700
Reply-to: bugs@xxxxxxxxxxx

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


--- James Canete <use_less@xxxxxxxxxxx> wrote:
> 
> <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12833
> >
> 
> > [bdunstan149@xxxxxxxxx - Mon Apr 18 21:38:43
> 2005]:
> > 
> > I was looking at the auto settler code to see what
> > there is to be done, and one thing I came upon is
> that
> > consider_settler_action has some unnecessary
> steps. 
> > All it has to do is call the amortize() function,
> > which will do all the necessary calculation of the
> > value of a future benefit. 
> 
> Actually, that's wrong.  You can't just amortize the
> difference in tile
> value, because that difference is not a one time
> payment.  

Are you sure?  The value, according to
evaluate_improvements(),  is the difference, before
and after, of city_tile_value().  In a republic
government, a square that is plains with road an
irrigation has a city_tile_value() of 93, according to
current weightings.  The question is, 93 of what? 
What are the units being used?  If the units are gold
pieces equivalent, the 93 looks like that is the value
of the perpetuity in lump sum today.

In any case if the number is only being used to
compare between different improvements for a worker to
make, the ranked order of the lump sums will be the
same as the rank order of the annual payments.


>Every turn
> after then will also pay the difference, so you need
> to do an
> amortization of a perpetuity.  (That's the
> accounting classes talking. :)

Yes.  If annual payment is 'p', and the interest rate
'i', the value of the perpetuity is simply

p / i

For example, if the interest rate is 5%, the value of
a perpetuity that pays $1 / year is  ($1 / 0.05) = $20


-Brian

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





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