Calculating outflow from the inflow
_str1 : qty in the tank
_str1,-1 : previous value of the qty in the tank
_str2 : inflow (qty/min)
double flow=Str.ToDouble(_doJava.get("_str1",-1))-Str.ToDouble(_str1)+Str.ToDouble(_str2);
if (flow>0)
return flow;
else
return "0";
// ================================
// New MX Common function
// ================================
/**
* Description : Calculating outflow from the inflow
*
* _str1 : qty in the tank
* _str2 : inflow (qty/min)
*/
return MxFlow_out_from_in(_doJava, _str1, _str2);
Calculating inflow from the outflow
_str1 : qty in the tank
_str1,-1 : previous value of the qty in the tank
_str2 : outflow (qty/min)
double flow=Str.ToDouble(_str2)-Str.ToDouble(_doJava.get("_str1",-1))+Str.ToDouble(_str1);
if (flow>0)
return flow;
else
return "0";
//=============================
// New MX Common function
//=============================
/**
* Description : Calculating inflow from the outflow
*
* Input : _str1 : qty in the tank
* _str2 : outflow (qty/min)
* Output : flow
*/
return MxFlow_in_from_out(_doJava, _str1,_str2);
Was this article helpful?