Using Arena Software, I am interested in modeling the following problem statemen
ID: 3581390 • Letter: U
Question
Using Arena Software, I am interested in modeling the following problem statement. Automatic upvote to the person who provides a link to the completed Arena model. Thanks in advance!
A fleet of 15 tankers carry oil from Alaska to an unloading dock on Seattle. Each tanker carries 150,000 barrels. The round trip travel time for each tanker is distributed normally with a mean of 12 days and a standard deviation of 3 days. A tanker is emptied at a rate of 300 tb (thousand barrels) a day. The tanker is considered unloaded when the level of crude in it drops below 7.5 tb. The crude from the tanker is pumped into a storage tank with a capacity of 2000 tb. If the storage tank reaches its capacity the unloading stops until it drops down to 1,600 tb. The storage tank is used to feed a refinery at a rate of 150 tb per day. The refinery operates 24 hours a day, but if the level of crude in the storage tank drops below 5 tb the refinery is shut down until the level reaches 50 tb.
a) Develop a model to plot the crude level at the storage tank as a function of time, for one month of operation.
b) Evaluate the utilization of the refinery.
c) Evaluate tankers queue length.
d) Determine the number of tankers to use in order not to have to ever shut down the refinery.
e) Considering the cost of operating each tanker is $1000 a day, each hour idle time of the refinery costs $5,000, determine the optimum number of tankers to minimize the total operating cost of the whole system
f) Suggest two modifications to the way the whole system operates and estimate the effect using your model. Compare the results with the original system statistically and determine if the differences are significant.
Explanation / Answer
for i in range(2*h):
g = [[0 for j in range(h)]for j in range(h)]
for k in range(h):
if organisms[i][k] == 1:
g[k] = 0
else:
g[k] = 1
organisms.append(g)
for i in range(h):
no = organisms[0+i]+organisms[2*h+i]
organisms1.append(no)
return(organisms1)
def fitness():
organisms = initial()
m2 = np.delete(d,(0),axis =0)
m2 = np.delete(m2,(0),axis = 0)
m2= np.delete(m2,(0),axis = 1)
m2 = np.delete(m2,(0),axis = 1)
scores = []
for y in range(h):
s1 = organisms[y][:h]
s2 = organisms[y][h:]
s1_l1 = []
s2_l2 = []
s1_d1 = []
s2_d2 = []
count2 = 0
for i in range(1,8):
if s1[i-1] ==1:
s1_d1.append(i)
if s2[i-1]==1:
s2_d2.append(i)
for i in range(7):
count1 = 0
count2 = 0
for j in s1_d1:
count1 += m2[i][j-1]
s1_l1.append((count1,i))
for j in s2_d2:
count2 += m2[i][j-1]
s2_l2.append((count2,i))
s1_l1 = sorted(s1_l1)
s2_l2 = sorted(s2_l2)
scores.append(s1_l1[0][0]+s2_l2[0][0])
print(scores)
return(scores)
def pairing():
global scores, generation, newgeneration, choseran
generation = initial()
newgeneration = []
choseran = []
scores = fitness()
scores1 = scores.copy()
scores = [int(x) for x in scores]
scores.sort()
w = scores1.index(scores[0])
w1 = scores1.index(scores[1])
newgeneration.append(generation[w])
newgeneration.append(generation[w1])
g = [[0 for j in range(h)]for j in range(h)]
a = [[0 for j in range(h)]for j in range(h)]
o = [[0 for j in range(h)]for j in range(h)]
v = [[0 for j in range(h)]for j in range(h)]
for i in range(h):
if generation[w][i]!=generation[w1][i]:
if rand()<.5:
g[i] = 0
a[i] = 1
else:
g[i] = 1
a[i] = 0
else:
g[i]=generation[w][i]
a[i]=generation[w][i]
for i in range(h):
if g[i]==1:
o[i]=0
else:
o[i]=1
for i in range(h):
if a[i]==1:
v[i]=0
else:
v[i]=1
q = v+a
n = g+o
newgeneration.append(q)
newgeneration.append(n)
i1 = 1
count = 0
count1 = 0
while i1<h:
if rand()<1*i1/(h):
ran1 = generation[count]
choseran.append(ran1)
break
else:
count+=1
i1+=1
u=1
e1=1
while u<h:
if rand()<1*u/(h):
ran2 = generation[count1]
choseran.append(ran2)
break
else:
count1+=1
u+=1
while e1<h:
if rand()<1*e1/(h):
ran3 = generation[count1]
choseran.append(ran3)
break
else:
count1+=1
e1+=1
g1 = [[0 for j in range(h)]for j in range(h)]
a1 = [[0 for j in range(h)]for j in range(h)]
t1 = [[0 for j in range(h)]for j in range(h)]
bn1 = [[0 for j in range(h)]for j in range(h)]
for v2 in range(h):
if ran1[v2]!=ran2[v2]:
if rand()<.5:
t1[v2] = 0
else:
t1[v2] = 1
else:
t1[v2]=ran1[v2]
for ui in range(h):
if t1[ui]==1:
bn1[ui]=0
else:
bn1[ui]=1
newgeneration.append(t1+bn1)
for p in range(h):
if ran1[p]!=ran2[p]:
if rand()<.5:
g1[p] = 0
a1[p] = 1
else:
g1[p] = 1
a1[p] = 0
else:
g1[p]=ran1[p]
a1[p]=ran1[p]
o1 = [[0 for j in range(h)]for j in range(h)]
for a2 in range(h):
if g1[a2]==1:
o1[a2]=0
else:
o1[a2]=1
v1 = [[0 for j in range(h)]for j in range(h)]
for i in range(h):
if a1[i]==1:
v1[i]=0
else:
v1[i]=1
q1 = o1+g1
n1 = v1+a1
newgeneration.append(q1)
newgeneration.append(n1)
return newgeneration
iterations = int(input("Enter the number of iterations you want to run for: "))
initial();
for i in range(iterations):
fitness()
pairing()
print("done")
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.