I found a couple of cases in scenarios.py where if _dict_.get(_key_) was used where if _dict_.get(_key_) is not None was the correct choice.
I did not fix other potential cases, but I did a grep in the optima files in the optima/optima directory:
grep "\.get("
and some additional cases came up in plotting.py and programs.py that look like potentially the same issue.
To test the present fix, do
import optima as op
loadProjFileName = 'C:\\Users\\George\\Documents\\Career\\Contract Coding\\Optima HIV\\Optima HIV Projects\\Ontario_NSP_20170505.prj' # wherever file is on your system
P = op.loadproj(loadProjFileName)
P.runscenarios()
op.pygui(P.results[1])
The NSP_lower curve should now be under the Without NSP_lower curve in the New infections acquired graph.
I found a couple of cases in scenarios.py where
if _dict_.get(_key_)
was used whereif _dict_.get(_key_) is not None
was the correct choice.I did not fix other potential cases, but I did a grep in the optima files in the
optima/optima
directory:grep "\.get("
and some additional cases came up in plotting.py and programs.py that look like potentially the same issue.To test the present fix, do
The
NSP_lower
curve should now be under theWithout NSP_lower
curve in theNew infections acquired
graph.