• More of my philosophy about abstraction and more of my thoughts.. (2/2)

    From Amine Moulay Ramdane@21:1/5 to All on Sun May 29 18:35:13 2022
    [continued from previous message]

    router[1]:='Router2';
    router[2]:='Router3';

    servTime[0]:=1.0;
    servTime[1]:=2.0;
    servTime[2]:=1.0;

    A := TMatrix.Create (3,3);
    b := TMatrix.Create (3,1);
    x := TMatrix.Create (3,1);

    A[1,1] := 1.0; A[1,2] := 0.0; A[1,3] := -0.2;
    A[2,1] := -0.5; A[2,2] := 1.0; A[2,3] := 0.0;
    A[3,1] := -0.5; A[3,2] := -0.8; A[3,3] := 1.0;

    b[1,1] := 0.5; b[2,1] := 0.0; b[3,1] := 0.0;

    LinSys.gauss(A, b, x);

    visitRatios[0]:=x[1,1]/arrivRate;
    visitRatios[1]:=x[2,1]/arrivRate;
    visitRatios[2]:=x[3,1]/arrivRate;

    serviceDemands[0]:=visitRatios[0]*servTime[0]; serviceDemands[1]:=visitRatios[1]*servTime[1]; serviceDemands[2]:=visitRatios[2]*servTime[2];

    pdq64.PDQ_Init('Delphi Network in PDQ');

    pdq64.PDQ_CreateOpen(work,arrivRate);

    pdq64.PDQ_SetWUnit('Msgs');
    pdq64.PDQ_SetTUnit('Time');


    for i:=0 to 2
    do
    begin
    pdq64.PDQ_CreateNode(router[i],pdq64.CEN,pdq64.FCFS);
    pdq64.PDQ_SetDemand(router[i],work,serviceDemands[i]);
    end;

    pdq64.PDQ_Solve(pdq64.CANON);
    pdq64.PDQ_Report();

    setlength(router,0);
    setlength(servTime,0);
    setlength(visitRatios,0);
    setlength(serviceDemands,0);

    A.free;
    b.free;
    x.free;


    end.

    ---



    And i invite you to read more of my thoughts of my philosophy here:

    https://groups.google.com/g/alt.culture.morocco/c/sw5EarahFo8




    Thank you,
    Amine Moulay Ramdane.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)