When you try to run do_min.py, during the execution of the beta distribution model, you get the following output:
Beginning an estimation with the specification name PYbetaDistIndNetWorth...
getKYratioDifference tried center = 0.95 and got -9.73574471397209
getKYratioDifference tried center = 0.995 and got 108.10737279427268
getKYratioDifference tried center = 0.953717726766 and got -9.701892400680814
getKYratioDifference tried center = 0.974358863383 and got -9.318167745132815
getKYratioDifference tried center = 0.984679431691 and got -6.177290169150552
getKYratioDifference tried center = 0.989839715846 and got 14.451949165200366
getKYratioDifference tried center = 0.986224644875 and got -3.033018049642135
getKYratioDifference tried center = 0.987456628336 and got 0.9310485365679941
getKYratioDifference tried center = 0.987167269826 and got -0.14252313644736248
getKYratioDifference tried center = 0.98720568392 and got -0.005530837946649214
getKYratioDifference tried center = 0.987207225666 and got 2.3644569774106117e-05
getKYratioDifference tried center = 0.987206725666 and got -0.001770311032350591
findLorenzDistanceAtTargetKY tried spread = 0.006 and got 10.557361576875467
getKYratioDifference tried center = 0.95 and got -9.734329349907803
getKYratioDifference tried center = 0.995 and got 150.10485470647563
getKYratioDifference tried center = 0.95274053464 and got -9.709581660552622
getKYratioDifference tried center = 0.97387026732 and got -9.317729861064027
getKYratioDifference tried center = 0.98443513366 and got -4.2048296989541445
getKYratioDifference tried center = 0.98971756683 and got 23.17116211727427
getKYratioDifference tried center = 0.98524649173 and got -2.2595894490413553
getKYratioDifference tried center = 0.986105223383 and got 0.41503113163824246
getKYratioDifference tried center = 0.985971970699 and got -0.04742782606564511
getKYratioDifference tried center = 0.985985636528 and got -0.0008789954362544705
getKYratioDifference tried center = 0.985986136528 and got 0.0008280712433954562
findLorenzDistanceAtTargetKY tried spread = 0.008 and got 4.926370337581616
getKYratioDifference tried center = 0.95 and got -9.73111352958761
Traceback (most recent call last):
File "<ipython-input-1-0e9883c01aa9>", line 1, in <module>
runfile('U:/gsr_2019/REMARK/REMARKs/cstwMPC/do_min.py', wdir='U:/gsr_2019/REMARK/REMARKs/cstwMPC')
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 95, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "U:/gsr_2019/REMARK/REMARKs/cstwMPC/do_min.py", line 27, in <module>
exec(open('cstwMPC_MAIN.py').read())
File "<string>", line 681, in <module>
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\_minimize.py", line 771, in minimize_scalar
return _minimize_scalar_brent(fun, bracket, args, **options)
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\optimize.py", line 2115, in _minimize_scalar_brent
brent.optimize()
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\optimize.py", line 1899, in optimize
xa, xb, xc, fa, fb, fc, funcalls = self.get_bracket_info()
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\optimize.py", line 1876, in get_bracket_info
xb=brack[1], args=args)
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\optimize.py", line 2304, in bracket
fc = func(*((xc,) + args))
File "<string>", line 679, in <lambda>
File "<string>", line 523, in findLorenzDistanceAtTargetKY
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\scipy\optimize\zeros.py", line 754, in brentq
r = _zeros._brentq(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
File "<string>", line 522, in <lambda>
File "<string>", line 483, in getKYratioDifference
File "<string>", line 172, in solve
File "C:\Users\bdwyer\AppData\Local\Continuum\anaconda3\envs\py2\lib\site-packages\econ_ark-0.10.1.dev3-py2.7.egg\HARK\core.py", line 979, in solveAgents
if self.print_parallel_error_once:
AttributeError: 'cstwMPCmarket' object has no attribute 'print_parallel_error_once'
# try:
# multiThreadCommands(self.agents, ['solve()'])
# except Exception as err:
# if self.print_parallel_error_once:
# # Set flag to False so this is only printed once.
# self.print_parallel_error_once = False
# print("**** WARNING: could not execute multiThreadCommands in HARK.core.Market.solveAgents() ",
# "so using the serial version instead. This will likely be slower. "
# "The multiTreadCommands() functions failed with the following error:", '\n',
# sys.exc_info()[0], ':', err) # sys.exc_info()[0])
multiThreadCommandsFake(self.agents, ['solve()'])
the error does not arise. I suspect there's some error in the way the print_parallel_error_once attribute of the Market class is being inherited by the cstwMPCmarket when the solution is parallelized.