Контрольная работа: Методы синтеза и оптимизации
Funop=function(xi:Artype):real;
type MyClass=class
public
procedure slpoisk(n,m,mf:integer;
h,hmin:real; xmin,xmax:Artype;
Var xo:Artype; Var Yopt:real; F:Funop);
end;
var opt6:MyClass;
var
F:FUNOP;
i,m,mf,im:integer;
h,hmin:real;
xmin,xmax:Artype;
xo,x:Artype;
Yopt:real;
function model(x:Artype): real;
implementation
uses main,unitGraph;
function model(x:Artype): real;
begin
model:={25*sqr(x[1]+3)+4*sqr(x[3]-4)+10*sqr(x[1]-x[2])+10;}
{10*sqr(x[1]-x[2])+4*sqr(x[1]-2)+25*sqr(x[3]+x[2])+8;}
16*sqr(x[1]+2)+4*sqr(x[2]-3)+5*sqr(x[3]-x[2])-8;
end;
procedure Myclass.slpoisk(n,m,mf:integer;
h,hmin:real; xmin,xmax:Artype;
Var xo:Artype; Var Yopt:real; F:Funop);
Label 9,10;
Var x,d,s:Artype; b,hr,y0,y,qsi:real; i,l,k:integer;