Package unbbayes.prs.mebn.entity

Examples of unbbayes.prs.mebn.entity.ObjectEntityInstance


    if (multiEntityBayesianNetwork.getObjectEntityContainer()
        .getEntityInstanceByName(nameInstance) != null) {
      throw new EntityInstanceAlreadyExistsException();
    } else {
      try {
        ObjectEntityInstance instance = entity
            .addInstance(nameInstance);
        multiEntityBayesianNetwork.getObjectEntityContainer()
            .addEntityInstance(instance);
        multiEntityBayesianNetwork.getNamesUsed().add(nameInstance);
      } catch (TypeException e1) {
View Full Code Here


      // let's assure we never have numberType == null
      throw new IllegalArgumentException("The type of " + continuousResidentNode +" is not a " + continuousResidentNode.NUMBER_ENTITY_NAME +", and also could not extract the type from its MTheory.");
    }
   
    // check whether the value is already recorded as a possible value of numberType. If so, reuse it
    ObjectEntityInstance state = numberType.getInstanceByName(String.valueOf(value));
    if (state == null) {
      // this is a new value. Insert it
      try {
        state = numberType.addInstance(String.valueOf(value));
        continuousResidentNode.getMFrag().getMultiEntityBayesianNetwork().getObjectEntityContainer().addEntityInstance(state);
View Full Code Here

        }else{
          if(argument[i].getSelectedItem() instanceof String){
            if(isNameValid((String)argument[i].getSelectedItem())){
             String nameInstance = (String)argument[i].getSelectedItem();
             ObjectEntity objectEntity = mebn.getObjectEntityContainer().getObjectEntityByType(node.getOrdinaryVariableList().get(i).getValueType());
             argumentVector[i] = new ObjectEntityInstance(nameInstance, objectEntity);
            }else{
              throw new ParcialStateException();
            }
          }
        }
View Full Code Here

         
          if (logManager != null) {
            logManager.printText(in1, false, " - " + finding);
          }
         
          ObjectEntityInstance arguments[] = finding.getArguments();
          List<OVInstance> ovInstanceList = new ArrayList<OVInstance>();
          for(int i = 0; i < arguments.length ; i++){
            OrdinaryVariable ov = residentNode.getArgumentNumber(i + 1).getOVariable();
            LiteralEntityInstance lei = LiteralEntityInstance.getInstance(arguments[i].getName() , ov.getValueType());
            ovInstanceList.add(OVInstance.getInstance(ov, lei));
View Full Code Here

      // let's assure we never have numberType == null
      throw new IllegalArgumentException("The type of " + continuousResidentNode +" is not a " + continuousResidentNode.NUMBER_ENTITY_NAME +", and also could not extract the type from its MTheory.");
    }
   
    // check whether the value is already recorded as a possible value of numberType. If so, reuse it
    ObjectEntityInstance state = numberType.getInstanceByName(String.valueOf(value));
    if (state == null) {
      // this is a new value. Insert it
      try {
        state = numberType.addInstance(String.valueOf(value));
        continuousResidentNode.getMFrag().getMultiEntityBayesianNetwork().getObjectEntityContainer().addEntityInstance(state);
View Full Code Here

    ResidentNode residentSpeed = (ResidentNode)mebn.getNode("Speed");
    assertNotNull(residentSpeed);
   
    // set up instances of object entities
    // we need only one object
    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("OBJ1", mebn.getObjectEntityContainer().getObjectEntityByName("Object")));

    // add three regions
    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("RGN1", mebn.getObjectEntityContainer().getObjectEntityByName("Region")));
    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("RGN2", mebn.getObjectEntityContainer().getObjectEntityByName("Region")));
    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("RGN3", mebn.getObjectEntityContainer().getObjectEntityByName("Region")));
   
    // add three timesteps
//    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("T0", mebn.getObjectEntityContainer().getObjectEntityByName("TimeStep")));
//    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("T1", mebn.getObjectEntityContainer().getObjectEntityByName("TimeStep")));
    mebn.getObjectEntityContainer().addEntityInstance(new ObjectEntityInstance("T2", mebn.getObjectEntityContainer().getObjectEntityByName("TimeStep")));
   
   
    probabilisticNetwork = new ProbabilisticNetwork(mebn.getName());
    SSBN ssbn = new SSBN();
    ssbn.setNetwork(probabilisticNetwork);
View Full Code Here

    if (multiEntityBayesianNetwork.getObjectEntityContainer()
        .getEntityInstanceByName(nameInstance) != null) {
//      throw new EntityInstanceAlreadyExistsException();
    } else {
      try {
        ObjectEntityInstance instance = entity
            .addInstance(nameInstance);
        multiEntityBayesianNetwork.getObjectEntityContainer()
            .addEntityInstance(instance);
        multiEntityBayesianNetwork.getNamesUsed().add(nameInstance);
      } catch (TypeException e1) {
View Full Code Here

TOP

Related Classes of unbbayes.prs.mebn.entity.ObjectEntityInstance

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.