EasyML (Carp/Carpentry)

Experimental export is provided for EasyML, the language used by Carp and Carpentry.

Imports, exporters, and expression writers


Returns a dict of all exporters available in this module.

class myokit.formats.easyml.EasyMLExporter

This Exporter generates a .model file in the EasyML format used by CARP/CARPEntry.

For details of the language, see https://carp.medunigraz.at/carputils/tutorials/tutorials/tutorials.01_EP_single_cell.05_EasyML.run.html

model(path, model)

Exports a myokit.Model in EasyML format, writing the result to the file indicated by path.

A myokit.ExportError will be raised if any errors occur.


Optional method that returns a string containing information about this exporter, to be shown after the export is completed.

runnable(path, model, protocol=None, *args)

Exports a myokit.Model and optionally a myokit.Protocol to something that can be run or compiled.

The output will be stored in the directory path. A myokit.ExportError will be raised if any errors occur.


See myokit.formats.Exporter.supports_model().


Returns True if this exporter supports export of a model and optional protocol to a runnable piece of code.


Returns a dict of all expression writers available in this module.

class myokit.formats.easyml.EasyMLExpressionWriter

This ExpressionWriter writes equations for variables in EasyML syntax.


Converts an equation to a string


Converts an Expression to a string.

Sets a naming function, will be called to get the variable name from a
myokit.LhsExpression object.

The argument f should be a function that takes an LhsExpression as input and returns a string.