private AObjectiveFunction setUpObjFunc(String xmlFile, AModel appModel,
IPriceCalculator priceCalculator, EstimationResult estimationResult,
DAOFactory daoFactory, String workspace, Map<String, List<AttributeType>> aslaParams) throws Exception
{
ObjectiveFunctionConfig objFuncConfig = null;
AObjectiveFunction objFunc = null;
System.out.println("[TestFramework] Loading objective function from XML file");
objFuncConfig = optUtil.loadObjectiveFunction(xmlFile);
objFunc = classLoader.getObjectiveFunctionInstance(objFuncConfig.getImplClazz());
System.out.println("[TestFramework] Initialising objective function");
objFunc.init(objFuncConfig, appModel, aslaParams, workspace, estimationResult, daoFactory);
objFunc.setPriceCalculator(priceCalculator);
System.out.println();
return objFunc;
}