diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/lsqlin.bin | bin | 52068 -> 52024 bytes | |||
-rw-r--r-- | macros/lsqlin.sci | 22 | ||||
-rw-r--r-- | macros/qpipopt.bin | bin | 49652 -> 49616 bytes | |||
-rw-r--r-- | macros/qpipopt.sci | 18 | ||||
-rw-r--r-- | macros/qpipoptmat.bin | bin | 51408 -> 51240 bytes | |||
-rw-r--r-- | macros/qpipoptmat.sci | 50 | ||||
-rw-r--r-- | macros/symphony.bin | bin | 54824 -> 54820 bytes | |||
-rw-r--r-- | macros/symphony.sci | 16 | ||||
-rw-r--r-- | macros/symphonymat.bin | bin | 60900 -> 60724 bytes | |||
-rw-r--r-- | macros/symphonymat.sci | 36 |
10 files changed, 71 insertions, 71 deletions
diff --git a/macros/lsqlin.bin b/macros/lsqlin.bin Binary files differindex d7fccb3..ce5d4a4 100644 --- a/macros/lsqlin.bin +++ b/macros/lsqlin.bin diff --git a/macros/lsqlin.sci b/macros/lsqlin.sci index 1dc1fd5..08554e1 100644 --- a/macros/lsqlin.sci +++ b/macros/lsqlin.sci @@ -22,19 +22,19 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin) // [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin( ... ) // // Parameters - // C : a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x. - // d : a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations. - // A : a vector of doubles, represents the linear coefficients in the inequality constraints - // b : a vector of doubles, represents the linear coefficients in the inequality constraints - // Aeq : a matrix of doubles, represents the linear coefficients in the equality constraints - // beq : a vector of doubles, represents the linear coefficients in the equality constraints - // LB : a vector of doubles, contains lower bounds of the variables. - // UB : a vector of doubles, contains upper bounds of the variables. - // x0 : a vector of doubles, contains initial guess of variables. + // C : a matrix of double, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x. + // d : a vector of double, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations. + // A : a vector of double, represents the linear coefficients in the inequality constraints + // b : a vector of double, represents the linear coefficients in the inequality constraints + // Aeq : a matrix of double, represents the linear coefficients in the equality constraints + // beq : a vector of double, represents the linear coefficients in the equality constraints + // LB : a vector of double, contains lower bounds of the variables. + // UB : a vector of double, contains upper bounds of the variables. + // x0 : a vector of double, contains initial guess of variables. // param : a list containing the the parameters to be set. - // xopt : a vector of doubles, the computed solution of the optimization problem. + // xopt : a vector of double, the computed solution of the optimization problem. // resnorm : a double, objective value returned as the scalar value norm(C*x-d)^2. - // residual : a vector of doubles, solution residuals returned as the vector C*x-d. + // residual : a vector of double, solution residuals returned as the vector C*x-d. // exitflag : Integer identifying the reason the algorithm terminated. // output : Structure containing information about the optimization. Right now it contains number of iteration. // lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints. diff --git a/macros/qpipopt.bin b/macros/qpipopt.bin Binary files differindex 584f327..f4b14b9 100644 --- a/macros/qpipopt.bin +++ b/macros/qpipopt.bin diff --git a/macros/qpipopt.sci b/macros/qpipopt.sci index affd061..6a53693 100644 --- a/macros/qpipopt.sci +++ b/macros/qpipopt.sci @@ -22,16 +22,16 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin) // Parameters // nbVar : a double, number of variables // nbCon : a double, number of constraints - // Q : a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem. - // p : a vector of doubles, represents coefficients of linear in the quadratic problem - // LB : a vector of doubles, contains lower bounds of the variables. - // UB : a vector of doubles, contains upper bounds of the variables. - // conMatrix : a matrix of doubles, contains matrix representing the constraint matrix - // conLB : a vector of doubles, contains lower bounds of the constraints. - // conUB : a vector of doubles, contains upper bounds of the constraints. - // x0 : a vector of doubles, contains initial guess of variables. + // Q : a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem. + // p : a vector of double, represents coefficients of linear in the quadratic problem + // LB : a vector of double, contains lower bounds of the variables. + // UB : a vector of double, contains upper bounds of the variables. + // conMatrix : a matrix of double, contains matrix representing the constraint matrix + // conLB : a vector of double, contains lower bounds of the constraints. + // conUB : a vector of double, contains upper bounds of the constraints. + // x0 : a vector of double, contains initial guess of variables. // param : a list containing the the parameters to be set. - // xopt : a vector of doubles, the computed solution of the optimization problem. + // xopt : a vector of double, the computed solution of the optimization problem. // fopt : a double, the function value at x. // exitflag : Integer identifying the reason the algorithm terminated. // output : Structure containing information about the optimization. Right now it contains number of iteration. diff --git a/macros/qpipoptmat.bin b/macros/qpipoptmat.bin Binary files differindex ad893f2..89ce559 100644 --- a/macros/qpipoptmat.bin +++ b/macros/qpipoptmat.bin diff --git a/macros/qpipoptmat.sci b/macros/qpipoptmat.sci index eec93ce..e9ed9a5 100644 --- a/macros/qpipoptmat.sci +++ b/macros/qpipoptmat.sci @@ -23,17 +23,17 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin) // [xopt,fopt,exitflag,output,lamda] = qpipoptmat( ... ) // // Parameters - // H : a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem. - // f : a vector of doubles, represents coefficients of linear in the quadratic problem - // A : a vector of doubles, represents the linear coefficients in the inequality constraints - // b : a vector of doubles, represents the linear coefficients in the inequality constraints - // Aeq : a matrix of doubles, represents the linear coefficients in the equality constraints - // beq : a vector of doubles, represents the linear coefficients in the equality constraints - // LB : a vector of doubles, contains lower bounds of the variables. - // UB : a vector of doubles, contains upper bounds of the variables. - // x0 : a vector of doubles, contains initial guess of variables. + // H : a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem. + // f : a vector of double, represents coefficients of linear in the quadratic problem + // A : a vector of double, represents the linear coefficients in the inequality constraints + // b : a vector of double, represents the linear coefficients in the inequality constraints + // Aeq : a matrix of double, represents the linear coefficients in the equality constraints + // beq : a vector of double, represents the linear coefficients in the equality constraints + // LB : a vector of double, contains lower bounds of the variables. + // UB : a vector of double, contains upper bounds of the variables. + // x0 : a vector of double, contains initial guess of variables. // param : a list containing the the parameters to be set. - // xopt : a vector of doubles, the computed solution of the optimization problem. + // xopt : a vector of double, the computed solution of the optimization problem. // fopt : a double, the function value at x. // exitflag : Integer identifying the reason the algorithm terminated. // output : Structure containing information about the optimization. Right now it contains number of iteration. @@ -65,7 +65,7 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin) // // 0 ≤ x1, 0 ≤ x2. // H = [1 -1; -1 2]; // f = [-2; -6]; - // A = [1 1; -1 2; 2 1]; + // A = [1 1; -1 2; 2 1]; // b = [2; 2; 3]; // lb = [0; 0]; // ub = [%inf; %inf]; @@ -73,21 +73,21 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin) // // Press ENTER to continue // // Examples - // //Find x in R^6 such that: - // Aeq= [1,-1,1,0,3,1; - // -1,0,-3,-4,5,6; - // 2,5,3,0,1,0]; - // beq=[1; 2; 3]; - // A= [0,1,0,1,2,-1; - // -1,0,2,1,1,0]; - // b = [-1; 2.5]; - // lb=[-1000; -10000; 0; -1000; -1000; -1000]; - // ub=[10000; 100; 1.5; 100; 100; 1000]; - // x0 = repmat(0,6,1); + // //Find x in R^6 such that: + // Aeq= [1,-1,1,0,3,1; + // -1,0,-3,-4,5,6; + // 2,5,3,0,1,0]; + // beq=[1; 2; 3]; + // A= [0,1,0,1,2,-1; + // -1,0,2,1,1,0]; + // b = [-1; 2.5]; + // lb=[-1000; -10000; 0; -1000; -1000; -1000]; + // ub=[10000; 100; 1.5; 100; 100; 1000]; + // x0 = repmat(0,6,1); // param = list("MaxIter", 300, "CpuTime", 100); - // //and minimize 0.5*x'*Q*x + p'*x with - // f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); - // [xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param) + // //and minimize 0.5*x'*H*x + f'*x with + // f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); + // [xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param) // Authors // Keyur Joshi, Saikiran, Iswarya, Harpreet Singh diff --git a/macros/symphony.bin b/macros/symphony.bin Binary files differindex 4bca695..562f5cc 100644 --- a/macros/symphony.bin +++ b/macros/symphony.bin diff --git a/macros/symphony.sci b/macros/symphony.sci index b1a6f28..cc05dcd 100644 --- a/macros/symphony.sci +++ b/macros/symphony.sci @@ -21,16 +21,16 @@ function [xopt,fopt,status,output] = symphony (varargin) // Parameters // nbVar : a double, number of variables. // nbCon : a double, number of constraints. - // objCoeff : a vector of doubles, represents coefficients of the variables in the objective. + // objCoeff : a vector of double, represents coefficients of the variables in the objective. // isInt : a vector of boolean, represents wether a variable is constrained to be an integer. - // LB : a vector of doubles, represents lower bounds of the variables. - // UB : a vector of doubles, represents upper bounds of the variables. - // conMatrix : a matrix of doubles, represents matrix representing the constraint matrix. - // conLB : a vector of doubles, represents lower bounds of the constraints. - // conUB : a vector of doubles, represents upper bounds of the constraints + // LB : a vector of double, represents lower bounds of the variables. + // UB : a vector of double, represents upper bounds of the variables. + // conMatrix : a matrix of double, represents matrix representing the constraint matrix. + // conLB : a vector of double, represents lower bounds of the constraints. + // conUB : a vector of double, represents upper bounds of the constraints // objSense : The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here. // options : a a list containing the the parameters to be set. - // xopt : a vector of doubles, the computed solution of the optimization problem. + // xopt : a vector of double, the computed solution of the optimization problem. // fopt : a double, the function value at x. // status : status flag from symphony. // output : The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration. @@ -54,7 +54,7 @@ function [xopt,fopt,status,output] = symphony (varargin) // Examples // //A basic case : // // Objective function - // c = [350*5,330*3,310*4,280*6,500,450,400,100]'; + // objCoef = [350*5,330*3,310*4,280*6,500,450,400,100]'; // // Lower Bound of variable // lb = repmat(0,8,1); // // Upper Bound of variables diff --git a/macros/symphonymat.bin b/macros/symphonymat.bin Binary files differindex 08b1616..c123d3c 100644 --- a/macros/symphonymat.bin +++ b/macros/symphonymat.bin diff --git a/macros/symphonymat.sci b/macros/symphonymat.sci index 40b07eb..f7e08ac 100644 --- a/macros/symphonymat.sci +++ b/macros/symphonymat.sci @@ -13,24 +13,24 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // Solves a mixed integer linear programming constrained optimization problem in intlinprog format. // // Calling Sequence - // xopt = symphonymat(f,intcon,A,b) - // xopt = symphonymat(f,intcon,A,b,Aeq,beq) - // xopt = symphonymat(f,intcon,A,b,Aeq,beq,lb,ub) - // xopt = symphonymat(f,intcon,A,b,Aeq,beq,lb,ub,options) + // xopt = symphonymat(C,intcon,A,b) + // xopt = symphonymat(C,intcon,A,b,Aeq,beq) + // xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub) + // xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub,options) // [xopt,fopt,status,output] = symphonymat( ... ) // // Parameters - // f : a vector of doubles, contains coefficients of the variables in the objective + // f : a vector of double, contains coefficients of the variables in the objective // intcon : Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable. - // A : Linear inequality constraint matrix, specified as a matrix of doubles. A represents the linear coefficients in the constraints A*x ≤ b. A has size M-by-N, where M is the number of constraints and N is number of variables - // b : Linear inequality constraint vector, specified as a vector of doubles. b represents the constant vector in the constraints A*x ≤ b. b has length M, where A is M-by-N - // Aeq : Linear equality constraint matrix, specified as a matrix of doubles. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has size Meq-by-N, where Meq is the number of constraints and N is number of variables - // beq : Linear equality constraint vector, specified as a vector of doubles. beq represents the constant vector in the constraints Aeq*x = beq. beq has length Meq, where Aeq is Meq-by-N. - // lb : Lower bounds, specified as a vector or array of doubles. lb represents the lower bounds elementwise in lb ≤ x ≤ ub. - // ub : Upper bounds, specified as a vector or array of doubles. ub represents the upper bounds elementwise in lb ≤ x ≤ ub. + // A : Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has size M-by-N, where M is the number of constraints and N is number of variables + // b : Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has length M, where A is M-by-N + // Aeq : Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has size Meq-by-N, where Meq is the number of constraints and N is number of variables + // beq : Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has length Meq, where Aeq is Meq-by-N. + // lb : Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub. + // ub : Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub. // options : a list containing the the parameters to be set. // xopt : a vector of double, the computed solution of the optimization problem - // fopt : a doubles, the function value at x + // fopt : a double, the function value at x // status : status flag from symphony. // output : The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration. // @@ -41,7 +41,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // <latex> // \begin{eqnarray} // &\mbox{min}_{x} - // & f^T*x \\ + // & C^T*x \\ // & \text{subject to} & A*x \leq b \\ // & & Aeq*x = beq \\ // & & lb \leq x \leq ub \\ @@ -53,7 +53,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // // Examples // // Objective function - // c = [350*5,330*3,310*4,280*6,500,450,400,100]'; + // C = [350*5,330*3,310*4,280*6,500,450,400,100]'; // // Lower Bound of variable // lb = repmat(0,1,8); // // Upper Bound of variables @@ -79,7 +79,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // // st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m // // x(j)=0 or 1 // // The function to be maximize i.e. P(j) - // objCoef = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 .. + // C = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 .. // 825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 .. // 877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 .. // 957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 .. @@ -87,7 +87,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // 510 671 575 740 510 675 996 636 826 1022 1140 654 909 799 .. // 1162 653 814 625 599 476 767 954 906 904 649 873 565 853 1008 632]'; // //Constraint Matrix - // conMatrix = [ //Constraint 1 + // A = [ //Constraint 1 // 42 41 523 215 819 551 69 193 582 375 367 478 162 898 .. // 550 553 298 577 493 183 260 224 852 394 958 282 402 604 .. // 164 308 218 61 273 772 191 117 276 877 415 873 902 465 .. @@ -129,7 +129,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // 893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ; // ]; // nbVar = size(objCoef,1) - // conUB=[11927 13727 11551 13056 13460 ]; + // b=[11927 13727 11551 13056 13460 ]; // // Lower Bound of variables // lb = repmat(0,1,nbVar) // // Upper Bound of variables @@ -148,7 +148,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin) // // Optimal value // fopt = [ 24381 ] // // Calling Symphony - // [x,f,status,output] = symphonymat(objCoef,intcon,conMatrix,conUB,[],[],lb,ub,options); + // [x,f,status,output] = symphonymat(C,intcon,A,b,[],[],lb,ub,options); // Authors // Keyur Joshi, Saikiran, Iswarya, Harpreet Singh |