I've been stuck in a problem from yesterday to today!!!!!!
Why b=1 when the time is good!!!!!! Not when you b=2,!!!!!!!!!!!.
Today, we looked at the algorithm from start to finish again, searched the literature, looked for the meaning of B, and thought about the meaning of the formula!!!!! I think! B is that little!!!!!
No!!!!!!!!!!!!!
I studied for almost two days!!! B=2 succeeded,!!!!!!. B=3 's not!!!!!!! anymore.
Why the bug stuck me in the first step when I was about to complete the implementation of Erlang A in a minute!
In my near collapse of time!!! I think of a small problem when roommates and I do it together! Saved me!!!
That's it! Integer and floating-point!!!!!!!!!
In Python, the result of print 1/5 is 0, because integers are divided by integers, and the result is an integer
So enter 1.0/5!
I have always thought of this problem, but there is no cure, I put floating-point type added to the expression outside, the expression part, layer by layer add in, still feel trouble, should add to the innermost! You should put float directly. () set me on every parameter! It's killing me,!!!!!.
Did not think so small a problem, took me for a long time! I can read the error hint is the denominator is zero, also added a floating-point function, did not think that there is no place to add! No problem solved!
Even doubt the algorithm, doubt the formula, doubt the meaning of the parameters written by the teacher, doubt the meaning of life.
But this process is not wasted, I forced myself to understand the algorithm in the process of exploration. Before that is smattering, tiger in writing code, and even what the meaning of each parameter, are not well understood, ready to put the next step to do.
Now not only solve the problem, but also well clear the meaning of each parameter, but also the teacher gave me the paper, found each parameter approximate value, hard not wasted.
I'm really good.
I'm really stupid.
I'm going to have a meal, write a function to string up all the previous functions, name Erlang A, and then come back to the last step if the nested while is written, and then the subscript s,t to traverse up. I succeeded,!!!!!!!!!.
Next you might want to look at the data, figure out the parameters I need from the data, or write integer programming.
I feel like I've forgotten my cplex and my head is bald.
Originally:
(Password: Cat not bald)
By the way, while fixing the bug, I also learned some new knowledge and recorded
Python Range Reverse Iteration
Use Python3.0,range to be an iterative object
1. Positive order
Range (6):
0,1,2,3,4,5
2. Reverse order
Range (5,-1,-1):
5,4,3,2,1,0
3. Reverse the slices:
Range (6) [::-1]
5,4,3,2,1,0
4.reversed ():
Reversed (range (6))
5,4,3,2,1,0
---------------------This article from MIPS71 csdn blog, full-text address please click: 78712485?utm_source=copy
Mom!!!!!!!!! I did it!!!!!!!!!!!! Part!