leaf-analysis/src/simulation/Intention.java
/** Creates an intention to be added to the mode.
	 *		Note: Assumes Actors have already been read into the model. 
	 * @param iNode the input node to be added
	 * @param modelSpec	the initial model specification containing actors
	 * @return	the new intention
	 */
Creates an intention to be added to the mode.
Note: Assumes Actors have already been read into the model.
@param iNode the input node to be added
@param modelSpec     the initial model specification containing actors
@return      the new intention
Creates an intention to be added to the mode . Note : Assumes Actors have already been read into the model . @param iNode the input node to be added @param modelSpec the initial model specification containing actors @return the new intention
public static Intention createIntention(ICell iNode, ModelSpec modelSpec) {
		Actor nodeActor = null;
		if (iNode.getParent() != null) {
			for(Actor actor : modelSpec.getActors()){
				if(iNode.getParent().equals(actor.getUniqueID())){
					nodeActor = actor;
					break;
				}
			}
		}
		HashMap<Integer, String> userEvaluations = new HashMap<Integer, String>();
		for (BIUserEvaluation eval : iNode.getIntention().getUserEvaluationList()) 
			userEvaluations.put(eval.getAbsTime(), eval.getAssignedEvidencePair());
		Intention element = new Intention(iNode.getId(), iNode.getIntention().getNodeName(), 
				nodeActor, iNode.getType(), iNode.getIntention().getEvolvingFunction(), 
				userEvaluations);
		return element;
	}
public static Intention createIntention ( ICell iNode , ModelSpec modelSpec ) { Actor nodeActor = null ; if ( iNode . getParent ( ) != null ) { for ( Actor actor : modelSpec . getActors ( ) ) { if ( iNode . getParent ( ) . equals ( actor . getUniqueID ( ) ) ) { nodeActor = actor ; break ; } } } HashMap < Integer , String > userEvaluations = new HashMap < Integer , String > ( ) ; for ( BIUserEvaluation eval : iNode . getIntention ( ) . getUserEvaluationList ( ) ) userEvaluations . put ( eval . getAbsTime ( ) , eval . getAssignedEvidencePair ( ) ) ; Intention element = new Intention ( iNode . getId ( ) , iNode . getIntention ( ) . getNodeName ( ) , nodeActor , iNode . getType ( ) , iNode . getIntention ( ) . getEvolvingFunction ( ) , userEvaluations ) ; return element ; }
Creates an intention to be added to the mode.
Creates an intention to be added to the mode .
// Determine if intention has an actor.