Skip to main content
deleted 67 characters in body
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t = t + dt
    st = scalecompress(t)
    if st<3
      times.add(st)
    end if
  while st < 3
end

function% stcompress =slow scale(t)
time to %faster scaletimes timeafter according1st tohour
function inteinsitiesst = compress(t)
  scale2 = 2.1/1.5
  scale3 = 3.4/1.5
  if t < 1
    stt2 = t
  else if t < 1 + scale2scale2;
    st = min(t,1) + (min(t,t2)-min(t,1) / scale2 
  else
    st = 1 + 1 )/ scale2  + (t - max(1 + scale2t,t2)-t2) / scale3
  end if
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t = t + dt
    st = scale(t)
    if st<3
      times.add(st)
    end if
  while st < 3
end

function st = scale(t)
  % scale time according to inteinsities
  scale2 = 2.1/1.5
  scale3 = 3.4/1.5
  if t < 1
    st = t
  else if t < 1 + scale2
    st = 1 + (t-1) / scale2 
  else
    st = 1 + 1 / scale2  + (t - (1 + scale2)) / scale3
  end if
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t = t + dt
    st = compress(t)
    if st<3
      times.add(st)
    end if
  while st < 3
end

% compress slow time to faster times after 1st hour
function st = compress(t)
  scale2 = 2.1/1.5
  scale3 = 3.4/1.5
  t2 = 1 + scale2;
  st = min(t,1) + (min(t,t2)-min(t,1))/scale2 + (max(t,t2)-t2)/scale3
end
bug fix
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t1t = t + dt
    if t1 < 1
      tst = t1scale(t)
    else if t1 < 2st<3
      dt = dt * lambda / 2times.1add(st)
     end if t < 1
    while st < 3
end

function dtst = scale(1 - t) * (1 - lambda / 2.1)
  % scale time according endto ifinteinsities
      tscale2 = t + dt
    else2.1/1.5
      dtscale3 = dt * lambda / 3.4/1.5
      if t < 21
      st = dtt
 = (2else -if t) *< (1 - lambda /+ 3.4)scale2
      end if
  st = 1 + (t =-1) t/ +scale2 dt
  else
  end if
  st = if1 t<3
+ 1 / scale2  + times.add(t)
  - (1 end+ if
scale2)) / whilescale3
 t <end 3if
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t1 = t + dt
    if t1 < 1
      t = t1
    else if t1 < 2
      dt = dt * lambda / 2.1
      if t < 1
        dt = (1 - t) * (1 - lambda / 2.1)
      end if
      t = t + dt
    else
      dt = dt * lambda / 3.4
      if t < 2
        dt = (2 - t) * (1 - lambda / 3.4)
      end if
      t = t + dt
    end if
    if t<3
      times.add(t)
    end if
  while t < 3
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t = t + dt
    st = scale(t)
    if st<3
      times.add(st)
    end if
  while st < 3
end

function st = scale(t)
  % scale time according to inteinsities
  scale2 = 2.1/1.5
  scale3 = 3.4/1.5
  if t < 1
    st = t
  else if t < 1 + scale2
    st = 1 + (t-1) / scale2 
  else
    st = 1 + 1 / scale2  + (t - (1 + scale2)) / scale3
  end if
end
bug fix
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t1 = t + dt
    if t1 < 1
      t = t1
    else if t1 < 2
      tdt = dt * lambda / 2.1
      if t +< 1
        dt = (1 - t) * (1 - lambda / 2.1)
    else  end if
      t = t + dt
    else
      dt = dt * lambda / 3.4
      if t < 2
        dt = (2 - t) * (1 - lambda / 3.4)
      end if
      t = t + dt
    end if
    if t<3
      times.add(t)
    end if
  while t < 3
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t1 = t + dt
    if t1 < 1
      t = t1
    else if t1 < 2
      t = t + dt * lambda / 2.1
    else
      t = t + dt * lambda / 3.4
    end if
    if t<3
      times.add(t)
    end if
  while t < 3
end
function times = f()
  lambda = 1.5
  list times 
  t = 0
  do 
    dt = random_exponential(lambda)
    t1 = t + dt
    if t1 < 1
      t = t1
    else if t1 < 2
      dt = dt * lambda / 2.1
      if t < 1
        dt = (1 - t) * (1 - lambda / 2.1)
      end if
      t = t + dt
    else
      dt = dt * lambda / 3.4
      if t < 2
        dt = (2 - t) * (1 - lambda / 3.4)
      end if
      t = t + dt
    end if
    if t<3
      times.add(t)
    end if
  while t < 3
end
added 859 characters in body
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
Loading
added 859 characters in body
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
Loading
Source Link
Aksakal
  • 62.3k
  • 6
  • 106
  • 206
Loading