Uses KURSOVIK;

var
 Model  : ^CModel;
 Buffer : PBuffer;
 Device : PDevice;
 Srcs1,Srcs2 : 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 := 2.0;
 LastVal := 3.0;

 Steps := 20;

 BufferSize := 3;
 S1 := 2.0;
 S2 := 3.0;

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

 New(Srcs1,Init(1,S1));
 Model^.AddNewSource(Srcs1);
 New(Srcs2,Init(2,S2));
 Model^.AddNewSource(Srcs2);

{ for i := 0 to Steps do
  begin
   Device^.Lambda := BegVal + (LAstVal-BegVal)/Steps*i;}
   Model^.Start;
   Model^.RealizSteps := 100000;
   while Model^.Step do if Model^.Curstep mod 1000 = 6 then
    begin
     WriteLn('˜ £ - ',Model^.Curstep,
         ' : P®âª2 = ',100*Srcs2^.RefusedReq/Srcs2^.TotalReq:0:2,
         ' : P®âª1 = ',100*Srcs1^.RefusedReq/Srcs1^.TotalReq:0:2); 
    end;
{   Model^.PrintValues;
  end;}

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