AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Matlab simplex method9/17/2023 ![]() ![]() ![]() % compute the inital basic feasible solution % Create the initial Basis matrix, compute its inverse and % Initialize the vector of decision variables % NOTE: Replace 12345X with your own student numberįunction = SXXXXX(A,b,c,C) % f_opt: Objective function value at the optimal solution % x_opt: Decision variable values at the optimal solution % C: The indices of the basic variables corresponding to an ![]() % The function input parameters are the following: Here's the code I wrote: %% Implementation of the revised Simplex. The vector u is transformed into a unit vector with u(l_out) = 1 and u(i) = 0 for other i. The problem is only related to a part of the code, the one in the bottom of the script aiming at:Ĭomputing the new inverse basis B^-1 by performing elementary row operations on (pivot row index is l_out). The code I wrote runs without problems with input data although I've realised it doesn't solve the problem properly, as it does not update the inverse of the basis B (the real core idea of the abovementioned method). I've been asked to write down a Matlab program in order to solve LPs using the Revised Simplex Method. ![]()
0 Comments
Read More
Leave a Reply. |