Variables, constraints and objectives
The three parts of every optimization model, with examples from three fields.
7 minute read
Every optimization model answers three questions: what can I decide (variables), what must be true (constraints), and what makes one answer better than another (objective).
Portfolio selection (finance)
Let mean asset is held. Maximize expected return minus a risk penalty:
Here is expected returns, the covariance matrix and the number of assets to hold.
Vehicle routing (logistics)
Variables say which vehicle drives which road segment in which order. Constraints say each customer is visited once and vehicles respect capacity. The objective is total distance or time.
Candidate screening (materials)
Variables choose which candidates to test next. Constraints encode budget, solubility or synthesis limits. The objective combines predicted performance with diversity so you don’t test near-duplicates.
From constraints to penalties
QUBO solvers accept no explicit constraints. Constraints are moved into the objective as penalty terms. For example, “choose exactly ” becomes with a large weight . Choosing well matters: too small and constraints are violated, too large and the landscape becomes hard to search.
Super builds this formulation for you from a plain-language description, but knowing it helps you check the model it proposes.
Key points
- Variables, constraints, objective: name each one explicitly.
- The same domain problem can be modelled several ways; size and structure decide which works.
- QUBO turns constraints into weighted penalties.