Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An LP model is expressed in terms of its technology matrix (A), RHS vector(b), and cost vector (c) in an Excel file named 'Params.xlsx'

   

An LP model is expressed in terms of its technology matrix (A), RHS vector(b), and cost vector (c) in an Excel file named 'Params.xlsx' with 3 sheets (attached). We would like to minimize the objective function. Write a Python code (or any other programming language) in Jupyter notebook that does the following steps: 1. Read each sheet of the Excel file and create A, b, and c. 2. Define a function called 'Min-Vector'. This function declares the model, adds all the decision variables and constraints to it, sets the objective, and writes the model into a file called 'Primal.lp'. Name your variables r in this function. 3. Solve the model. 4. Define another function called 'print_solution' which takes a model as input, and prints all the decision variables that have a positive optimal value next to their names. It also prints the optimal value of the objective function. 5. Define another function called 'Max-Vector' with all the functionalities of the 'Min-Vector' function. This 'Max Vector function should solve the dual of the original problem defined by A, b, and c. Name your variables in this function and write the model into a file called 'Dual.lp'. 6. Solve the dual model. 7. Use the 'print solution' function that you previously defined to print the solutions of the dual model. Verify that the optimal value of the objective function is equal for the primal and dual models. Use Markdown cells to put some explanation before every code cell that you use in Jupyter notebook. Submit your Jupyter notebook file along with your primal.lp and dual.lp files.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Step 1 Reading Data from Excel In this step well read the data from the Excel file and create matrices A b and c import pandas as pd Read data from Ex... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management Accounting Information for Decision-Making and Strategy Execution

Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young

6th Edition

137024975, 978-0137024971

More Books

Students also viewed these Programming questions

Question

=+d) State the conclusion from this analysis.

Answered: 1 week ago

Question

Need help with this project! college accounting chapters 1-30

Answered: 1 week ago

Question

When should an organization use stock options?

Answered: 1 week ago

Question

3. Explain inductive analysis.

Answered: 1 week ago

Question

1. Describe qualitative research and its assumptions.

Answered: 1 week ago