{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "5jDthKd8zoSX", "tags": [] }, "source": [ "# Homework Assignment 2: Optimization\n", "\n", "Homework assigment 4 is intended to develop your skills in creating linear programming models. The lecture notes (notebook 5.2) will provide with a starting point for the following exercises. The problem data has been changed to provide a more meaningful example for sensitivity analysis.\n", "\n", "\n", "You have been placed in charge of a metals reuse operation. A collection of raw materials are available with key parameters given in the following table.\n", "\n", "| material | % carbon (C) | % copper (Cu) | % manganese (Mn) | amount (kg) | cost (\\$/kg) | type |\n", "| :---: | :---: | :---: | :---: | :---: | :---: | :---\n", "| A | 2.5 | 0.0 | 1.3 | 4000 | 1.20 | iron alloy\n", "| B | 3.0 | 0.0 | 0.8 | 3000 | 1.50 | iron alloy\n", "| C | 0.0 | 0.3 | 0.0 | 6000 | 0.90 | iron alloy\n", "| D | 0.0 | 90.0 | 0.0 | 5000 | 1.30 | copper alloy\n", "| E | 0.0 | 96.0 | 4.0 | 2000 | 1.45 | copper alloy\n", "| F | 0.0 | 0.4 | 1.2 | 3000 | 1.20 | aluminum alloy\n", "| G | 0.0 | 0.6 | 0.0 | 2500 | 1.00 | aluminum alloy\n", "\n", "A customer has requested 5000 kg of mix satisfying these specifications:\n", "\n", "| Component | min % | max % |\n", "| :---: | :---: | :---: |\n", "| C | 2.0 | 3.0 |\n", "| Cu | 0.4 | 0.6 |\n", "| Mn | 1.2 | 1.65 |\n", "\n", "For convenience, the raw material data has been organized as a nested dictionaries." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "executionInfo": { "elapsed": 351, "status": "ok", "timestamp": 1617821702648, "user": { "displayName": "Jeffrey Kantor", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14Gg_n8V7bVINy02QRuRgOoMo11Ri7NKU3OUKdC1bkQ=s64", "userId": "09038942003589296665" }, "user_tz": 240 }, "id": "cwM6Z9es1HCJ" }, "outputs": [ { "data": { "text/html": [ "
\n", " | C | \n", "Cu | \n", "Mn | \n", "amount | \n", "cost | \n", "
---|---|---|---|---|---|
A | \n", "2.5 | \n", "0.0 | \n", "1.3 | \n", "4000.0 | \n", "1.20 | \n", "
B | \n", "3.0 | \n", "0.0 | \n", "0.8 | \n", "3000.0 | \n", "1.50 | \n", "
C | \n", "0.0 | \n", "0.3 | \n", "0.0 | \n", "6000.0 | \n", "0.90 | \n", "
D | \n", "0.0 | \n", "90.0 | \n", "0.0 | \n", "5000.0 | \n", "1.30 | \n", "
E | \n", "0.0 | \n", "96.0 | \n", "4.0 | \n", "2000.0 | \n", "1.45 | \n", "
F | \n", "0.0 | \n", "0.4 | \n", "1.2 | \n", "3000.0 | \n", "1.20 | \n", "
G | \n", "0.0 | \n", "0.6 | \n", "0.0 | \n", "2500.0 | \n", "1.00 | \n", "