Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # I am sorry that it seems there is not a short code to display since the same
- # problem does not pop up when simulate(input_args) is a simple or short
- # function. I cannot simply put my entire code here because it is two long:
- # simulation(timeHorizon) it self is 60+ lines long and it has dependency on
- # functions and classes which together take up almost 300 lines
- myRecord = open('myRecord','w')
- myRecord.write('***n')
- myRecord.write('Here begins one simulation:n')
- for i in range(0,100):
- myRecord.write('round '+str(i)+':n')
- roundResult = simulate(Horizon_t,i) # returns [T,N,M,M_neo,D,D_neo]
- for item in roundResult:
- myRecord.write('--'+str(item)+'n')
- startAllOver() # reset global variables [T,N,M,M_neo,D,D_neo]
- myRecord.close()
- # expected : every iteration gives a new random result
- # reality: all iterations are the same
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement