Custom model

In the compartmental analysis task in PKanalix you can use any custom model* – any model written in the Mlxtran language. To load an existing model, click on “BROWSE” in the Model sub tab, and to write a new model from scratch click “NEW MODEL” button.

*Note: In PKanalix versions before 2023, only models from the PK library are available.

You can also choose a model form the library and then edit it directly in the Model tab by clicking on the button “EDIT MODEL”:

In the edition mode, there are special features that help to write models in mlxtran. It includes functions to color syntax and to detect mlxtran syntax errors, to zoom editing window. In addition, it gives functions and keyword suggestions for the mlxtran language.

You can save a new model and automatically apply it to a current project – click SAVE & APPLY. To save a model with a different name, use “SAVE AS & APPLY” or “SAVE AS”. Note that models from the library cannot be overwritten.

Merging two models from libraries

In MonolixSuite application there is a dedicated application to write and edit models – mlxEditor. Its functionalities are integrated in the interface, as described above, but you can also use mlxEditor independently of PKanalix.  The following video shows an example how to merge two models using mlxEditor.





Writing a model from scratch

The following video describes how to write a custom model. Note that this video uses the old version of mlxEditor, but the functionalities are the same.





Understanding the error messages

The error messages generated when syntax errors occur in the model are very informative and quickly help to get the model right. This video explains the most common error messages..





Next section: Initialization of model parameters