I want to convert this formula into code
Awaiting user input#U,T,B list
trailer = ['0','1','2','3','4','5','6','7','8'] #index of trailer T
unload_dock = ['0','1','2'] #index of unload dock u
time_bucket = ['0','1','2'] #index of time bucket b
output_station = ['0','1','2'] #index of output_station
#B = [b for b in range(len(unload_dock))]
num_trailer = 9
num_unload_dock = 3
num_time_bucket = 3
num_output_station = 3
t_d = [d for d in range(num_trailer)]
s_k = [k for k in range(num_output_station)]
b_j = [j for j in range(num_time_bucket)]
and my code conversion is as below. Is this right? I don't know how to convert the inclusion of d and s in t.
quicksum(t[t_d,[s_k]]for t in range(num_time_bucket))
0
-
Hi 석찬 이 ,
The expression you have pasted doesn't look valid to me.
If \(t\) is a collection of variables with a single index then it is not clear what \( t_{ds_k} \) is supposed to be, since this implies two indices on t. I would guess the lack of answers to your question so far is a result of others also being confused.
- Riley
0
Please sign in to leave a comment.
Comments
1 comment