Error in Morphine substance

edited December 2017 in Report Bug
Good day!
At first, sorry for my english, it's not very good and I hope that You understand me.
I have the next trouble with morphine infusion in toolkit. When I use this substance in SubstanceBolus and in SubstanceInfusion I have the next error:

ERROR : : [0(s)] Value is NaN

If I use scenarios (for example Scenarios\Drug\Morphine.xml, Scenarios\Drug\MorphineOverdose.xml) whit morphine i have the next error:


INFO : : [0(s)] Executing Scenario
ERROR : : [0(s)] Value is NaN
ERROR : CSVPlotTool : CSV file, BioGears_6.2-beta-toolkit-windows (1)/BioGears_6.2-beta/toolkit/Scenarios/Drug/MorphineResults.txt, does not conteain a Time(s) header to plot against
INFO : ScenarioCalcThread : Calculation Complete

Could you help me with it?
Thanks,
NurNur

Comments

  • Hello!

    I believe the issue is that you are accidentally running your scenarios using an "Engine State", rather than a "Patient File". When you open the GUI, these two options should be in the upper right corner. When I open mine, "Engine State" is selected by default. These files contain engine information saved after stabilization and, since those save states were not configured with morphine in the system, do not contain information about morphine. I think this is causing the NaN error.

    The "Patient Files", on the other hand, contain only basic body metrics. The engine must stabilize using the values in these files, and while doing this it can incorporate information about substance infusion. When I run a SubstanceBolus and SubstanceInfusion with morphine using the StandardMale patient file, I do not get any errors.

    One final thing: Make sure when creating your scenario in the GUI that you specify an amount of time to advance the system (this is the very first item on the list of actions). If no time is specified, the engine will not advance and will have no data to plot, which will result in the "does not contain a Time(s) header" error that you noticed.

    Hopefully this helps, please keep us updated if there are still issues with the toolkit. Thanks for reaching out!

    Matt
    BioGears Physiology Modeling Engineer
  • abrayabray Entry Level
    On the subject of the GUI, I designed it to intentionally default to the "Engine State" so you would not need to initialize the engine and run quicker.

    Save states do not need to be configured for use with any particular action, such as injecting morphine, for it to work. You can load the state and request data from anywhere. It will return NaN at time step 0, as morphine has not been introduced into the system yet, but it won't crash the engine. (This happens through out the drug verification scenarios during the nightly build)

    It looks like the current 6.2 toolkit is unable to run any scenario with a state. (on windows)
    It looks like the current fix is to not use states at all in the GUI

    A NaN crash is usually due to an internal call in the engine (such as in a system) to a scalar and that scalar is NaN. The Engine has no issue writing out that a compartment or system property is NaN.

    I think the engine is crashing during time executing step 0 due to the NaN exception, and not writing anything out to the results file, hence the plotter not seeing any data. Could be in the C++, could be from the Java...

    I hope this helps track down the issue, let me know if you have any questions debugging this.

    Aaron
    (Ex-BioGears Software Lead)

  • Sorry for the delay in response, but the issue with loading drug scenarios in the GUI has been resolved. We were addressing this concern and another question about our hemorrhage scenarios. If you go to the top thread in the Report Bug forum (the "Hemorrhage Action not functional..." one), the most recent comment has a link to an updated toolkit. Let us know if this does not help. We'll also be releasing a full update next month and we'll make sure that these fixes are incorporated.

    Thanks!
    Matthew McDaniel
    BioGears
Sign In or Register to comment.