4 Constrained optimization

 

This chapter covers

  • Adding comments to your R code
  • Visualizing data distributions with density plots
  • Visualizing the correlation between just two variables at a time
  • Defining constrained optimization
  • Applying the constrained optimization method

How often have you been asked to do more with less? In other words, what you’re really being asked is to make the most of a situation compromised by trying circumstances. Constrained optimization is the operations research and quantitative solution to that end. In this chapter, we’ll demonstrate how to organize and execute a typical constrained optimization problem. To accomplish this goal, we have a fictional NBA team fixed on acquiring veteran players from the free agent market. Their objective is not to acquire the five best players available, but the five best players that meet their specific requirements and needs. Our hypothesis, therefore, is that constrained optimization can successfully isolate the best group of free agents this team should acquire without breaching any of the constraints established in advance.

4.1 What is constrained optimization?

4.2 Loading packages

4.3 Importing data

4.4 Knowing the data

4.5 Visualizing the data

4.5.1 Density plots

4.5.2 Boxplots

4.5.3 Correlation plot

4.5.4 Bar chart

4.6 Constrained optimization setup

4.7 Constrained optimization construction

4.8 Results

Summary