Package unbbayes.io.log

Examples of unbbayes.io.log.IdentationLevel


    //Query and Findings nodes
    //Input nodes still don't evaluated
   
    int iteration = 0;
   
      level1 =  new IdentationLevel(null);
   
    ISSBNLogManager logManager = ssbn.getLogManager();
   
    if (logManager != null) {
      logManager.skipLine();
View Full Code Here


   * - Generated by a finding/query node
   */
  private void evaluateUnfinishedRV(SimpleSSBNNode node) throws ImplementationRestrictionException,
                    SSBNNodeGeneralException{
   
    IdentationLevel thisLevel2;
    level2 = new IdentationLevel(level1);
    thisLevel2 = level2;
   
    ISSBNLogManager logManager = ssbn.getLogManager();
    if (logManager != null) {
      logManager.printText(level2, false, "Evaluate unfinished node" + ": " + node);
View Full Code Here

              //because the enter node should be other.
    }
   
      // 2) Evaluate MFragInstance context
    try {
      level3 = new IdentationLevel(level2);
      if (logManager != null) {
        logManager.printText(level3, true, "Evaluate MFrag Context Nodes");
      }
      evaluateMFragContextNodes(mFragInstance);
     
    } catch (ImplementationRestrictionException e) {
      //Stop the evaluation when the context nodes fail.
      //TODO warning... the evaluation continue, using the default distribution
//      throw e;
//    } catch (OVInstanceFaultException e) {
//      throw new ImplementationRestrictionException(e.getMessage());
    } catch (MFragContextFailException e) {
      //TODO warning... the evaluation continue, using the default distribution
//      throw new SSBNNodeGeneralException(e.getMessage());
    }
   
    // 3) Create the nodes of the MFragInstance
    level3 = new IdentationLevel(level2);
    if (logManager != null) {
      logManager.printText(level3, true, "Create the nodes of MFrag ");
    }
    evaluateNodeInMFragInstance(mFragInstance, ssbnNode)
   
View Full Code Here

   * @throws SSBNNodeGeneralException
   */
  private void evaluateNodeInMFragInstance(MFragInstance mFragInstance, SimpleSSBNNode node)
         throws ImplementationRestrictionException, SSBNNodeGeneralException{
   
    level4 = new IdentationLevel(level3);
    ISSBNLogManager logManager = ssbn.getLogManager();
    if (logManager != null) {
      logManager.printText(level4, false, "Create parents of node " + node);
    }
   
View Full Code Here

//      }
//      Debug.println("]");
//      Debug.println("[Arg] inputNodeParent= " + nodeParent.getResidentNode());
//    }
   
    level5 = new IdentationLevel(level4);
   
   
    List<SimpleSSBNNode> ssbnCreatedList = new ArrayList<SimpleSSBNNode>();
   
    int contextParentsCount = 0;
View Full Code Here

   
    ObjectEntityInstanceOrdereable prev = objectEntityInstanceOrdereable.getPrev();

    if(prev != null){

      level5 = new IdentationLevel(level4);
      if (ssbn.getLogManager() != null) {
        ssbn.getLogManager().printText(level5, false, "Previous node = " + prev + " (" + objectEntityInstanceOrdereable + ")");
      }
     
      LiteralEntityInstance ovOrdereablePreviusValue =
View Full Code Here

   */
  public MFragInstance evaluateMFragContextNodes(MFragInstance mFragInstance)
                     throws ImplementationRestrictionException,
                            MFragContextFailException{
   
    level4 = new IdentationLevel(level3);
   
    //Consider that the tree with the know ordinary variables are already mounted.
    //Consider that the only ordinary variables filled are the alread know OV
    List<OVInstance> ovInstances = mFragInstance.getOVInstanceList();
   
    ISSBNLogManager logManager = ssbn.getLogManager();
    if (logManager != null) {
      logManager.printText(level4, false, "1) Loop for evaluate context nodes.");
    }
    for(ContextNode contextNode: mFragInstance.getContextNodeList()){
     
      if (logManager != null) {
        logManager.printText(level4, false, "Context Node: " + contextNode);
      }
     
      //---> 1) Verify if the context node is soluted only with the know arguments.
      List<OrdinaryVariable> ovInstancesFault = contextNode.getOVFaultForOVInstanceSet(ovInstances);
     
      level5 = new IdentationLevel(level4);
      if(ovInstancesFault.size() == 0){
       
        if (logManager != null) {
          logManager.printText(level5, false, "All ov's of the context node are setted");
        }
View Full Code Here

    //We assume that all the queries is referent to the same MEBN
    mebn = queryList.get(0).getMebn();
   
    //Parameters:

    IdentationLevel in = new IdentationLevel(null);
   
    //Add queries to the list of nodes
    IdentationLevel in1 = new IdentationLevel(in);
    if (logManager != null) {
      logManager.printText(in1, true,
        getResourceForHybridAlgorithm().getString("011_BuildingSSBNForQueries"));
    }
   
    for(Query query: queryList){
      SimpleSSBNNode ssbnNode = SimpleSSBNNode.getInstance(query.getResidentNode());
      query.setSSBNNode(ssbnNode);
     
      for(OVInstance argument : query.getArguments()){
        ssbnNode.setEntityForOv(argument.getOv(), argument.getEntity());  
      }
     
      ssbnNode.setFinished(false);
      ssbn.addSSBNNodeIfItDontAdded(ssbnNode);
      ssbn.addQueryToTheQueryList(query);
     
      if (logManager != null) {
        logManager.printText(in1, false, " - " + ssbnNode);
      }
                                                                         
    }
   
    if (logManager != null) {
      logManager.skipLine();
    }
   
    //Add findings to the list of nodes
   
    in1 = new IdentationLevel(in);
    if (logManager != null) {
      logManager.printText(in1, true,
        getResourceForHybridAlgorithm().getString("012_BuildingSSBNForFindings"));
    }
   
View Full Code Here

TOP

Related Classes of unbbayes.io.log.IdentationLevel

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.