Question: i need help on 4 and 5 4 and 5 xy = tons of raw material i used for i ER IGR Objective function and



![the "piece is 100 tons" constraint as model.piece. In [53]: def consti](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa3b363a60d_18966fa3b35cda44.jpg)
![rule(model, i): return model.x[i] == 108| model.piece = pyo.Constraint(R, rule=Consti_rule) hin Recal](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa3b36e94c4_19066fa3b368158a.jpg)
xy = tons of raw material i used for i ER IGR Objective function and constraints. min , (total cost) s.t. Ex; = 100 (piece is 100 tons) Ex nyx forj EC (characteristic requirements) nx, Su Xx forj EC (characteristic requirements) IGR IER IGR IGR TER OS X Sa for i ER (nonnegativity, availability of raw materials) 6a. (5 points) Define the "piece is 100 tons" constraint as model.piece. In [53]: def consti rule(model, i): return model.x[i] == 108| model.piece = pyo.Constraint(R, rule=Consti_rule) hin Recal Exercise 2 13 from Rader (the Midwest Steel problem), assigned for homework We can formulate this problemas a linear program as to Sets Reset of riw material Alloyl. Alloy2. Alloy. Scrapl. Scrap21 C = set of characteristien Carbon, Nickel, Chromium, TensileStrength Parameters cost of raw material for IGR of raw material available for IGR y value of characteristic / in raw material foric RJEC 4, lower bound for characteristic for C , = upper bound for characteristic for jeg Decision variables x = tom of raw material wood foric R Objective function and constraints min (total cost) At Xx = 100 (piece is 100 tons) xx for CC (characteristic requirements) Eh, , Xx for jeC (characteristic requirements) OSXSQ for i GR (nonegativity, availability of raw materials) The sets above have the folowing concrete values R = Alloyl, Alloy 2. Alloy 3, Scrupl, Serup2) C=Cubon, Nickel, Chromium. TemileStrength The parameters above have the following concrete values Alloy 15050 Niloya 12050 A Bet 250 So 2000 Tec Cartoon 0.0200.000 N 0.0000010 Chromium 00 000 Tength coco,CO hy A Alley Asya Carbon NICU COM Triste strength OD 0.000 0.006 00000 00 0.00 a.com 40000 10260 0.00 0.012 00310 0.45 120000 0 0166 0.00 70000 Construct and solve this modern Pyoma by completing the tasks given below 1:05 points) import the promobrary X Lab 02 Cruz - Jupyter Notebook RC=set of raw materials (Alloy 20 Stuft/Lab%62002%20cruzipynb juplyter Lab 02 C 5 1.1 room TH 1 Outerworth 2. prestations to the wedi Alta, 112 15 Se . AL Alisya Ally20 10 " 2.3 point Definitions de defect value for the past, and will carte, Noli Chois "stretto Corso MO Chen Telstrength 2000 2d. 5 porte Deine dictionary that des concrete values for the patie Runde Uma multidimension play. In 10 30.678.830, 0.635. Alloy (2,040, 0.01), Ay)" 2. ... .008.) A 0.011 45.00, 120000 Srl (ees. 255, 220.000 Sera 2.15 ports in a concrete model nameddel 4 Sport Define the decision was forces de Mesure you plytheongenity Wepper bonde later constraints TA (45 ml po vardarpoval) 110 perts Dutre the objective turetion as 60 EN 14 Overdel return for 1 in model.jpyo.Goject rullrulle pyo. TA hented - X Lab 02 Cruz - Jupyter Notebook X Chapter 6-R.pdf New Tab yter%20Stuff/Lal:%2002%20cruzipynb Lab 02 Cruz Last Checkpoint 2 hours ago (autosaved) View Insert Cel Kernel Widgets Help 2 + Run Code Your assignment Recall Exercise 2 13 from Rader (the Midwest Steel problem), assigned for homework. We can formulate this problem as a linear pro Sets. R = set of raw materials = Alloy 1. Alloy2. Alloy3, Scrapl. Scrap21 C = set of characteristics = (Carbon, Nickel, Chromium, TensileStrength) Parameters. 4 = cost of raw material / for IER 4. = amount of raw material i available for i ER hy = value of characteristic / in raw material for i E R.JEC 6, = lower bound for characteristic for EC #} = upper bound for characteristic for EC Decision variables. * = tons of raw material i used for i ER Objective function and constraints. min , (total cost) re s. = 100 (piece is 100 tons) HER XS LeR eR for JEC (characteristic requirements) ,, , , * for) EC (characteristic requirements) 03*, Sa for IER (nonegativity, availability of raw materials) ER The sels above have the following concrete values. R= (Alloy. Alloy2. Alloy 3. Scrapl. Scrap2) C = (Carbon, Nickel, Chromium. TensileStrength) The parameters above have the following concrete values Chapter 6-R.pdf New mmented - Jux Lab 02 Cruz - Jupyter Notebook x upyter%20Stuft/Lab%2002%20Cruz.ipynb er Lab 02 Cruz Last Checkpoint 2 hours ago (autosaved) View Insert Cell Kamel Widgets Help Run Code The sets above have the following concrete values R = Alloy I. Alloy2. Alloy 3, Scrapl. Scrap2) C = (Carbon, Nickel. Chromium, TensileStrength The parameters above have the following concrete values: HER 15050 Alloy Alloy2 12050 Alloy3 8020 35 30 Scrap Scrap2 20 40 JEC Carbon 020 0.030 Nickel 0.0000040 Chromium 0.013 0.027 TensileStrength 50000 30000 hy Carbon Nickel Chromium Tensile Strength Alloy1 0.0175 0.020 0.035 80000 2 00245 0.030 0.008 40000 Alloy 0.0200 0040 0.012 90000 Scrapt 00310 120000 Scrap2 0.0350 0.055 0.028 70000 0045 0.039 Construct and solve this model in Pyomo by completing the tasks given below 1. (5 points) Import the Pyomo library - Import pyono.environ as pyo ented - Jux Lab 02 Cruz - Jupyter Notebook X Chapter-6-R.pdf X New Tab pyter%20Stuff/Lab%2002%20Cruz.ipynb Lab 02 Cruz Last Checkpoint 2 hours ago (autonaved) View Insert Cell Komol Widgets Help + Run Code import pyomo.environ as pyo 2a. (5 points) Define lists R and that define concrete values for the sets R and C respectively ER - [Alloyi', 'Alloy2', Alloy3', 'Scrapt', 'Scrap2') C. ('Carbon', 'Nickel', 'Chroniun', 'Tensilestrength'] 2b. (5 points) Define dictionaries cand a that define concrete values for the parameters and a fori e Rrespectively C- Alloy1 :150, "Alloy2":120, *Alloy80, Scrap2':35, Scrap2:20 > a- Alloy1':5e, Alloy2:50, Alloy3':20, Scrap':30, Scrap2:40 2c. 6 points) Define dictionanes 1 and u that define concrete values for the parameters, and a forje Crespectively El Carbon":0.020, Nickel":0.000, *Chromium': 0.013, Tensilestrength":50000 u- Carbon: 0.030, Nickel":0.040, "Chromium :0.027, Tensilestrength":80000 Chapter-6-R.pdf New Tab amented - X & Lab 02 Cruz - Jupyter Notebook x supyter%20Stuff/Lab%2002%20Gruzipynb er Lab 02 Cruz Last Checkpoint 2 hours ago (autonaved) Viow Insert Cell Kemel Widgets Help Code + Run C Carbon :0.030, Nickel':0.040, "Chromium':8.027 TensileStrength: 30000 2d. (5 points) Define dictionary that defines concrete values for the parameters for i E Rand / E C Use multidimensional (tup a:h (0.0175, 0.020, 0.035, 6): Alloy, (0.0245, 0.030, 0.688, 40000): "Alloy2. (0.0280, 0.040, 0.012, 9000): Alloy (0.0310, 0.045, 0.039, 120000): "Scrapi (0.0350, 0.855, 0.028. 78000): 'Scrap2 3 3. (5 points) Initialize a concrete model named model to]: model - pyo.Concret Model() 4. (6 points) Define the decision variables x, fori e Ras nodel. Make sure you specify the nonnegativity We'll tackle their uppen constraints 41]: model.x - pyo.Var(,domain-pyo. NonegativeReals) 5. (10 points) Define the objective function as model.ob 4211 det oby.rule (model): return sun(c[1] model.x[] for 1 in A) model.obj - pyo. Objective(rule - ob rule, sense - pyo.maximize) 11: (5 points) Define the piece is 100 tons constraint as Bodel.piece. xy = tons of raw material i used for i ER IGR Objective function and constraints. min , (total cost) s.t. Ex; = 100 (piece is 100 tons) Ex nyx forj EC (characteristic requirements) nx, Su Xx forj EC (characteristic requirements) IGR IER IGR IGR TER OS X Sa for i ER (nonnegativity, availability of raw materials) 6a. (5 points) Define the "piece is 100 tons" constraint as model.piece. In [53]: def consti rule(model, i): return model.x[i] == 108| model.piece = pyo.Constraint(R, rule=Consti_rule) hin Recal Exercise 2 13 from Rader (the Midwest Steel problem), assigned for homework We can formulate this problemas a linear program as to Sets Reset of riw material Alloyl. Alloy2. Alloy. Scrapl. Scrap21 C = set of characteristien Carbon, Nickel, Chromium, TensileStrength Parameters cost of raw material for IGR of raw material available for IGR y value of characteristic / in raw material foric RJEC 4, lower bound for characteristic for C , = upper bound for characteristic for jeg Decision variables x = tom of raw material wood foric R Objective function and constraints min (total cost) At Xx = 100 (piece is 100 tons) xx for CC (characteristic requirements) Eh, , Xx for jeC (characteristic requirements) OSXSQ for i GR (nonegativity, availability of raw materials) The sets above have the folowing concrete values R = Alloyl, Alloy 2. Alloy 3, Scrupl, Serup2) C=Cubon, Nickel, Chromium. TemileStrength The parameters above have the following concrete values Alloy 15050 Niloya 12050 A Bet 250 So 2000 Tec Cartoon 0.0200.000 N 0.0000010 Chromium 00 000 Tength coco,CO hy A Alley Asya Carbon NICU COM Triste strength OD 0.000 0.006 00000 00 0.00 a.com 40000 10260 0.00 0.012 00310 0.45 120000 0 0166 0.00 70000 Construct and solve this modern Pyoma by completing the tasks given below 1:05 points) import the promobrary X Lab 02 Cruz - Jupyter Notebook RC=set of raw materials (Alloy 20 Stuft/Lab%62002%20cruzipynb juplyter Lab 02 C 5 1.1 room TH 1 Outerworth 2. prestations to the wedi Alta, 112 15 Se . AL Alisya Ally20 10 " 2.3 point Definitions de defect value for the past, and will carte, Noli Chois "stretto Corso MO Chen Telstrength 2000 2d. 5 porte Deine dictionary that des concrete values for the patie Runde Uma multidimension play. In 10 30.678.830, 0.635. Alloy (2,040, 0.01), Ay)" 2. ... .008.) A 0.011 45.00, 120000 Srl (ees. 255, 220.000 Sera 2.15 ports in a concrete model nameddel 4 Sport Define the decision was forces de Mesure you plytheongenity Wepper bonde later constraints TA (45 ml po vardarpoval) 110 perts Dutre the objective turetion as 60 EN 14 Overdel return for 1 in model.jpyo.Goject rullrulle pyo. TA hented - X Lab 02 Cruz - Jupyter Notebook X Chapter 6-R.pdf New Tab yter%20Stuff/Lal:%2002%20cruzipynb Lab 02 Cruz Last Checkpoint 2 hours ago (autosaved) View Insert Cel Kernel Widgets Help 2 + Run Code Your assignment Recall Exercise 2 13 from Rader (the Midwest Steel problem), assigned for homework. We can formulate this problem as a linear pro Sets. R = set of raw materials = Alloy 1. Alloy2. Alloy3, Scrapl. Scrap21 C = set of characteristics = (Carbon, Nickel, Chromium, TensileStrength) Parameters. 4 = cost of raw material / for IER 4. = amount of raw material i available for i ER hy = value of characteristic / in raw material for i E R.JEC 6, = lower bound for characteristic for EC #} = upper bound for characteristic for EC Decision variables. * = tons of raw material i used for i ER Objective function and constraints. min , (total cost) re s. = 100 (piece is 100 tons) HER XS LeR eR for JEC (characteristic requirements) ,, , , * for) EC (characteristic requirements) 03*, Sa for IER (nonegativity, availability of raw materials) ER The sels above have the following concrete values. R= (Alloy. Alloy2. Alloy 3. Scrapl. Scrap2) C = (Carbon, Nickel, Chromium. TensileStrength) The parameters above have the following concrete values Chapter 6-R.pdf New mmented - Jux Lab 02 Cruz - Jupyter Notebook x upyter%20Stuft/Lab%2002%20Cruz.ipynb er Lab 02 Cruz Last Checkpoint 2 hours ago (autosaved) View Insert Cell Kamel Widgets Help Run Code The sets above have the following concrete values R = Alloy I. Alloy2. Alloy 3, Scrapl. Scrap2) C = (Carbon, Nickel. Chromium, TensileStrength The parameters above have the following concrete values: HER 15050 Alloy Alloy2 12050 Alloy3 8020 35 30 Scrap Scrap2 20 40 JEC Carbon 020 0.030 Nickel 0.0000040 Chromium 0.013 0.027 TensileStrength 50000 30000 hy Carbon Nickel Chromium Tensile Strength Alloy1 0.0175 0.020 0.035 80000 2 00245 0.030 0.008 40000 Alloy 0.0200 0040 0.012 90000 Scrapt 00310 120000 Scrap2 0.0350 0.055 0.028 70000 0045 0.039 Construct and solve this model in Pyomo by completing the tasks given below 1. (5 points) Import the Pyomo library - Import pyono.environ as pyo ented - Jux Lab 02 Cruz - Jupyter Notebook X Chapter-6-R.pdf X New Tab pyter%20Stuff/Lab%2002%20Cruz.ipynb Lab 02 Cruz Last Checkpoint 2 hours ago (autonaved) View Insert Cell Komol Widgets Help + Run Code import pyomo.environ as pyo 2a. (5 points) Define lists R and that define concrete values for the sets R and C respectively ER - [Alloyi', 'Alloy2', Alloy3', 'Scrapt', 'Scrap2') C. ('Carbon', 'Nickel', 'Chroniun', 'Tensilestrength'] 2b. (5 points) Define dictionaries cand a that define concrete values for the parameters and a fori e Rrespectively C- Alloy1 :150, "Alloy2":120, *Alloy80, Scrap2':35, Scrap2:20 > a- Alloy1':5e, Alloy2:50, Alloy3':20, Scrap':30, Scrap2:40 2c. 6 points) Define dictionanes 1 and u that define concrete values for the parameters, and a forje Crespectively El Carbon":0.020, Nickel":0.000, *Chromium': 0.013, Tensilestrength":50000 u- Carbon: 0.030, Nickel":0.040, "Chromium :0.027, Tensilestrength":80000 Chapter-6-R.pdf New Tab amented - X & Lab 02 Cruz - Jupyter Notebook x supyter%20Stuff/Lab%2002%20Gruzipynb er Lab 02 Cruz Last Checkpoint 2 hours ago (autonaved) Viow Insert Cell Kemel Widgets Help Code + Run C Carbon :0.030, Nickel':0.040, "Chromium':8.027 TensileStrength: 30000 2d. (5 points) Define dictionary that defines concrete values for the parameters for i E Rand / E C Use multidimensional (tup a:h (0.0175, 0.020, 0.035, 6): Alloy, (0.0245, 0.030, 0.688, 40000): "Alloy2. (0.0280, 0.040, 0.012, 9000): Alloy (0.0310, 0.045, 0.039, 120000): "Scrapi (0.0350, 0.855, 0.028. 78000): 'Scrap2 3 3. (5 points) Initialize a concrete model named model to]: model - pyo.Concret Model() 4. (6 points) Define the decision variables x, fori e Ras nodel. Make sure you specify the nonnegativity We'll tackle their uppen constraints 41]: model.x - pyo.Var(,domain-pyo. NonegativeReals) 5. (10 points) Define the objective function as model.ob 4211 det oby.rule (model): return sun(c[1] model.x[] for 1 in A) model.obj - pyo. Objective(rule - ob rule, sense - pyo.maximize) 11: (5 points) Define the piece is 100 tons constraint as Bodel.piece
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
