hexagon logo

User subroutine evaluation order

Hello,
 
I have an Adams model which calls two different user subroutines. How can I ensure that one of them is evaluated before the other? In my proble the order of evaluation is of great significance.
 
Thanks.
 
Josef
Parents
  • You can't. But you can "suggest" tot he solver to sort them in the right order if you in the one that you want to be called second, in there make a call (SYSFNC, SYSARY) to get values from the element that uses the first subroutine. You don't need to use that value, just make the call and solver will register that the second element is dependent on the first element and try to sort it in that order.
    But in general, this is bad practice. Better is to store values from previous step or iteration and use that if possible.
     
     
Reply
  • You can't. But you can "suggest" tot he solver to sort them in the right order if you in the one that you want to be called second, in there make a call (SYSFNC, SYSARY) to get values from the element that uses the first subroutine. You don't need to use that value, just make the call and solver will register that the second element is dependent on the first element and try to sort it in that order.
    But in general, this is bad practice. Better is to store values from previous step or iteration and use that if possible.
     
     
Children
No Data