~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to demos/optimization/icse/icsegen.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function [co,u,g,itv,dtv]=icsegen(u,simu,nap,imp,ech,cof)
 
2
//Calcul du controle optimal avec mise a l'echelle du controle et 
 
3
//ponderation des observations
 
4
//Syntaxe
 
5
//[co,u,g,itv,dtv]=icsegen(u,simu,nap,imp,ech,cof)
 
6
//
 
7
//variables d'entree :
 
8
//u(nu)     : parametres initiaux
 
9
//simu      : chaine de caracteres donnant le nom du sous programme
 
10
//            decrivant le probleme (second menbre, critere et etat
 
11
//            initial)
 
12
//nap       : nombre maximum d' appels du simulateur
 
13
//imp       : valeur de debug pendant l'optimisation
 
14
//ech(1,nu) : coeff de mise a l'echelle du controle
 
15
//cof(1,ntob*nob) : coeff de ponderation des observations
 
16
//variables de sortie :
 
17
//co        : cout final
 
18
//u(nu)     : parametres finaux
 
19
//g(nu)     : gradient final
 
20
//itv(nitv) : tableau de travail (entiers fortran)
 
21
//dtv(ndtv) : tableau de travail (double precision fortran)
 
22
//Utiliser les macros icot et icob pour extraire l'etat
 
23
//!
 
24
 
 
25
// Copyright INRIA
 
26
if nu<large then alg='qn' ; else alg='gc' ; end;
 
27
itv=itu;
 
28
itv(nitv)=0;
 
29
dtv=[dtu,y0,tob,matrix(obs,1,ny*nob),don,ech,cof,b,fy1,fu1];
 
30
dtv(ndtv)=0;
 
31
debug(imp);
 
32
[co,u,g,itv,dtv]=optim(simu,'b',binf,bsup,u, alg, df0, 'ar',nap,...
 
33
                       'ti',itv,'td',dtv,'si','sd')
 
34
debug(0);
 
35
 
 
36
 
 
37