[Freeciv-Dev] Re: (PR#7249) Auto settlers don't irrigate or mine
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7249 >
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7249 >
>
> I made a patch based on my post above, so I'd better explain what
> exactly my math is.
>
> if:
> b = difference in improvement value
> m = discount per turn, defined in amortize() as (MORT-1)/MORT
> t = time to create improvement
> a = amortized value of one time payment after t
> v = total value
>
> then a = bm^t
>
> however this isn't quite right, since the value is paid every turn
> thereafter, so v = bm^t + bm^(t+1) + bm^(t+2) + ...
>
> we can factor this into v = bm^t ( 1 + m + m^2 + m^3 + ... )
>
> and the sum of the infinite series (1 + m + m^2 + m^3 + ... ) is equal
> to 1 / (1 - m), assuming m<1.
>
> and so the final value of v is a / (1 - m), which is in the patch.
>
> The patch also includes the "if extra == -1, extra = 0" clause.
>
> Anyone want to check my math? :)
The math is correct. Of course this doesn't mean that the MORT system is
a good model in the first place.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#7249) Auto settlers don't irrigate or mine,
Jason Short <=
|
|