Package org.jamesii.core.model

Examples of org.jamesii.core.model.InvalidModelException


      } else {
        model.removeCoupling(src.getFirstValue(), src.getSecondValue(),
            tar.getFirstValue(), tar.getSecondValue());
      }
    } catch (NoSuchElementException nsee) {
      throw new InvalidModelException(
          "On trying to add/remove a coupling the following error occured: In the model "
              + model.getFullName() + " the following " + nsee.getMessage(), nsee);
    }
  }
View Full Code Here


      for (ICACell<?> c : initStates) {

        this.cells[c.getPosition()[0]] = c.clone();
      }
    } catch (CloneNotSupportedException e) {
      throw new InvalidModelException(e);
    }

    calculateHashCode();
  }
View Full Code Here

              // add the direct replacements to the list of direct couplings
              addCouplings(nc.iterator(), couplings);

            } else {
              throw new InvalidModelException(
                      "DMR only supports std DEVS couplings!!!");
            }

          }
View Full Code Here

            addToInfluenceeSet(model, influencees, involvedCM, targetModel);
          }
        }
      } // if multicoupling
      else {
        throw new InvalidModelException(
            "This coupling class is not yet supported!! ("
                + coupling.getClass().getName() + ")");
      }
    } // end of while(coupIter.hasNext())
  }
View Full Code Here

      for (ICACell c : initStates) {

        this.cells[c.getPosition()[0]][c.getPosition()[1]] = c.clone();
      }
    } catch (CloneNotSupportedException e) {
      throw new InvalidModelException(e);
    }

  }
View Full Code Here

        int y = c.getPosition()[1];
        int z = c.getPosition()[2];
        this.cells[z][y][x] = c.clone();
      }
    } catch (CloneNotSupportedException e) {
      throw new InvalidModelException(e);
    }
  }
View Full Code Here

        // class via default constructor
        if (modelClass.getEnclosingClass() != null) {
          return Reflect.instantiate(modelClass,
              Reflect.instantiate(modelClass.getEnclosingClass()), parameters);
        }
        throw new InvalidModelException(
            "Does model '"
                + modellLocation
                + "' implement a constructor with a Map<String, ?> as single argument? This is required.",
            ex);
      }
    } catch (Exception ex) {
      throw new InvalidModelException(
          "Error while trying to read implemented model '" + ident.getHost()
              + "'", ex);
    }
  }
View Full Code Here

  @Override
  public double timeAdvanceSim() {
    double ta = timeAdvance();
    if (ta < 0) {
      throw new InvalidModelException("The model " + getFullName()
          + " an instance of " + getClass().getName()
          + " has a negative time advance value!!! " + ta);
    }
    return ta;
  }
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.