[Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13845 >
Well, for applying the logistic curve rx(1-x) one could use the food
supply to give max pop, the idea of the curve is that growth is
exponential in the beginning and then slows down when pop comes close
to the max pop, which in freeciv is determined by 2 food used per
citizen
foodusedpersize= 2;
maxsize= totalfood/foodusedpersize;
maxpop= 100000*(maxsize*(maxsize+1))/2;
if( maxpop>12 && !haseffect(city,EFT_SEWERS) ){
maxpop= 12;
}
if( maxpop>8 && !haseffect(city,EFT_AQUEDUCT) ){
maxpop= 8;
}
growthbaserate = 100000/(16*foodboxsize);
growthrate= pop*growthbaserate*(maxpop - pop);
A starving city(and also a city selling its aqueduct/sewer) would get
negative growth (which would cause messages of famine/plaque)
Ah yes, and I named everything "pop" because size is about
size=2*sqrt(pop);
, that is unless someone solves exactly the current formula
(size+1)*size/2 == pop
, and the granary is
if( haseffect(city,EFT_GRANARY) ){
if(growthrate>0){
growthrate*= 2;
}else{//famine
growthrate/= 2;
}
}
On 9/7/05, Benoit Hudson <benoit.hudson@xxxxxxxxx> wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13845 >
>
> > The only thing wrong with that model is that it is not transparent what
> > affects population growth.
>
> We can make it transparent if we want, with all the tooltips.
>
> > Yeah, the growth rate was something like proportional to
> > (size) * sqrt(maxsize - size)
> > I'm sure we could find the exact formula somewhere.
>
> What do we set maxsize to? Maybe min(N, FOOD_COST * prod[O_FOOD]),
> where N is 8 before aqueduct, 12 before sewers, and unlimited
> afterwards? This makes population growth still depend on food, but
> maybe that's OK.
>
> My formula can generate maxsize < size, which means either my formula
> is bad or we need to special-case that.
>
> -- Benoît
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, (continued)
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Jason Short, 2005/09/06
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Antoine Bouchard, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Benoit Hudson, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Benoit Hudson, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Brian Dunstan, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Jason Short, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Brian Dunstan, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Benoit Hudson, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Jason Short, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities, Benoit Hudson, 2005/09/07
- [Freeciv-Dev] Re: (PR#13845) Increasing the appeal of very large cities,
Peter Schaefer <=
|
|