- logger.info("DEVIATION.Exec: " + self._containerName +
- ' ; ' + self._instanceName)
- if self.inputVarList is None:
- raise Exception("Init not run")
- if len(inPoint) != len(self.inputVarList):
- raise Exception("Size mismatch between inputVarList and point to evaluate")
-
- logger.debug("DEVIATION.Exec (1): inPoint = %s" % inPoint)
- for i in range(len(self.inputVarList)):
- self.evalPoint[self.inputVarList[i]] = inPoint[i]
- logger.debug("evalPoint = %s" % self.evalPoint)
-
- resDict = {}
- resDict["dev"] = self.BeamModel(**self.evalPoint)
-
- outPoint = []
- for outputVar in self.outputVarList:
- outPoint.append(resDict[outputVar])
- logger.debug("DEVIATION.Exec (2): outPoint = %s" % outPoint)
- return outPoint
+ logger.info("Exec: " + self._getIdMessage())
+ logger.debug("inputVarList: %s" % paramInput.inputVarList)
+ logger.debug("outputVarList: %s" % paramInput.outputVarList)
+ logger.debug("inputValues: %s" % paramInput.inputValues)
+
+ inputDict = create_input_dict(self.deterministicValues, paramInput)
+ logger.debug("inputDict = %s" % inputDict)
+
+ # Test for an invalid parameter and return an error in this case
+ if inputDict["L"] <= 0:
+ return create_error_parametric_output("Invalid value: L must be positive")
+
+ outputDict = {}
+ outputDict["dev"] = self.BeamModel(**inputDict)
+
+ paramOutput = create_normal_parametric_output(outputDict, paramInput)
+ logger.debug("outputValues: %s" % paramOutput.outputValues)
+ return paramOutput