Index: mttroot/mtt/bin/trans/dae2cse_r ================================================================== --- mttroot/mtt/bin/trans/dae2cse_r +++ mttroot/mtt/bin/trans/dae2cse_r @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.15.2.2 2001/05/05 20:50:16 geraint +## Fixed errors when MTTNx=0. +## ## Revision 1.15.2.1 2001/05/04 04:07:24 geraint ## Numerical solution of algebraic equations. ## sys_ae.cc written for unsolved inputs. ## Solution of equations using hybrd from MINPACK (as used by Octave fsolve). ## @@ -291,20 +294,20 @@ % No algebraic variables left! MTTNYz := 0; END; % IF MTTNyz>0 and $solve +OUT "$1_ae.r"; IF (MTTNyz>0) THEN % not $solve (or perhaps solution failed?) BEGIN - OUT "$1_ae.r"; WRITE "MATRIX MTTyz(",MTTNyz,",1)"; WRITE "%File: $1_ae.r"; FOR i := 1:MTTNyz DO WRITE "MTTyz(",i,",1) := ",MTTyz(i,1); - WRITE ";END;"; - SHUT "$1_ae.r"; END; % if MTTNyz>0 (and !$solve) +WRITE ";END;"; +SHUT "$1_ae.r"; % Create the matrix declarations OUT "$1_cse.r1"; write "%"; IF (MTTNx > 0) THEN