| | |
| | | param2Values[count] = settings_predict; |
| | | |
| | | //打印参数 |
| | | log.info("##############调度模型:modelId=" + modelId + " ##########################"); |
| | | log.info("##############调度模型:scheduleScheme=" + scheduleScheme.getCode() + " ##########################"); |
| | | JSONObject jsonObjNewModelBean = new JSONObject(); |
| | | jsonObjNewModelBean.put("newModelBean", newModelBean); |
| | | log.info(String.valueOf(jsonObjNewModelBean)); |
| | |
| | | jsonObjParam2Values.put("param2Values", param2Values); |
| | | log.info(String.valueOf(jsonObjParam2Values)); |
| | | |
| | | //IAILMDK.run |
| | | HashMap<String, Object> result = IAILMDK.run(newModelBean, param2Values); |
| | | /*HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid()); |
| | | //运行模型 |
| | | HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, scheduleScheme.getMpkprojectid()); |
| | | if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT) || |
| | | !modelResult.get(CommonConstant.MDK_STATUS_CODE).toString().equals(CommonConstant.MDK_STATUS_100)) { |
| | | throw new RuntimeException("模型结果异常:" + modelResult); |
| | | } |
| | | modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT);*/ |
| | | modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); |
| | | |
| | | //打印结果 |
| | | JSONObject jsonObjResult = new JSONObject(); |
| | | jsonObjResult.put("result", result); |
| | | jsonObjResult.put("result", modelResult); |
| | | log.info(String.valueOf(jsonObjResult)); |
| | | log.info("调度模型计算完成:modelId=" + modelId + result); |
| | | |
| | | //5.返回调度结果 |
| | | scheduleResult.setResult(result); |
| | | scheduleResult.setResult(modelResult); |
| | | scheduleResult.setModelId(modelId); |
| | | scheduleResult.setSchemeId(scheduleScheme.getId()); |
| | | scheduleResult.setScheduleTime(scheduleTime); |