The Integer Variable: Application in Modeling

Integer variables are often required to model reality – a fact well understood for the last 50 years. Still, five decades of advancement has resulted in few distinct mixed integer (MIP) modeling approaches. As if most software vendors simply copied each other, the common approach has always relied chiefly on programming skills and expert knowledge. 

Like Sisyphus exerting extreme effort to move a boulder up a hill, countless modelers have exerted similar effort with MIP models, only to face criticism and damaged credibility when scope creep and exploding datasets led to numerical difficulties, skyrocketing solve times, and missed delivery dates. If you’ve been there, then you know what I’m talking about.

This entry is a primer on why business decision makers should care about this topic and how Enterprise Optimizer® (EO), River Logic’s modeling platform, has transformed the art and science of MIP models.

Integer Variable: Three Simple Definitions

Let me introduce three simple definitions, which can be found on many websites and within various textbooks. They are constructs commonly used in many EO models:

  • An Integer variable is a decision that must result in an integer value (0, 1, 2, …)
  • A binary variable is a special kind of integer variable whereby the value must be either 0 or 1
  • A constraint set (commonly known as a Special Ordered Set, or SOS) is a group of variables in which the solution can select a maximum of n of m possible choices

As applied math goes these are not difficult concepts, yet relatively few people are familiar with them. As proof, a Google search for “SOS” returned 216 million hits; while the same search for “Special Ordered Set” returned only 5,150 hits. Assuming that “SOS” also appears with “Special Ordered Set,” which is likely, this equates to only 0.002% of all “SOS” hits! For a cultural comparison, searching for the exact string “SOS Lady Gaga” returned nearly 13,000 hits!

Examples of Integer Variables

Imagine you are a member of a select team tasked to plan your company’s (or your client’s) future. Your company produces and sells high-value, discrete products like flat panel TVs or lawn mowers, and your logistics group only ships product in full truck loads (FTLs). To accurately model many operating decisions, integer variables will be required; it would be illogical to make part of a TV or lawn mower and to ensure truckloads are FTLs.

On your “to do” list are critically important scenarios to evaluate closing a distribution center, adding a second shift at a manufacturing plant, expanding a product line into new markets, and – due to a special request from the CFO – selling bonds to retire old debt. These types of decisions require binary variables: you must decide to do them or not do them. All subsequent decisions, like setting marketing budgets, hiring personnel, or buying new equipment, hinge on these “yes or no” decisions.

To complete the capital expenditure (CAPEX) exercise, you must develop a list of project recommendations to Senior Management. Due to budget constraints, however, you’re likely to recommend a maximum of 5 projects out of 20 possible choices. This is an example of a constraint set.

EO versus 4GPL software

Applying integer constraints within the EO modeling environment is not merely “different” than other modeling software; it’s a paradigm shift. I’ve modeled integer constraints for two decades using a variety of software. The degree of complexity, amount of time spent, and level of frustration when using integer constraints depends significantly on the technology used.

Fourth Generation Programming Languages (4GPL), like SAS, AMPL, or GAMS, demand expert knowledge of integer modeling syntax; an understanding of how to define variables, and where constraint markers must fit into the matrix; and an aptitude and ability to debug infeasibilities. This last point is not a particularly easy task since 4GPL programs have relatively primitive tools to assist in debugging any resulting infeasibilities. Since 4GPLs are languages for modelers designed by other modelers, maybe “ease of use” just isn’t important.

More importantly, in 4GPLs the complexity of each modeled scenario often results in a highly focused, albeit sub-optimal solution; sub-optimal in the sense that each scenario is analyzed in isolation from other scenarios, possibly by different analysts/modelers, sometimes even using different technologies. There is simply not enough time to create a fully holistic, Integrated Business Planning (IBP) model when code must be written, databases built, interfaces created, and reports generated. This makes comprehensive scenario analysis for a CAPEX exercise extremely difficult and time-consuming.

By contrast, a 5GPL language, like River Logic’s Enterprise Optimizer (EO), when defining integer constraints, a significant and quite frankly brilliant difference becomes apparent – EO has built-in, data driven choices like:

  • To model the decision to re-open a previously closed facility, simply change a data choice in the Facility (or Location) Definition table from “off” to either “on” or “Decide”;
  • To force a sales activity to be a integer value, simply change a data choice associated with the decision’s Variable Type field from “Continuous” to either “Integer” or “Binary”;
  • To define a constraint set, simply define the set description in a text field of the Constraint Sets Definition table and then attach to data choices via a drop-down list.

    The common point here is that modeling integer-constrained decision variables is a simple data-driven exercise – no extra coding is required. A 5GPL program won’t require expert knowledge of syntax rules to be typed into a user interface. Instead, an enterprise diagram representing the particular business process is created, existing data is imported as both decisions and constraints, and then, using these pre-defined data choices in drop-down lists, the modeler quickly changes otherwise continuous solution values into integer decisions. Yes, it really is that easy.

New Call-to-action

You May Also Enjoy Reading
Supply Chain Brief