Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Do only question 3 please by using Matlab, Gusek, and Octeve show the scripts(co

ID: 3882967 • Letter: D

Question

Do only question 3 please by using Matlab, Gusek, and Octeve

show the scripts(code) and the optimal solutions

Consider the LP (1)-(5). min zeta = 6x_1 + 8x_2 - 6x_3 - x_4 s.t. 9x_1 - x_3 + 3x_2 - x_4 lessthanorequalto 30 17x_1 + x_2 - 2x_4 greaterthanorequalto -20 4x_1 + x_4 + 6x_3 - 5x_2 = 6.7 -3 lessthanorequalto x_1 lessthanorequalto 15, x_2 greaterthanorequalto 6.5, x_3 lessthanorequalto -2, x_4 free. Reformulate LP (1)-(5) to the following matrix form min_x {c^T x: lb lessthanorequalto Ax lessthanorequalto ub, lx lessthanorequalto x lessthanorequalto ux}. What are the parameters A, lb, ub, c, lx, ux for this matrix form? Solve the LP (1)-(5) using Gusek, Matlab linprog, and Octave glpk. Submit screenshots of your codes and outputs (showing the optimal solution and the optimal objective value). Solve the LP (1)-(5) with x_1 and x_4 required to be integers using Gusek, Matlab intlinprog, and Octave glpk. Submit screenshots of your codes and outputs (showing the optimal solution and the optimal objective value).

Explanation / Answer

MATLAB Code :

%% Matlab Code for linear Programming.
clc;
close all;
clear;
%% Program Starts here
f = [6;8;-6;-1];
intcon = [1,4];
A=[9 3 -1 -1;
    -17 -1 0 2;
    ]
b=[30;20];
Aeq = [4,-5,6,1];
beq = 6.7;
lb = [-3;6.5;-Inf;-Inf];
ub = [15;Inf;-2;Inf];
x = intlinprog(f,intcon,A,b,Aeq,beq,lb,ub)

OUTPUT:


A =

     9     3    -1    -1
   -17    -1     0     2

LP:                Optimal objective value is 43.160000.                                          

Cut Generation:    Applied 3 Gomory cuts.                                                         
                   Lower bound is 52.800000.                                                      
                   Relative gap is 0.00%.                                                        


Optimal solution found.

Intlinprog stopped at the root node because the objective value is within a gap tolerance of
the optimal value, options.TolGapAbs = 0 (the default value). The intcon variables are
integer within tolerance, options.TolInteger = 1e-05 (the default value).


x =

    4.0000
    6.5000
   -2.1333
   36.0000

>>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote