This directory contains codes that were used in

  Ian M. Mitchell & Yoshihiko Susuki, "Level Set Methods for Computing
  Reachable Sets of Hybrid Systems with Differential Algebraic
  Equation Dynamics," submitted October 2007 to Hybrid Systems
  Computational & Control 2008.

Most of the code requires version 1.1 of the Toolbox of Level Set
Methods (ToolboxLS) by Ian M. Mitchell, which can be downloaded from

	 http://www.cs.ubc.ca/~mitchell/ToolboxLS

The runHybridOneGen script also requires the presence of an
<addPathToKernel> script file in the directory above the one in which
this README exists.  Normally this script can be a copy of the script
<Examples/addPathToKernel> from the toolbox download (after it has
been modified to point to your own Toolbox installation).

The files implement the scheme for approximating the reachable set of
the hybrid nonlinear power system voltage safety problem in section 3
of the paper above.

The codes perform the following tasks:

1) runHybridOneGen: A script that recreates the reach tube for the
   system by implementing the hybrid automata (HA) reachable set.  The
   actual continuous and discrete evolutions are performed by the
   routines below.  This file also generates the final figure (without
   set labels) that appears in figure (2b) of the paper.  This routine
   specifies the model parameters used in the calculation (which
   override the default parameters in the other routines below), but
   it uses the default computational grid from projReachOneGen.

2) projReachOneGen: Handles the continuous evolution of the backwards
   reach tube for the example.  This routine is called four times by
   runHybridOneGen -- once for each mode of the HA, plus once more to
   look at the safe set if the delay in mode q_2 were zero.  This
   routine also controls the grid on which the other calculations take
   place.

3) resetOneGen: Applies the reset mapping required by the DAE model
   when the HA mode changes (and hence the DAE constraint changes).
   Note that this routine does not compute the reset mapping (that is
   done by a call to switchOneGen); it only applies it to find out how
   the reset affected the implicit surface representation of the reach
   tube.

4) switchOneGen: Computes the reset mapping required by the DAE model.
   This routine determines the mapping between states when the DAE
   constraint changes, and also generated figure (2a) for the paper.

Questions or comments can be sent to mitchell@cs.ubc.ca

Ian Mitchell
University of British Columbia
October 2007
