A Modeling Framework

  • Tony Hürlimann
Part of the Applied Optimization book series (APOP, volume 31)


After having investigated and criticized various approaches in the last chapter, it is time to present my own view of a computer-based modeling framework. As one might expect, it has been inspired from many sources. The different algebraic languages have had a certain influence, although at least the initial versions of LPL were developed completely independently from any other algebraic language. Structured Modeling too, influenced me, helping to shape the point of view presented in this chapter. More conceptual and implementation specific aspects were influenced by computer science and especially programming language design, as taught by Wirth [Wirth 1996], [Wirth/Gutknecht 1992].


Programming Language Modeling Language Editing Tool Input Gate Transform Instruction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 56.
    Since the AND-operator makes part of a constraint, “a constraint” might also mean “a set of constraints”, of course.Google Scholar
  2. 57.
    From the point of view of algorithmic complexity, accessing a value in a sparse table (which means reading and writing an entry) can be guaranteed in time proportional to O(log n) using a binary tree structure, if n is the cardinality of the full table. Using hash tables, the average time can be made constant, but many insert/remove operations can seriously degrade the efficiency. Sorting a sparse table can be done in linear time of n by applying the counting sort. Nonetheless, it uses an unacceptably large number of 0(n) memory cells. We are often better off by using a 0(m log m) sorting algorithm, where m is the actual size of the sparse table.Google Scholar
  3. 58.
    The discussion as to whether all identifiers should be explicitly declared before their use, has a long history in programming languages. It is not the purpose to rediscuss it in this book. See, for example, [Hoare 1974] for a synopsis of related problems.Google Scholar
  4. 59.
    According to Wirth [1996, p 126], the term information hiding which is now an essential notion in software engineering, was introduced by [Parnas 1972].Google Scholar
  5. 60.
    The programming language Eiffel [Meyer, 1992] also merges the two concepts of module and class into a single one: the class. This is an intentional design choice as Meyer notes on page 34. Module (“a group of related services”) and class (“the description of similar runtime data elements, or objects”) have different “roles”, but it is “natural to support them through a single concept”. Meyer gives no further justification why this is “natural”. Of course, “we can build the class in such a way that the services it offers as a module are precisely the operations available on the objects.” A stronger argument for merging these two concepts would be: “do not use two concepts when one is enough” (Ockham’s Razor). However, as was exposed above, the two concepts not only have different “roles” but they have very different functions: the module controls the visibility while the class declares an abstract data type. Maybe in algorithmic languages it is less important to distinguish between these functions, in modeling languages (where the concept of module will be replaced by the one of model,see below) it is crucial, since a model is more than a data structure: it also contains the declarative part (in contrast to the procedural part).Google Scholar
  6. 61.
    Units cannot be reduced to types. The question of whether a (numeric) value represents — say — time, length, speed, or voltage is not addressed by the concept of type. They are all floating point numbers. Even a strict form of name equivalence between types would not solve the problem. The declaration type LENGTH = REAL; SPEED = REAL; in Pascal, for instance, (supposing the two types are considered to be different) would give rise to syntax errors in expressions using memory variables of type LENGTH and SPEED, which is highly undesirable [House 1983 ].Google Scholar
  7. 62.
    An extended Backus-Naur Form is used to express the syntax of the language constructs. Words entirely written in capitals are keywords, text included in apostrophes is literal text, words beginning with an uppercase letter are productions (non-terminals), words beginning with a lowercase letter are terminals (tokens recognized by finite automata (scanners)). Three metaconstructs are also used: [Xxx]: means that Xxx is optional Xxx I Yyy: means that either Xxx or Yyy is to be taken 1 Xxx 1: means that Xxx can be repeated zero or any number of times.Google Scholar
  8. 63.
    The requirement that each identifier needs to be declared before it is used, violates our objective that the order of the entities is not significant. We can easily drop this requirement at the cost of implementing a two-pass compiler which collects all entities in the first pass.Google Scholar
  9. 64.
    In the programming language Modula [Wirth 1977] it is possible to nest modules even as local memory variables within procedures.Google Scholar
  10. 65.
    It should be noted that this notion of formal parameters of models and procedures is different from template parameters in C++ or generic class parameters in Eiffel. While the former stand for single data and functions, the later stand for a data type. Data-type parameterization is substantially more complex, but still fails to cover some practical cases (see [Loeckx al., 1996, p. 12] for more details).Google Scholar
  11. 66.
    The term attribute is used throughout this text to denote explicit properties of an entity, which have a well defined syntax within the modeling language.Google Scholar
  12. 67.
    The uncommon and original concept of tag has been introduced by [Kuip 1992, Chap 2, “Compound Sets in Mathematical Programming Modeling Languages”]. He calls it label,but the word label is already used for labelling nodes in an index-tree (see below). This is in accordance with the tradition for denoting tree structures in logic programming.Google Scholar
  13. 68.
    We shall see below, when introducing tags,that the star is not really needed in the syntax of the modeling language. However, to represent the index-tree they are mandatory to flag unlabeled nodes. Another use is to show that general hierarchical index-set are nothing else than compound index-set where some nodes in the corresponding index-tree are unlabeled (see Figure 7–5).Google Scholar
  14. 69.
    I am grateful to Koos Heerink of the University of Twente who is writing his doctoral thesis on modeling languages for this notion of mark. In June 1995, he came to Fribourg for two weeks and we discussed intensively the concept of hierarchical index-sets — without coming up with conclusive results. But the idea of marking elements of index-sets arose in our discussion.Google Scholar
  15. 70.
    In the first version of LPL [Hürlimann 1987, p. 23], it was already possible to use such a construct for generating recursively defined constraints. However, that construct was limited in several respects and, therefore, has been removed in subsequent versions. I wanted toGoogle Scholar
  16. 71.
    Since x A y = x v only one of the two AND and OR gates is really needed. Furthermore, we can reduce all three gates to the NAND (I) gate as follows (where 1 is the signal 1): x11= x, x A y = (xly)I1, x v y (x11)I(y1l). This is interesting because the NAND gate is electronically easier to build.Google Scholar
  17. 72.
    This model was first formulated in LPL (Version 3.5) by Pius Hättenschwiler at the Institute of Informatics of the University of Fribourg using LPL’s hierarchical indexing mechanism. I am grateful to him for letting me use the model in a slightly modified form.Google Scholar

Copyright information

© Springer Science+Business Media Dordrecht 1999

Authors and Affiliations

  • Tony Hürlimann
    • 1
  1. 1.Institute for InformaticsUniversity of FribourgSwitzerland

Personalised recommendations