[From Bill Powers (2003.03.02.0759 MST)]
Rick Marken (2003.03.01.1740)--
>Second, Bill Powers recently sent a revised version of Econ004 that deals
>correctly with the situation in which credit (going below zero reserves)
>is not allowed. I've printed out the source but it would be nice if I
>could get a version where the changed code is highlighted in some way. Is
>there some way you could do that, Bill? Perhaps read the Pascal source
>into WORD and italicize the changes?
You found some repeated code, which I then fixed, and then I completely
rewrote the two procedures called kconsumerlevel1 and wconsumerlevel1. So I
can't really do as you ask, no longer having the original forms. Here are
the latest versions of the two procedures in their entirety -- they're not
very long:
···
======================================================================
{Wage consumer mechanics of working and buying}
procedure wconsumerlevel1;
begin
with wC^, wH^, plant^ do
begin
Nw := outputRw; { Days worked/day, 0 <= Nw <= 1.0 }
if Nw > 0.67 then Nw := 0.67; { Can't work more than 16 hr per day }
Yw := Nw*W; { Household wage/day }
Rw := Rw + Yw*dt; { Add income immediately}
Xw := outputVw; { Spending/day on goods}
if not CreditAllowed then
if Xw*dt > Rw { Can't spend more than consumer reserve}
then Xw := Rw/dt; { Spend all in reserve}
if Xw*dt > Vp*P { Can't buy more than remaining stock}
then Xw := Vp*P/dt; { Buy remaining stock}
Rw := Rw - Xw*dt; { Subtract expenses from Reserve}
Cw := Xw/P; { Goods/d depends on price & amt spent/d)}
Vw := Vw+(Cw - Uw - Dw*Vw)*dt;{ Acquisitions - use - depreciation}
if Vw < 0.0 then Vw := 0.0; { Cannot have less than 0 goods }
end;
{k consumer mechanics }
procedure kconsumerlevel1;
begin
with kC^, kH^, plant^ do
begin
Yk := K; { Household capital Income per day }
Rk := Rk + Yk*dt; { Add income immediately}
Xk := outputVk; { Spending/day on goods}
if not CreditAllowed then
if Xk*dt > Rk { Can't spend more than consumer reserve}
then Xk := Rk/dt; { Spend all in reserve}
if Xk*dt > Vp*P { Can't buy more than remaining stock}
then Xk := Vp*P/dt; { Buy remaining stock}
Rk := Rk - Xk*dt; { Subtract expenses from Reserve}
Ck := Xk/P; { Goods/d depends on price & amt spent/d)}
Vk := Vk+(Ck - Uk - Dk*Vk)*dt;{ Acquisitions - use - depreciation}
if Vk < 0.0 then Vk := 0.0; { Cannot have less than 0 goods }
end;
end;
.
Finally, I wonder if you (Bill P.) could explain your selection of
reference values for the variables that are controlled.
Glad to oblige. I selected them at random.
For example, why
is the reference for plant inventory (Vp) 500, and the references for
cash (Rp) and capital (Ip) reserves 1000? Wouldn't the plant manager want
to keep Vp close to zero?
That's called the "just in time" strategy, but it's not a good idea if
there are variations in demand. Look up the "newsboy problem" to see how
game theory treats this problem. If the newsboy runs out of newspapers,
customers will start getting them elsewhere. In a national model, of
course, you might say that is unlikely, but if each plant making up the
composite producer wants to keep its customers, the average plant will keep
a nonzero inventory.
The actual level of inventory otherwise makes no difference once the
desired level has been built up, as the model works at present. Whatever
the steady-state level, the rate of production will equal the rate of
consumption.
When we introduce depreciation of inventory, the amount held will make a
difference -- the greater the inventory, the greater the expense of
maintaining it, and the greater the rate of loss or spoilage.
I guess I'd also like to know how many
individuals you think each economic component represents. For example, is
plant output (Op, in N goods/day) and wage household consumption (Cw, in
N goods/day) per individual or per a collection of individuals in the
plant and household.
I haven't made this explicit in the model -- there's no way to represent
changes in population, as we were discussing a couple of days back. You
could say that the numbers for flows and cumulative variables are in units
of millions; to put them on a per capita basis or per plant basis you'd
have to divide them by the population or number of plants. There's no point
in doing that until we have multiple entities, and even then, the most
useful breakdown is per entity, not per capita. Perhaps this would be a
good time to try to make the numbers more realistic -- you have access to
the Statistical Abstracts, don't you?
To get realistic numbers, of course, we might want to start with numbers
for individuals and multiply them by the number of individuals who are
members of the same class. As you're well aware, some aspects of this have
to take into account the composite nature of the class -- for example, the
savings rate for individual consumers is not the savings rate of the group
because individuals of all ages are saving and widthdrawing at the same
time. The aggregate picture can't be computed correctly by considering what
a typical family does and multiplying by 60 or 70 million.
Best,
Bill P.