var i, j;

location l0 with
(i=150
j=175) ;

location l1 ;

location l2 ;

location l3 ;


transition t0 l0 -> l1 ;

transition t1 l1 -> l2 with 
Guard (j-100 >= 0 
	j <= 300)
      i := i+1 ;


transition t2 l2 -> l1 with
Guard (j <= i)
      j := j-2
      i := i-1;

transition t3 l1 -> l3 with
Guard (j <= 99 
	j >= 301) ;

transition t4 l2 -> l1 with
Guard (j >= i+1) ;

end

