# Coding Challenge: Bayesian Optimization

This lesson is be a coding challenge to let you play with Python to implement the code.

We'll cover the following

## Problem statement

Let’s assume a factory produces four different products, and that the daily produced amount of the first product is $x₁$, the amount produced of the second product is $x₂$, and so on. The goal is to determine the profit-maximizing daily production amount for each product, bearing in mind the following conditions:

• The profit per unit of product is $20,$12, $40, and$25 for the first, second, third, and fourth product, respectively.

• Due to labor constraints, the total number of units produced per day can’t exceed 50.

• For each unit of the first product, 3 units of raw material A are consumed. Each unit of the second product requires 2 units of raw material A and 1 unit of raw material B. Each unit of the third product needs 1 unit of raw material A and 2 units of raw material B. Finally, each unit of the fourth product requires 3 units of raw material B.

• Due to transportation and storage constraints, the factory can consume up to 100 units of raw material A and 90 units of raw material B per day.

## Objective function

Write the objective function for this.

Get hands-on with 1200+ tech skills courses.