Research Alliance
From domain to model

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 xi∈{0,1}x_i \in \{0,1\} mean asset ii is held. Maximize expected return minus a risk penalty:

max⁡x  μ⊤x−λ x⊤Σxsubject to∑ixi=k\max_x \; \mu^\top x - \lambda \, x^\top \Sigma x \quad \text{subject to} \quad \textstyle\sum_i x_i = k

Here μ\mu is expected returns, Σ\Sigma the covariance matrix and kk 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 kk” becomes P (∑ixi−k)2P\,(\sum_i x_i - k)^2 with a large weight PP. Choosing PP 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.

Check your understanding

In a QUBO, how is the constraint “choose exactly k items” usually handled?

In a QUBO, how is the constraint “choose exactly k items” usually handled?

Answer the questions above to finish.

Powered by Cor3 Innovations