FOMTm function

First-Order Multi-Target model