Indexing in Modeling Languages for Mathematical Programming
讨论数学规划建模语言中的索引结构(如集合和关系),通过分类、实例和原则分析四种语言(AMPL、GAMS、LINGO、SML)的索引能力,帮助语言设计者和使用者理解其表达力与易用性。
Indexing structures are of fundamental importance to modeling languages for mathematical programming as a device for mathematical abstraction, and because they facilitate achieving conciseness, stability, and error-resistance. The aim of this article is to stimulate discussion of such structures, especially the two most common kinds found in algebraic style languages: sets and relations. We offer a taxonomy of set-based and relation-based indexing structures, a suite of detailed examples illustrating this taxonomy, and a number of specific principles (some arguable and some not) for incorporating indexing structures into modeling languages. We also examine four modeling languages in detail with respect to their indexing capabilities: AMPL, GAMS, LINGO, and SML. By attempting to work all of the illustrative examples in each language, we are able to reach some conclusions concerning relative expressive power, economy of notation, obedience to our principles of “good” language design, ease of data handling, and other criteria.