/***************************************************************************
 *   Copyright (c) 2005-2024 by Pierre-Henri WUILLEMIN[@LIP6) and Christophe GONZALES(@AMU)   *
 *   {prenom.nom}@lip6.fr                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
// ============================================================================
// Tis file contains basic PRM classes for testing purpose.
// Author: Lionel Torti.
// ============================================================================

type quantity int(0,10);
type total_quantity int(0,<PLACEHOLDER>0);
type t_state labels(LOW,MEDIUM,HIGH);

class WaterTank {

  t_state eyelevel {
      [0.25, 0.5, 0.25]
  };

  quantity waterlevel dependson eyelevel {
  // eye_level |   LOW   | |   MEDIUM   | |   HIGH   |
  /* 0  */     [  0.05,        0.00,          0.00,
  /* 1  */        0.25,        0.00,          0.00,
  /* 2  */        0.40,        0.01,          0.00,
  /* 3  */        0.25,        0.04,          0.00,
  /* 4  */        0.04,        0.25,          0.00,
  /* 5  */        0.01,        0.40,          0.01,
  /* 6  */        0.00,        0.25,          0.04,
  /* 7  */        0.00,        0.04,          0.25,
  /* 8  */        0.00,        0.01,          0.40,
  /* 9  */        0.00,        0.00,          0.25,
  /* 10 */        0.00,        0.00,          0.05]
  };
}

class City {
  WaterTank[] tanks;

  total_quantity waterlevel = sum([tanks.waterlevel]);
}

system aSys {
  City city;
  WaterTank[<PLACEHOLDER>] tanks;

  city.tanks = tanks;
}
