<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 A commercial printing firm is trying to determine the best mix of printing jobs it should seek, given its current capacity constraints in its four capital-intensive departments
Step1:  PART A
Find the optimal solution and value.
Step2:  Change Kernel to Python
<ASSISTANT_TASK:>
Python Code:
using JuMP
m = Model()
# Definig variable
Classes  = ["A", "B", "C"]
Shift = ["R", "O"]
@variable(m, x[Classes, Shift] >= 0)
# Define Constraints
@constraints m begin
    2x["B","R"] + 3x["C","R"] <= 40
    2x["B","O"] + 3x["C","O"] <= 35
    3x["A","R"] +  x["B","R"] + 3x["C","R"] +  x["B","O"] + 3x["C","O"] <= 60
    3x["A","R"] + 6x["B","R"] + 2x["C","R"] + 6x["B","O"] + 2x["C","O"] <= 200
    5x["A","R"] + 4x["B","R"] + 4x["B","O"]  <= 160
     x["A","R"] >= 10
     x["B","R"] +  x["B","O"] >= 10
     x["C","R"] +  x["C","O"] >= 5
end
@objective(m, Max,  200x["A","R"] + 300x["B","R"] + 100x["C","R"] + 292x["B","O"] + 88x["C","O"])
print(m)
Explanation: A commercial printing firm is trying to determine the best mix of printing jobs it should seek, given its current capacity constraints in its four capital-intensive departments: typesetting, camera, pressroom, and bindery. It has classified its commercial work into three classes: A, B, and C, each requiring different amounts of time in the four major departments.
The production requirements in hours per unit of product are as follows:
|             | Class A | Class B | Class C |
|-------------|---------|---------|---------|
| Typesetting |    0    |    2    |    3    |
| Camera      |    3    |    1    |    3    |
| Pressroom   |    3    |    6    |    2    |
| Bindery     |    5    |    4    |    0    |
Assuming these units of work are produced using regular time, the contribution to overhead and profit is \$200 for each unit of Class A work, \$300 for each unit of Class B work, and \$100 for each unit of Class C work.
The firm currently has the following regular-time capacity available in each department for the next time period: typesetting, 40 hours; camera, 60 hours; pressroom, 200 hours; bindery, 160 hours. In addition to this regular time, the firm could utilize an overtime shift in typesetting, which would make available an additional 35 hours in that department. The premium for this overtime (i.e., incremental costs in addition to regular time) would be \$4/hour.
Since the firm wants to find the optimal job mix for its equipment, management assumes it can sell all it produces. However, to satisfy long-established customers, management decides to produce at least 10 units of each class A,B, and at least 5 units of class C of work in each time period.
Assuming that the firm wants to maximize its contribution to profit and overhead, we can formulate the above situation as a linear program, as follows:
$X_{AR}$ = Number of units of Class A work produced on regular time
$X_{BR}$ = Number of units of Class B work produced on regular time
$X_{CR}$ = Number of units of Class C work produced on regular time
$X_{BO}$ = Number of units of Class B work produced on overtime typesetting
$X_{CO}$ = Number of units of Class C work produced on overtime typesetting
$$
\left.\begin{array}{rrcl}      &  \max & z=200X_{AR} + 300X_{BR} + 100X_{CR} + 292X_{BO} + 88X_{CO}\
                    &  \text {s.t.:} & & & \
       & \text{Regular Typesetting}     &  2X_{BR} +3X_{CR}   & \leq & 40 \
        & \text{Overtime Typesetting}     &  2X_{BO} + 3X_{CO} & \leq &  35 \
        & \text{Camera}     &  3X_{AR} + X_{BR} + 3x_{CR} + X_{BO} + 3X_{CO}& \leq & 60 \
        & \text{Pressroom}     & 3X_{AR} + 6X_{BR} + 2x_{CR} + 6X_{BO} + 2X_{CO} & \leq & 200 \
        & \text{Bindery}     & 5X_{AR} + 4X_{BR} + 4X_{BO} & \leq & 160 \
        & \text{Class A, minimum}     & X_{AR} & \geq & 10 \
        & \text{Class B, minimum}     & X_{BR}+X_{BO}& \geq & 10 \
        & \text{Class C, minimum}     & X_{CR}+X_{CO}&\geq & 5 \             
\end{array}\right}
$$
End of explanation
solve(m)
println("Optimal Profit: ", getobjectivevalue(m))
println(getvalue(x))
writeLP(m, "printing.lp")
Explanation: PART A
Find the optimal solution and value.
End of explanation
!less printing.lp
!glpsol --cpxlp printing.lp --ranges printing.sen
!less printing.sen
Explanation: Change Kernel to Python
End of explanation
<END_TASK>