# Did I formulate this problem in the correct way?

A company makes two products, product 1 (X1) and product 2 (X2).

Profits per unit are $$\30.00$$ for $$X_1$$ and $$\15.00$$ for $$X_2$$.

Hours per unit for each of the three departments are:

Dept. A (hrs./unit) $$1.00$$ for $$X_1$$, $$0.35$$ for $$X_2$$ with a maximum capacity of $$100$$ hours for the whole department

Dept. B (hrs./unit) $$0.30$$ for $$X_1$$, $$0.20$$ for $$X_2$$ with a maximum capacity of $$36$$ hours for the whole department

Dept. C (hrs./unit) $$0.20$$ for $$X_1$$, $$0.50$$ for $$X_2$$ with a maximum capacity of $$50$$ hours for the whole department

There is a possibility to work extra hours: $$10$$ extra hours for Dept. A at $$\18$$ per hour, 6 for Dept. B at $$\22$$ per hour, and $$8$$ for Dept. C at $$\12$$ per hour. However, there can only be 2 departments at a time with extra hours.

I formulated the problem as follows:

Let $$X_i$$ be the number of units of product $$i$$, $$H_N$$ the extra hours for department $$N$$, and $$O_A$$, $$O_B$$ and $$O_C$$ binary variables that represent which departments are working extra hours

Max $$30X_1 + 15X_2$$ subject to

$$X1 + 0.35X_2 - H_A \leftarrow 100$$

$$0.3X1 + 0.2X_2 - H_B \leftarrow 36$$

$$0.2X_1 + 0.5X_2 -H_C \leftarrow 50$$

$$H_A \leftarrow 10(O_A)$$

$$H_B \leftarrow 6(O_B)$$

$$H_C \leftarrow 8(O_C)$$

$$O_C + O_B + O_A \leftarrow 2$$

Is this right??

• The additional costs for each extra hour worked should be included in the objective function. – YukiJ Feb 18 at 8:26
• Great! thank you! – Lollipop Feb 18 at 14:53
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 39, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/3117188/did-i-formulate-this-problem-in-the-correct-way", "fetch_time": 1563563123000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-30/segments/1563195526337.45/warc/CC-MAIN-20190719182214-20190719204214-00258.warc.gz", "warc_record_offset": 464466002, "warc_record_length": 35010, "token_count": 537, "char_count": 1574, "score": 3.71875, "int_score": 4, "crawl": "CC-MAIN-2019-30", "snapshot_type": "latest", "language": "en", "language_score": 0.8484451770782471, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00041-of-00064.parquet"}