Uses CORE;

var
 Model  : ^CModel;
 Buffer : PBuffer;
 Device : PDevice;
 Srcs   : PSource;
 i :  longint;

 BegVal,
 LastVal : Real;
 Steps   : integer;

 BufferSize : integer;
 S1,S2,S3 : Real;

 Delta, DovInt : real;

begin
 Randomize;
Assign(output,'1.out');
Rewrite(output);
 Delta := 0.1;
 DovInt := 1.64;

 BegVal := 1.0;
 LastVal := 4.0;

 Steps := 20;

 BufferSize := 5;
 S1 := 2.0;
 S2 := 1.0;
 S3 := 5.0;

 New(Buffer, Init(BufferSize));
 New(Device, Init(BegVal));
 New(Model, Init(3,Device,Buffer,Delta,DovInt));

 New(Srcs,Init(0,S1));
 Model^.AddNewSource(Srcs);
 New(Srcs,Init(1,S2));
 Model^.AddNewSource(Srcs);
 New(Srcs,Init(2,S3));
 Model^.AddNewSource(Srcs);

 for i := 0 to Steps do
  begin
   Device^.Lambda := BegVal + (LAstVal-BegVal)/Steps*i;
   Model^.Start;
   while Model^.Step do;
   Model^.PrintValues;
  end;

 Close(OutPut);
 Dispose(Model,Done);
 Dispose(Buffer,Done);
 Dispose(Device,Done);
end.