# Copyright (c) 1996, 1997, The Regents of the University of California. # All rights reserved. See Legal.htm for full text and disclaimer. from history_condition import * import history_test_aux if __name__ == "__main__": z = open("history_condition_test_out.txt", "w") import sys sys.stdout = z b = Cycles (2, 10, 4) c = Times (.3, 1.0, .3) ll = When ("xx > .3") mm = When ("x == 1", history_test_aux.__dict__) # a = And(ll, c) a = ll + c e = Or(ll, b) d = Not(ll) for i in range(12): cycle = i time = i / 10. xx = time / 2.0 print cycle, time, xx for x in (b,c,ll,a,e,d,mm): x.evaluate (cycle, time) print "\t", (x.state, x.state_final), x