If that's the entire code, then we have some problems. There are many undefined variables:
`dist`, `dB`, `dG`, `iJDP`, `K`, `t`, and `B`
The product t B
is probably an error and was intended to be a single symboltB
.
There is also a syntax problem in the definition of f
. I'm not exactly sure what is being attempted, so I don't know if it's just missing brackets or missing lines of code.
So, I can't even get this to run properly.