LOL was that Monty Python?
Announcement
Collapse
No announcement yet.
Economy Model Version 0.2
Collapse
X
-

You are crazy, Guildmaster.

But thanks for the word. The entrepeneur class it is, then.
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Wow, I found a great link on the topic. www.sparknotes.com which is a site i sometimes use as an English Novel reference has a section on economy. It has everying thing w have beren discussing
*Suppy and Demand
*Elactisity
*quyalibrum, etc.
and messag boards. This site is alwwaays written vry well. I havnt atcually read it yt, I glanced at demand, and it seemed somewhat rellevant.
Comment
-
Thanks, heardie! Checking it out now...
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Hmm.
It's pretty much just the message boards they have. It's not of as much use as I thought.
Maybe I should buy that book they're advertizing for. It did get 5 out of 5 in Amazon's user rating.
Anyway, I am still working on a more advanced supply and production algorithm. It should include both capital, raw materials, labour and productivity. But like the demand thing it wont be ready till it's ready. Just give me some time, guys! If I get the time to work on it it might be ready in a week or so, otherwise maybe 2-3 weeks. Dunno.
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
While working on the supply algorithm I have come up with a way to handle the "what do the people want" part of the demand.
Basically it should look something like this:
First the amount of goods produced that turn is calculated. Then each class' income's percentage of the total income of all classes is the same as the percentage of the total amount of goods that this class demands. Then the amount of people is used to find the goods per PU (note that when we link this with the pop model not everybody would be working - the kids and elderly etc would also be included in the class population). All this we have seen before. Then the magic begins:
The greatness of this system is propably not seen immediately. But what is good about it is, that later on, adding a lot of new goods to the line wont take up many lines. So to make it so good number 1000 to 1100 demanded is cars we will only have to add 7 lines. And when people's incomes are very high the rows of goods that they demand will generally be pretty large. So all in all the amount of lines would not be _too_ large, and the algorithm still does what I want it to.Code:if (goodsperpu < 5) { dfood = goodsperpu; goto end; } else dfood = 5; if (goodsperpu < 6) { dhousing = goodsperpu - 5; goto end; } else dhousing = 1; if (goodsperpu < 8) { dfood = dfood + goodsperpu - 6; goto end; } else dfood = dfood + 2; if (goodsperpu < 9) { dclothing = goodsperpu - 8; goto end; } else dclothing = 1; if (goodsperpu < 10) { dfood = dfood + goodsperpu - 9; goto end; } else dfood = dfood + 1; if (goodsperpu < 11) { dhousing = dhousing + goodsperpu - 10; goto end; } else dhousing = dhousing + 1; if (goodsperpu < 12) { dfood = dfood + goodsperpu - 11; goto end; } else dfood = dfood + 1; if (goodsperpu < 13) { dclothing = dclothing + goodsperpu - 12; goto end; } else dclothing = dclothing + 1; if (goodsperpu < 14) { dfood = dfood + goodsperpu - 13; goto end; } else dfood = dfood + 1; if (goodsperpu < 16) { dhousing = dhousing + goodsperpu - 14; goto end; } else dhousing = dhousing + 2; if (goodsperpu < 17) { dfood = dfood + goodsperpu - 16; goto end; } else dfood = dfood + 1; if (goodsperpu < 19) { dclothing = dclothing + goodsperpu - 17; goto end; } else dclothing = dclothing + 2; if (goodsperpu < 22) { dhousing = dhousing + goodsperpu - 19; goto end; } else dhousing = dhousing + 3; if (goodsperpu < 23) { dfood = dfood + goodsperpu - 22; goto end; } else dfood = dfood + 1; if (goodsperpu < 24) { dclothing = dclothing + goodsperpu - 23; goto end; } else dclothing = dclothing + 1; if (goodsperpu < 28) { dhousing = dhousing + goodsperpu - 24; goto end; } else dhousing = dhousing + 4; if (goodsperpu < 29) { dfood = dfood + goodsperpu - 28; goto end; } else dfood = dfood + 1; if (goodsperpu < 32) { dclothing = dclothing + goodsperpu - 29; goto end; } else dclothing = dclothing + 3; if (goodsperpu < 38) { dhousing = dhousing + goodsperpu - 32; goto end; } else dhousing = dhousing + 6; if (goodsperpu < 40) { dfood = dfood + goodsperpu - 38; goto end; } else dfood = dfood + 2; if (goodsperpu < 43) { dclothing = dclothing + goodsperpu - 40; goto end; } else dclothing = dclothing + 3; if (goodsperpu < 50) { dhousing = dhousing + goodsperpu - 43; goto end; } else dhousing = dhousing + 7; end:
So now it should be fast and easy for Amjayee to just make a few new changes to the econ demo, which will make the whole demand thing a finished chapter.
The other minor changes needed is:
- make the minimum price of a good 0.1 credits and not 1 credit.
- add a few lines to the price calculator:
To make sure that people spend the same amount of money as they buy.Code:mfood = sfood * pfood; mhousing = shousing * phousing; mclothing = sclothing * pclothing; mgoods = mfood + mhousing + mclothing; mfood = (income / mgoods) * mfood; mhousing = (income / mgoods) * mhousing; mclothing = (income / mgoods) * mclothing; pfood = mfood / sfood; phousing = mhousing / shousing; pclothing = mclothing / sclothing;
Then the demand and price calculator should be settled. All that is left is for me to complete the supply thing. My work is going forward. I haven't had a lot of time this week to work on it, and what I have is still pretty complex (it always becomes more simple when I am completing it). Hopefully this weekend I will be able to do some serious breakthroughs.
------------------
"It ain't broke, so BREAK it."
- Raingoon
GGS Website
[This message has been edited by The Joker (edited November 30, 2000).]
[This message has been edited by The Joker (edited November 30, 2000).]"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
quote:

Originally posted by The Joker on 11-30-2000 06:50 PM
Code:if (goodsperpu < 5) { dfood = dfood + goodsperpu - 6; goto end;
I have heard that the 'goto' command should be avoided, as it creates hard to read code. Anyway apart from that little rambling good work
....not that I understand what it does (as with most the economyu programming 
Comment
-
Yeah I know the reasons why Goto is shunned.
It was just the obvious thing to use here, since it is just a lot of goto's that all lead to the same point. And it would be much more time consuming to make this entire list into some other sort of loop.
What the whole thing is supposed to do is make it possible to use the people's income to find what goods they demand. If people's income is low they will mostly demand simple goods like food and housing. When they become wealthier they will demand lots of luxury goods and they will only spend a fraction of their income on food.
But this is actually not just a thing you do. Programming it is quite dificult. Cause it is not possible to just make the demand of each goods a function of the income, since the demand for each good as a function of total income will not just make up a straight line. In stead it will have an inclination of 0 some places, and other places it will have an inclination of 1.
Argh, this is not easy to describe. Especially when I can't draw it for you all, and even more so when I have to do it in english!
------------------
"It ain't broke, so BREAK it."
- Raingoon
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Ok, I think I have finally found a good way to handle supply, and production in general. Now it just needs some overall testing, to see if it works as I want it to, and I have to figure out some minor details, like the actual relationship between the capitalists and workers etc.
But I might as well post the first part of the algorithm, the one used to figure out how much money is invested in each sector.
After a lot of thinking, and after having thought of lots of potentials, I think the best way to do this is actually the simplest as well:
Simply use the amount of money earned from selling each good to invest in the good as well.
So if the production of food is 20, of housing is 10 and of clothing is 5, and the price of food is 8, of housing 10 and of clothing 20, then the amount of money invested in each of these the next turn will be:
Food: 20 * 8 = 160
Housing: 10 * 10 = 100
Clothing: 5 * 20 = 100
This should make sure that the equilibrium, where the price of all goods are the same, should come rather quickly.
Actually I think this system could be tested in the old version of the econ prototype. Since Amjayee is propably buissy I will try to do this myself, by scouting his program for the "people changing jobs" algorithm. Since there is no expences when producing goods in the first prototype, and since investments are not used, I will just use the results gained as modifiers with which the people should change jobs.
But the more I think about this, the less sure I am of whether the profit rate (money earned divided by money invested) should be the same for all sectors. Is it so? I mean, if technological development stopped right now, would it mean that all sectors would end up with the same profit rate? Logic would say that it would, cause if more money was earned somewhere it would mean people would invest money there, which would cause a lower profit rate.
But maybe sectors with high production has a low profit rate, where ones with a low production has a higher one. I am just not sure.
But the system I described there will most likely be used in the second econ prototype, and if we realize it is not good after all then we can always change it.
And don't worry, the rest of the econ model will be there shortly. I am almost done now.
------------------
"Damn those nazicommunists."
- McBain
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment

Comment