Package org.jamesii.core.model

Examples of org.jamesii.core.model.InvalidModelException


      internalInit((IBasicCoupledModel) getModel(), time);
      eventForwarding.init(getAssociatedDEVSModel());
      setTime(events.get(this.getAssociatedDEVSModel()).getMin());
    } else {
      // invalid model type
      throw new InvalidModelException(getModel()
          + " is neither an atomic nor a coupled DEVS model.");
    }
  }
View Full Code Here


          // System.out.println("Executing int state trans of
          // "+m.getFullName());
          m.clearOutPorts();
          m.deltaInternalSim();
        } else {
          throw new InvalidModelException("the model is connected to itself");
        }
      }
      // inform any attached observer if the state has been changed
      m.getState().isChangedRR();
      this.changed();
View Full Code Here

          }
        }
      }
    } catch (CloneNotSupportedException e) {
      SimSystem.report(e);
      throw new InvalidModelException(
          "At least one of the cells uses a non cloneable state!", e);
    }
  }
View Full Code Here

        states[coord[0]] =
            (CAState<?>) ((Grid1D) grid).getCell(coord).getCAState().clone();
      }
    } catch (CloneNotSupportedException e) {
      SimSystem.report(e);
      throw new InvalidModelException(
          "At least one of the cells uses a non cloneable state!", e);
    }

  }
View Full Code Here

              (CAState<?>) ((Grid2D) grid).getCell(coord).getCAState().clone();
        }
      }
    } catch (CloneNotSupportedException e) {
      SimSystem.report(e);
      throw new InvalidModelException(
          "At least one of the cells uses a non cloneable state!", e);
    }
  }
View Full Code Here

              .getFactory(AbstractEventQueueFactory.class, aeqp));
    } else {
      if (model instanceof IAtomicModel) {
        aproc = new Simulator((IAtomicModel<? extends AbstractState>) model);
      } else {
        throw new InvalidModelException(
            "Cannot create an abstract sequential simulator for non-valid DEVS models!");
      }
    }
    aproc.init(simulation.getStartTime());
View Full Code Here

   *
   * @param grid
   */
  public final void setGrid(ICAGrid grid) {
    if (this.grid != null) {
      throw new InvalidModelException(
          "setGrid was already called for this cell.");
    }
    this.grid = grid;
    int dim = grid.getDimensions().length;
    neighborhood = new NeumannNeighborhood(dim, null);
View Full Code Here

      model.setName(name);
      addModel(model);
      return model;
    } catch (Exception e) {
      SimSystem.report(e);
      throw new InvalidModelException("Adding model " + name
          + " of type class " + modelClass.getName() + " failed!!", e);
    }
  }
View Full Code Here

    MultiCoupling mc = (MultiCoupling) getCoupling(ident);

    if (mc != null) {
      mc.addTargetList(targets);
    } else {
      throw new InvalidModelException(
          "BasicCoupledModel, addToCoupling: unknown coupling " + ident);
      // System.out.println();
    }
  }
View Full Code Here

   */
  private void removeCoupling(ICouplingSet couplings, BasicCoupling c) {
    try {
      couplings.removeCoupling(c);
    } catch (NoSuchElementException nsee) {
      throw new InvalidModelException("The coupling " + c
          + " cannot be removed from the model " + getFullName()
          + " as it is not existent.", nsee);
    }
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.model.InvalidModelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.