## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The factory produces two types of car oils: Regular Synthetic and Premium Synthetic. The goal is to maximize profit given the constraints on the availability of substances A, B, and C.

Let's define the decision variables:
- \(R\): Number of containers of Regular Synthetic oil to produce.
- \(P\): Number of containers of Premium Synthetic oil to produce.

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 17.4R + 11.1P \]

Subject to the constraints:
1. Substance A: \( 25R + 10P \leq 1000 \)
2. Substance B: \( 40R + 25P \leq 500 \)
3. Substance C: \( 36R + 40P \leq 900 \)
4. Non-negativity: \( R \geq 0, P \geq 0 \)

## Gurobi Code

To solve this problem, we will use the Gurobi Optimizer in Python. First, ensure you have Gurobi installed in your environment. You can install it via pip:
```bash
pip install gurobi
```

Here's the Gurobi code for the problem:

```python
import gurobi as gp

# Create a new model
model = gp.Model("Car_Oil_Production")

# Define the decision variables
R = model.addVar(name="Regular_Synthetic", lb=0, vtype=gp.GRB.CONTINUOUS)
P = model.addVar(name="Premium_Synthetic", lb=0, vtype=gp.GRB.CONTINUOUS)

# Objective function: Maximize profit
model.setObjective(17.4 * R + 11.1 * P, sense=gp.GRB.MAXIMIZE)

# Constraints
model.addConstr(25 * R + 10 * P <= 1000, name="Substance_A")
model.addConstr(40 * R + 25 * P <= 500, name="Substance_B")
model.addConstr(36 * R + 40 * P <= 900, name="Substance_C")

# Optimize the model
model.optimize()

# Print the results
if model.status == gp.GRB.OPTIMAL:
    print("Optimal Solution:")
    print(f"Regular Synthetic: {R.varValue} containers")
    print(f"Premium Synthetic: {P.varValue} containers")
    print(f"Max Profit: ${model.objVal:.2f}")
else:
    print("No optimal solution found.")
```