Efficient implementation of nonlinear model predictive control (NMPC) for bioprocesses remains challenging because large nonlinear models are difficult to organize, simulate, and embed within optimization and control workflows. This difficulty is particularly pronounced for large-scale and multiscale systems that require hierarchical model construction and customized simulation strategies. To address this issue, we present GlycoPy, a CasADi-based Python framework for hierarchical modeling, optimization, and control of bioprocesses. GlycoPy combines an equation-oriented, object-oriented modeling architecture with CasADi's symbolic and differentiable computational capabilities, enabling hierarchical model composition, numerical and symbolic simulation, parameter estimation, dynamic optimization, and NMPC within a unified workflow. A key feature of the framework is its support for customized differentiable simulation algorithms that can be embedded directly in gradient-based optimization and control. GlycoPy is demonstrated on a multiscale monoclonal antibody glycosylation process in Chinese hamster ovary cell culture, where it is used for hierarchical model construction, quasi-steady-state simulation, and adaptive NMPC. The results show that GlycoPy provides a practical and reusable framework for applying advanced optimization and control methods to computationally demanding bioprocesses.
翻译:生物过程中非线性模型预测控制(NMPC)的高效实现仍具挑战性,原因在于大规模非线性模型难以组织、仿真并嵌入到优化与控制工作流中。这一问题对于需要分层模型构建及定制化仿真策略的大规模多尺度系统尤为突出。为解决此问题,我们提出了GlycoPy——一个基于CasADi的Python框架,用于生物过程的分层建模、优化与控制。GlycoPy将面向方程的面向对象建模架构与CasADi的符号化及可微分计算能力相结合,在统一工作流中实现了分层模型组合、数值与符号仿真、参数估计、动态优化及NMPC。该框架的关键特性在于支持定制化的可微分仿真算法,这些算法可直接嵌入基于梯度的优化与控制中。通过在中华仓鼠卵巢细胞培养中多尺度单克隆抗体糖基化过程的案例演示,我们展示了GlycoPy在分层模型构建、准稳态仿真及自适应NMPC中的应用。结果表明,GlycoPy为计算密集型生物过程应用先进优化与控制方法提供了实用且可复用的框架。