Modeling workflow

Modeling Workflow

Modeling is the process of translating a real-world decision problem into mathematics.

In operational research, the goal is to build a model that can be solved by an optimization method.

Core Idea

A model must answer three questions:

  1. What do we choose?
  2. What do we want?
  3. What limits us?

Mathematically:

Question Model Part
What do we choose? decision variables
What do we want? objective function
What limits us? constraints

Standard Workflow

A typical OR workflow is:

  1. identify the problem
  2. identify the variables
  3. formulate the mathematical model
  4. solve the model
  5. validate the model
  6. analyze the result

Step 1: Understand the Problem

Read the problem carefully.

Identify:

  • the decision-maker
  • the available choices
  • the goal
  • the limitations
  • the units
  • the time period

Example questions:

  • Are we deciding production per day, week, or year?
  • Are variables measured in units, kilograms, euros, or hours?
  • Is the goal profit, cost, revenue, or return?

Step 2: Define Decision Variables

Decision variables are the unknowns.

They should be precise.

Bad:

\[x_1 = \text{lettuce}\]

Good:

\[x_1 = \text{hectares allocated to lettuce}\]

Bad:

\[x_2 = \text{fund B}\]

Good:

\[x_2 = \text{number of units purchased of fund B}\]

Step 3: Write the Objective Function

The objective function expresses the goal.

Use maximization for benefits:

\[\max f(x)\]

Examples:

  • maximize profit
  • maximize return
  • maximize production
  • maximize number of hires

Use minimization for costs:

\[\min f(x)\]

Examples:

  • minimize cost
  • minimize time
  • minimize waste
  • minimize distance

Step 4: Write the Constraints

Constraints express the rules and limitations.

Common phrases:

Phrase Mathematical Meaning
at most $\le$
no more than $\le$
maximum $\le$
at least $\ge$
no less than $\ge$
minimum $\ge$
exactly $=$

Step 5: Add Sign Restrictions

Most quantity variables are nonnegative:

\[x_j\ge 0\]

Examples:

  • production cannot be negative
  • investment cannot be negative
  • transported goods cannot be negative
  • hectares cannot be negative
  • food quantity cannot be negative

If variables must be whole numbers, add:

\[x_j\in\mathbb{Z}\]

If variables are yes/no, add:

\[x_j\in\{0,1\}\]

Step 6: Check Units

Every coefficient must match the unit of the variable.

Example:

If:

\[x_1 = \text{hectares of lettuce}\]

and each hectare requires $18$ labor hours, then labor use is:

\[18x_1\]

If:

\[x_2 = \text{hectares of tomatoes}\]

and each hectare requires $24$ labor hours, then total labor is:

\[18x_1+24x_2\]

Step 7: Check the Objective Units

All terms in the objective must have the same unit.

Example:

If lettuce revenue is euros and tomato revenue is euros, then:

\[\max 2000x_1+4500x_2\]

is meaningful.

Do not add incompatible quantities such as:

\[\text{euros}+\text{hours}\]

unless they have been converted into a common scale.

Step 8: Write the Final Model Clearly

A complete LP model should have:

  • objective
  • constraints
  • sign restrictions
  • variable definitions

Example structure:

\[\max c_1x_1+c_2x_2\]

subject to:

\[a_{11}x_1+a_{12}x_2\le b_1\] \[a_{21}x_1+a_{22}x_2\ge b_2\] \[x_1,x_2\ge 0\]

where:

\[x_1=\ldots,\qquad x_2=\ldots\]

Example: Production Problem

A factory produces two products.

Let:

\[x_1 = \text{units of product A produced}\] \[x_2 = \text{units of product B produced}\]

If profit per unit is $5$ and $12$, then:

\[\max 5x_1+12x_2\]

If resource constraints are:

\[20x_1+10x_2\le 200\] \[10x_1+20x_2\le 120\] \[10x_1+30x_2\le 150\]

and:

\[x_1,x_2\ge 0\]

then the model is complete.

Example: Diet Problem

Let:

\[x_j = \text{quantity of food }j\]

If food $j$ costs $c_j$ per unit, the objective is:

\[\min \sum_{j=1}^n c_jx_j\]

If nutrient $i$ contained in food $j$ is $a_{ij}$ and the required amount is $b_i$, then:

\[\sum_{j=1}^n a_{ij}x_j\ge b_i\]

for each nutrient $i$.

Also:

\[x_j\ge 0\]

Example: Transportation Problem

Let:

\[x_{ij}=\text{quantity shipped from source }i\text{ to destination }j\]

If shipping cost per unit is $c_{ij}$, then:

\[\min \sum_i\sum_j c_{ij}x_{ij}\]

Supply constraints:

\[\sum_j x_{ij}\le s_i\]

Demand constraints:

\[\sum_i x_{ij}\ge d_j\]

Nonnegativity:

\[x_{ij}\ge 0\]

Common Modeling Mistakes

Missing Variable Definitions

Do not write equations before defining variables.

The reader must know what every variable means.

Wrong Inequality Direction

“At most” means $\le$.

“At least” means $\ge$.

“Exactly” means $=$.

Missing Nonnegativity

If a variable represents a physical quantity, include:

\[x_j\ge 0\]

Mixing Units

Do not mix kilograms, grams, euros, and units without converting.

Optimizing the Wrong Quantity

If the problem asks for maximum gain, do not accidentally minimize cost unless cost is the intended objective.

Validation

After writing the model, check whether it makes sense.

Ask:

  • Can the variables take realistic values?
  • Do all constraints match the problem statement?
  • Are all units consistent?
  • Does the objective represent the stated goal?
  • Are nonnegativity or integer constraints needed?
  • Is the model too restrictive or too loose?

Analyzing Results

After solving the model, interpret the result in words.

A complete answer should include:

  • the optimal solution $x^*$
  • the optimal value $z^*$
  • the real-world meaning of each variable
  • whether constraints are binding or nonbinding, if relevant

Example:

\[x^*=(6,3),\qquad z^*=66\]

means:

  • produce 6 units of product A
  • produce 3 units of product B
  • maximum profit is 66

Modeling Template

Use this template for exam problems:

Let:
x1 = ...
x2 = ...

Objective:
max/min ...

Subject to:
constraint 1
constraint 2
constraint 3

Sign restrictions:
x1, x2, ... >= 0

Checklist

You understand the modeling workflow if you can:

  • define decision variables clearly
  • write the objective function
  • translate words into constraints
  • choose the correct inequality direction
  • add sign restrictions
  • check units
  • write the final model cleanly
  • interpret the solution in words

See Also

Exam checkpoint

In exam problems, translate the story into variables, objective, constraints, feasible set, and optimal value. Always state whether the problem is a maximization or minimization and what the units are.

25

25
Ready to start
Modeling workflow
Session: 1 | Break: Short
Today: 0 sessions
Total: 0 sessions