Question 1: (15 points)
Use Python programming to implement the iterative details of the following three algorithms: classical simplex method, dual simplex method, and generalized simplex method. The requirements are given as follows:
1. Use the concept of “class” learned in Python to program. You can define three classes or three algorithms within one class. ( 3 points )
2. In the class, there needs to be interfaces that accept linear programming coefficients and can read and write external data. You can use database (such as Excel, Mysql, etc) to store these data. Meanwhile, you need to care about the data structure. ( 3 points )
3. The generalized simplex method can be developed using the idea of inheritance. ( 3 points )
4. This class should have universality and can be tested using different cases. (3 points )
5. Brain storm: Suppose you are designing a robot where he/she is reading a linear programming case. Please provide a detailed explanation of your specific approach to the following questions. ( 3 points )
a) How to enable robot to recognize that this is a linear programming problem.
b) How robot construct the objectives and constraints of linear programming.
c) How can robot choose the appropriate simplicity method to calculate this case.
d) In this case, how can you design human-computer interaction to be more user-friendly?
Note: If the program cannot run, a grace score will be given, such as 1 point. If it can run, but the results of your own cases are not correct, give a score of 40%. If your own case result is correct, but it can’t pass the test of someone else's cases, give half the score. If it can be run, other students' cases can also be tested, give full marks.
Question 2: ( 10 points, each method 5 points)
In linear programming, we can consider using the northwest corner method and the least-cost method to provide initial values for the problem. Please try to use the idea of “class” to write the iterative steps for these two algorithms. The requirements are as follows:
1. Interface for reading and writing data ( 1 points )
2. The method has universality ( 1 points )
3. It has the abnormal error reporting ( 1 points )
4. Comments should be clear ( 1 points )
5. The algorithm should be able to stop ( 1 points )