1              Use of ICSE within SCILAB
2
3-1- The user must provide a ``simulator'' program for his problem:
4
5      this simulator is made of a main routine :
6
7      subroutine mysim(ind,nu,u,co,g,itv,rtv,dtv)
8      external secmbr, cost, inist
9      call icse(ind,nu,u,co,g,itv,rtv,dtv,secmbr,cost,inist)
10      end
11
12      and three additional subroutines secmbr, cost and inist
13
14     where secmbr, cost, inist are symbolic name of particular routines
15       secmbr : computes the RHS
16       cost   : computes the cost function
17       inist  : computes the initial state
18
19       cost may be replaced by the predefined routine icsec2 for quadratic cost.
20
21       inist may be replaced by the predefined routine icsei for standard
22            initialization.
23
24 It is better to put the four routines in a single file called mysim.f
25
26-2- compile (f77) the file mysim.f
27
28-3- Link mysim with scilab :
29    link('mysim.o',mysim)
30
31    Otherwise you have to link your program as follows:
32 .modify the routines/default/foptim.f routine to add the call to mysim
33 .put your mysim.f file in the routines/default directory,
34 .append mysim.o in ICSE variable definition within routines/default/Makefile
35 .re-generate a new scilab with the main Makefile
36
37
38
39
40
41
42
43
44
45
46