This paper introduces the design and implementation of PyOptInterface, a modeling language for mathematical optimization embedded in Python programming language. PyOptInterface uses lightweight and compact data structure to bridge high-level entities in optimization models like variables and constraints to internal indices of optimizers efficiently. It supports a variety of optimization solvers and a range of common problem classes. We provide benchmarks to exhibit the competitive performance of PyOptInterface compared with other state-of-the-art modeling languages.
翻译:本文介绍了PyOptInterface的设计与实现,这是一种嵌入Python编程语言的数学优化建模语言。PyOptInterface采用轻量紧凑的数据结构,高效地将优化模型中的高级实体(如变量和约束)映射到优化器的内部索引。它支持多种优化求解器及一系列常见问题类别。我们通过基准测试展示了PyOptInterface相较于其他先进建模语言的竞争性能。