Differences From Artifact [9dc2d47b21]:

To Artifact [ca24aae01a]:


1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21











+
+
+







#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
    ######################################

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.51  2001/02/19 06:33:19  geraint
## Removed operation form loop.
##
## Revision 1.50  2001/02/18 09:18:49  geraint
## Removed temporary Matrices from mtt_implicit.cc
##
## Revision 1.49  2001/02/14 06:06:34  geraint
## Removed octave_value_list wrappers from standalone.exe - speed improvements
##
## Revision 1.48  2001/02/11 07:08:59  geraint
278
279
280
281
282
283
284
285

286
287
288
289
290
291
292
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295







-
+







    vector_value=vector_value
    feval_header=toplev.h
fi

cat <<EOF  > $filename
#include <octave/oct.h>
#include <octave/ov-struct.h>
#include <octave/oct-map.h>
#include <octave/load-save.h>
#include <octave/lo-mappers.h>
#include <octave/variables.h>

#ifndef STANDALONE
#include <octave/${feval_header}>
#endif

583
584
585
586
587
588
589

590

591

592
593
594
595

596
597
598
599
600
601
602
586
587
588
589
590
591
592
593
594
595

596
597
598
599

600
601
602
603
604
605
606
607







+

+
-
+



-
+







  data.elem (row, ++col) = t;
  for (register int i = 0; i < nx; i++)
    data.elem (row, ++col) = x.elem (i);

  row++;

  if (nrows == row)
    {
#ifdef STANDALONE
      save_ascii_data_for_plotting (cout, data, "MTT_data");
    cout << data << endl;
//    cout << data << endl;
#else // ! STANDALONE
  set_global_value ("MTT_data", data);
#endif

    }
}

#ifdef STANDALONE
int main (void) {
#else
DEFUN_DLD (${sys}_ode2odes, args, ,
"Octave ode2odes representation of system 
667
668
669
670
671
672
673





674
675
676
677
678
679
680
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690







+
+
+
+
+







  static ColumnVector	open_switches (MTTNX);

  register double t	= 0.0;

  const double	ddt	= dt / stepfactor;
  const int	ilast	= static_cast<int> (round ((last - first) / ddt)) + 1;
  const int	nrows	= static_cast<int> (round ((last - first) / dt)) + 1;

  for (register int i = 0; i < MTTNU; i++)
    {
      u (i) = 0.0;
    }

  for (register int j = 0, i = 1; i <= ilast; i++)
    {
      y	= mtt_${odeo} (x, u, t, par);
      u	= mtt_input (x, y, t, par);
      if (0 == j)
	{

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