Beispiel #1
0
            max_batches = int(a)
        elif o == "--batch-size":
            batch_size = int(a)
        elif o == "--conf-perc":
            conf_perc = int(a)
            conf_fact = invstdnrmlcdf(1 - (100 - conf_perc) / 200)
        elif o == "--out":
            text_file = a

print("Output is written out to {}".format(text_file))

tic = perf_counter()
stateSpace = og.StateSpace(m1, n2, reduced=True)
toc = timedelta(seconds=perf_counter() - tic)

og.print_header("m1 = {}, n2 = {}".format(m1, n2), text_file)

f = open(text_file, 'a')
print("Generating the state space took {}".format(toc), file=f)
f.close()

#################################################
# Simulations
#################################################
policies = ['RA', 'LF', 'MF']

f = open(text_file, 'a')
print("SSA simulation with batch size {:,d},".format(batch_size) +
      " minimum {} batches and maximum {} batches.".format(
          min_batches, max_batches),
      file=f)
Beispiel #2
0
                    for _i in range(numrhos)
                ]
        elif o == "--maxit":
            maxit = int(a)
        elif o == "--out":
            text_file = a
        elif o == "--repeat":
            reps = a

print("Output is written out to {}".format(text_file))

tic = perf_counter()
stateSpace = og.StateSpace(m1, n2, reduced=True)
toc = timedelta(seconds=perf_counter() - tic)

og.print_header("m1 = {}, n2 = {}".format(m1, n2), text_file)

f = open(text_file, 'a')
print("Generating the state space took {}".format(toc), file=f)
f.close()

#################################################
# Looping the computations over all possible values of rho
#################################################
ULs = ['L', 'U']  # 'L' and/or 'T'
BPs = [1, 2]  # 0, 1 and/or 2

f = open(text_file, 'a')
print("Using the completely imprecise chain.", file=f)
print("The state space has {} states".format(stateSpace.dim), file=f)
print("Running {} simulations for rho = {}".format(reps, rhos), file=f)