- logger.info("Exec: " + self._containerName + ' ; ' + self._instanceName)
- logger.debug("inputVarList: %s" % inputDesc.inputVarList)
- logger.debug("outputVarList: %s" % inputDesc.outputVarList)
- logger.debug("inputValues: %s" % inputDesc.inputValues)
- if len(inputDesc.inputValues) != len(inputDesc.inputVarList):
- raise Exception("Size mismatch between inputVarList and point to evaluate")
-
- evalPoint = self.deterministicValues
- for i in range(len(inputDesc.inputVarList)):
- evalPoint[inputDesc.inputVarList[i]] = inputDesc.inputValues[i][0]
- logger.debug("evalPoint = %s" % evalPoint)
-
- resDict = {}
- resDict["dev"] = self.BeamModel(**evalPoint)
-
- outputValues = []
- for outputVar in inputDesc.outputVarList:
- outputValues.append([resDict[outputVar]])
- logger.debug("outputValues: %s" % outputValues)
- return outputValues
+ 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