ENFORCE

David desJardins (desj@ccr-p.ida.org)
Fri, 21 Oct 1994 15:38:01 -0400

> But it seems like the only information that can pass to A from B
> through this mechanism is whether B is about to execute the ENFORCE --
> does it provide any capabilities that the existing WAIT and other
> tricks don't already provide?

Sure. If a WAIT fails, you are stuck there WAITing, rather than being
allowed to do something else. If ENFORCE fails, you can do whatever
else you want. So you can easily construct IF-THEN-ELSE sequences,
which are exactly what aren't allowed now.

I think you could make these conditional on just about anything.
Suppose you want to do IF (condition occurs before day 10) THEN (execute
order sequence 1) ELSE (execute order sequence 2). With two cooperating
units:

A B
wait day 10 (condition) wait day 10
enforce enforce
unit a unit a
(order sequence 2a) (order sequence 2a)
unit b unit b
(order sequence 2b) (order sequence 2b)
end end
(order sequence 1a) (order sequence 1b)

This is just off the top of my head. I'm sure there are lots of more
elegant possibilities. It would depend on what kind of thing you want
to test, certainly, and what you want to do in response.

David desJardins


Main Index  |  Olympia  |  Arena  |  PBM FAQ  |  Links