Overview
Comment:fixcc when rdae_is_dae (-cr).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: d7f4d9a52703caf36ea8d4de11ec650fc899d8fc11777aadaafabd67ca8ae0e2
User & Date: geraint@users.sourceforge.net on 2001-10-26 01:01:49
Other Links: branch diff | manifest | tags
Context
2001-10-29
13:53:09
Suppresses [221] warnings (undefined symbols) in the code. check-in: 975977d8b0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2001-10-26
01:01:49
fixcc when rdae_is_dae (-cr). check-in: d7f4d9a527 user: geraint@users.sourceforge.net tags: origin/master, trunk
2001-10-16
02:15:58
Added print dialogue to allow user to select print filename. check-in: eacde8ae82 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [e662cf5bda] to [ae857fca80].

13
14
15
16
17
18
19




20
21
22
23
24
25
26
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$




## Revision 1.324  2001/10/05 23:39:43  geraint
## Made odes.dat2 .PRECIOUS to prevent deletion when simulation receives ^C.
##
## Revision 1.323  2001/08/08 02:14:59  geraint
## Rationalisation of solver code, beginning with algebraic solvers.
##
## Revision 1.322  2001/08/01 04:06:07  geraint







>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.325  2001/10/11 03:15:55  geraint
## Fixed make dependencies for c++ simulation code
## - re-simulation no longer required for different output format.
##
## Revision 1.324  2001/10/05 23:39:43  geraint
## Made odes.dat2 .PRECIOUS to prevent deletion when simulation receives ^C.
##
## Revision 1.323  2001/08/08 02:14:59  geraint
## Rationalisation of solver code, beginning with algebraic solvers.
##
## Revision 1.322  2001/08/01 04:06:07  geraint
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
#SUMMARY cse	constrained-state equations (ps)
#Constrained-state equations
${sys}_cse.r: ${Subsystem}_dae.r ${Subsystem}_dae.r ${Subsystem}_def.r ${Subsystem}_subs.r 
ifneq ($partition,)
	echo Doing subsystems
	mtt_make_subsystems  ${sys} cse r
endif
	dae2cse_r $optimise $Solve ${Subsystem}; tidy ${Subsystem}_cse.r #$1_subs.r
$1_csex.r: $1_cse.r
	touch $1_csex.r
$1_cseo.r: $1_cse.r
	touch $1_cseo.r

#$1_cse.m: $1_def.r $1_cse.r $1_sympar.r  $1_subs.r 
#	cse_r2m $1; matlab_tidy $1_cse.m







|







2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
#SUMMARY cse	constrained-state equations (ps)
#Constrained-state equations
${sys}_cse.r: ${Subsystem}_dae.r ${Subsystem}_dae.r ${Subsystem}_def.r ${Subsystem}_subs.r 
ifneq ($partition,)
	echo Doing subsystems
	mtt_make_subsystems  ${sys} cse r
endif
	dae2cse_r $fixcc $optimise $Solve ${Subsystem}; tidy ${Subsystem}_cse.r #$1_subs.r
$1_csex.r: $1_cse.r
	touch $1_csex.r
$1_cseo.r: $1_cse.r
	touch $1_cseo.r

#$1_cse.m: $1_def.r $1_cse.r $1_sympar.r  $1_subs.r 
#	cse_r2m $1; matlab_tidy $1_cse.m

Modified mttroot/mtt/bin/trans/dae2cse_r from [b9d5a45f5d] to [95da3f9a38].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop 1991, 1992, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.17  2001/07/27 23:29:10  geraint
## Optimises only when requested (-opt).
##
## Revision 1.16  2001/07/13 04:54:04  geraint
## Branch merge: numerical-algebraic-solution back to main.
##
## Revision 1.15.2.4  2001/06/26 00:55:48  geraint







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop 1991, 1992, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.18  2001/10/05 23:37:32  geraint
## Fixed assignment statement in ae.r when RHS=0.
##
## Revision 1.17  2001/07/27 23:29:10  geraint
## Optimises only when requested (-opt).
##
## Revision 1.16  2001/07/13 04:54:04  geraint
## Branch merge: numerical-algebraic-solution back to main.
##
## Revision 1.15.2.4  2001/06/26 00:55:48  geraint
105
106
107
108
109
110
111




112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144



145
146
147
148
149
150
151
solve=0; solve_msg=''
optimise=''; optimise_msg=''
while [ -n "`echo $1 | grep '^-'`" ]; do
  case $1 in
        -A )
                solve=1
		solve_msg=' with explicit solution of algebraic equations' ;;




	-optimise)
	    optimise='-optimise'
	    optimise_msg=' with optimisation' ;;
        *)
                echo "$1 is an invalid argument - ignoring" ;;
  esac
  shift
done

# Create the reduce output code
def2write_r $optimise $1 cse 
def2write_r $optimise $1 csex # Version without E matrix
def2write_r $optimise $1 cseo

echo "Creating $1_cse.r $solve_msg $optimise_msg"
echo "Creating $1_csex.r $optimise_msg"
echo "Creating $1_cseo.r $optimise_msg"

# Remove the old log file
rm -f dae2cse_r.log

# Remove some files
rm -f $1_cse.r? $1_cseo.r?

# Use reduce to accomplish the transformation
$SYMBOLIC >dae2cse_r.log << EOF

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

OFF Echo;
OFF Nat;
ON NERO;




in "$1_def.r";
MTTdxs := MTTdX;  %Save the symbolic form of dX

in "$1_subs.r";
in "$1_dae.r";








>
>
>
>














|


















>
>
>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
solve=0; solve_msg=''
optimise=''; optimise_msg=''
while [ -n "`echo $1 | grep '^-'`" ]; do
  case $1 in
        -A )
                solve=1
		solve_msg=' with explicit solution of algebraic equations' ;;
	-fixcc )
                fixcc=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
                fix_msg='fixing c and cc code';
		;;
	-optimise)
	    optimise='-optimise'
	    optimise_msg=' with optimisation' ;;
        *)
                echo "$1 is an invalid argument - ignoring" ;;
  esac
  shift
done

# Create the reduce output code
def2write_r $optimise $1 cse 
def2write_r $optimise $1 csex # Version without E matrix
def2write_r $optimise $1 cseo

echo "Creating $1_cse.r $solve_msg $optimise_msg $fix_msg"
echo "Creating $1_csex.r $optimise_msg"
echo "Creating $1_cseo.r $optimise_msg"

# Remove the old log file
rm -f dae2cse_r.log

# Remove some files
rm -f $1_cse.r? $1_cseo.r?

# Use reduce to accomplish the transformation
$SYMBOLIC >dae2cse_r.log << EOF

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

OFF Echo;
OFF Nat;
ON NERO;

%Fix c code if required
$fixcc

in "$1_def.r";
MTTdxs := MTTdX;  %Save the symbolic form of dX

in "$1_subs.r";
in "$1_dae.r";


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]