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 | |
parent | 79583a44468943fad22ba1de2dd25dd86f7be167 (diff) | |
download | FOSSEE-Optimization-toolbox-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.tar.gz FOSSEE-Optimization-toolbox-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.tar.bz2 FOSSEE-Optimization-toolbox-6e9ee19cd67b0b85b7708efa4847c7ebb6d79f24.zip |
Bugs fixed 3
30 files changed, 191 insertions, 191 deletions
diff --git a/demos/qpipoptmat.dem.sce b/demos/qpipoptmat.dem.sce index bbaa42c..0892855 100644 --- a/demos/qpipoptmat.dem.sce +++ b/demos/qpipoptmat.dem.sce @@ -32,7 +32,7 @@ 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 +//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) //========= E N D === O F === D E M O =========// diff --git a/demos/symphony.dem.sce b/demos/symphony.dem.sce index 0449b3a..9dcf6d7 100644 --- a/demos/symphony.dem.sce +++ b/demos/symphony.dem.sce @@ -5,7 +5,7 @@ mode(1) //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/demos/symphonymat.dem.sce b/demos/symphonymat.dem.sce index 9467e78..bc0f67a 100644 --- a/demos/symphonymat.dem.sce +++ b/demos/symphonymat.dem.sce @@ -4,7 +4,7 @@ mode(1) // // 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 @@ -30,7 +30,7 @@ halt() // Press return to continue // 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 .. @@ -38,7 +38,7 @@ objCoef = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 .. 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 .. @@ -80,7 +80,7 @@ conMatrix = [ //Constraint 1 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 @@ -99,5 +99,5 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 .. // 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); //========= E N D === O F === D E M O =========// diff --git a/help/en_US/lsqlin.xml b/help/en_US/lsqlin.xml index 1936e11..73416a9 100644 --- a/help/en_US/lsqlin.xml +++ b/help/en_US/lsqlin.xml @@ -38,31 +38,31 @@ <title>Parameters</title> <variablelist> <varlistentry><term>C :</term> - <listitem><para> 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.</para></listitem></varlistentry> + <listitem><para> 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.</para></listitem></varlistentry> <varlistentry><term>d :</term> - <listitem><para> 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.</para></listitem></varlistentry> + <listitem><para> 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.</para></listitem></varlistentry> <varlistentry><term>A :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> <varlistentry><term>b :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> <varlistentry><term>Aeq :</term> - <listitem><para> a matrix of doubles, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> + <listitem><para> a matrix of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> <varlistentry><term>beq :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> <varlistentry><term>LB :</term> - <listitem><para> a vector of doubles, contains lower bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>UB :</term> - <listitem><para> a vector of doubles, contains upper bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>x0 :</term> - <listitem><para> a vector of doubles, contains initial guess of variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains initial guess of variables.</para></listitem></varlistentry> <varlistentry><term>param :</term> <listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry> <varlistentry><term>xopt :</term> - <listitem><para> a vector of doubles, the computed solution of the optimization problem.</para></listitem></varlistentry> + <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry> <varlistentry><term>resnorm :</term> <listitem><para> a double, objective value returned as the scalar value norm(C*x-d)^2.</para></listitem></varlistentry> <varlistentry><term>residual :</term> - <listitem><para> a vector of doubles, solution residuals returned as the vector C*x-d.</para></listitem></varlistentry> + <listitem><para> a vector of double, solution residuals returned as the vector C*x-d.</para></listitem></varlistentry> <varlistentry><term>exitflag :</term> <listitem><para> Integer identifying the reason the algorithm terminated.</para></listitem></varlistentry> <varlistentry><term>output :</term> diff --git a/help/en_US/qpipopt.xml b/help/en_US/qpipopt.xml index d9a0e6e..23e2c52 100644 --- a/help/en_US/qpipopt.xml +++ b/help/en_US/qpipopt.xml @@ -40,25 +40,25 @@ <varlistentry><term>nbCon :</term> <listitem><para> a double, number of constraints</para></listitem></varlistentry> <varlistentry><term>Q :</term> - <listitem><para> a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem.</para></listitem></varlistentry> + <listitem><para> a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</para></listitem></varlistentry> <varlistentry><term>p :</term> - <listitem><para> a vector of doubles, represents coefficients of linear in the quadratic problem</para></listitem></varlistentry> + <listitem><para> a vector of double, represents coefficients of linear in the quadratic problem</para></listitem></varlistentry> <varlistentry><term>LB :</term> - <listitem><para> a vector of doubles, contains lower bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>UB :</term> - <listitem><para> a vector of doubles, contains upper bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>conMatrix :</term> - <listitem><para> a matrix of doubles, contains matrix representing the constraint matrix</para></listitem></varlistentry> + <listitem><para> a matrix of double, contains matrix representing the constraint matrix</para></listitem></varlistentry> <varlistentry><term>conLB :</term> - <listitem><para> a vector of doubles, contains lower bounds of the constraints.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains lower bounds of the constraints.</para></listitem></varlistentry> <varlistentry><term>conUB :</term> - <listitem><para> a vector of doubles, contains upper bounds of the constraints.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains upper bounds of the constraints.</para></listitem></varlistentry> <varlistentry><term>x0 :</term> - <listitem><para> a vector of doubles, contains initial guess of variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains initial guess of variables.</para></listitem></varlistentry> <varlistentry><term>param :</term> <listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry> <varlistentry><term>xopt :</term> - <listitem><para> a vector of doubles, the computed solution of the optimization problem.</para></listitem></varlistentry> + <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry> <varlistentry><term>fopt :</term> <listitem><para> a double, the function value at x.</para></listitem></varlistentry> <varlistentry><term>exitflag :</term> diff --git a/help/en_US/qpipoptmat.xml b/help/en_US/qpipoptmat.xml index 2ea714d..70150bc 100644 --- a/help/en_US/qpipoptmat.xml +++ b/help/en_US/qpipoptmat.xml @@ -39,27 +39,27 @@ <title>Parameters</title> <variablelist> <varlistentry><term>H :</term> - <listitem><para> a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem.</para></listitem></varlistentry> + <listitem><para> a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</para></listitem></varlistentry> <varlistentry><term>f :</term> - <listitem><para> a vector of doubles, represents coefficients of linear in the quadratic problem</para></listitem></varlistentry> + <listitem><para> a vector of double, represents coefficients of linear in the quadratic problem</para></listitem></varlistentry> <varlistentry><term>A :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> <varlistentry><term>b :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry> <varlistentry><term>Aeq :</term> - <listitem><para> a matrix of doubles, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> + <listitem><para> a matrix of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> <varlistentry><term>beq :</term> - <listitem><para> a vector of doubles, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry> <varlistentry><term>LB :</term> - <listitem><para> a vector of doubles, contains lower bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>UB :</term> - <listitem><para> a vector of doubles, contains upper bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>x0 :</term> - <listitem><para> a vector of doubles, contains initial guess of variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, contains initial guess of variables.</para></listitem></varlistentry> <varlistentry><term>param :</term> <listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry> <varlistentry><term>xopt :</term> - <listitem><para> a vector of doubles, the computed solution of the optimization problem.</para></listitem></varlistentry> + <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry> <varlistentry><term>fopt :</term> <listitem><para> a double, the function value at x.</para></listitem></varlistentry> <varlistentry><term>exitflag :</term> @@ -132,7 +132,7 @@ 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 +//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) ]]></programlisting> diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differindex 9b6386a..90b22d8 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB Binary files differindex 8f3ddaf..8cff552 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS Binary files differindex d668ed6..62368d7 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex 65379cd..c85a3ee 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differindex e2f089a..80e09d1 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png Binary files differindex 94c5200..2d61fb7 100644 --- a/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png +++ b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png diff --git a/help/en_US/scilab_en_US_help/lsqlin.html b/help/en_US/scilab_en_US_help/lsqlin.html index b371871..b843257 100644 --- a/help/en_US/scilab_en_US_help/lsqlin.html +++ b/help/en_US/scilab_en_US_help/lsqlin.html @@ -46,31 +46,31 @@ <div class="refsection"><h3 class="title">Parameters</h3> <dl><dt><span class="term">C :</span> - <dd><p class="para">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.</p></dd></dt> + <dd><p class="para">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.</p></dd></dt> <dt><span class="term">d :</span> - <dd><p class="para">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.</p></dd></dt> + <dd><p class="para">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.</p></dd></dt> <dt><span class="term">A :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the inequality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the inequality constraints</p></dd></dt> <dt><span class="term">b :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the inequality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the inequality constraints</p></dd></dt> <dt><span class="term">Aeq :</span> - <dd><p class="para">a matrix of doubles, represents the linear coefficients in the equality constraints</p></dd></dt> + <dd><p class="para">a matrix of double, represents the linear coefficients in the equality constraints</p></dd></dt> <dt><span class="term">beq :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the equality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the equality constraints</p></dd></dt> <dt><span class="term">LB :</span> - <dd><p class="para">a vector of doubles, contains lower bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt> <dt><span class="term">UB :</span> - <dd><p class="para">a vector of doubles, contains upper bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt> <dt><span class="term">x0 :</span> - <dd><p class="para">a vector of doubles, contains initial guess of variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains initial guess of variables.</p></dd></dt> <dt><span class="term">param :</span> <dd><p class="para">a list containing the the parameters to be set.</p></dd></dt> <dt><span class="term">xopt :</span> - <dd><p class="para">a vector of doubles, the computed solution of the optimization problem.</p></dd></dt> + <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt> <dt><span class="term">resnorm :</span> <dd><p class="para">a double, objective value returned as the scalar value norm(C*x-d)^2.</p></dd></dt> <dt><span class="term">residual :</span> - <dd><p class="para">a vector of doubles, solution residuals returned as the vector C*x-d.</p></dd></dt> + <dd><p class="para">a vector of double, solution residuals returned as the vector C*x-d.</p></dd></dt> <dt><span class="term">exitflag :</span> <dd><p class="para">Integer identifying the reason the algorithm terminated.</p></dd></dt> <dt><span class="term">output :</span> diff --git a/help/en_US/scilab_en_US_help/qpipopt.html b/help/en_US/scilab_en_US_help/qpipopt.html index 7cc0560..d4b6b3c 100644 --- a/help/en_US/scilab_en_US_help/qpipopt.html +++ b/help/en_US/scilab_en_US_help/qpipopt.html @@ -48,25 +48,25 @@ <dt><span class="term">nbCon :</span> <dd><p class="para">a double, number of constraints</p></dd></dt> <dt><span class="term">Q :</span> - <dd><p class="para">a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem.</p></dd></dt> + <dd><p class="para">a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</p></dd></dt> <dt><span class="term">p :</span> - <dd><p class="para">a vector of doubles, represents coefficients of linear in the quadratic problem</p></dd></dt> + <dd><p class="para">a vector of double, represents coefficients of linear in the quadratic problem</p></dd></dt> <dt><span class="term">LB :</span> - <dd><p class="para">a vector of doubles, contains lower bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt> <dt><span class="term">UB :</span> - <dd><p class="para">a vector of doubles, contains upper bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt> <dt><span class="term">conMatrix :</span> - <dd><p class="para">a matrix of doubles, contains matrix representing the constraint matrix</p></dd></dt> + <dd><p class="para">a matrix of double, contains matrix representing the constraint matrix</p></dd></dt> <dt><span class="term">conLB :</span> - <dd><p class="para">a vector of doubles, contains lower bounds of the constraints.</p></dd></dt> + <dd><p class="para">a vector of double, contains lower bounds of the constraints.</p></dd></dt> <dt><span class="term">conUB :</span> - <dd><p class="para">a vector of doubles, contains upper bounds of the constraints.</p></dd></dt> + <dd><p class="para">a vector of double, contains upper bounds of the constraints.</p></dd></dt> <dt><span class="term">x0 :</span> - <dd><p class="para">a vector of doubles, contains initial guess of variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains initial guess of variables.</p></dd></dt> <dt><span class="term">param :</span> <dd><p class="para">a list containing the the parameters to be set.</p></dd></dt> <dt><span class="term">xopt :</span> - <dd><p class="para">a vector of doubles, the computed solution of the optimization problem.</p></dd></dt> + <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt> <dt><span class="term">fopt :</span> <dd><p class="para">a double, the function value at x.</p></dd></dt> <dt><span class="term">exitflag :</span> diff --git a/help/en_US/scilab_en_US_help/qpipoptmat.html b/help/en_US/scilab_en_US_help/qpipoptmat.html index 8b81cac..2ed139d 100644 --- a/help/en_US/scilab_en_US_help/qpipoptmat.html +++ b/help/en_US/scilab_en_US_help/qpipoptmat.html @@ -47,27 +47,27 @@ <div class="refsection"><h3 class="title">Parameters</h3> <dl><dt><span class="term">H :</span> - <dd><p class="para">a symmetric matrix of doubles, represents coefficients of quadratic in the quadratic problem.</p></dd></dt> + <dd><p class="para">a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</p></dd></dt> <dt><span class="term">f :</span> - <dd><p class="para">a vector of doubles, represents coefficients of linear in the quadratic problem</p></dd></dt> + <dd><p class="para">a vector of double, represents coefficients of linear in the quadratic problem</p></dd></dt> <dt><span class="term">A :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the inequality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the inequality constraints</p></dd></dt> <dt><span class="term">b :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the inequality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the inequality constraints</p></dd></dt> <dt><span class="term">Aeq :</span> - <dd><p class="para">a matrix of doubles, represents the linear coefficients in the equality constraints</p></dd></dt> + <dd><p class="para">a matrix of double, represents the linear coefficients in the equality constraints</p></dd></dt> <dt><span class="term">beq :</span> - <dd><p class="para">a vector of doubles, represents the linear coefficients in the equality constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents the linear coefficients in the equality constraints</p></dd></dt> <dt><span class="term">LB :</span> - <dd><p class="para">a vector of doubles, contains lower bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt> <dt><span class="term">UB :</span> - <dd><p class="para">a vector of doubles, contains upper bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt> <dt><span class="term">x0 :</span> - <dd><p class="para">a vector of doubles, contains initial guess of variables.</p></dd></dt> + <dd><p class="para">a vector of double, contains initial guess of variables.</p></dd></dt> <dt><span class="term">param :</span> <dd><p class="para">a list containing the the parameters to be set.</p></dd></dt> <dt><span class="term">xopt :</span> - <dd><p class="para">a vector of doubles, the computed solution of the optimization problem.</p></dd></dt> + <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt> <dt><span class="term">fopt :</span> <dd><p class="para">a double, the function value at x.</p></dd></dt> <dt><span class="term">exitflag :</span> @@ -114,7 +114,7 @@ find the minimum of f(x) such that</p> <span class="scilabid">ub</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">10000</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.5</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">x0</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> <span class="scilabid">param</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">"</span><span class="scilabstring">MaxIter</span><span class="scilabstring">"</span><span class="scilabdefault">,</span> <span class="scilabnumber">300</span><span class="scilabdefault">,</span> <span class="scilabstring">"</span><span class="scilabstring">CpuTime</span><span class="scilabstring">"</span><span class="scilabdefault">,</span> <span class="scilabnumber">100</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> -<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">'</span><span class="scilabcomment">*Q*x + p</span><span class="scilabcomment">'</span><span class="scilabcomment">*x with</span> +<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">'</span><span class="scilabcomment">*H*x + f</span><span class="scilabcomment">'</span><span class="scilabcomment">*x with</span> <span class="scilabid">f</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</span> <span class="scilabnumber">4</span><span class="scilabdefault">;</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</span> <span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">H</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://eye">eye</a><span class="scilabopenclose">(</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> <span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">qpipoptmat</span><span class="scilabopenclose">(</span><span class="scilabid">H</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">b</span><span class="scilabdefault">,</span><span class="scilabid">Aeq</span><span class="scilabdefault">,</span><span class="scilabid">beq</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">param</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> diff --git a/help/en_US/scilab_en_US_help/symphony.html b/help/en_US/scilab_en_US_help/symphony.html index 9b2bebe..96be830 100644 --- a/help/en_US/scilab_en_US_help/symphony.html +++ b/help/en_US/scilab_en_US_help/symphony.html @@ -48,25 +48,25 @@ <dt><span class="term">nbCon :</span> <dd><p class="para">a double, number of constraints.</p></dd></dt> <dt><span class="term">objCoeff :</span> - <dd><p class="para">a vector of doubles, represents coefficients of the variables in the objective.</p></dd></dt> + <dd><p class="para">a vector of double, represents coefficients of the variables in the objective.</p></dd></dt> <dt><span class="term">isInt :</span> <dd><p class="para">a vector of boolean, represents wether a variable is constrained to be an integer.</p></dd></dt> <dt><span class="term">LB :</span> - <dd><p class="para">a vector of doubles, represents lower bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, represents lower bounds of the variables.</p></dd></dt> <dt><span class="term">UB :</span> - <dd><p class="para">a vector of doubles, represents upper bounds of the variables.</p></dd></dt> + <dd><p class="para">a vector of double, represents upper bounds of the variables.</p></dd></dt> <dt><span class="term">conMatrix :</span> - <dd><p class="para">a matrix of doubles, represents matrix representing the constraint matrix.</p></dd></dt> + <dd><p class="para">a matrix of double, represents matrix representing the constraint matrix.</p></dd></dt> <dt><span class="term">conLB :</span> - <dd><p class="para">a vector of doubles, represents lower bounds of the constraints.</p></dd></dt> + <dd><p class="para">a vector of double, represents lower bounds of the constraints.</p></dd></dt> <dt><span class="term">conUB :</span> - <dd><p class="para">a vector of doubles, represents upper bounds of the constraints</p></dd></dt> + <dd><p class="para">a vector of double, represents upper bounds of the constraints</p></dd></dt> <dt><span class="term">objSense :</span> <dd><p class="para">The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.</p></dd></dt> <dt><span class="term">options :</span> <dd><p class="para">a a list containing the the parameters to be set.</p></dd></dt> <dt><span class="term">xopt :</span> - <dd><p class="para">a vector of doubles, the computed solution of the optimization problem.</p></dd></dt> + <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt> <dt><span class="term">fopt :</span> <dd><p class="para">a double, the function value at x.</p></dd></dt> <dt><span class="term">status :</span> @@ -84,7 +84,7 @@ find the minimum or maximum of f(x) such that</p> <div class="refsection"><h3 class="title">Examples</h3> <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//A basic case :</span> <span class="scilabcomment">// Objective function</span> -<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span> +<span class="scilabid">objCoef</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span> <span class="scilabcomment">// Lower Bound of variable</span> <span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">8</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> <span class="scilabcomment">// Upper Bound of variables</span> diff --git a/help/en_US/scilab_en_US_help/symphonymat.html b/help/en_US/scilab_en_US_help/symphonymat.html index 611010b..c580508 100644 --- a/help/en_US/scilab_en_US_help/symphonymat.html +++ b/help/en_US/scilab_en_US_help/symphonymat.html @@ -37,35 +37,35 @@ <div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3> - <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">f</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span> -<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">f</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span> -<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">f</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span> -<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">f</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">options</span><span class="default">)</span> + <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span> +<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span> +<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span> +<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">options</span><span class="default">)</span> <span class="default">[</span><span class="default">xopt</span><span class="default">,</span><span class="default">fopt</span><span class="default">,</span><span class="default">status</span><span class="default">,</span><span class="default">output</span><span class="default">] = </span><span class="functionid">symphonymat</span><span class="default">( ... )</span></pre></div></div> <div class="refsection"><h3 class="title">Parameters</h3> <dl><dt><span class="term">f :</span> - <dd><p class="para">a vector of doubles, contains coefficients of the variables in the objective</p></dd></dt> + <dd><p class="para">a vector of double, contains coefficients of the variables in the objective</p></dd></dt> <dt><span class="term">intcon :</span> <dd><p class="para">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.</p></dd></dt> <dt><span class="term">A :</span> - <dd><p class="para">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</p></dd></dt> + <dd><p class="para">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</p></dd></dt> <dt><span class="term">b :</span> - <dd><p class="para">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</p></dd></dt> + <dd><p class="para">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</p></dd></dt> <dt><span class="term">Aeq :</span> - <dd><p class="para">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</p></dd></dt> + <dd><p class="para">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</p></dd></dt> <dt><span class="term">beq :</span> - <dd><p class="para">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.</p></dd></dt> + <dd><p class="para">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.</p></dd></dt> <dt><span class="term">lb :</span> - <dd><p class="para">Lower bounds, specified as a vector or array of doubles. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt> + <dd><p class="para">Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt> <dt><span class="term">ub :</span> - <dd><p class="para">Upper bounds, specified as a vector or array of doubles. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt> + <dd><p class="para">Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt> <dt><span class="term">options :</span> <dd><p class="para">a list containing the the parameters to be set.</p></dd></dt> <dt><span class="term">xopt :</span> <dd><p class="para">a vector of double, the computed solution of the optimization problem</p></dd></dt> <dt><span class="term">fopt :</span> - <dd><p class="para">a doubles, the function value at x</p></dd></dt> + <dd><p class="para">a double, the function value at x</p></dd></dt> <dt><span class="term">status :</span> <dd><p class="para">status flag from symphony.</p></dd></dt> <dt><span class="term">output :</span> @@ -80,7 +80,7 @@ find the minimum or maximum of f(x) such that</p> <div class="refsection"><h3 class="title">Examples</h3> <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// Objective function</span> -<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span> +<span class="scilabid">C</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span> <span class="scilabcomment">// Lower Bound of variable</span> <span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">8</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span> <span class="scilabcomment">// Upper Bound of variables</span> @@ -106,7 +106,7 @@ find the minimum or maximum of f(x) such that</p> <span class="scilabcomment">// st sum{j=1,...,n} r(i,j)x(j) </span><span class="scilabcomment"><</span><span class="scilabcomment">= b(i) i=1,...,m</span> <span class="scilabcomment">// x(j)=0 or 1</span> <span class="scilabcomment">// The function to be maximize i.e. P(j)</span> -<span class="scilabid">objCoef</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilaboperator">*</span><span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span> +<span class="scilabid">C</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilaboperator">*</span><span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span> <span class="scilabnumber">825</span> <span class="scilabnumber">1002</span> <span class="scilabnumber">860</span> <span class="scilabnumber">615</span> <span class="scilabnumber">540</span> <span class="scilabnumber">797</span> <span class="scilabnumber">616</span> <span class="scilabnumber">660</span> <span class="scilabnumber">707</span> <span class="scilabnumber">866</span> <span class="scilabnumber">647</span> <span class="scilabnumber">746</span> <span class="scilabnumber">1006</span> <span class="scilabnumber">608</span> <span class="scilabspecial">..</span> <span class="scilabnumber">877</span> <span class="scilabnumber">900</span> <span class="scilabnumber">573</span> <span class="scilabnumber">788</span> <span class="scilabnumber">484</span> <span class="scilabnumber">853</span> <span class="scilabnumber">942</span> <span class="scilabnumber">630</span> <span class="scilabnumber">591</span> <span class="scilabnumber">630</span> <span class="scilabnumber">640</span> <span class="scilabnumber">1169</span> <span class="scilabnumber">932</span> <span class="scilabnumber">1034</span> <span class="scilabspecial">..</span> <span class="scilabnumber">957</span> <span class="scilabnumber">798</span> <span class="scilabnumber">669</span> <span class="scilabnumber">625</span> <span class="scilabnumber">467</span> <span class="scilabnumber">1051</span> <span class="scilabnumber">552</span> <span class="scilabnumber">717</span> <span class="scilabnumber">654</span> <span class="scilabnumber">388</span> <span class="scilabnumber">559</span> <span class="scilabnumber">555</span> <span class="scilabnumber">1104</span> <span class="scilabnumber">783</span> <span class="scilabspecial">..</span> @@ -114,7 +114,7 @@ find the minimum or maximum of f(x) such that</p> <span class="scilabnumber">510</span> <span class="scilabnumber">671</span> <span class="scilabnumber">575</span> <span class="scilabnumber">740</span> <span class="scilabnumber">510</span> <span class="scilabnumber">675</span> <span class="scilabnumber">996</span> <span class="scilabnumber">636</span> <span class="scilabnumber">826</span> <span class="scilabnumber">1022</span> <span class="scilabnumber">1140</span> <span class="scilabnumber">654</span> <span class="scilabnumber">909</span> <span class="scilabnumber">799</span> <span class="scilabspecial">..</span> <span class="scilabnumber">1162</span> <span class="scilabnumber">653</span> <span class="scilabnumber">814</span> <span class="scilabnumber">625</span> <span class="scilabnumber">599</span> <span class="scilabnumber">476</span> <span class="scilabnumber">767</span> <span class="scilabnumber">954</span> <span class="scilabnumber">906</span> <span class="scilabnumber">904</span> <span class="scilabnumber">649</span> <span class="scilabnumber">873</span> <span class="scilabnumber">565</span> <span class="scilabnumber">853</span> <span class="scilabnumber">1008</span> <span class="scilabnumber">632</span><span class="scilabopenclose">]</span><span class="scilaboperator">'</span><span class="scilabdefault">;</span> <span class="scilabcomment">//Constraint Matrix</span> -<span class="scilabid">conMatrix</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabcomment">//Constraint 1</span> +<span class="scilabid">A</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabcomment">//Constraint 1</span> <span class="scilabnumber">42</span> <span class="scilabnumber">41</span> <span class="scilabnumber">523</span> <span class="scilabnumber">215</span> <span class="scilabnumber">819</span> <span class="scilabnumber">551</span> <span class="scilabnumber">69</span> <span class="scilabnumber">193</span> <span class="scilabnumber">582</span> <span class="scilabnumber">375</span> <span class="scilabnumber">367</span> <span class="scilabnumber">478</span> <span class="scilabnumber">162</span> <span class="scilabnumber">898</span> <span class="scilabspecial">..</span> <span class="scilabnumber">550</span> <span class="scilabnumber">553</span> <span class="scilabnumber">298</span> <span class="scilabnumber">577</span> <span class="scilabnumber">493</span> <span class="scilabnumber">183</span> <span class="scilabnumber">260</span> <span class="scilabnumber">224</span> <span class="scilabnumber">852</span> <span class="scilabnumber">394</span> <span class="scilabnumber">958</span> <span class="scilabnumber">282</span> <span class="scilabnumber">402</span> <span class="scilabnumber">604</span> <span class="scilabspecial">..</span> <span class="scilabnumber">164</span> <span class="scilabnumber">308</span> <span class="scilabnumber">218</span> <span class="scilabnumber">61</span> <span class="scilabnumber">273</span> <span class="scilabnumber">772</span> <span class="scilabnumber">191</span> <span class="scilabnumber">117</span> <span class="scilabnumber">276</span> <span class="scilabnumber">877</span> <span class="scilabnumber">415</span> <span class="scilabnumber">873</span> <span class="scilabnumber">902</span> <span class="scilabnumber">465</span> <span class="scilabspecial">..</span> @@ -156,7 +156,7 @@ find the minimum or maximum of f(x) such that</p> <span class="scilabnumber">893</span> <span class="scilabnumber">160</span> <span class="scilabnumber">785</span> <span class="scilabnumber">311</span> <span class="scilabnumber">417</span> <span class="scilabnumber">748</span> <span class="scilabnumber">375</span> <span class="scilabnumber">362</span> <span class="scilabnumber">617</span> <span class="scilabnumber">553</span> <span class="scilabnumber">474</span> <span class="scilabnumber">915</span> <span class="scilabnumber">457</span> <span class="scilabnumber">261</span> <span class="scilabnumber">350</span> <span class="scilabnumber">635</span> <span class="scilabdefault">;</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">objCoef</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> -<span class="scilabid">conUB</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">11927</span> <span class="scilabnumber">13727</span> <span class="scilabnumber">11551</span> <span class="scilabnumber">13056</span> <span class="scilabnumber">13460</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span> +<span class="scilabid">b</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">11927</span> <span class="scilabnumber">13727</span> <span class="scilabnumber">11551</span> <span class="scilabnumber">13056</span> <span class="scilabnumber">13460</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabcomment">// Lower Bound of variables</span> <span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabopenclose">)</span> <span class="scilabcomment">// Upper Bound of variables</span> @@ -175,7 +175,7 @@ find the minimum or maximum of f(x) such that</p> <span class="scilabcomment">// Optimal value</span> <span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">24381</span> <span class="scilabopenclose">]</span> <span class="scilabcomment">// Calling Symphony</span> -<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">objCoef</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> +<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">C</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">b</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div> <div class="refsection"><h3 class="title">Authors</h3> <ul class="itemizedlist"><li class="member">Keyur Joshi, Saikiran, Iswarya, Harpreet Singh</li></ul></div> diff --git a/help/en_US/symphony.xml b/help/en_US/symphony.xml index 9fb615d..1f77555 100644 --- a/help/en_US/symphony.xml +++ b/help/en_US/symphony.xml @@ -40,25 +40,25 @@ <varlistentry><term>nbCon :</term> <listitem><para> a double, number of constraints.</para></listitem></varlistentry> <varlistentry><term>objCoeff :</term> - <listitem><para> a vector of doubles, represents coefficients of the variables in the objective.</para></listitem></varlistentry> + <listitem><para> a vector of double, represents coefficients of the variables in the objective.</para></listitem></varlistentry> <varlistentry><term>isInt :</term> <listitem><para> a vector of boolean, represents wether a variable is constrained to be an integer.</para></listitem></varlistentry> <varlistentry><term>LB :</term> - <listitem><para> a vector of doubles, represents lower bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, represents lower bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>UB :</term> - <listitem><para> a vector of doubles, represents upper bounds of the variables.</para></listitem></varlistentry> + <listitem><para> a vector of double, represents upper bounds of the variables.</para></listitem></varlistentry> <varlistentry><term>conMatrix :</term> - <listitem><para> a matrix of doubles, represents matrix representing the constraint matrix.</para></listitem></varlistentry> + <listitem><para> a matrix of double, represents matrix representing the constraint matrix.</para></listitem></varlistentry> <varlistentry><term>conLB :</term> - <listitem><para> a vector of doubles, represents lower bounds of the constraints.</para></listitem></varlistentry> + <listitem><para> a vector of double, represents lower bounds of the constraints.</para></listitem></varlistentry> <varlistentry><term>conUB :</term> - <listitem><para> a vector of doubles, represents upper bounds of the constraints</para></listitem></varlistentry> + <listitem><para> a vector of double, represents upper bounds of the constraints</para></listitem></varlistentry> <varlistentry><term>objSense :</term> <listitem><para> The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.</para></listitem></varlistentry> <varlistentry><term>options :</term> <listitem><para> a a list containing the the parameters to be set.</para></listitem></varlistentry> <varlistentry><term>xopt :</term> - <listitem><para> a vector of doubles, the computed solution of the optimization problem.</para></listitem></varlistentry> + <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry> <varlistentry><term>fopt :</term> <listitem><para> a double, the function value at x.</para></listitem></varlistentry> <varlistentry><term>status :</term> @@ -97,7 +97,7 @@ We are calling SYMPHONY written in C by gateway files for the actual computation <programlisting role="example"><![CDATA[ //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/help/en_US/symphonymat.xml b/help/en_US/symphonymat.xml index ab2ca34..792eb15 100644 --- a/help/en_US/symphonymat.xml +++ b/help/en_US/symphonymat.xml @@ -24,10 +24,10 @@ <refsynopsisdiv> <title>Calling Sequence</title> <synopsis> - 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( ... ) </synopsis> @@ -37,27 +37,27 @@ <title>Parameters</title> <variablelist> <varlistentry><term>f :</term> - <listitem><para> a vector of doubles, contains coefficients of the variables in the objective</para></listitem></varlistentry> + <listitem><para> a vector of double, contains coefficients of the variables in the objective</para></listitem></varlistentry> <varlistentry><term>intcon :</term> <listitem><para> 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.</para></listitem></varlistentry> <varlistentry><term>A :</term> - <listitem><para> 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</para></listitem></varlistentry> + <listitem><para> 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</para></listitem></varlistentry> <varlistentry><term>b :</term> - <listitem><para> 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</para></listitem></varlistentry> + <listitem><para> 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</para></listitem></varlistentry> <varlistentry><term>Aeq :</term> - <listitem><para> 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</para></listitem></varlistentry> + <listitem><para> 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</para></listitem></varlistentry> <varlistentry><term>beq :</term> - <listitem><para> 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.</para></listitem></varlistentry> + <listitem><para> 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.</para></listitem></varlistentry> <varlistentry><term>lb :</term> - <listitem><para> Lower bounds, specified as a vector or array of doubles. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> + <listitem><para> Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> <varlistentry><term>ub :</term> - <listitem><para> Upper bounds, specified as a vector or array of doubles. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> + <listitem><para> Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> <varlistentry><term>options :</term> <listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry> <varlistentry><term>xopt :</term> <listitem><para> a vector of double, the computed solution of the optimization problem</para></listitem></varlistentry> <varlistentry><term>fopt :</term> - <listitem><para> a doubles, the function value at x</para></listitem></varlistentry> + <listitem><para> a double, the function value at x</para></listitem></varlistentry> <varlistentry><term>status :</term> <listitem><para> status flag from symphony.</para></listitem></varlistentry> <varlistentry><term>output :</term> @@ -75,7 +75,7 @@ find the minimum or maximum of f(x) such that <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 \\ @@ -94,7 +94,7 @@ We are calling SYMPHONY written in C by gateway files for the actual computation <title>Examples</title> <programlisting role="example"><![CDATA[ // 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 @@ -125,7 +125,7 @@ intcon = [1 2 3 4]; // 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 .. @@ -133,7 +133,7 @@ objCoef = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 .. 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 .. @@ -175,7 +175,7 @@ conMatrix = [ //Constraint 1 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 @@ -194,7 +194,7 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 .. // 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); ]]></programlisting> </refsection> diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex b17b700..73ff5f1 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar 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 |