27Discrete and Integer Variables
27.1 Introduction
Integers, the counting numbers, are a subset of discrete numbers. Even if a variable is continuum valued conceptually, in practice it might be discretized. An example is time in a digital simulator. Whether the time in a simulation is discretized into 0.1 s increments, millisecond increments, or whole‐second increments, the simulated time can only have discrete values. Whenever some variable is placed in cells or array elements, the interval is discretized. Other examples include spatial increments in solving a differential equation (even though distance may be continuum valued) or bin increments in creating histograms.
Each category of variable in an optimization (DVs, constraints, intermediate variables, or OF values) may be limited to discrete values. These values may be point values, for which existence is only at one particular point, and no in‐between values exist. Or the discretization may create flat spots, such as is often the result of a “dead‐band” logic wherein a variable retains its past value until it exceeds some discretization value. The step‐and‐hold logic in a digital clock is just such an example. The time shows 11 : 23 until 1 min later when it jumps to 11 : 24.
Flat spots arise from several mechanisms. One type could be that of constraints in a physical process. For example, the level in an open bucket rises with the addition of liquid until the bucket overflows, and then adding more liquid does not change ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access