<jupyter_start><jupyter_text>Basic PuLP for Linear ProgrammingHere's the sample case of Optimization problems that we will solve using PuLP to solve the problems  Problems 1: Cake Bakery BoutiqueThere are 2 types of cakes sold, Cake A produce profit 20 dollar, Cake B produce profit 40 dollar, **Resources needed to produce cake:**| |**Cake A**|**Cake B**||--|--|--||Oven |0.5 days|1 days||Bakers |1 day|2.5 days||Packers |1 days|2 days|We want to know how many cakes we can made per month to maximize bakery profit given our bakery resources:* 1 Oven* 2 Bakers* 1 Packaging packer (only worksfor 22 days per month) Solving:* Objective function : Profit = 20*A + 40*B* Subject to:    * A >= 0  Number of cakes always positive    * B >= 0    * 0.5A + 1B <=30  Oven use monthly    * 1A + 2.5 B <= 60 Since there's 2 Bakers    * 1A + 2B <= 22  Packers only works 22 days per month<jupyter_code>from pulp import *
# Initialize Class
model = LpProblem('Maximuze_Bakery_Profits', LpMaximize)

# Define Decision Variable
A = LpVariable('Cake A', lowBound=0, cat='Integer')
B = LpVariable('Cake B', lowBound=0, cat='Integer')
# Define Objective function
model += 20 * A + 40 * B
# Define Constraints
model += 0.5 * A + 1 * B <= 30
model += 1 * A + 2.5 * B <= 60
model += 1 * A + 2 * B <= 22
# Problems statement
model
# Solve Model
model.solve()
print(f'Produce {A.varValue} Cake A')
print(f'Produce {B.varValue} Cake B')<jupyter_output>Produce 0.0 Cake A
Produce 11.0 Cake B
{'fraction_non_alphanumeric': 0.11724608043626449, 'fraction_numerical': 0.04567143830947512, 'mean_word_length': 4.169014084507042, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '272865', 'license': 'MIT', 'n_tokens_mistral': 561, 'n_tokens_neox': 485, 'n_words': 203, 'path': 'Basic PuLP for Linear Programming.ipynb', 'repo_name': 'BenedictusAryo/Optimization-Application_Python', 'size': '1467'}