diff options
author | Harpreet | 2015-12-22 15:54:28 +0530 |
---|---|---|
committer | Harpreet | 2015-12-22 15:54:28 +0530 |
commit | 6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24 (patch) | |
tree | 9501c5e1123426ab0b91d2e668902bd2b8d2a356 /macros/symphonymat.sci | |
parent | 79583a44468943fad22ba1de2dd25dd86f7be167 (diff) | |
download | symphony-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.tar.gz symphony-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.tar.bz2 symphony-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.zip |
Bugs fixed 3
Diffstat (limited to 'macros/symphonymat.sci')
-rw-r--r-- | macros/symphonymat.sci | 36 |
1 files changed, 18 insertions, 18 deletions
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 |