<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle22
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR-CH link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Dear Michael,<o:p></o:p></p><p class=MsoNormal>Thank you so much for your quick answer,<o:p></o:p></p><p class=MsoNormal>Actually, what i did long time ago in Trnsys 13.1 was the following.<o:p></o:p></p><p class=MsoNormal>I was simulating a greenhouse with a thermal storage (water tank), the logic of the control was to initiate each time step with the hypothesis that nothing is done (neutral, zero control). Then once converged, check if it is too cold or too warm then going toward controlling the system by iterating again for each possible case (if too warm, case 1, then 2, then 3, then 4 etc, same when heating is needed. This allowed me to reinitiate the iteration and convergence  until the correct physical case be obtained. Like that i did have any trouble of convergence to the wrong physical case.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><img width=892 height=532 style='width:9.2916in;height:5.5416in' id="Picture_x0020_1" src="cid:image002.png@01D7774E.CD0C2A80"><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>See a short description below. Written in good old f77.<o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;mso-fareast-language:FR-CH'>the philosophy is the following:<br>In my own control routine, at each iteration, I check if the control configuration is OK. If it is ok then the variable "ireiter" is set to 0, otherwise it is set to 1, and one start again as if it was the begining of the same time step.<br><br>In my control routine I have the various control cases numbered with the variable "icas", the variable "icaschk" represents the numbered cases after check of the physical conditions obtained. <br>If icaschk does not equal icas after the checks, then I have another variable called "icorrcas" which is set to either +1 or -1 and will drive the control to another control case for the next iteration on the same timestep.<br><br>In the routine blockdat.for, I have added two commons. The second /sunsp/ is actually not needed and was just there to print out variable during debugging.<br>-------------------------------------------------------------------------<br>in blockdat<br><br>C MODIF 00000 PJ BEGIN<br>       COMMON /CHKSTEP/ ireiter, icas, icaschk<br>       COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text <br>C MODIF 00000 PJ END<br>-------------------------------------------------------------------------<br><br>Then in main, I have the same commons, I have added a new label 10001 in order to be able to start the iteration from scratch again, which is checked with a test on the variable ireiter (if = 0 then go straight, if .gt. 0, then start to reiter again)<br><br>-------------------------------------------------------------------------<br>-------------------------------------------------------------------------<br>in main<br>-------------------------------------------------------------------------<br><br>c modif 00000 pj begin<br>       COMMON /CHKSTEP/ IREITER , icas, icaschk<br>       COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text<br>c modif 00000 pj end<br><br>-------------------------------------------------------------------------<br><br>C ********************** MAIN SIMULATION LOOP **************************<br>100   IF (DONE) GO TO 999<br>      CALL CLOCK(TIME,DONE,2)<br>C  modif 00000 pj begin<br>c added label 10001 used for reiter of the time step<br>10001 IF (NDERIV.EQ.0) THEN<br>c modif 00000 pj end<br><br>-------------------------------------------------------------------------<br><br>370       CONTINUE<br>         ENDIF<br><br>C       SWITCH PREDICTED AND CORRECTED VALUES<br>        I = PRED<br>        PRED = CORR<br>        CORR = I<br>        INTG = 2<br>        IF (IRECUR.GT.0) INTG = 3<br>        IF ((IRECUR.GT.0.OR.NCALLS.GT.0).AND.(ICT.EQ.0)) GO TO 200<br><br>C ************************************************************<br>C MODIF 00000 PJ BEGIN (LABELED COMMON ADDED IN BLOCKDAT_M.FOR, )<br>c control_iter retuen a variable reiter (in common labelled CHKSTEP)        <br>C REITER =0 GO ON TO NEXT TIME STEP<br>C        =1 REITER ON THE SAME TIME STEP<br>      call control_iter(time)<br>       if (ireiter .gt. 0) then<br>        ireiter=ireiter+1<br>       icasmain=icas<br>             icaschkm=icaschk<br>       timereit=max(0.,time)<br>c      WRITE(*,*) "reiter ", timereit, icasmain, icaschkm<br>       tsunspm=tsunsp<br>       tsetm=tset<br>       tloadm=tload<br>       tmaxm=tmax<br>       stom=tsto<br>       textm=text<br>c      write (*,*) "  tsunsp=", tsunspm, "  tset=",tsetm," text=",textm<br>c      write (*,*) "  tload=", tloadm, "  tmax=",tmaxm," tsto=",tsto  <br>c      write (*,*) icasmain<br>c      write (*,*) icaschkm<br>c      CALL PRINT(TIME,DONE)<br>       goto 10001<br>       endif<br>C MODIF 00000 PJ END<br><br>-------------------------------------------------------------------------<br>-------------------------------------------------------------------------<br><br>Then in exec.for, one has also modified to set the flag to reiter<br><br>-------------------------------------------------------------------------<br>-------------------------------------------------------------------------<br>in exec<br>-------------------------------------------------------------------------<br>c modif 00000 pj begin<br>       COMMON /CHKSTEP/ IREITER, icas, icaschk <br>c modif 00000 pj end<br>-------------------------------------------------------------------------<br><br>110         INFO(7,J) = -1<br>        ELSE<br>          DO 111 J = 1, NUNITS<br>            CALL(J) = CALL1(J)<br>c modif 00000 pj begin<br>c added info(7,j) =0 for the case where one wants to reiter on the same<br>c time step<br>       if (ireiter .le. 0) then<br>             INFO(7,J) = -1<br>       else<br>             CALL(J) = .TRUE.<br>             INFO(7,J) = 0<br>       endif <br>111   continue      <br>c modif 00000 pj end<br>-------------------------------------------------------------------------<br>-------------------------------------------------------------------------<br><br>In the control routine properly, the variable ireiter is the one that I check and control.<br><br><br>(TRNSYS type, control routine used)<br>c modif 00000 pj begin<br>        COMMON /CHKSTEP/ IREITER, icas, icaschk<br>       COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text<br>       SAVE /sunsp/ <br>c modif 00000 pj end<br><br></span>it was working very well, and i have now also  project where the control logic sequence may not always follow a simple sequence at each time step.<o:p></o:p></p><p class=MsoNormal>I had everthing within the TRNSYS code,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I do now know much about ESP-r and its co-simulation, and also does not have much time for that,<o:p></o:p></p><p class=MsoNormal>So is there a way to use the type 130 to do the same in TRNSYS 17 ?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If you have any idea or example…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best regards,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Pierre Jaboyedoff,<o:p></o:p></p><p class=MsoNormal>TRNSYS user since 1987,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-IN style='mso-fareast-language:FR-CH'>Pierre Jaboyedoff<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IN style='mso-fareast-language:FR-CH'>Ing. Thermicien Dipl. EPFL <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Effin’Art</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Associé<o:p></o:p></span></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Chemin de Pré-Fleuri 6<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Entrée arrière, 3 ème étage gauche<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>CH-1006 Lausanne<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'><o:p> </o:p></span></b></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Tel : 00 41 21 616 11 00</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Mobile : 00 41 79 668 50 88</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'><a href="mailto:pierre.jaboyedoff@effinart.ch" target="_blank">pierre.jaboyedoff@effinart.ch</a></span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:FR-CH'>From:</span></b><span lang=EN-US style='mso-fareast-language:FR-CH'> Michaël Kummert <michael.kummert@polymtl.ca> <br><b>Sent:</b> Monday, 12 July 2021 14:52<br><b>To:</b> 'TRNSYS users mailing list at OneBuilding.org' <trnsys-users@lists.onebuilding.org><br><b>Cc:</b> pierre.jaboyedoff@effinart.ch<br><b>Subject:</b> RE: [TRNSYS-users] controlling the passage to the next time steps<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-CA>Hello,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>The co-simulator with ESP-r available in TRNSYS 17 and 18 implements something that is similar to what you are trying to do, if I understand correctly. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>Once TRNSYS has converged for a time step, Type 130 checks that the iterations between the 2 programs have converged, and if that is not the case, Type 130 “forces” TRNSYS to continue iterating at the current time step.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>Perhaps you can take a look at Type 130 and how it interacts with the Kernel to see whether you can use that for what you are trying to achieve.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>The part I am not sure to understand is that in the co-simulation case, it makes sense to force additional iterations because the inputs coming from ESP-r will be different so the TRNSYS results after new iterations will be different. In your case, I am not sure what would cause TRNSYS to find different results, but I am probably missing something. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>In any case, I hope this helps.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA>Michaël Kummert<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA>Polytechnique Montréal<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:EN-CA'>From:</span></b><span lang=EN-US style='mso-fareast-language:EN-CA'> Pierre Jaboyedoff via TRNSYS-users <<a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a>> <br><b>Sent:</b> July 9, 2021 08:35<br><b>To:</b> <a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a><br><b>Cc:</b> <a href="mailto:pierre.jaboyedoff@effinart.ch">pierre.jaboyedoff@effinart.ch</a><br><b>Subject:</b> [TRNSYS-users] controlling the passage to the next time steps<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p><p class=MsoNormal>In trnsys 13.1, i had (long time ago ..) modified the kernel of TRNSYS (see below).<o:p></o:p></p><p class=MsoNormal>The reason was to be able to check if the control routine developed was converging to the correct physical case (e.g. solar, then auxiliary etc …). If not then i was getting TRNSYS to restart the iteration on the same time step until the correct control case was obtained.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Has anybody done something similar for TRNSYS 17.2 ?<o:p></o:p></p><p class=MsoNormal>I have started looking for this, it seems to be located between, exec.for, trnsys.for, etc …<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks in advance,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-IN style='mso-fareast-language:FR-CH'>Pierre Jaboyedoff<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Head of BEEP PMTU Switzerland (<a href="http://www.beepindia.org">www.beepindia.org</a>)<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Effin’Art</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Associate<o:p></o:p></span></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Chemin de Pré-Fleuri 6<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Entrance at the back, 3rd floor on the left<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>CH-1006 Lausanne<o:p></o:p></span></b></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Tel : 00 41 21 616 11 00</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Mobile : 00 41 79 668 50 88</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'><a href="mailto:pierre.jaboyedoff@effinart.ch" target="_blank">pierre.jaboyedoff@effinart.ch</a></span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>in blockdat<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>C MODIF  PJ BEGIN<o:p></o:p></p><p class=MsoNormal>                COMMON /CHKSTEP/ ireiter, icas, icaschk<o:p></o:p></p><p class=MsoNormal>                COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text <o:p></o:p></p><p class=MsoNormal>C MODIF  PJ END<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>in main<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>c modif  pj begin<o:p></o:p></p><p class=MsoNormal>                COMMON /CHKSTEP/ IREITER , icas, icaschk<o:p></o:p></p><p class=MsoNormal>                COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text<o:p></o:p></p><p class=MsoNormal>c modif  pj end<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>C ********************** MAIN SIMULATION LOOP **************************<o:p></o:p></p><p class=MsoNormal>100   IF (DONE) GO TO 999<o:p></o:p></p><p class=MsoNormal>      CALL CLOCK(TIME,DONE,2)<o:p></o:p></p><p class=MsoNormal>C  modif  pj begin<o:p></o:p></p><p class=MsoNormal>c added label 10001 used for reiter of the time step<o:p></o:p></p><p class=MsoNormal>10001 IF (NDERIV.EQ.0) THEN<o:p></o:p></p><p class=MsoNormal>c modif  pj end<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>370       CONTINUE<o:p></o:p></p><p class=MsoNormal>         ENDIF<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>C       SWITCH PREDICTED AND CORRECTED VALUES<o:p></o:p></p><p class=MsoNormal>        I = PRED<o:p></o:p></p><p class=MsoNormal>        PRED = CORR<o:p></o:p></p><p class=MsoNormal>        CORR = I<o:p></o:p></p><p class=MsoNormal>        INTG = 2<o:p></o:p></p><p class=MsoNormal>        IF (IRECUR.GT.0) INTG = 3<o:p></o:p></p><p class=MsoNormal>        IF ((IRECUR.GT.0.OR.NCALLS.GT.0).AND.(ICT.EQ.0)) GO TO 200<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>C ************************************************************<o:p></o:p></p><p class=MsoNormal>C MODIF  PJ BEGIN (LABELED COMMON ADDED IN BLOCKDAT_M.FOR, )<o:p></o:p></p><p class=MsoNormal>c control_iter retuen a variable reiter (in common labelled CHKSTEP)        <o:p></o:p></p><p class=MsoNormal>C REITER =0 GO ON TO NEXT TIME STEP<o:p></o:p></p><p class=MsoNormal>C        =1 REITER ON THE SAME TIME STEP<o:p></o:p></p><p class=MsoNormal>      call control_iter(time)<o:p></o:p></p><p class=MsoNormal>                if (ireiter .gt. 0) then<o:p></o:p></p><p class=MsoNormal>                ireiter=ireiter+1<o:p></o:p></p><p class=MsoNormal>                icasmain=icas<o:p></o:p></p><p class=MsoNormal>                               icaschkm=icaschk<o:p></o:p></p><p class=MsoNormal>                timereit=max(0.,time)<o:p></o:p></p><p class=MsoNormal>c              WRITE(*,*) "reiter ", timereit, icasmain, icaschkm<o:p></o:p></p><p class=MsoNormal>                tsunspm=tsunsp<o:p></o:p></p><p class=MsoNormal>                tsetm=tset<o:p></o:p></p><p class=MsoNormal>                tloadm=tload<o:p></o:p></p><p class=MsoNormal>                tmaxm=tmax<o:p></o:p></p><p class=MsoNormal>                stom=tsto<o:p></o:p></p><p class=MsoNormal>                textm=text<o:p></o:p></p><p class=MsoNormal>c              write (*,*) "  tsunsp=", tsunspm, "  tset=",tsetm," text=",textm<o:p></o:p></p><p class=MsoNormal>c              write (*,*) "  tload=", tloadm, "  tmax=",tmaxm," tsto=",tsto  <o:p></o:p></p><p class=MsoNormal>c              write (*,*) icasmain<o:p></o:p></p><p class=MsoNormal>c              write (*,*) icaschkm<o:p></o:p></p><p class=MsoNormal>c             CALL PRINT(TIME,DONE)<o:p></o:p></p><p class=MsoNormal>                goto 10001<o:p></o:p></p><p class=MsoNormal>                endif<o:p></o:p></p><p class=MsoNormal>C MODIF  PJ END<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>in exec<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>c modif  pj begin<o:p></o:p></p><p class=MsoNormal>                COMMON /CHKSTEP/ IREITER, icas, icaschk <o:p></o:p></p><p class=MsoNormal>c modif  pj end<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>110         INFO(7,J) = -1<o:p></o:p></p><p class=MsoNormal>        ELSE<o:p></o:p></p><p class=MsoNormal>          DO 111 J = 1, NUNITS<o:p></o:p></p><p class=MsoNormal>            CALL(J) = CALL1(J)<o:p></o:p></p><p class=MsoNormal>c modif  pj begin<o:p></o:p></p><p class=MsoNormal>c added info(7,j) =0 for the case where one wants to reiter on the same<o:p></o:p></p><p class=MsoNormal>c time step<o:p></o:p></p><p class=MsoNormal>                if (ireiter .le. 0) then<o:p></o:p></p><p class=MsoNormal>                      INFO(7,J) = -1<o:p></o:p></p><p class=MsoNormal>                else<o:p></o:p></p><p class=MsoNormal>                               CALL(J) = .TRUE.<o:p></o:p></p><p class=MsoNormal>                      INFO(7,J) = 0<o:p></o:p></p><p class=MsoNormal>                endif <o:p></o:p></p><p class=MsoNormal>111   continue      <o:p></o:p></p><p class=MsoNormal>c modif  pj end<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>-------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>In my own control routine<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>c modif  pj begin<o:p></o:p></p><p class=MsoNormal>                COMMON /CHKSTEP/ IREITER, icas, icaschk<o:p></o:p></p><p class=MsoNormal>                COMMON /sunsp/ tsunsp, tset, tmax, tload, tsto, text<o:p></o:p></p><p class=MsoNormal>                SAVE /sunsp/ <o:p></o:p></p><p class=MsoNormal>c modif  pj end<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-IN style='mso-fareast-language:FR-CH'>Pierre Jaboyedoff<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='mso-fareast-language:FR-CH'>Head of BEEP PMTU Switzerland (</span><span style='mso-fareast-language:FR-CH'><a href="http://www.beepindia.org"><span lang=EN-CA>www.beepindia.org</span></a></span><span lang=EN-CA style='mso-fareast-language:FR-CH'>)<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Effin’Art</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Associate<o:p></o:p></span></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Chemin de Pré-Fleuri 6<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>Entrance at the back, 3rd floor on the left<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='mso-fareast-language:FR-CH'>CH-1006 Lausanne<o:p></o:p></span></b></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Tel : 00 41 21 616 11 00</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'>Mobile : 00 41 79 668 50 88</span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR-CH'><a href="mailto:pierre.jaboyedoff@effinart.ch" target="_blank">pierre.jaboyedoff@effinart.ch</a></span><span lang=EN-IN style='mso-fareast-language:FR-CH'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>