CAEngine::DefaultEvaluationTimeLimit

Revision as of 06:23, 24 October 2015 by Jhuawen (talk | contribs) (Created page with "这主要影响CAObject::EvaluateCAObject::ResultCAObject::ResultTable等方法")

ADE User Guide > ADE Server Class Reference > CAObject

Other languages:
English • ‎中文

ADE 4.1新特征

描述

CAObject的这个属性指明该对象中发生的计算所使用的最大时间限制(毫秒)可以用来确保方法调用最终将返回,即使模型包含一个无线循环,后者比续期消耗更长的时间。

这主要影响CAObject::EvaluateCAObject::ResultCAObject::ResultTable等方法

(in ADE 4.3) Its value is inherited from CAEngine::DefaultEvaluationTimeLimit when the CAObject is first created. Changing the value of CAEngine::DefaultEvaluationTimeLimit has no impact on CAObjects that already exist at that time.

A value of zero (the usual default) means that there is no time limit. Method calls will not return until the computation is complete or terminates (e.g., due to an evaluation error) or the Abort event is triggered. It may never return if the model contains an infinite loop.

数据类型

long int:长整型

访问

读 / 写

示例用法

CAObject obj = ade.GetObjectByName("Projected_profit")
obj.MethodEvaluationTimeLimit = 50000;
CATable result = obj.ResultTable;
if (ade.ErrorCode == 77) {
   /* computation timed out */
}

错误代码

The ErrorCode is not changed by reading or writing a property like this, but when calling other methods when a time limit is in force, you may encounter this error code from them:

  • 77 – "方法计算超出允许的时间限制"

另请参考

Comments


You are not allowed to post comments.