A decision variable is an input whose value you control when solving an optimization problem. Its assigned values define candidate solutions and affect the objective function, while constraints restrict which assignments are acceptable. section 1.3.1 section 1.6
Ticket pricing
An event organizer chooses ticket price x to maximize profit. Demand falls as price rises, so x affects both revenue and costs through the expected number of attendees. Lower and upper price bounds constrain x. With the supplied cost and demand values, maximizing the profit function produces an optimal price of $155 and a net profit of $130,500. section 1.3.1 section 1.3.2
Decision variables can represent different choices across optimization settings:
- Use thermostat temperature, light levels, routes, or parking choices to balance comfort, energy, travel time, cost, and charging access. section 2.1
- Represent electric-vehicle design choices such as wheel size, motor power, and battery capacity when optimizing acceleration time and driving range. section 1.3.2
- Represent parcel-selection decisions in cargo-bike loading, where profit is maximized, weight is minimized, and capacity limits are handled as constraints or penalties. section 1.3.3
Figure 1.5 Ticket pricing problem—the optimal pricing that maximizes profit is $155 per ticket.
Use the ticket-pricing figure to connect a chosen decision-variable value with the resulting maximum objective value. section 1.3.2

