External Transition Function
function ext input st s; input Real e; input Integer bag; input Boolean cond; input Real prob; input Real T; output st sout; end ext;