Skip to main content

From a real problem to an optimization model

Before choosing GA, DE, or a numerical solver, make the problem itself precise.

Optimization & MetaheuristicsBeginner

Learning goal

Translate a decision problem into decision variables, an objective function, and constraints.

Prerequisites

  • Elementary algebra

Model structure

A model states what we choose, what we want to minimize or maximize, and which choices are feasible.

Base model
minx∈Ωf(x)

Production example

Let x₁ and x₂ be production quantities with unit profits 40 and 30. A natural objective is to maximize total profit under resource limits.

Objective
max40x1+30x2
Resource constraints
2x1+x2≤100,x1+2x2≤80,x1,x2≥0

Why modeling comes before the algorithm

If the objective is wrong, the optimizer returns the best answer to the wrong problem. If a real constraint is omitted, the result may be mathematically valid but operationally impossible.

Connection to the Convex QP Solver

Convex quadratic program
minx12xTPx+qTxs.t.Ax=b,Gx≤h

The solver project takes this modeling step to a more structured form and then applies numerical methods. The algorithm is the end of the chain, not the starting point.

Exercises

  • Model a two-task scheduling problem.
  • Write both a cost objective and a delay objective.
  • Find one real constraint whose removal would make the model unrealistic.

Related project

Convex Quadratic Programming Solver

A real project taking a convex QP model into a numerical solver.

Open source

Have a decision problem?

We can make the model precise before choosing an algorithm.