function AddDemand;
global endJ betta1 betta2 Demands

    a = 630360016;
    m = 2147483647;
    
J=mod((a*endJ), m);
endJ=J;
curlen = length(Demands);
Demands(2,curlen+1) = - betta1*log(J/m);

J=mod((a*endJ), m);
endJ=J;
Demands(3,curlen+1) = - betta2*log(J/m);
Demands(4,curlen+1) = Demands(3,curlen+1);

Demands(1,curlen+1) = curlen+1;