Solves a linear programming problem.
xopt = linprog(c,A,b) xopt = linprog(c,A,b,Aeq,beq) xopt = linprog(c,A,b,Aeq,beq,lb,ub) xopt = linprog(c,A,b,Aeq,beq,lb,ub,param) xopt = linprog(file) xopt = linprog(file,param) [xopt,fopt,exitflag,output,lambda] = linprog( ... )
a vector of double, contains coefficients of the variables in the objective
a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.
a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.
Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.
Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.
a list containing the parameters to be set.
a string describing the path to the mps file.
a vector of double, the computed solution of the optimization problem.
a double, the value of the function at x.
status flag returned from symphony. See below for details.
The output data structure contains detailed information about the optimization process. See below for details.
The structure consist of the Lagrange multipliers at the solution of problem. See below for details.
OSI-CLP is used for solving the linear programming problems, OSI-CLP is a library written in C++. Search the minimum of a constrained linear programming problem specified by :
The routine calls Clp for solving the linear programming problem, Clp is a library written in C++.
The options allows the user to set various parameters of the Optimization problem. It should be defined as type "list" and contains the following fields. In the current version it only contains maxiter.
The exitflag allows to know the status of the optimization which is given back by CLP.
The output data structure contains detailed informations about the optimization process. It has type "struct" and contains the following fields.
The lambda data structure contains the Lagrange multipliers at the end of optimization. In the current version the values are returned only when the the solution is optimal. It has type "struct" and contains the following fields.
filepath = get_absolute_file_path('linprog.dem.sce'); filepath = filepath + "exmip1.mps" [xopt,fopt,exitflag,output,lambda] =linprog(filepath) |