 |
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:13
|
|
This is my first shot an object design for the economy model. I haven't thought really hard about this, but will put up my initial ideas on the object model here for people to comment on. First I will define the basic objects in the economic model, and then say how they can be aggregated to give the different classes that represent a whole economy.
Sector -- is a sector of the economy such as farming or manufacturing. This object is in charge of producing the sector's output, such as food or manufactured goods. Sector is only used at the lowest level of the economy, for example the economy associated with a MapSquare.
SectorStats -- are statistics associated with a given sector of the economy. Things like how much is produced in a sector, what the wages are, etc. SectorStats can be held at any level of the economy, even the economy for the whole civilization will have a SectorStats object associated with the agriculture sector.... In this case the statistics will simply be the aggregated statistics of all the smaller units in the civilization.
EconStats -- are the same as SectorStats, except the information it holds pertains to the economy as a whole, rather than an individual sector.
Marketplace -- handles prices for various goods, and mediates trades between the government, the people, and merchants
PrivateSector -- handles what non-government individuals do when they get their hands on stuff... Consumption of goods by the public, as well as investment, and decisions by new workers of where they should work (provided the government gives them that discretion) are covered here.
PublicSector -- stores and implements government orders regarding the economy
Infrastructure -- Educational institutions, military training facilities, etc. Infrastructure does all the things that buildings do in Civ2.
The things above can be assembled into various Economy objects. Right now I am coding up a version of the economic model where most of the action happens at the MapSquare level. That is the version of objects I will present here. It is also possible that we will run the economy at the Province level primarily, and just keep track of some limited information at the MapSquare level. I think the collection of basic objects I have is sufficient to do both options, but I'm focused on the MapSquare-level economy now. For now the information on the different types of sector is available, and also infrastructure, is held in associated "Info" classes. So the SectorInfo class has information about the farm sector, resource extraction sector, manufacturing sector, and services sector. At some point we may make these independent objects (FarmSector, ServicesSector) that inherit from a base Sector class.
MapSquareEconomy
[*] EconStats
[*] Sectors (each sector has a SectorStats object)
[*] Marketplace
[*] PrivateSector
[*] PublicSector
[*] Infrastructure (actually, infrastructure is held in the MapSquare in each Terrain type, I just list the infrastructure here because it is an important component of the economy)
[/list]
HighLevelEconomy (This can either be an economy associated with a Civilization or Province. So there will really be to classes that inherit from HighLevelEconomy, but they are similar so I won't distinguish between them here)
[*] EconStats
[*] SectorStats for each economic sector
[*] PublicSector
[/list]
Well, that's about it for now. Does this look reasonable to the other programmers? Any big problems? I've tried to avoid "sprawling class syndrome" and kept each of the classes tightly focused on a single job.
|
|
|  |
 |
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:13
|
|
Question about Merchants: Do you have something to represent trade routes?
Trade routes can be pirated etc, and I believe I read that supply of armies in the military model could be done through specialized merchants, so basically it'd be a trade route from a square to an army in the case of military, or to another square in most cases.
Does your merchant object do that, or just takes care of what can be sold at what price?
|
|
|  |
 |
|
F_Smith
|
|
Austin, Tx 78728
May 1999 time: 05:13
|
|
This seems good, Mark.
I'll look it over in more detail later, but it seems you're doing well.
|
|
|  |
All times are GMT. The time now is 05:13. Apolyton Time is 00:13. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|