Econ004c, executable and source

[From Bill Powers (2003.02.28.1030 MST)]

Attached is Econ004c.zip. The errors in computing how much to spend when
borrowing is not allowed, and how much to buy when plant inventory is too
low, have been corrected, I do believe. These were in procedures
wconsumerlevel1 and kconsumerlevel1.

The variations in variables on startup are somewhat larger than they were,
but the final position seems to be the same as before.

Now to give control of Rp to the k-consumer.

Best,

Bill P.

Econ004c.ZIP (30.2 KB)

[From Bill Powers (2003.02.28.1509 MST)]

Dick Robertson,2003.02.28.1333CST--

>I used to have an unzipping program on my machine, but it seems to have
>disappeared, when I try to open a zip file I get a hex language file. Is
there
>a way I can get an unzip file again? (I hope this is the right question)

Follow up this URL to get a free zipping and unzipping program. I don't
know if it will work with the zip files I send, and would like to know. I
use PKzip, which is not free.

http://www.trans4mind.com/personal_development/zipper/

Best,

Bill P.

[From Rick Marken (2003.02.28.1200)]

Bill Powers (2003.02.28.1030 MST)--

Attached is Econ004c.zip. The errors in computing how much to spend when
borrowing is not allowed, and how much to buy when plant inventory is too
low, have been corrected, I do believe. These were in procedures
wconsumerlevel1 and kconsumerlevel1.

The variations in variables on startup are somewhat larger than they were,
but the final position seems to be the same as before.

Now to give control of Rp to the k-consumer.

I'll make the appropriate changes to the spreadsheet this weekend.

Bill Powers--

Happy Birthday, Rick!

I was wondering how much hinting it would take! :wink:

Thank you! It's has, indeed, been nice to have been born. People like you and Mozart
and Bach make up for the horrendous likes of... well, the task of filling up the list
I'd rather leave to you;-)

Best regards

Rick

···

--
Richard S. Marken, Ph.D.
Senior Behavioral Scientist
The RAND Corporation
PO Box 2138
1700 Main Street
Santa Monica, CA 90407-2138
Tel: 310-393-0411 x7971
Fax: 310-451-7018
E-mail: rmarken@rand.org

[From Dick Robertson,2003.02.28.1333CST]

Bill Powers wrote:

[From Bill Powers (2003.02.28.1030 MST)]

Attached is Econ004c.zip. The errors in computing how much to spend when
borrowing is not allowed, and how much to buy when plant inventory is too
low, have been corrected, I do believe. These were in procedures
wconsumerlevel1 and kconsumerlevel1.

The variations in variables on startup are somewhat larger than they were,
but the final position seems to be the same as before.

Now to give control of Rp to the k-consumer.

I used to have an unzipping program on my machine, but it seems to have
disappeared, when I try to open a zip file I get a hex language file. Is there
a way I can get an unzip file again? (I hope this is the right question)

Best, Dick R

···

.

[From Dick Robertson,2002.03.03.1828CST]

Bill Powers wrote:

[From Bill Powers (2003.02.28.1509 MST)]

Dick Robertson,2003.02.28.1333CST--

>I used to have an unzipping program on my machine, but it seems to have
>disappeared, when I try to open a zip file I get a hex language file. Is
there
>a way I can get an unzip file again? (I hope this is the right question)

Follow up this URL to get a free zipping and unzipping program. I don't
know if it will work with the zip files I send, and would like to know. I
use PKzip, which is not free.

Zipper - Free Zip & Unzip Program for Windows

Well, Thanks Bill,

I'll try this one if I need it, but meantime I had already been referred to one
called, Winzip by Dag, which I downloaded and installed. It opened the
econ004c file and i could, I guess, compile it with my version of TP v2 (if
that would work), but when I try to run the exec. file I got a message,
"Graphics not initialized (use initGraph), well I didn't know how to procede.
Is init'Graph another file I have to get from somewhere, or is it part in Win
98, or what?

Thanks for all the help

Best, Dick R

···

Bill P.

[From Bill Powers (2003.03.04.1038 MST)]

Dick Robertson,2002.03.03.1828CST--

>called, Winzip by Dag, which I downloaded and installed. It opened the

econ004c file and i could, I guess, compile it with my version of TP v2 (if
that would work), but when I try to run the exec. file I got a message,
"Graphics not initialized (use initGraph), well I didn't know how to procede.
Is init'Graph another file I have to get from somewhere, or is it part in Win
98, or what?

Attached is a new version of econ004c.zip. This one contains both
SETSVGA.PAS ( Pascal Unit) and SVGA.bgi, as well the the source and
executable files. The .bgi file must be put in a directory called

\TP\BGI (a directory and a subdirectory)

so the program can find it. I think it can also be in the directory where
you put Econ004c.exe.

Let me know how it works.

Best,

Bill P.

Econ004c1.ZIP (36.8 KB)

[ From Dick Robertson,2003.03.06.1932CST]

Bill Powers wrote:

[From Bill Powers (2003.03.04.1038 MST)]

Dick Robertson,2002.03.03.1828CST--

Attached is a new version of econ004c.zip. This one contains both
SETSVGA.PAS ( Pascal Unit) and SVGA.bgi, as well the the source and
executable files. The .bgi file must be put in a directory called

\TP\BGI (a directory and a subdirectory)

so the program can find it. I think it can also be in the directory where
you put Econ004c.exe.

Yup, it works! That is I see the lovely bar graphs, rising and falling. Now I
need to go back and hunt up your explanations from previous posts, to understand
what is happening. One thing, though: when I quit the file it seems to go back to
its zipped state and I get the unzip program to start each new time I try to run
econ004c. Is there a way to save the working version, that I missed?

Thanks, Dick R

···

[From Rick Marken (2003.03.08.0830)]

Bill Powers (2003.02.28.1030 MST)--

Attached is Econ004c.zip. The errors in computing how much to spend when
borrowing is not allowed, and how much to buy when plant inventory is too
low, have been corrected, I do believe. These were in procedures
wconsumerlevel1 and kconsumerlevel1.

Attached is my spreadsheet version of Econ004c (cleverly names Econ004c.xls).
Because I'm trying to keep all calculations within cells, the order of
calculation may not be quite the same as that in Econ004c. Therefore, it would
be nice to test Econ004c.xls to see if it behaves the same as Econ004c. I
presume a good test would be one that would drive reserves below zero. This
should not happen when no credit is allowed. Is there a set of reference
values for the various control systems that we could use to test to see whether
the two programs produce the same results when credit is and is not allowed?

Dick Robertson (2003.03.06.1932CST) --

Yup, it works! That is I see the lovely bar graphs, rising and falling.

Econ004c.xls makes nice rising and falling bar graphs, too. Could you give it a
try and see if it works OK for you. You might need to adjust the zoom (to 75%,
say) to see all systems and graphs simultaneously on a PC).

Best regards

Rick

Econ004c.xls (94 Bytes)

···

--
Richard S. Marken
MindReadings.com
marken@mindreadings.com
310 474-0313

[From Bill Powers (2003.03.08.1057 MST)]

Rick Marken (2003.03.08.0830)--

>Attached is my spreadsheet version of Econ004c (cleverly names Econ004c.xls).
>Because I'm trying to keep all calculations within cells, the order of
>calculation may not be quite the same as that in Econ004c. Therefore, it
would
>be nice to test Econ004c.xls to see if it behaves the same as Econ004c.

I've been able to get Excel and run your program. I changed the
initializations (green entries) that differed from those in my Pascal
program, and when I ran the spreadsheet, it ended up with very nearly the
same values as my program did (I use double precision floating point --
maybe you use a lower precision. The differences are trivial.

          Pascal Excel

Rp 1028.33 1028.23

Rw 985.84 985.84

Rk 985.82 985.25

I was fooled at first -- I thought "Hey. his program runs a lot faster than
mine." It took a while to realise that it wasn't finished when it stopped
-- I had to keep clicking on the Run button until the values stopped
changing. Is there a way to change the number of iterations that run before
it stops? I am a TOTAL neophyte when it comes to Excel.

It would also be nice if the program could be run to the end while the bar
graphs are showing, instead of having to go back to the main screen and
select dynamic display again. I see that during the run, first Rw goes
negative,then it goes back positive and Rp goes negative, and finally Rp
goes positive and everything reaches its reference level. The Pascal
version does exactly the same thing.

It looks to me as though you have reproduced the Pascal version perfectly.
I am very impressed with the display and the ease of altering parameters,
so much better than the Pascal version. I have almost finished a Delphi
version, and it, too is a lot easier to use because of those nice built-in
editing functions.

When borrowing is not allowed, my program ends up with the same values for
Rp and Rw, but Rk is 54+ units too large. Yours is 53+ units too large!
That's out of 1000. This could be the result of rounding errors or a
mistake. I've gone over the code and don't see the mistake. If there is one
it's probably something like subtracting the amount before instead of after
a test to see if it should be subtracted. Be nice to get it fixed if we
could, but we can live with it if we have to.

Check over the initialized values so yours are the same as mine, and I
think you'll find the sams things I did. If not we're in a space warp.

Nice work, Rick. I have more respect for the spreadsheet approach now.

Best,

Bill P.

  I

···

presume a good test would be one that would drive reserves below zero. This
should not happen when no credit is allowed. Is there a set of reference
values for the various control systems that we could use to test to see
whether
the two programs produce the same results when credit is and is not allowed?

Dick Robertson (2003.03.06.1932CST) --

>Yup, it works! That is I see the lovely bar graphs, rising and falling.

Econ004c.xls makes nice rising and falling bar graphs, too. Could you give
it a
try and see if it works OK for you. You might need to adjust the zoom (to 75%,
say) to see all systems and graphs simultaneously on a PC).

Best regards

Rick
--
Richard S. Marken
MindReadings.com
marken@mindreadings.com
310 474-0313

[From Rick Marken (2003.03.08.1641)]

Bill Powers (2003.03.08.1057 MST)--

Rick Marken (2003.03.08.0830)--

>Attached is my spreadsheet version of Econ004c (cleverly names Econ004c.xls).
>Because I'm trying to keep all calculations within cells, the order of
>calculation may not be quite the same as that in Econ004c. Therefore, it
would
>be nice to test Econ004c.xls to see if it behaves the same as Econ004c.

I've been able to get Excel and run your program. I changed the
initializations (green entries) that differed from those in my Pascal
program, and when I ran the spreadsheet, it ended up with very nearly the
same values as my program did (I use double precision floating point --
maybe you use a lower precision. The differences are trivial.

Wonderful.

Is there a way to change the number of iterations that run before
it stops?

Yes. I can give the user more control over that.

It would also be nice if the program could be run to the end while the bar
graphs are showing, instead of having to go back to the main screen and
select dynamic display again.

I agree. I think it can be done. I didn't want to take a lot of time
with that
until I was convinced that the Excel model was nearly equivalent to
yours. I'm
convinced now so I'll put some time into improving the display, etc.

I see that during the run, first Rw goes
negative,then it goes back positive and Rp goes negative, and finally Rp
goes positive and everything reaches its reference level. The Pascal
version does exactly the same thing.

Great!

Nice work, Rick. I have more respect for the spreadsheet approach now.

That makes my weekend! Thanks. Now let's try to get model to a point
where we can
start using it to predict some aggregate data!

Best regards

Rick

···

--
Richard S. Marken
MindReadings.com
marken@mindreadings.com
310 474-0313

[From Rick Marken (2003.03.13.1500)]

Dick Robertson (2003.03.13.1430CST)

I tried, but I guess I can't run it without Excel which I don't have, but I'll see
if I can 't get it and try again.

Thanks for trying.

Best

Rick

···

--
Richard S. Marken, Ph.D.
Senior Behavioral Scientist
The RAND Corporation
PO Box 2138
1700 Main Street
Santa Monica, CA 90407-2138
Tel: 310-393-0411 x7971
Fax: 310-451-7018
E-mail: rmarken@rand.org

[From Dick Robertson,2003.03.13.1430CST]

Richard Marken wrote:

[From Rick Marken (2003.03.08.0830)]

Attached is my spreadsheet version of Econ004c (cleverly names Econ004c.xls).
Because I'm trying to keep all calculations within cells, the order of
calculation may not be quite the same as that in Econ004c. Therefore, it would
be nice to test Econ004c.xls to see if it behaves the same as Econ004c. I
presume a good test would be one that would drive reserves below zero. This
should not happen when no credit is allowed. Is there a set of reference
values for the various control systems that we could use to test to see whether
the two programs produce the same results when credit is and is not allowed?

Dick Robertson (2003.03.06.1932CST) --

>Yup, it works! That is I see the lovely bar graphs, rising and falling.

Econ004c.xls makes nice rising and falling bar graphs, too. Could you give it a
try and see if it works OK for you. You might need to adjust the zoom (to 75%,
say) to see all systems and graphs simultaneously on a PC).

Best regards

Rick,

I tried, but I guess I can't run it without Excel which I don't have, but I'll see
if I can 't get it and try again.

Best, Dick R

···