Ernest,
When I run the latest Pumps example, it cranks the pump up then down hard,
then
overfills the tank, which explodes. Apparently, increments of 5 units is
too much for
the tank to handle.
I the modified the test to the condition of the rule "lower-rate-if-high" (
line 55 of pumps-from-java.clp) : (test (>= ?flow-rate 5)).
This will set the flow rate to 0 if 5 is still too high, effectively
shutting off the
pump until the tank is low. This keeps the tank from exploding.
Note:
The solution above "works", in that the tank will now not explode.
However, the pump is throttled up and down so hard that the tank and pump
never
approximate any kind of smooth equilibrium.
Recognizing that a true smooth equilibrium would require calculus, and that
an
approximation is sufficient in this particular case, and that this is, after
all, only an example,:
How would you adjust this example to smooth out the pump's flow rate, given
that the
tank, pump and main threads all run as fast as they currently do?
I'm curious.
Thanks.
----------
George Rudolph
Mad Scientist
Motorola SSG
----------
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------