Formulates ExaModels from PEtab models.
Unlike PEtab.jl, which uses the sequential method for
dynamic optimization, ExaModelsPEtab.jl applies the simultaneous method (orthogonal collocation) to
formulate the problem as a large-scale NLP. The ExaModel can then be solved with
MadNLP using CPU or GPU.
examodel_petab("path/to/petab.yaml"; backend = nothing, kwargs...)Returns an ExaModel from a PEtab .yaml file.
backend: array backendkwargs...passed on toExaCore/CollocationExaCore
using ExaModelsPEtab, MadNLP
# Build the ExaModel from a PEtab `.yaml` file
model = examodel_petab("path/to/petab.yaml")
result = madnlp(model)
# Solve using GPU
using MadNLPGPU, CUDA, CUDSS
model = examodel_petab(
"path/to/petab.yaml";
backend = CUDA.CUDABackend()
)
result = madnlp(model; tol = 1e-6)