Model Analyzer: view program code does not work (nothing happens)

I have issues with the followig error when running Model Analyzer:
Severity Message
error Unrecognized function or variable 'dosesForFit'.
So I am trying to check the code by right clicking on the Program name in Project browser and clicking on "View Program Code ..." but nothing happens.
Ideas?

Respuestas (1)

Christopher Sarkizi
Christopher Sarkizi el 29 de Jul. de 2022
Update:
Closing and re-opening the project causes this error to pop up:
Project Load Messages
Message
error Unable to load project, the client encountered an exception : TypeError: Cannot set property 'label' of undefined

6 comentarios

Hi Christopher,
Those issues look like bugs that might be related to each other. To the first issue regarding the unknown variable 'dosesForFit': I assume you are working with a Fit program, possibly switching to and from a Group Simulation program? I tried a couple workflows in this area, but I have not been able to reproduce this issue so far. Can you share the steps that lead to this error message?
The error message you are seeing when loading the project may be related to loading of plots. Is the project opening at all? If so, you could try deleting the plots in the project to see if the load error disappears. I recommend making a separate copy of the sbproj file, just to make sure you are not loosing any data.
It would be helpful if you could share your SimBiology project, but I know that this is not always possible. If you are only able to share information in a less public space than MATLAB Answers, please contact our Technical Support. If you do, please reference this post here in your message.
Thank you,
Florian
Hello Florian,
  1. I am working on a fit program. I do not get what you mean by switching.
  2. I do have issue when define doses from time to time and once it happens it corrupts my project.
  3. I have tried to narrow it down to the fact that some lines aren't being generate in the program code for some reason.
  • When it works I see this
% Get the baseline dose.
doses1 = sbioselect(doses, 'Name', 'pulse');
% Build array of doses.
dosesForFit = doses1;
  • When I define a dose and deactivate it I have:
% Build array of doses.
dosesForFit = [];
  • When it doesn't work I do not have the above
Also from the GUI there is an idication that might be helpful (photos attached).
Hi Christopher,
Thank you for sharing this additional information. It is possible that the bug you are seeing is already fixed. You tagged MATLAB version R2022a as the release you are working with, have you already installed the latest Update 4? This update contains a fix for the VARIANT AND DOSE SETUP section in the Fit program. If you haven't already, can you try installing this update? The update can be installed by clicking on the little bell icon in the top right corner of the main MATLAB window. Please let me know if this does not resolve the issue.
Best regards,
Florian
Hello there,
Just to give an update on the situation. My matlab was up to date. But my project started from the earlier versions.
Any way I just started the project from scratch and now have no more issues with the given error.
Just a few request from the developer:
  • It is possible to export the variable (model, parameters, etc.) but isn't there a way to import them from an excel sheet or something?
  • about the intial guess for parameter estimations, is there a way to import the initial value/upper/lower threshold? writing it for every single parameter is a bit laborious.
  • Is there a way the you could export the fitted parameters from a "Fit" to a "Simulate"?
Many thanks,
Chris
Arthur Goldsipe
Arthur Goldsipe el 3 de Ag. de 2022
Editada: Arthur Goldsipe el 3 de Ag. de 2022
Hi Chris,
You can import model components from Excel spreadsheets. Here's a link to instructions on how to do that for variants and doses. But other components work similarly.
Unfortunately, there's not currently any way to import initial values or bounds into the table. I'll add that to our list of enhancement requests.
Yes, you can export your parameter estimates to a variant. (Right-click on the results and select "Create Variant from Estimated Parameter Values...") Then, you can either commit that variant to the model to make those your new default initial conditions for simulations. Or you can include that variant in specific simulations if you don't want those to be your new defaults. You can also confirm that variants are applied as expected to a particular simulation program by inspecting your model's intiial conditions in the Model tab of the browser. (See here for an example.)
-Arthur
Perfect this was really helpful thanks.

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  SimBiology Community

Categorías

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 29 de Jul. de 2022

Comentada:

el 4 de Ag. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by