Differences From Artifact [6d4fbc4203]:

To Artifact [46dc6c59a0]:


10
11
12
13
14
15
16




17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+
+







# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997,1998,1999

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.218  1999/12/03 00:04:50  peterg
## Version to eric.
## -stdin switch added
##
## Revision 1.217  1999/11/16 22:15:55  peterg
## Changed compcopy to test for abg, not lbl file
##
## Revision 1.216  1999/11/16 05:53:21  peterg
## Added sensitivity (-s) switch
##
## Revision 1.215  1999/11/15 22:45:31  peterg
849
850
851
852
853
854
855
856

857
858
859
860
861
862
863
853
854
855
856
857
858
859

860
861
862
863
864
865
866
867







-
+







                mtt_switches="$mtt_switches $1";
                Solve='-A';;
	-abg )
                mtt_switches="$mtt_switches $1";
                start_at_abg='yes';;
	-stdin )
                mtt_switches="$mtt_switches $1";
                source=stdin;;
                stdin=stdin;;
        --version)                
                  echo 'MTT version' $version; exit;;
        --versions)                
                mtt_versions; exit;;
	*)
		echo "$1 is an invalid argument - ignoring" ;;
  esac
996
997
998
999
1000
1001
1002


1003
1004
1005
1006
1007
1008
1009
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015







+
+







fi

# Start at abg representation
if [ -n "$start_at_abg" ]; then
  if [ -f "$1_abg.m" ]; then
    if [ "$quiet" != "quiet" ]; then
        echo Starting from $1_abg.m
	touch $1_subs.sh
	touch $1_cr.r
    fi
  else
    echo $1_abg.m does not exist
    exit
  fi
fi

1822
1823
1824
1825
1826
1827
1828


1829
1830
1831
1832

1833
1834
1835
1836
1837
1838
1839
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839

1840
1841
1842
1843
1844
1845
1846
1847







+
+



-
+







	sub_sh2tex $1
else
	sub_sh2tex -l $1
endif

#SUMMARY abg	acausal bond graph (m)
#Raw bond graph to acausal bond graph: mfile

ifneq ($start_at_abg,yes)
$1_abg.m: $1_rbg.m $1_alias.m $1_sub.sh
	(sh $1_sub.sh "mtt $mtt_switches -q -u -l $level+1 " ' abg m null  || exit 1') || exit 1
	rbg2abg_m $info_switch $1

endif

#SUMMARY cbg*	causal bond graph (m)
#Acausal bond graph to causal bond graph: mfile
$1_cbg.m: $1_abg.m
	abg2cbg_m  $info_switch $causality_switch $1

$1_type.sh: $1_cbg.m
1848
1849
1850
1851
1852
1853
1854
1855

1856
1857
1858
1859
1860
1861
1862
1856
1857
1858
1859
1860
1861
1862

1863
1864
1865
1866
1867
1868
1869
1870







-
+







#SUMMARY ese	elementary system equations (r)
#SUMMARY def	definitions - system orders etc. (r)
#SUMMARY def	definitions - system orders etc. (m)
#SUMMARY struc*	structure - list of inputs, outputs and states (txt)
#SUMMARY struc	structure - list of inputs, outputs and states (tex)
#SUMMARY struc*	structure - list of inputs, outputs and states (view)
#Elementary system equations + definitions
$1_ese.r: $1_cbg.m $1_sympar.txt 
$1_ese.r: $1_cbg.m
	   cbg2ese_m2r $info_switch $1; ese_tidy $1
$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_struc.tex: $1_struc.txt
	struc_txt2tex $1
1968
1969
1970
1971
1972
1973
1974
1975

1976
1977
1978
1979
1980
1981
1982
1976
1977
1978
1979
1980
1981
1982

1983
1984
1985
1986
1987
1988
1989
1990







-
+







$1_simpar.p : $1_def.r $1_simpar.m
	mtt_m2p $1_simpar.m
$1_numpar.p : $1_def.r $1_numpar.m
	mtt_m2p $1_numpar.m
$1_state.p : $1_def.r $1_state.m
	mtt_m2p $1_state.m

ifeq ($source,stdin)
ifeq ($stdin,stdin)
$1_input.p : $1_def.r
	make_stdin $1 p
else
$1_input.p : $1_def.r $1_input.m
	mtt_m2p $1_input.m
endif

1993
1994
1995
1996
1997
1998
1999
2000

2001
2002
2003
2004
2005
2006

2007
2008
2009
2010
2011
2012
2013
2001
2002
2003
2004
2005
2006
2007

2008
2009
2010
2011
2012
2013

2014
2015
2016
2017
2018
2019
2020
2021







-
+





-
+







$1_switchopen.p : $1_def.r $1_switchopen.m
	mtt_m2p $1_switchopen.m

ifeq ($integration_method,implicit)
$1_ode2odes.p : $1_ode2odes.m $1_def.r $1_smx.p\
                $1_simpar.p $1_numpar.p $1_state.p $1_input.p \
                $1_cse.p $1_cseo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method
	mtt_m2p $1_ode2odes.m $integration_method $stdin
endif
ifeq ($integration_method,euler)
$1_ode2odes.p : $1_ode2odes.m $1_def.r\
                $1_simpar.p $1_numpar.p $1_state.p $1_input.p \
                $1_ode.p $1_odeo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method
	mtt_m2p $1_ode2odes.m $integration_method $stdin
endif

$1_ode2odes.c: $1_ode2odes.p 
	mtt_p2c $info_switch $1 ode2odes

#SUMMARY obs	observer equations for CGPC (r)
#SUMMARY obs*	observer equations for CGPC (m)
2064
2065
2066
2067
2068
2069
2070
2071

2072
2073
2074


2075
2076
2077
2078
2079
2080
2081
2072
2073
2074
2075
2076
2077
2078

2079
2080


2081
2082
2083
2084
2085
2086
2087
2088
2089







-
+

-
-
+
+








#SUMMARY csm	constrained-state matrices (r)
#SUMMARY csm	constrained-state matrices (m)
#SUMMARY csm	constrained-state matrices (tex)
#SUMMARY csm	constrained-state matrices (view)
#SUMMARY csm	constrained-state matrices (ps)
#Linearised system: constrained-state matrices
$1_csm.r: $1_cse.r $1_def.r $1_cr.r $1_ss.r $1_sympar.r
$1_csm.r: $1_cse.r $1_def.r $1_cr.r $1_sspar.r
	cse2csm_r $1 csm; tidy $1_csm.r
$1_csm.m: $1_def.r $1_csm.r
		csm_r2m $1 csm;  matlab_tidy $1_csm.m
$1_csm.m: $1_def.r $1_csm.r $1_sympars.txt
		mtt_r2m $1 csm;  matlab_tidy $1_csm.m
$1_csm.tex: $1_csm.r  $1_sympar.r $1_simp.r
	csm_r2tex $1 csm; latex_tidy $1_csm.tex
#SUMMARY scsm	sensitivity constrained-state matrices (r)
#SUMMARY scsm	sensitivity constrained-state matrices (m)
#SUMMARY scsm	sensitivity constrained-state matrices (tex)
#SUMMARY scsm	sensitivity constrained-state matrices (view)
#SUMMARY scsm	sensitivity constrained-state matrices (ps)

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