Thank you very much, Vince. I appreciate your help.
I have been using a few different types of programming language. I could have the RAS gate operation rule work fine for the last two years, and I have been viewing the detailed log results.
But recently, the errors came up for the conditions that I could easily handle before. Not sure Why.
(1) scenario 1: The gate flow would not increase and keep almost constant (simulation results) with an increasing in gate opening, or with an wide open gate (Operation rule).
(2) scenario 2: gate keeps small openings (from the modelling results), but the detailed output shows it wide open, which matches with the operation rule set in the RAS.