/**
   * Constructor with same parameters as WaitQueue
   *
   * @param owner used model
   * @param name as in WaitQueue
   * @param masterSortOrder as in WaitQueue
   * @param masterQCapacity as in WaitQueue
   * @param slaveSortOrder as in WaitQueue
   * @param slaveQCapacity as in WaitQueue
   * @param showInReport as in WaitQueue
   * @param showInTrace as in WaitQueue
   */
  public WaitQueueAnimation(
      ModelAnimation owner,
      String name,
      int masterSortOrder,
      int masterQCapacity,
      int slaveSortOrder,
      int slaveQCapacity,
      boolean showInReport,
      boolean showInTrace) {

    super(
        owner,
        name,
        masterSortOrder,
        masterQCapacity,
        slaveSortOrder,
        slaveQCapacity,
        showInReport,
        showInTrace);
    this.showInAnimation = false;
    this.cmdGen = owner.getCmdGen();
    this.masterSortOrder = masterSortOrder;
    this.slaveSortOrder = slaveSortOrder;
    this.id = this.cmdGen.createInternId(name);
  }
  /**
   * creates a Station for animation
   *
   * @param owner
   * @param name Name and ID of Station
   * @param pos position
   * @param showInAnimation
   */
  public TransportStationAnimation(
      ModelAnimation owner, String name, Position pos, boolean showInAnimation) {
    super(owner, name);
    this.model = owner;
    this.name = name;
    this.cmdGen = owner.getCmdGen();
    this.showInAnimation = showInAnimation;
    this.id = this.cmdGen.createInternId(name);
    TimeInstant simTime = this.model.presentTime();
    boolean init = this.cmdGen.isInitPhase();
    this.position = pos;
    Command c;
    Point p = pos.getPoint();

    if (this.showInAnimation) {
      try {
        if (init)
          c = Command.getCommandInit("createStation", this.cmdGen.getAnimationTime(simTime));
        else c = Command.getCommandTime("createStation", this.cmdGen.getAnimationTime(simTime));
        c.addParameter("StationId", this.id);
        c.addParameter("Name", this.name);
        c.addParameter("Point", pos.getView() + "|" + p.x + "|" + p.y);
        c.setRemark(this.getGeneratedBy(TransportStationAnimation.class.getSimpleName()));
        cmdGen.checkAndLog(c);
        cmdGen.write(c);
      } catch (CommandException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
  }