<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOff = 1;
  private static $BulbDimmed = 2;
  private static $BulbOn = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbDimmed) { return "BulbDimmed"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function turnDimmer($lightval, $grade)
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function flipSwitch()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function entry()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbDimmed)
    {
      if ($this->dimmer>99)
      {
        $this->setBulb(self::$BulbOn);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private static $StatusFINAL = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    elseif ($this->status == self::$StatusFINAL) { return "StatusFINAL"; }
    return null;
  }

  public function turnoff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function powerOff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusFINAL);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function turnOn()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusFINAL)
    {
      entry();
      $this->delete();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Mentor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Mentor Attributes
  private $howLongUntilOk;

  //Mentor State Machines
  private static $StatusOk = 1;
  private static $StatusNotOk = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->howLongUntilOk = 3;
    $this->setStatus(self::$StatusOk);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setHowLongUntilOk($aHowLongUntilOk)
  {
    $wasSet = false;
    $this->howLongUntilOk = $aHowLongUntilOk;
    $wasSet = true;
    return $wasSet;
  }

  public function getHowLongUntilOk()
  {
    return $this->howLongUntilOk;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOk) { return "StatusOk"; }
    elseif ($this->status == self::$StatusNotOk) { return "StatusNotOk"; }
    return null;
  }

  public function timeoutOkToNotOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOk)
    {
      $this->setStatus(self::$StatusNotOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeoutNotOkToOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusNotOk)
    {
      $this->setStatus(self::$StatusOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class stateMachineWithNegativeNumberGuard2
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //stateMachineWithNegativeNumberGuard2 State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function turnOff($pn)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      if ($this->pn<-1)
      {
        $this->setStatus(self::$StatusOff);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  public function turnOn()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      System.out.println("transition");
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private static $StatusError1 = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    elseif ($this->status == self::$StatusError1) { return "StatusError1"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function unspecified()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusError1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reject()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusFull)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusError1)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusError1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Duplicate
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Duplicate State Machines
  private static $SmS0 = 1;
  private static $SmS1 = 2;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS0);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS0) { return "SmS0"; }
    elseif ($this->sm == self::$SmS1) { return "SmS1"; }
    return null;
  }

  public function e0()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS0)
    {
      $this->exitSm();
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    elseif ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitSm()
  {
    if ($this->sm == self::$SmS0)
    {
      s0_exit1();
      s0_exit2();
    }
    elseif ($this->sm == self::$SmS1)
    {
      s1_exit1();
      s1_exit1();
    }
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS0)
    {
      s0_entr1();
      s0_entry2();
    }
    elseif ($this->sm == self::$SmS1)
    {
      s1_entry1();
      s1_entry1();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A_Guard
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A_Guard State Machines
  private static $StatusS1 = 1;
  private static $StatusS2 = 2;
  private static $StatusS3 = 3;
  private $Status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->Status == self::$StatusS1) { return "StatusS1"; }
    elseif ($this->Status == self::$StatusS2) { return "StatusS2"; }
    elseif ($this->Status == self::$StatusS3) { return "StatusS3"; }
    return null;
  }

  public function e1($myB)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->Status;
    if ($aStatus == self::$StatusS1)
    {
      if ($this->checkGuard($this->myB))
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  public function e2($myB, $mySecondB)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->Status;
    if ($aStatus == self::$StatusS2)
    {
      if ($this->checkGuard($this->myB))
      {
        $this->setStatus(self::$StatusS3);
        $wasEventProcessed = true;
      }
    }
    elseif ($aStatus == self::$StatusS3)
    {
      if ($this->checkGuard($this->myB,$this->mySecondB))
      {
        $this->setStatus(self::$StatusS1);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->Status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

   private function checkGuard(B $myB)
  {
    return true;
  }

   private function checkGuard(B $myB, B $mySecondB)
  {
    return true;
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOff = 1;
  private static $BulbDimmed = 2;
  private static $BulbOn = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbDimmed) { return "BulbDimmed"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function turnDimmer($lightval)
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function flipSwitch()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function entry()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbDimmed)
    {
      if ($this->dimmer>99)
      {
        $this->setBulb(self::$BulbOn);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusOn)
    {
      System.out.println("entry");
      System.out.println("entry2");
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private static $StatusFINAL = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    elseif ($this->status == self::$StatusFINAL) { return "StatusFINAL"; }
    return null;
  }

  public function turnoff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function powerOff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusFINAL);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function turnOn()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusFINAL)
    {
      entry();
      $this->delete();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $Sm1S1 = 1;
  private static $Sm1S2 = 2;
  private $sm1;

  private static $Sm2S1 = 1;
  private static $Sm2S2 = 2;
  private $sm2;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm1(self::$Sm1S1);
    $this->setSm2(self::$Sm2S1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSm1FullName()
  {
    $answer = $this->getSm1();
    return $answer;
  }

  public function getSm2FullName()
  {
    $answer = $this->getSm2();
    return $answer;
  }

  public function getSm1()
  {
    if ($this->sm1 == self::$Sm1S1) { return "Sm1S1"; }
    elseif ($this->sm1 == self::$Sm1S2) { return "Sm1S2"; }
    return null;
  }

  public function getSm2()
  {
    if ($this->sm2 == self::$Sm2S1) { return "Sm2S1"; }
    elseif ($this->sm2 == self::$Sm2S2) { return "Sm2S2"; }
    return null;
  }

  public function timeouts1Tos2()
  {
    $wasEventProcessed = false;
    
    $aSm1 = $this->sm1;
    $aSm2 = $this->sm2;
    if ($aSm1 == self::$Sm1S1)
    {
      $this->setSm1(self::$Sm1S2);
      $wasEventProcessed = true;
    }

    
    if ($aSm2 == self::$Sm2S1)
    {
      $this->setSm2(self::$Sm2S2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm1($aSm1)
  {
    $this->sm1 = $aSm1;
  }

  private function setSm2($aSm2)
  {
    $this->sm2 = $aSm2;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private static $BulbAmber = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbAmber) { return "BulbAmber"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      if ($this->getBrightness()<1)
      {
        $this->setBulb(self::$BulbOff);
        $wasEventProcessed = true;
      }
      if ($this->getBrightness()>10)
      {
        $this->setBulb(self::$BulbAmber);
        $wasEventProcessed = true;
      }
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private static $StatusFINAL = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    elseif ($this->status == self::$StatusFINAL) { return "StatusFINAL"; }
    return null;
  }

  public function turnoff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function powerOff()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusFINAL);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function turnOn()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusFINAL)
    {
      $this->delete();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    return null;
  }

  public function setStatus($aStatus)
  {
    if ($aStatus == "StatusOpen" || $aStatus == self::$StatusOpen)
    {
      $this->status = self::$StatusOpen;
      return true;
    }
    elseif ($aStatus == "StatusFull" || $aStatus == self::$StatusFull)
    {
      $this->status = self::$StatusFull;
      return true;
    }
    else
    {
      return false;
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmS3 = 3;
  private static $SmS4 = 4;
  private $sm;

  private static $Sm2Sm21 = 1;
  private static $Sm2Sm22 = 2;
  private $sm2;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
    $this->setSm2(self::$Sm2Sm21);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm2FullName()
  {
    $answer = $this->getSm2();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function getSm2()
  {
    if ($this->sm2 == self::$Sm2Sm21) { return "Sm2Sm21"; }
    elseif ($this->sm2 == self::$Sm2Sm22) { return "Sm2Sm22"; }
    return null;
  }

  public function ev1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    $aSm2 = $this->sm2;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }

    
    if ($aSm2 == self::$Sm2Sm21)
    {
      $this->setSm2(self::$Sm2Sm22);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev5()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev4()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS4)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev7()
  {
    $wasEventProcessed = false;
    
    $aSm2 = $this->sm2;
    if ($aSm2 == self::$Sm2Sm22)
    {
      $this->setSm2(self::$Sm2Sm21);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;
  }

  private function setSm2($aSm2)
  {
    $this->sm2 = $aSm2;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmS3 = 3;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts2Tos3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class QSMwithUnspecifiedRecep
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //QSMwithUnspecifiedRecep State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmError1 = 3;
  private static $SmError2 = 4;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmError1) { return "SmError1"; }
    elseif ($this->sm == self::$SmError2) { return "SmError2"; }
    return null;
  }

  public function e1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function unspecified()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      printError();
      $this->setSm(self::$SmError1);
      $wasEventProcessed = true;
    }
    elseif ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmError2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function e2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmError1)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function __autotransition2__()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmError2)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmError1)
    {
      $this->__autotransition1__();
    }
    elseif ($this->sm == self::$SmError2)
    {
      $this->__autotransition2__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function printError()
  {
    System.out.println("Unspecified Reception");
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Garage
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Garage State Machines
  private $GarageDoor;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {}

  //------------------------
  // INTERFACE
  //------------------------

  public function getGarageDoorFullName()
  {
    $answer = $this->getGarageDoor();
    return $answer;
  }

  public function getGarageDoor()
  {
    return null;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class stateMachineWithStringComparisonGuard
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //stateMachineWithStringComparisonGuard Attributes
  private $cmdString;

  //stateMachineWithStringComparisonGuard State Machines
  private static $CommandControlIDLE = 1;
  private static $CommandControlCHECK_AVAILABILITY = 2;
  private static $CommandControlCOMMAND_VALIDITY = 3;
  private static $CommandControlEXECUTION = 4;
  private $CommandControl;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->cmdString = "";
    $this->setCommandControl(self::$CommandControlIDLE);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setCmdString($aCmdString)
  {
    $wasSet = false;
    $this->cmdString = $aCmdString;
    $wasSet = true;
    return $wasSet;
  }

  public function getCmdString()
  {
    return $this->cmdString;
  }

  public function getCommandControlFullName()
  {
    $answer = $this->getCommandControl();
    return $answer;
  }

  public function getCommandControl()
  {
    if ($this->CommandControl == self::$CommandControlIDLE) { return "CommandControlIDLE"; }
    elseif ($this->CommandControl == self::$CommandControlCHECK_AVAILABILITY) { return "CommandControlCHECK_AVAILABILITY"; }
    elseif ($this->CommandControl == self::$CommandControlCOMMAND_VALIDITY) { return "CommandControlCOMMAND_VALIDITY"; }
    elseif ($this->CommandControl == self::$CommandControlEXECUTION) { return "CommandControlEXECUTION"; }
    return null;
  }

  public function execute()
  {
    $wasEventProcessed = false;
    
    $aCommandControl = $this->CommandControl;
    if ($aCommandControl == self::$CommandControlIDLE)
    {
      $this->setCommandControl(self::$CommandControlCHECK_AVAILABILITY);
      $wasEventProcessed = true;
    }
    elseif ($aCommandControl == self::$CommandControlCHECK_AVAILABILITY)
    {
      if (!(""==$this->getCmdString()))
      {
        $this->setCommandControl(self::$CommandControlCOMMAND_VALIDITY);
        $wasEventProcessed = true;
      }
    }
    elseif ($aCommandControl == self::$CommandControlCOMMAND_VALIDITY)
    {
      if ($this->isCommandValid($this->getCmdString()))
      {
        $this->setCommandControl(self::$CommandControlEXECUTION);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setCommandControl($aCommandControl)
  {
    $this->CommandControl = $aCommandControl;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Lamp
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Lamp State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //Lamp Do Activity Threads
  private $doActivityStatusOnThread = null;
  private $doActivityStatusOffThread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function press()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusOn)
    {
      alsoDo();
    }
    elseif ($this->status == self::$StatusOff)
    {
      keepDoing();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

interface IX
{
  
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X implements IX
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    return null;
  }

  public function e()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Agent
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Agent State Machines
  private static $StatusFollow = 1;
  private static $StatusChanging_lane = 2;
  private static $StatusFinal = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusFollow);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusFollow) { return "StatusFollow"; }
    elseif ($this->status == self::$StatusChanging_lane) { return "StatusChanging_lane"; }
    elseif ($this->status == self::$StatusFinal) { return "StatusFinal"; }
    return null;
  }

  public function change_lane()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusFollow)
    {
      $this->setStatus(self::$StatusChanging_lane);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusChanging_lane)
    {
      if ($this->not_achieved==$this->False)
      {
        $this->setStatus(self::$StatusChanging_lane);
        $wasEventProcessed = true;
      }
      if ($this->not_achieved==$this->True)
      {
        $this->setStatus(self::$StatusFinal);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $BulbOff = 1;
  private static $BulbOn = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      $this->exitBulb();
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitBulb()
  {
    if ($this->bulb == self::$BulbOn)
    {
      blahblah;
    }
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOff = 1;
  private static $BulbDimmed = 2;
  private static $BulbOn = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbDimmed) { return "BulbDimmed"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function turnDimmer($lightval, $lightval_1)
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function flipSwitch()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function entry()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbDimmed)
    {
      if ($this->dimmer>99)
      {
        $this->setBulb(self::$BulbOn);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    return null;
  }

  public function register($name, $age, $grades)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Mentor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Mentor State Machines
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {}

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    return null;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class GarageDoor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //GarageDoor State Machines
  private static $StatusOpen = 1;
  private static $StatusClosing = 2;
  private static $StatusClosed = 3;
  private static $StatusOpening = 4;
  private static $StatusHalfOpen = 5;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusClosing) { return "StatusClosing"; }
    elseif ($this->status == self::$StatusClosed) { return "StatusClosed"; }
    elseif ($this->status == self::$StatusOpening) { return "StatusOpening"; }
    elseif ($this->status == self::$StatusHalfOpen) { return "StatusHalfOpen"; }
    return null;
  }

  public function buttonOrObstacle()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusClosing);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusClosing)
    {
      $this->setStatus(self::$StatusOpening);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusClosed)
    {
      $this->setStatus(self::$StatusOpening);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusOpening)
    {
      $this->setStatus(self::$StatusHalfOpen);
      $wasEventProcessed = true;
    }
    elseif ($aStatus == self::$StatusHalfOpen)
    {
      $this->setStatus(self::$StatusOpening);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reachBottom()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusClosing)
    {
      $this->setStatus(self::$StatusClosed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reachTop()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpening)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS0 = 1;
  private static $SmS1 = 2;
  private static $SmS2 = 3;
  private static $SmS3 = 4;
  private static $SmS4 = 5;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS0);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS0) { return "SmS0"; }
    elseif ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function ev0()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS0)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts1Tos2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS0)
    {
      a();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function a()
  {
    System.out.println("a running");
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS0 = 1;
  private static $SmS1 = 2;
  private static $SmS2 = 3;
  private static $SmS3 = 4;
  private static $SmS4 = 5;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS0);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS0) { return "SmS0"; }
    elseif ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function ev0()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS0)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts1Tos2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS0)
    {
      a();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function a()
  {
    System.out.println("a running");
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A Attributes
  private $result;

  //A State Machines
  private static $SmCreated = 1;
  private static $SmInitialized = 2;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->result = false;
    $this->setSm(self::$SmCreated);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setResult($aResult)
  {
    $wasSet = false;
    $this->result = $aResult;
    $wasSet = true;
    return $wasSet;
  }

  public function getResult()
  {
    return $this->result;
  }

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmCreated) { return "SmCreated"; }
    elseif ($this->sm == self::$SmInitialized) { return "SmInitialized"; }
    return null;
  }

  public function init()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmCreated)
    {
      if ($this->getResult()==$this->false)
      {
        $this->setSm(self::$SmCreated);
        $wasEventProcessed = true;
      }
      if ($this->getResult()==$this->true)
      {
        $this->exitSm();
        $this->setSm(self::$SmInitialized);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  public function getback()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmInitialized)
    {
      $this->setSm(self::$SmCreated);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitSm()
  {
    if ($this->sm == self::$SmCreated)
    {
      execute_exit_code();
    }
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmCreated)
    {
      execute_entry_code();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A Attributes
  private $repeatCheck;

  //A State Machines
  private static $StatusS1 = 1;
  private static $StatusS2 = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->repeatCheck = false;
    $this->setStatus(self::$StatusS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setRepeatCheck($aRepeatCheck)
  {
    $wasSet = false;
    $this->repeatCheck = $aRepeatCheck;
    $wasSet = true;
    return $wasSet;
  }

  public function getRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function isRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusS1) { return "StatusS1"; }
    elseif ($this->status == self::$StatusS2) { return "StatusS2"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusS1)
    {
      if ($this->getRepeatCheck()<$this->repeatCheck($this->z))
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusS1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function repeatCheck()
  {
    return true;
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A Attributes
  private $repeatCheck;

  //A State Machines
  private static $StatusS1 = 1;
  private static $StatusS2 = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->repeatCheck = false;
    $this->setStatus(self::$StatusS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setRepeatCheck($aRepeatCheck)
  {
    $wasSet = false;
    $this->repeatCheck = $aRepeatCheck;
    $wasSet = true;
    return $wasSet;
  }

  public function getRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function isRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusS1) { return "StatusS1"; }
    elseif ($this->status == self::$StatusS2) { return "StatusS2"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusS1)
    {
      if ($this->getRepeatCheck()!=$this->repeatCheck())
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusS1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function repeatCheck()
  {
    return true;
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private $sm;

  //X Do Activity Threads
  private $doActivity0SmS1Thread = null;
  private $doActivity1SmS1Thread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    return null;
  }

  public function e1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS1)
    {
      blah1();
      blah2();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class PooledSMwithUnspecifiedReception
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //PooledSMwithUnspecifiedReception State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmError1 = 3;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmError1) { return "SmError1"; }
    return null;
  }

  public function e1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function unspecified()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmError1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmError1)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmError1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $BulbOff = 1;
  private static $BulbOn = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class stateMachineWithNegativeNumberGuard
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //stateMachineWithNegativeNumberGuard State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function turnOff($pn)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      if ($this->pn>-1)
      {
        $this->setStatus(self::$StatusOff);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  public function turnOn()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOff)
    {
      $this->setStatus(self::$StatusOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $Bulb;

  //LightFixture Do Activity Threads
  private $doActivityBulbOnThread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->Bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->Bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function setBulb($aBulb)
  {
    if ($aBulb == "BulbOn" || $aBulb == self::$BulbOn)
    {
      $this->Bulb = self::$BulbOn;
      return true;
    }
    elseif ($aBulb == "BulbOff" || $aBulb == self::$BulbOff)
    {
      $this->Bulb = self::$BulbOff;
      return true;
    }
    else
    {
      return false;
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOff = 1;
  private static $BulbDimmed = 2;
  private static $BulbOn = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbDimmed) { return "BulbDimmed"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function turnDimmer($lightval)
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function flipSwitch()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function entry()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbDimmed)
    {
      if ($this->dimmer>99)
      {
        $this->setBulb(self::$BulbOn);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmS3 = 3;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts2Tos3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS0 = 1;
  private static $SmS1 = 2;
  private static $SmS2 = 3;
  private static $SmS3 = 4;
  private static $SmS4 = 5;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS0);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS0) { return "SmS0"; }
    elseif ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function ev0()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS0)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts1Tos2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS0)
    {
      a();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function a()
  {
    System.out.println("a running");
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS0 = 1;
  private static $SmS1 = 2;
  private static $SmS2 = 3;
  private static $SmS3 = 4;
  private static $SmS4 = 5;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS0);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS0) { return "SmS0"; }
    elseif ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function ev0()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS0)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeouts1Tos2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS0)
    {
      a();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function a()
  {
    System.out.println("a running");
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $Bulb;

  //LightFixture Do Activity Threads
  private $doActivity0BulbOnThread = null;
  private $doActivity1BulbOnThread = null;
  private $doActivity0BulbOffThread = null;
  private $doActivity1BulbOffThread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->Bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->Bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->Bulb;
    if ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function __autotransition2__()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->Bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->Bulb = $aBulb;

    // entry actions and do activities
    if ($this->Bulb == self::$BulbOn)
    {
      onActivity1();
      onActivity2();
    }
    elseif ($this->Bulb == self::$BulbOff)
    {
      offActivity1();
      offActivity2();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Mentor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Mentor Attributes
  private $howLongUntilOk;

  //Mentor State Machines
  private static $StatusOk = 1;
  private static $StatusNotOk = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->howLongUntilOk = 3;
    $this->setStatus(self::$StatusOk);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setHowLongUntilOk($aHowLongUntilOk)
  {
    $wasSet = false;
    $this->howLongUntilOk = $aHowLongUntilOk;
    $wasSet = true;
    return $wasSet;
  }

  public function getHowLongUntilOk()
  {
    return $this->howLongUntilOk;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOk) { return "StatusOk"; }
    elseif ($this->status == self::$StatusNotOk) { return "StatusNotOk"; }
    return null;
  }

  public function timeoutOkToNotOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOk)
    {
      $this->setStatus(self::$StatusNotOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeoutNotOkToOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusNotOk)
    {
      $this->setStatus(self::$StatusOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    return null;
  }

  public function register($name, $age, $grades)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reject($firstName)
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusFull)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOff = 1;
  private static $BulbDimmed = 2;
  private static $BulbOn = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbDimmed) { return "BulbDimmed"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  public function turnDimmer($lightval)
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      setBrightness(lightval)
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function flipSwitch()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbDimmed);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbDimmed)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function entry()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbDimmed)
    {
      if ($this->dimmer>99)
      {
        $this->setBulb(self::$BulbOn);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Mentor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Mentor State Machines
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {}

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    return null;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $bulb;

  private static $AnotherBulbOn = 1;
  private static $AnotherBulbAmber = 2;
  private $anotherBulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
    $this->setAnotherBulb(self::$AnotherBulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getAnotherBulbFullName()
  {
    $answer = $this->getAnotherBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function getAnotherBulb()
  {
    if ($this->anotherBulb == self::$AnotherBulbOn) { return "AnotherBulbOn"; }
    elseif ($this->anotherBulb == self::$AnotherBulbAmber) { return "AnotherBulbAmber"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    $aAnotherBulb = $this->anotherBulb;
    if ($aBulb == self::$BulbOn)
    {
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    elseif ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }

    
    if ($aAnotherBulb == self::$AnotherBulbOn)
    {
      $this->setAnotherBulb(self::$AnotherBulbAmber);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function unflip()
  {
    $wasEventProcessed = false;
    
    $aAnotherBulb = $this->anotherBulb;
    if ($aAnotherBulb == self::$AnotherBulbAmber)
    {
      $this->setAnotherBulb(self::$AnotherBulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  private function setAnotherBulb($aAnotherBulb)
  {
    $this->anotherBulb = $aAnotherBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Window
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Window State Machines
  private static $WindowControllerStationary = 1;
  private static $WindowControllerSafetyMechanism = 2;
  private static $WindowControllerStationaryNull = 3;
  private static $WindowControllerStationaryNormalStationary = 4;
  private $WindowController;
  private $WindowControllerStationary;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setWindowControllerStationary(self::$WindowControllerStationaryNull);
    $this->setWindowController(self::$WindowControllerStationary);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getWindowControllerFullName()
  {
    $answer = $this->getWindowController();
    if ($this->WindowControllerStationary != self::$WindowControllerStationaryNull) { $answer .= "." . $this->getWindowControllerStationary(); }
    return $answer;
  }

  public function getWindowController()
  {
    if ($this->WindowController == self::$WindowControllerStationary) { return "WindowControllerStationary"; }
    elseif ($this->WindowController == self::$WindowControllerSafetyMechanism) { return "WindowControllerSafetyMechanism"; }
    return null;
  }

  public function getWindowControllerStationary()
  {
    if ($this->WindowControllerStationary == self::$WindowControllerStationaryNull) { return "WindowControllerStationaryNull"; }
    elseif ($this->WindowControllerStationary == self::$WindowControllerStationaryNormalStationary) { return "WindowControllerStationaryNormalStationary"; }
    return null;
  }

  public function timeoutSafetyMechanismToStationary()
  {
    $wasEventProcessed = false;
    
    $aWindowController = $this->WindowController;
    if ($aWindowController == self::$WindowControllerSafetyMechanism)
    {
      $this->setWindowController(self::$WindowControllerStationary);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function down()
  {
    $wasEventProcessed = false;
    
    $aWindowControllerStationary = $this->WindowControllerStationary;
    if ($aWindowControllerStationary == self::$WindowControllerStationaryNormalStationary)
    {
      $this->exitWindowControllerStationary();
      $this->setWindowController(self::$WindowControllerSafetyMechanism);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitWindowController()
  {
    if ($this->WindowController == self::$WindowControllerStationary)
    {
      $this->exitWindowControllerStationary();
    }
  }

  private function setWindowController($aWindowController)
  {
    $this->WindowController = $aWindowController;

    // entry actions and do activities
    if ($this->WindowController == self::$WindowControllerStationary)
    {
      
      if ($this->WindowControllerStationary == self::$WindowControllerStationaryNull) { $this->setWindowControllerStationary(self::$WindowControllerStationaryNormalStationary); }
    }
    elseif ($this->WindowController == self::$WindowControllerSafetyMechanism)
    {
      System.out.println("Safety mechanism");
    }
  }

  private function exitWindowControllerStationary()
  {
    if ($this->WindowControllerStationary == self::$WindowControllerStationaryNormalStationary)
    {
      $this->setWindowControllerStationary(self::$WindowControllerStationaryNull);
    }
  }

  private function setWindowControllerStationary($aWindowControllerStationary)
  {
    $this->WindowControllerStationary = $aWindowControllerStationary;
    if ($this->WindowController != self::$WindowControllerStationary && $aWindowControllerStationary != self::$WindowControllerStationaryNull) { $this->setWindowController(self::$WindowControllerStationary); }

    // entry actions and do activities
    if ($this->WindowControllerStationary == self::$WindowControllerStationaryNormalStationary)
    {
      System.out.println("Window is stopped");
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

   public static  function main($argc)
  {
    new Window1();
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $LightOn = 1;
  private static $LightOff = 2;
  private $light;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setLight(self::$LightOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getLightFullName()
  {
    $answer = $this->getLight();
    return $answer;
  }

  public function getLight()
  {
    if ($this->light == self::$LightOn) { return "LightOn"; }
    elseif ($this->light == self::$LightOff) { return "LightOff"; }
    return null;
  }

  public function flip()
  {
    $wasEventProcessed = false;
    
    $aLight = $this->light;
    if ($aLight == self::$LightOn)
    {
      $this->setLight(self::$LightOff);
      $wasEventProcessed = true;
    }
    elseif ($aLight == self::$LightOff)
    {
      $this->setLight(self::$LightOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setLight($aLight)
  {
    // line 16 "../BeforeAndAfter_StateMachineSet.ump"
    System.out.println("About to flip");
    // END OF UMPLE BEFORE INJECTION
    $this->light = $aLight;
    // line 12 "../BeforeAndAfter_StateMachineSet.ump"
    System.out.println("Just flipped");
    // END OF UMPLE AFTER INJECTION
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private static $BulbAmber = 3;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbAmber) { return "BulbAmber"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      if ($this->getBrightness()<1)
      {
        $this->setBulb(self::$BulbOff);
        $wasEventProcessed = true;
      }
      if ($this->getBrightness()>10)
      {
        $this->setBulb(self::$BulbAmber);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusClosed = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusClosed) { return "StatusClosed"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusClosed);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function deregister()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusClosed)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Garage
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Garage Attributes
  private $entranceClear;

  //Garage State Machines
  private static $GarageDoorOpen = 1;
  private static $GarageDoorClosing = 2;
  private $GarageDoor;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct($aEntranceClear)
  {
    $this->entranceClear = $aEntranceClear;
    $this->setGarageDoor(self::$GarageDoorOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setEntranceClear($aEntranceClear)
  {
    $wasSet = false;
    $this->entranceClear = $aEntranceClear;
    $wasSet = true;
    return $wasSet;
  }

  public function getEntranceClear()
  {
    return $this->entranceClear;
  }

  public function isEntranceClear()
  {
    return $this->entranceClear;
  }

  public function getGarageDoorFullName()
  {
    $answer = $this->getGarageDoor();
    return $answer;
  }

  public function getGarageDoor()
  {
    if ($this->GarageDoor == self::$GarageDoorOpen) { return "GarageDoorOpen"; }
    elseif ($this->GarageDoor == self::$GarageDoorClosing) { return "GarageDoorClosing"; }
    return null;
  }

  public function pressButton()
  {
    $wasEventProcessed = false;
    
    $aGarageDoor = $this->GarageDoor;
    if ($aGarageDoor == self::$GarageDoorOpen)
    {
      if ($this->getEntranceClear())
      {
        $this->setGarageDoor(self::$GarageDoorClosing);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setGarageDoor($aGarageDoor)
  {
    $this->GarageDoor = $aGarageDoor;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reject()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusFull)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function reject()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusFull)
    {
      $this->setStatus(self::$StatusFull);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Student
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Student State Machines
  private static $GradePass = 1;
  private $grade;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setGrade(self::$GradePass);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getGradeFullName()
  {
    $answer = $this->getGrade();
    return $answer;
  }

  public function getGrade()
  {
    if ($this->grade == self::$GradePass) { return "GradePass"; }
    return null;
  }

  public function setGrade($aGrade)
  {
    if ($aGrade == "GradePass" || $aGrade == self::$GradePass)
    {
      $this->grade = self::$GradePass;
      return true;
    }
    else
    {
      return false;
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Garage
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Garage State Machines
  private static $GarageDoorClosed = 1;
  private static $GarageDoorOpening = 2;
  private $GarageDoor;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setGarageDoor(self::$GarageDoorClosed);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getGarageDoorFullName()
  {
    $answer = $this->getGarageDoor();
    return $answer;
  }

  public function getGarageDoor()
  {
    if ($this->GarageDoor == self::$GarageDoorClosed) { return "GarageDoorClosed"; }
    elseif ($this->GarageDoor == self::$GarageDoorOpening) { return "GarageDoorOpening"; }
    return null;
  }

  public function pressButton()
  {
    $wasEventProcessed = false;
    
    $aGarageDoor = $this->GarageDoor;
    if ($aGarageDoor == self::$GarageDoorClosed)
    {
      turnLightOn();
      $this->setGarageDoor(self::$GarageDoorOpening);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setGarageDoor($aGarageDoor)
  {
    $this->GarageDoor = $aGarageDoor;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Garage
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Garage State Machines
  private static $GarageDoorClosed = 1;
  private static $GarageDoorOpening = 2;
  private $GarageDoor;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setGarageDoor(self::$GarageDoorClosed);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getGarageDoorFullName()
  {
    $answer = $this->getGarageDoor();
    return $answer;
  }

  public function getGarageDoor()
  {
    if ($this->GarageDoor == self::$GarageDoorClosed) { return "GarageDoorClosed"; }
    elseif ($this->GarageDoor == self::$GarageDoorOpening) { return "GarageDoorOpening"; }
    return null;
  }

  public function pressButton()
  {
    $wasEventProcessed = false;
    
    $aGarageDoor = $this->GarageDoor;
    if ($aGarageDoor == self::$GarageDoorClosed)
    {
      turnLightOn();
      $this->setGarageDoor(self::$GarageDoorOpening);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setGarageDoor($aGarageDoor)
  {
    $this->GarageDoor = $aGarageDoor;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      $this->exitBulb();
      doTransition();
      $this->setBulb(self::$BulbOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitBulb()
  {
    if ($this->bulb == self::$BulbOn)
    {
      doExit();
    }
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;

    // entry actions and do activities
    if ($this->bulb == self::$BulbOn)
    {
      doEntry();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Mentor
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Mentor Attributes
  private $howLongUntilOk;

  //Mentor State Machines
  private static $StatusOk = 1;
  private static $StatusNotOkay = 2;
  private static $StatusNotOk = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->howLongUntilOk = 3;
    $this->setStatus(self::$StatusOk);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setHowLongUntilOk($aHowLongUntilOk)
  {
    $wasSet = false;
    $this->howLongUntilOk = $aHowLongUntilOk;
    $wasSet = true;
    return $wasSet;
  }

  public function getHowLongUntilOk()
  {
    return $this->howLongUntilOk;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOk) { return "StatusOk"; }
    elseif ($this->status == self::$StatusNotOkay) { return "StatusNotOkay"; }
    elseif ($this->status == self::$StatusNotOk) { return "StatusNotOk"; }
    return null;
  }

  public function timeoutOkToNotOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOk)
    {
      $this->setStatus(self::$StatusNotOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function timeoutNotOkayToOk()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusNotOkay)
    {
      $this->setStatus(self::$StatusOk);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X Attributes
  private $ev;

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmS3 = 3;
  private static $SmS4 = 4;
  private $sm;

  private static $Sm2Sm21 = 1;
  private static $Sm2Sm22 = 2;
  private $sm2;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->ev = "";
    $this->setSm(self::$SmS1);
    $this->setSm2(self::$Sm2Sm21);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setEv($aEv)
  {
    $wasSet = false;
    $this->ev = $aEv;
    $wasSet = true;
    return $wasSet;
  }

  public function getEv()
  {
    return $this->ev;
  }

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm2FullName()
  {
    $answer = $this->getSm2();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function getSm2()
  {
    if ($this->sm2 == self::$Sm2Sm21) { return "Sm2Sm21"; }
    elseif ($this->sm2 == self::$Sm2Sm22) { return "Sm2Sm22"; }
    return null;
  }

  public function ev1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    $aSm2 = $this->sm2;
    if ($aSm == self::$SmS1)
    {
      ev="ev1";
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }

    
    if ($aSm2 == self::$Sm2Sm21)
    {
      ev="ev1 in sm2";
      $this->setSm2(self::$Sm2Sm22);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev5()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      ev="ev5";
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      ev="ev2";
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      ev="ev3";
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev4()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS4)
    {
      ev="ev4";
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev7()
  {
    $wasEventProcessed = false;
    
    $aSm2 = $this->sm2;
    if ($aSm2 == self::$Sm2Sm22)
    {
      ev="ev7 in sm2";
      $this->setSm2(self::$Sm2Sm21);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;
  }

  private function setSm2($aSm2)
  {
    $this->sm2 = $aSm2;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private $sm;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    return null;
  }

  public function hh()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->exitSm();
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function hhh()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->exitSm();
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function exitSm()
  {
    if ($this->sm == self::$SmS1)
    {
      if (!condition2)
        {
          System.out.println("s1 exit!");
        }
    }
    elseif ($this->sm == self::$SmS2)
    {
      if (condition4)
        {
          System.out.println("s2 exit!");
        }
    }
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS1)
    {
      if (condition)
        {
          System.out.println("s1 entry!");
        }
    }
    elseif ($this->sm == self::$SmS2)
    {
      if (condition3)
        {
          System.out.println("s2 entry!");
        }
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A State Machines
  private static $StatusS1 = 1;
  private static $StatusS2 = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusS1) { return "StatusS1"; }
    elseif ($this->status == self::$StatusS2) { return "StatusS2"; }
    return null;
  }

  public function test()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusS1)
    {
      if ($this->y>$this->z)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if (($this->x+$this->y)>$this->z)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ((5*2)<11)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if (($this->x+$this->y)==$this->z)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ($this->x==$this->y)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ("test"==$this->x)
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ($this->x=="test"."hello")
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if (((5*2)<=11))
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ((($this->a>$this->b)||($this->variable&&(($this->b<$this->a)||($this->c>=$this->b)))))
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
      if ((($this->a-$this->c)>($this->b*2))!=(($this->a-$this->c)>($this->b^2)))
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Switch
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Switch State Machines
  private static $StatusOn = 1;
  private static $StatusOff = 2;
  private $status;

  //Switch Do Activity Threads
  private $doActivityStatusOffThread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOn) { return "StatusOn"; }
    elseif ($this->status == self::$StatusOff) { return "StatusOff"; }
    return null;
  }

  public function press()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOn)
    {
      $this->setStatus(self::$StatusOff);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusOff)
    {
      keepDoing();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private static $SmS3 = 3;
  private static $SmS4 = 4;
  private $sm;

  private static $Sm2Sm21 = 1;
  private static $Sm2Sm22 = 2;
  private $sm2;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
    $this->setSm2(self::$Sm2Sm21);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm2FullName()
  {
    $answer = $this->getSm2();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    elseif ($this->sm == self::$SmS3) { return "SmS3"; }
    elseif ($this->sm == self::$SmS4) { return "SmS4"; }
    return null;
  }

  public function getSm2()
  {
    if ($this->sm2 == self::$Sm2Sm21) { return "Sm2Sm21"; }
    elseif ($this->sm2 == self::$Sm2Sm22) { return "Sm2Sm22"; }
    return null;
  }

  public function ev1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    $aSm2 = $this->sm2;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }

    
    if ($aSm2 == self::$Sm2Sm21)
    {
      $this->setSm2(self::$Sm2Sm22);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev5()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev3()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS3)
    {
      $this->setSm(self::$SmS4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev4()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS4)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function ev7()
  {
    $wasEventProcessed = false;
    
    $aSm2 = $this->sm2;
    if ($aSm2 == self::$Sm2Sm22)
    {
      $this->setSm2(self::$Sm2Sm21);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;
  }

  private function setSm2($aSm2)
  {
    $this->sm2 = $aSm2;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private $sm;

  private static $Sm1S3 = 1;
  private static $Sm1S4 = 2;
  private static $Sm1S5 = 3;
  private $sm1;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
    $this->setSm1(self::$Sm1S3);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm1FullName()
  {
    $answer = $this->getSm1();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    return null;
  }

  public function getSm1()
  {
    if ($this->sm1 == self::$Sm1S3) { return "Sm1S3"; }
    elseif ($this->sm1 == self::$Sm1S4) { return "Sm1S4"; }
    elseif ($this->sm1 == self::$Sm1S5) { return "Sm1S5"; }
    return null;
  }

  public function e1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function e2()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS2)
    {
      $this->setSm(self::$SmS1);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function e3()
  {
    $wasEventProcessed = false;
    
    $aSm1 = $this->sm1;
    if ($aSm1 == self::$Sm1S3)
    {
      $this->setSm1(self::$Sm1S4);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  public function e4()
  {
    $wasEventProcessed = false;
    
    $aSm1 = $this->sm1;
    if ($aSm1 == self::$Sm1S4)
    {
      $this->setSm1(self::$Sm1S3);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;
  }

  private function setSm1($aSm1)
  {
    $this->sm1 = $aSm1;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A Attributes
  private $repeatCheck;

  //A State Machines
  private static $StatusS1 = 1;
  private static $StatusS2 = 2;
  private static $StatusS3 = 3;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->repeatCheck = false;
    $this->setStatus(self::$StatusS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setRepeatCheck($aRepeatCheck)
  {
    $wasSet = false;
    $this->repeatCheck = $aRepeatCheck;
    $wasSet = true;
    return $wasSet;
  }

  public function getRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function isRepeatCheck()
  {
    return $this->repeatCheck;
  }

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusS1) { return "StatusS1"; }
    elseif ($this->status == self::$StatusS2) { return "StatusS2"; }
    elseif ($this->status == self::$StatusS3) { return "StatusS3"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusS1)
    {
      if ($this->repeatCheck())
      {
        $this->setStatus(self::$StatusS2);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;

    // entry actions and do activities
    if ($this->status == self::$StatusS1)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

  public function repeatCheck()
  {
    return true;
  }

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $BulbOff = 1;
  private static $BulbOn = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;

    // entry actions and do activities
    if ($this->bulb == self::$BulbOff)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class X
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //X State Machines
  private static $SmS1 = 1;
  private static $SmS2 = 2;
  private $sm;

  //X Do Activity Threads
  private $doActivity0SmS1Thread = null;
  private $doActivity1SmS1Thread = null;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setSm(self::$SmS1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getSmFullName()
  {
    $answer = $this->getSm();
    return $answer;
  }

  public function getSm()
  {
    if ($this->sm == self::$SmS1) { return "SmS1"; }
    elseif ($this->sm == self::$SmS2) { return "SmS2"; }
    return null;
  }

  public function e1()
  {
    $wasEventProcessed = false;
    
    $aSm = $this->sm;
    if ($aSm == self::$SmS1)
    {
      $this->setSm(self::$SmS2);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setSm($aSm)
  {
    $this->sm = $aSm;

    // entry actions and do activities
    if ($this->sm == self::$SmS1)
    {
      blah1();
      blah2();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      if ($this->isTurnedOn)
      {
        $this->exitBulb();
        doTransition();
        $this->setBulb(self::$BulbOff);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function exitBulb()
  {
    if ($this->bulb == self::$BulbOn)
    {
      doExit();
    }
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;

    // entry actions and do activities
    if ($this->bulb == self::$BulbOn)
    {
      doEntry();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $BulbOff = 1;
  private static $BulbOn = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;

    // entry actions and do activities
    if ($this->bulb == self::$BulbOff)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private static $StatusFull = 2;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    elseif ($this->status == self::$StatusFull) { return "StatusFull"; }
    return null;
  }

  public function setStatus($aStatus)
  {
    if ($aStatus == "StatusOpen" || $aStatus == self::$StatusOpen)
    {
      $this->status = self::$StatusOpen;
      return true;
    }
    elseif ($aStatus == "StatusFull" || $aStatus == self::$StatusFull)
    {
      $this->status = self::$StatusFull;
      return true;
    }
    else
    {
      return false;
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class LightFixture
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //LightFixture Attributes
  private $brightness;

  //LightFixture State Machines
  private static $BulbOn = 1;
  private static $BulbOff = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->brightness = 0;
    $this->setBulb(self::$BulbOn);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function setBrightness($aBrightness)
  {
    $wasSet = false;
    $this->brightness = $aBrightness;
    $wasSet = true;
    return $wasSet;
  }

  public function getBrightness()
  {
    return $this->brightness;
  }

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    elseif ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    return null;
  }

  public function push()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOn)
    {
      if ($this->getBrightness()<1)
      {
        $this->setBulb(self::$BulbOff);
        $wasEventProcessed = true;
      }
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Student
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Student State Machines
  private static $GradePass = 1;
  private $grade;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setGrade(self::$GradePass);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getGradeFullName()
  {
    $answer = $this->getGrade();
    return $answer;
  }

  public function getGrade()
  {
    if ($this->grade == self::$GradePass) { return "GradePass"; }
    return null;
  }

  public function setGrade($aGrade)
  {
    if ($aGrade == "GradePass" || $aGrade == self::$GradePass)
    {
      $this->grade = self::$GradePass;
      return true;
    }
    else
    {
      return false;
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Light
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Light State Machines
  private static $BulbOff = 1;
  private static $BulbOn = 2;
  private $bulb;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setBulb(self::$BulbOff);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getBulbFullName()
  {
    $answer = $this->getBulb();
    return $answer;
  }

  public function getBulb()
  {
    if ($this->bulb == self::$BulbOff) { return "BulbOff"; }
    elseif ($this->bulb == self::$BulbOn) { return "BulbOn"; }
    return null;
  }

  private function __autotransition1__()
  {
    $wasEventProcessed = false;
    
    $aBulb = $this->bulb;
    if ($aBulb == self::$BulbOff)
    {
      $this->setBulb(self::$BulbOn);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setBulb($aBulb)
  {
    $this->bulb = $aBulb;

    // entry actions and do activities
    if ($this->bulb == self::$BulbOff)
    {
      $this->__autotransition1__();
    }
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.32.1.6535.66c005ced modeling language!*/

class Course
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //Course State Machines
  private static $StatusOpen = 1;
  private $status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct()
  {
    $this->setStatus(self::$StatusOpen);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public function getStatusFullName()
  {
    $answer = $this->getStatus();
    return $answer;
  }

  public function getStatus()
  {
    if ($this->status == self::$StatusOpen) { return "StatusOpen"; }
    return null;
  }

  public function register()
  {
    $wasEventProcessed = false;
    
    $aStatus = $this->status;
    if ($aStatus == self::$StatusOpen)
    {
      $this->setStatus(self::$StatusOpen);
      $wasEventProcessed = true;
    }
    return $wasEventProcessed;
  }

  private function setStatus($aStatus)
  {
    $this->status = $aStatus;
  }

  public function equals($compareTo)
  {
    return $this == $compareTo;
  }

  public function delete()
  {}

}
?>