leaf-analysis/src/simulation/BIModelSpecBuilder.java
/** Read the elements that were passed as analysis request.
     * @param modelSpec - the spec to be generated
     * 	Note: this function depends on modelSpec.getNumIntentions() being set prior to being called.
     * @param aRequest - the request passed from the front end
     */
Read the elements that were passed as analysis request.
@param modelSpec - the spec to be generated
Note: this function depends on modelSpec.getNumIntentions() being set prior to being called.
@param aRequest - the request passed from the front end
Read the elements that were passed as analysis request . @param modelSpec - the spec to be generated Note : this function depends on modelSpec . getNumIntentions () being set prior to being called . @param aRequest - the request passed from the front end
private static void readAnalysisParameters(ModelSpec modelSpec, IAnalysisRequest aRequest,
    		int numIntentions) {
    	try {
			modelSpec.setAnalysisType(aRequest.getAction());	
			if (aRequest.getConflictLevel() != null) {
				modelSpec.setConflictAvoidLevel(aRequest.getConflictLevel().charAt(0));
			}
			if(aRequest.getNumRelTime() != null){
				modelSpec.setNumRelativeTimePoints(Integer.parseInt(aRequest.getNumRelTime()));
			} 
			if (Main.DEBUG) System.out.println("Read Simple Analysis Parameters");
			modelSpec.setPrevResult(aRequest.getPreviousAnalysis());
			if (Main.DEBUG) System.out.println("Read Previous Results");
    	} catch (Exception e) {
    		throw new RuntimeException(e.getMessage());
    	}      	
    }
private static void readAnalysisParameters ( ModelSpec modelSpec , IAnalysisRequest aRequest , int numIntentions ) { try { modelSpec . setAnalysisType ( aRequest . getAction ( ) ) ; if ( aRequest . getConflictLevel ( ) != null ) { modelSpec . setConflictAvoidLevel ( aRequest . getConflictLevel ( ) . charAt ( 0 ) ) ; } if ( aRequest . getNumRelTime ( ) != null ) { modelSpec . setNumRelativeTimePoints ( Integer . parseInt ( aRequest . getNumRelTime ( ) ) ) ; } if ( Main . DEBUG ) System . out . println ( "Read Simple Analysis Parameters" ) ; modelSpec . setPrevResult ( aRequest . getPreviousAnalysis ( ) ) ; if ( Main . DEBUG ) System . out . println ( "Read Previous Results" ) ; } catch ( Exception e ) { throw new RuntimeException ( e . getMessage ( ) ) ; } }
Read the elements that were passed as analysis request.
Read the elements that were passed as analysis request .
// Type of analysis // Conflict level //Number of Relative time