EasyML (Carp/Carpentry)

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

Imports, exporters, and expression writers

myokit.formats.easyml.exporters()

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

info()

See myokit.formats.Exporter.info().

logger()

Returns this exporter’s TextLogger.

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.

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.

supports_model()

See myokit.formats.Exporter.supports_model().

supports_runnable()

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

myokit.formats.easyml.ewriters()

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.

eq(q)

Converts an equation to a string

ex(e)

Converts an Expression to a string.

set_lhs_function(f)
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.