[Mist-support] MIST Test Code Error

Everett Mumford emumford at uw.edu
Fri Apr 1 09:50:41 PDT 2016


Hi Jacob,

Thank you again for all of your help using MIST! I am hoping to run a simulation that allows for transition probabilities to change as time progresses for an individual simulant. I want to transition simulants from an ‘Alive’ state to a ‘Dead’ state. I have mortality rates (transition probabilities) that differ by age, sex, and year. As a simulant ages, I am hoping to make his/her mortality change. For instance, the mortality rate for a given disease is different for a 50 year old male in 2013 than it is for that same male when he is an 51 years old in 2014. The mortality rate for a 50 year old male in 2013 is also different than the mortality rate for a 50 year old male in 2014.

I think the best way to accomplish my goal is to create a 3 dimensional object in the ‘transitions between states in a model page’. I have been able to create a 2 dimensional table with dummy data using the expression below.

Table([[sex,[NaN,1,2]],[age,[NaN,1,2]]],[[.25,.6],[.3,.55]])

I believe the expression above creates a table that looks like this:


age=1

age=2

sex=1

0.25

0.6

sex=2

0.3

0.55


I am hoping that I can make a table like this (thought with far more ages) for each year so that I can apply the correct mortality rate for each age/sex/year cohort in MIST. I believe that this is possible after reading through the online help page, but am having trouble writing the correct syntax. Is it possible to create a 3-dimensional object like I am describing? Or is there a better way that I can accomplish my goal of assigning different transition probabilities by age/sex/year?

Best regards,
Everett

From: Everett Mumford
Sent: Thursday, March 24, 2016 10:05 AM
To: 'Jacob Barhak' <jacob.barhak at gmail.com>
Cc: mist-support at simtk.org
Subject: RE: [Mist-support] MIST Test Code Error

Hi Jacob,

Downgrading Matplotlib seems to have fixed the issue. Thank you for all of your help with this. I have really enjoyed using the MIST thus far and think that it will be very useful for my research.

Best regards,
Everett

From: Jacob Barhak [mailto:jacob.barhak at gmail.com]
Sent: Thursday, March 24, 2016 12:30 AM
To: Everett Mumford <emumford at uw.edu<mailto:emumford at uw.edu>>
Cc: mist-support at simtk.org<mailto:mist-support at simtk.org>
Subject: Re: [Mist-support] MIST Test Code Error

Hi Everett,

It seems that the new version of Anaconda uses by default a new version of Matplotlib that breaks previous MIST code.

If you wish to use MIST 0_92_0_0 with the plot capability, you should downgrade Matplotlib. Within anaconda, you can do this by using the command:

conda install matplotlib=1.3.1

This worked on my windows machine. And is a suitable ad hoc solution if you have no code that depends on a newer matplotlib version.

Note that the plot capability is related to the MIST script CreatePlotsFromCSV.py. This script is rarely used for basic modeling and simulation, and you can use other MIST capabilities without changing the matplotlib version, as long as you ignore the plot capabilities in the CreatePlotsFromCSV.py script.

If TestCode.py does not report any other error, you should be good to proceed. Yet it is better to test this at least once by using the matplotlib downgrade command.

I will check downstream to see what was upgraded in Matplotlib to avoid this issue in the future and may provide other solutions. I also opened an issue in Github to address this.

Let me know if you encounter any other issues.

Yet hopefully, this solution will allow you to proceed for now.

          Jacob


On Wed, Mar 23, 2016 at 7:10 PM, Everett Mumford <emumford at uw.edu<mailto:emumford at uw.edu>> wrote:
Hi Jacob,

Thank you for your prompt response. I am using Windows 8.1. I am using Anaconda (64-BIT) for Python 2.7. My matplotlib version is 1.5.1.

Best regards,
Everett Mumford

From: Jacob Barhak [mailto:jacob.barhak at gmail.com<mailto:jacob.barhak at gmail.com>]
Sent: Wednesday, March 23, 2016 4:52 PM
To: Everett Mumford <emumford at uw.edu<mailto:emumford at uw.edu>>
Cc: mist-support at simtk.org<mailto:mist-support at simtk.org>
Subject: Re: [Mist-support] MIST Test Code Error


Hi Everett,

What OS are you using? What kind of python distribution you are using and what is your matplotlib version?
If you are using anaconda, can you specify what version?

This will help isolate the issue and treat it.

The goods news are that if only the plots do not pass the test script, then you can still use the system for modeling and simulation and export data to create plots outside the system.

        Jacob
On Mar 23, 2016 6:40 PM, "Everett Mumford" <emumford at uw.edu<mailto:emumford at uw.edu>> wrote:
Hi MIST support,

I am having issues running TestCode.py. The code gets an error when it reaches the PlotGeneration scripts. The code does not always error out on the same script (e.g. I have run into errors when the code tries to run PlotGeneration5_rmjj.py, PlotGenerationoit6qb.py, etc.). I have tried uninstalling and then reinstalling the package several times.

Have you seen a similar error? And can you please provide assistance?

Thanks!

Best regards,
Everett Mumford

_______________________________________________
MIST-support mailing list
MIST-support at simtk.org<mailto:MIST-support at simtk.org>
https://simtk.org/mailman/listinfo/mist-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://simtk.org/pipermail/mist-support/attachments/20160401/b0d00ae1/attachment-0001.html>


More information about the MIST-support mailing list