More on Test Bed

[From Bill Powers (2003.12.06.1034 MST)]
Here are a few concepts that may help others understand what the Test Bed
project is about. These are all preliminary ideas subject to revision,
extension, and deletion.

  1. Defining a Household
    I use the term Household to indicate a consumer, but without any model of
    the consumer. A household might make a nice Object (in the sense of
    object-oriented programming) because it has both methods and
    properties.
    Household Reserve, Rh.

A “reserve” is a place where money is kept after it is received
and before it is spent. If Rh stands for the amount of money in the
household reserve, then, for example, we would write
Rh = Rh + (WH - GP) * dt
where
W is the daily wage rate in dollars per day
H is the rate of working in number of days per day
G is the rate of purchasing goods in goods per day
P is the price per good in dollars
dt is the number of days in one iteration of the
program.
So if the wage is $10 per hour, and the person works 0.33 days per day,
and one iteration of the program occupies 0.01 days, the reserve
increases at 10 * 0.33 * 0.01 or $0.033 in this iteration.
At the same time, if the price per good is $2.00, and goods are purchased
at the rate of 20 per day, the reserve decreases by 2.0200.01 or
$0.40 in this iteration.

The net result is that during this iteration, the reserve changes by
$0.033 - $0.40 = -$0.37. If wages, hours worked, purchase rate of goods,
or prices are changing, a slightly different amount of change in Rh will
occur in the next iteration, the next hundredth of a day.

Note that if we allow the household reserve to go negative (rather than
forbidding purchases if it reaches zero), we are allowing borrowing, and
must include in the model a place where the money comes from.

  1. Defining a Plant:

I use the term Plant to indicate a place where manufacturing takes place,
but leaving out any managers.

The Plant also has a reserve, Rp, which might be defined this
way:

Rp = Rp + (GP - WH*N - S)*dt

where

G = goods sold/purchased per day, in number per day

P = price, in dollars per good

N = number of worker-days worked per day

WHN = wages paid per day

S = Savings (money put into savings account)

dt = number of days in one iteration of the program

The plant income is the sum of all positive terms, and the plant expense
is the sum of all negative terms.

The calculation of the reserve works as in the Household example, with
the plant reserve changing by some amount in this particular
iteration.

Of course we could include many other sources of income and expenditure;
this is meant only to indicate how the model is build up.

Actually, the Plant sells to many customers, and many customers work at
many plants, so the above equations eventually will have to be modified
to show the wage paid to each worker and the price paid by each consumer.
At present those numbers would all be the same for different consumers,
but eventually there will be differences as details are added to the
model.

We can write similar equations to represent what can be called Inventory,
symbolized V (because I stands for so many other words in economics). We
have Vh, the Household inventory into which goods come when purchased and
out of which goods are withdrawn when they are used or deteriorate. And
we have Vp, the Plant inventory of goods, which is increased as goods are
produced by workers working at a certain productivity, and decreased as
consumers purchase the goods, or as the goods become
unsaleable.

That’s enough for starters. Notice all the things that happen during one
iteration of 0.01 day. A household can receive purchased goods into its
inventory, which are simultaneously subtracted from the plant inventory.
The goods are paid for, the money disappearing from the household reserve
and appearing in the plant reserve. The goods are used and some may
depreciate, disappearing from the household inventory. And goods are
manufactured, appearing in the plant’s inventory. Wages are paid to the
consumers, the money being subtracted from the Plant reserve and
simultaneously added to the Household reserve.

There are some rules that have to be decided upon. What happens when the
Plant or Household inventory falls to zero? What happens when either
reserve falls to zero? If we allow negative reserves, where does the
money being spent come from (and how much detail do we want to add to the
banking and credit system at that point – for example, does interest
have to be transferred from Household reserves to, say, Banking
reserves?).

The point is that we can put in any rules we think are needed and make
the model operate accordingly.

What is left unspecified is the determination of wages, hours worked,
goods purchased and used, decisions on allocation of plant income,
interest rate charged, spending to change productivity or sales, and so
on – all the things that the human operators of this system would
determine. That is what I call the “psychology” of the model –
the part that represents someone’s theory of Economic Man.

When any particular theory of Economic Man is used to determine how much
people will earn and spend, what goods they will buy, what prices they
will charge, that theory can be put into the model to close all the loops
and make sure every loose end is accounted for. Then the model can be set
to whatever initial conditions are considered realistic, and be allowed
to operate to see what it does.

In my current version of this Test Bed, I have used PCT models for the
consumer (who operates the Household) and the manager (who operates the
Plant). The consumer wants a certain number of goods to be in Household
inventory, and a certain amount of money to be in Household reserves. The
consumer uses up goods in Household inventory and replaces them by
purchasing more from the plant. Purchasing the goods disturbs the
Household reserve, which is replenished by the consumer’s working
sufficient hours (up to 2/3 day per day) to replace the spent money. In
the plant, the manager maintains inventory at a constant level by varying
the price per good, and also controls the plant reserves by deciding how
much money to distribute to consumers who do not work for wages (this
accounts for profits and other capital expenses). That latter was an
afterthought and is probably not the best way to determine the ratio of
capital income to wage income). With the addition of these human control
systems, the model can now actually operate.

When started, this system begins in an arbitrary state far from
equilibrium, and soon approaches a final state in which prices, hours
worked, and both reserves and both inventories have come to steady states
again. If wages are then arbitrarily increased, hours worked decline,
plant inventory declines, and soon all the variables have been affected.
Equilibrium is soon reached again, now with prices having increased
exactly enough to offset the increase in wages and hours worked having
returned to where they were. Other interesting effects happen when other
changes are made by the user, but I don’t know if they are
realistic.

So this is how the Test Bed would be used to test a theory, and how
theories can be modified to see the effects of changes. Note that this
model contains no high-falutin’ theories like Supply and Demand. There
are supplies and there are demands, and they have the effects they have
because of the detailed relationships that are spelled out in the model,
but nothing happens because of a law of supply and demand, or any other
such generalization. The model doesn’t work because of generalizations,
but because of how its variables are related to each other down to the
last detail.

This approach, simulation, works by detailing every variable and every
relationship among variables, and evaluating the relationships at very
short time intervals to compute the conditions for starting the next
evaluation. No equations are ever solved analytically, so
discontiunuities and nonlinearities cause no problems at all, at least of
a computational kind. And if the model is constructed realistically
enough, the results can be very nearly as good as those obtained by
experimenting with the real system.

Best,

Bill P.

Melding
[From Bill Powers (2003.12.07.20:15 EuST)]

[From Bill Powers (2003.12.06.1034 MST)]

I will work with your Test Bed.

Defining your Household, shouldn’t there also be a variable for tax and fees. If you have a variable for tax and fees, you also need an public Plant. This public Plant (the State) may then have a “reserve” Rpubl =Rpubl + (T*(∑W∑H∑N) -Gpubl* -WHN - Spubl).

∑W is the sum of all daily rates in dollar per day

∑H is the sum of all rates of working in number of days per day

∑N is the sum of all rates of worker-days worked per day

Gpubl is goods distributed per day in millions per day, purchased goods is negative.

Spubl is public savings and funds etc.

Defining your Plant, shouldn’t there also be an unemployment insurance WuHuNu where

Wu is the daily unemployment insurance rate in dollar per day

Hu is the rate of unemployment in numbers of days per day

Nu number of unemployment-days when a person is getting unemployment insurance per day.

bjorn

Melding
[Bjorn Simonsen (2003.12.09,15:45 EuST)]

From Bill Powers (2003.12.08.0506 MST)

So I welcome help in developing this Test Bed, but caution that we really do need considerable
advice from people with practical experience in the world of business (like you, perhaps?), so
we can make the model realistic enough to mean something. My idea of how to proceed is to
define large chunks first, like Consumer and Producer, Government and Bank, and then break
them down into smaller chunks as we see the need for more detail.

I will work with my own Test Bed. I will place it on my Web (first Sunday (Excel)) where you can come with, and now and again I’ll send you some questions and comments. Parallel I will make my Test Bed in PowerSim and gradual as I learn Smalltalk (VisualWorks7.1), I’ll also make it OOP.

Could it be an Idea and make the model running one year and let dt be 1/(365*24)? Then the wages and more would be applied also for a year. The model would still be a dynamic continuous model. I know engineers thinks in microseconds, and so do the brain. I am making something which can’t be named “toy model” and which runs a year, but I would like to hear a comment from you. I am not interested in economical comments, but according to programming.

In the same model I don’t use a simple person, but a group of 1000 persons working at the time being one Plant. Here I also have a simple Government and Bank. Give me comments.

I am not en economist. At the management school I studied social economics, business economics but mostly and budgeting/planning, but more organization and personnel administration. But I am not the one who will give the advises. I will rather listen to advises and form questions.

bjorn

[ Samuel Saunders (2003.12.09.1122 MST]

···

On Tue, Dec 09, 2003 at 03:38:42PM +0100, Bj�rn Simonsen wrote:

[Bjorn Simonsen (2003.12.09,15:45 EuST)]
...
Parallel I will make my Test Bed in
PowerSim and gradual as I learn Smalltalk (VisualWorks7.1), I'll also
make it OOP.

Bjorn,

Would you consider using Squeak Smalltalk, a GPL version of Smalltalk that
works for most common platforms (including Windows, Mac, and common flavors
of Unix and Unix clones) ? That might make things more accessible to more
people.

Samuel
--
Samuel Spence Saunders, Ph.D.
saunders@gwtc.net
ssaunders@olc.edu

[From Rick Marken (2003.12.09.1110)

Samuel Saunders (2003.12.09.1122 MST) --

> Bjorn Simonsen (2003.12.09,15:45 EuST)
> ...
> Parallel I will make my Test Bed in
> PowerSim and gradual as I learn Smalltalk (VisualWorks7.1), I'll also
> make it OOP.

Would you consider using Squeak Smalltalk, a GPL version of Smalltalk that
works for most common platforms

Bjorn and Samuel (and all other Test Bed modelers):

Here is an Excel version of Bill's Test Bed model as it existed in February of
this year. Excel is certainly platform independent and has some nice display
capabilities (demonstrated in this version of the model). Of course, it's slow
and has that problem with labeling variables. But that may not be a big problem
if the model stays at the aggregate level.

Best

Rick

Econ004RMb1.xls (97 Bytes)

Melding
[Bjorn Simonsen (2003.12.09,21:20
EuST)]

[ Samuel Saunders (2003.12.09.1122 MST]

Would you consider using Squeak Smalltalk, a GPL version of Smalltalk that works for most common
platforms (including Windows, Mac, and common flavors of Unix and Unix clones) ? That might make
things more accessible to more people.

No, I don’t think so VW7.1 is the same. (http://www.cincom.com/scripts/smalltalk.dll/index.ssp)

bjorn

[From Bill Powers (2003.12.09.1359 MST)]

Bjorn Simonsen (2003.12.09,15:45
EuST)–

Looks as though several people want to join the Test Bed project (all are
welcome, Bill W).

I do not have PowerSim, or Smalltalk, and have no significant experience
with OOP programming. I have checked out the SmallTalk site you
mentioned, and registered so I can download VisualWorks and the other
one. It seems to be free for noncommercial use. I hope those who
understand OOP programming can explain it to me. I’m game to try. Are
there any good tutorials on the Web?

Christian Heider, in Germany, has long been trying to get us to use
SmallTalk. Maybe he will see this and join in, too. Wolfgang, do you know
anything about this?

At over 400 megs, the download will take about 28 hours. If someone
here in the States has access to fast downloads and a CD-ROM burner, I
would greatly appreciate getting the program that way! Any
volunteers?

Who’s going to get on this bandwagon?

Best,

Bill P.