From 4b64cf486f5c999fd8167758cae27839f3b50848 Mon Sep 17 00:00:00 2001 From: Harpreet Date: Sat, 3 Sep 2016 00:34:27 +0530 Subject: Structure updated and intqpipopt files added --- .../en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 0 -> 2197 bytes .../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | 4 + .../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | Bin 0 -> 38 bytes .../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 0 -> 9643 bytes .../en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 + .../en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 0 -> 10240 bytes .../help/en_US/scilab_en_US_help/ScilabCaution.png | Bin 0 -> 513 bytes .../help/en_US/scilab_en_US_help/ScilabEdit.png | Bin 0 -> 414 bytes .../help/en_US/scilab_en_US_help/ScilabExecute.png | Bin 0 -> 535 bytes .../en_US/scilab_en_US_help/ScilabImportant.png | Bin 0 -> 637 bytes .../help/en_US/scilab_en_US_help/ScilabNote.png | Bin 0 -> 687 bytes .../help/en_US/scilab_en_US_help/ScilabTip.png | Bin 0 -> 687 bytes .../help/en_US/scilab_en_US_help/ScilabWarning.png | Bin 0 -> 513 bytes .../_LaTeX_cbcintlinprog.xml_1.png | Bin 0 -> 3436 bytes .../scilab_en_US_help/_LaTeX_intfminbnd.xml_1.png | Bin 0 -> 1792 bytes .../scilab_en_US_help/_LaTeX_intfmincon.xml_1.png | Bin 0 -> 4330 bytes .../scilab_en_US_help/_LaTeX_intfminimax.xml_1.png | Bin 0 -> 5068 bytes .../scilab_en_US_help/_LaTeX_intfminimax.xml_2.png | Bin 0 -> 1295 bytes .../scilab_en_US_help/_LaTeX_intfminunc.xml_1.png | Bin 0 -> 1223 bytes .../scilab_en_US_help/_LaTeX_intqpipopt.xml_1.png | Bin 0 -> 3961 bytes .../help/en_US/scilab_en_US_help/c_code.css | 54 ++++ .../en_US/scilab_en_US_help/cbcintlinprog.html | 205 ++++++++++++ .../help/en_US/scilab_en_US_help/index.html | 85 +++++ .../help/en_US/scilab_en_US_help/intfminbnd.html | 170 ++++++++++ .../help/en_US/scilab_en_US_help/intfmincon.html | 266 ++++++++++++++++ .../help/en_US/scilab_en_US_help/intfminimax.html | 195 ++++++++++++ .../help/en_US/scilab_en_US_help/intfminunc.html | 159 ++++++++++ .../help/en_US/scilab_en_US_help/intqpipopt.html | 151 +++++++++ .../help/en_US/scilab_en_US_help/jhelpidx.xml | 3 + .../help/en_US/scilab_en_US_help/jhelpmap.jhm | 12 + .../help/en_US/scilab_en_US_help/jhelpset.hs | 28 ++ .../help/en_US/scilab_en_US_help/jhelptoc.xml | 14 + .../help/en_US/scilab_en_US_help/scilab_code.css | 96 ++++++ .../section_2f30ec7805b02b8760d8add3187208be.html | 85 +++++ .../help/en_US/scilab_en_US_help/style.css | 350 +++++++++++++++++++++ .../help/en_US/scilab_en_US_help/xml_code.css | 94 ++++++ 36 files changed, 1973 insertions(+) create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA create mode 100644 newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabCaution.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabEdit.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabExecute.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabImportant.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabNote.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabTip.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/ScilabWarning.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_cbcintlinprog.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminbnd.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfmincon.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_2.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminunc.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/_LaTeX_intqpipopt.xml_1.png create mode 100644 newstructure/help/en_US/scilab_en_US_help/c_code.css create mode 100644 newstructure/help/en_US/scilab_en_US_help/cbcintlinprog.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/index.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/intfminbnd.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/intfmincon.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/intfminimax.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/intfminunc.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/intqpipopt.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/jhelpidx.xml create mode 100644 newstructure/help/en_US/scilab_en_US_help/jhelpmap.jhm create mode 100644 newstructure/help/en_US/scilab_en_US_help/jhelpset.hs create mode 100644 newstructure/help/en_US/scilab_en_US_help/jhelptoc.xml create mode 100644 newstructure/help/en_US/scilab_en_US_help/scilab_code.css create mode 100644 newstructure/help/en_US/scilab_en_US_help/section_2f30ec7805b02b8760d8add3187208be.html create mode 100644 newstructure/help/en_US/scilab_en_US_help/style.css create mode 100644 newstructure/help/en_US/scilab_en_US_help/xml_code.css (limited to 'newstructure/help/en_US/scilab_en_US_help') diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS new file mode 100644 index 0000000..a125d6d Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS differ diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB new file mode 100644 index 0000000..83471ed --- /dev/null +++ b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB @@ -0,0 +1,4 @@ +eÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿeÿÿý×ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý×ÿÿÿö_ÿÿÿÿÿÙÿÿÿÿÿÿÿö_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ@2‹Ìªª/2ªªŠ2ªªªŠ2*Œ¨®0£*ª/2ªª‹£*/ï2ª*¨Â£ +ªó +¨ÂŒ(ÂŒ.¿0¼ÂªªŒ¨¯ìª0ªªºº0¾ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªºªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª«ªªªªªªªªªªªªªªªªªªªªªªªªªªªªª»0¨Âÿ2,ÂóÌ,ÂÿÌ/Ì,Âÿÿó"üÂÌ/2‹ó0¿ÿÿÿÿÿÿ2‹0£ +ª®Œ,Ê.êÿóÌ.ª2ª.úú»úªºº¾ª®ªªªþºªªªªªªªªªªªªªªªªª¦ \ No newline at end of file diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS new file mode 100644 index 0000000..074d3e3 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS differ diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS new file mode 100644 index 0000000..784ccb6 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS differ diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA new file mode 100644 index 0000000..6740d1a --- /dev/null +++ b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -0,0 +1,2 @@ +JavaSearch 1.0 +TMAP bs=2048 rt=1 fl=-1 id1=916 id2=1 diff --git a/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP new file mode 100644 index 0000000..062a5d6 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabCaution.png b/newstructure/help/en_US/scilab_en_US_help/ScilabCaution.png new file mode 100644 index 0000000..8edb56e Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabCaution.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabEdit.png b/newstructure/help/en_US/scilab_en_US_help/ScilabEdit.png new file mode 100644 index 0000000..e139988 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabEdit.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabExecute.png b/newstructure/help/en_US/scilab_en_US_help/ScilabExecute.png new file mode 100644 index 0000000..4acd4b9 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabExecute.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabImportant.png b/newstructure/help/en_US/scilab_en_US_help/ScilabImportant.png new file mode 100644 index 0000000..3b51020 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabImportant.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabNote.png b/newstructure/help/en_US/scilab_en_US_help/ScilabNote.png new file mode 100644 index 0000000..ed46c3e Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabNote.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabTip.png b/newstructure/help/en_US/scilab_en_US_help/ScilabTip.png new file mode 100644 index 0000000..ed46c3e Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabTip.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/ScilabWarning.png b/newstructure/help/en_US/scilab_en_US_help/ScilabWarning.png new file mode 100644 index 0000000..8edb56e Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/ScilabWarning.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_cbcintlinprog.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_cbcintlinprog.xml_1.png new file mode 100644 index 0000000..257c49b Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_cbcintlinprog.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminbnd.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminbnd.xml_1.png new file mode 100644 index 0000000..2634ce3 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminbnd.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfmincon.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfmincon.xml_1.png new file mode 100644 index 0000000..5b7d818 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfmincon.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_1.png new file mode 100644 index 0000000..e332d78 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_2.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_2.png new file mode 100644 index 0000000..6a9edc4 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminimax.xml_2.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminunc.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminunc.xml_1.png new file mode 100644 index 0000000..a0ce708 Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intfminunc.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intqpipopt.xml_1.png b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intqpipopt.xml_1.png new file mode 100644 index 0000000..6e4fffd Binary files /dev/null and b/newstructure/help/en_US/scilab_en_US_help/_LaTeX_intqpipopt.xml_1.png differ diff --git a/newstructure/help/en_US/scilab_en_US_help/c_code.css b/newstructure/help/en_US/scilab_en_US_help/c_code.css new file mode 100644 index 0000000..948d2ee --- /dev/null +++ b/newstructure/help/en_US/scilab_en_US_help/c_code.css @@ -0,0 +1,54 @@ +.ccomment { + font-style: italic; + color: #b22222 +} + +.cdefault { + font-style: normal; + color: #000000 +} + +.copenclose { + font-style: normal; + color: #000000 +} + +.coperator { + font-style: normal; + color: #000000 +} + +.cstring { + font-style: normal; + color: #a6557a +} + +.ctype { + font-style: normal; + color: #55a655 +} + +.cpreprocessor { + font-style: normal; + color: #9965a6 +} + +.cid { + font-style: normal; + color: #000000 +} + +.ckeyword { + font-style: normal; + color: #ad3ff2 +} + +.cmodifier { + font-style: normal; + color: #ad3ff2 +} + +.cnumber { + font-style: normal; + color: #008b8b +} diff --git a/newstructure/help/en_US/scilab_en_US_help/cbcintlinprog.html b/newstructure/help/en_US/scilab_en_US_help/cbcintlinprog.html new file mode 100644 index 0000000..03640bb --- /dev/null +++ b/newstructure/help/en_US/scilab_en_US_help/cbcintlinprog.html @@ -0,0 +1,205 @@ +
+ +Solves a mixed integer linear programming constrained optimization problem in intlinprog format.
xopt = cbcintlinprog(c,intcon,A,b) +xopt = cbcintlinprog(c,intcon,A,b,Aeq,beq) +xopt = cbcintlinprog(c,intcon,A,b,Aeq,beq,lb,ub) +xopt = cbcintlinprog(c,intcon,A,b,Aeq,beq,lb,ub,options) +xopt = cbcintlinprog('path_to_mps_file') +xopt = cbcintlinprog('path_to_mps_file',options) +[xopt,fopt,status,output] = cbcintlinprog( ... )
a vector of double, contains coefficients of the variables in the objective
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 matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a matrix of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.
Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.
a list containing the parameters to be set.
a vector of double, the computed solution of the optimization problem.
a double, the value of the function at x.
status flag returned from symphony. See below for details.
The output data structure contains detailed information about the optimization process. See below for details.
Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
++
// Objective function +// Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; +// Constraint Matrix +Aeq = [5,3,4,6,1,1,1,1; +5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03; +5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;] +beq = [ 25, 1.25, 1.25] +intcon = [1 2 3 4]; +// Calling Symphony +[x,f,status,output] = cbcintlinprog(c,intcon,[],[],Aeq,beq,lb,ub) +// Press ENTER to continue |
// An advanced case where we set some options in symphony +// This problem is taken from +// P.C.Chu and J.E.Beasley +// "A genetic algorithm for the multidimensional knapsack problem", +// Journal of Heuristics, vol. 4, 1998, pp63-86. +// The problem to be solved is: +// Max sum{j=1,...,n} p(j)x(j) +// 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) +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 .. +959 668 507 855 986 831 821 825 868 852 832 828 799 686 .. +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 +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 .. +320 870 244 781 86 622 665 155 680 101 665 227 597 354 .. +597 79 162 998 849 136 112 751 735 884 71 449 266 420 .. +797 945 746 46 44 545 882 72 383 714 987 183 731 301 .. +718 91 109 567 708 507 983 808 766 615 554 282 995 946 651 298; +//Constraint 2 +509 883 229 569 706 639 114 727 491 481 681 948 687 941 .. +350 253 573 40 124 384 660 951 739 329 146 593 658 816 .. +638 717 779 289 430 851 937 289 159 260 930 248 656 833 .. +892 60 278 741 297 967 86 249 354 614 836 290 893 857 .. +158 869 206 504 799 758 431 580 780 788 583 641 32 653 .. +252 709 129 368 440 314 287 854 460 594 512 239 719 751 .. +708 670 269 832 137 356 960 651 398 893 407 477 552 805 881 850; +//Constraint 3 +806 361 199 781 596 669 957 358 259 888 319 751 275 177 .. +883 749 229 265 282 694 819 77 190 551 140 442 867 283 .. +137 359 445 58 440 192 485 744 844 969 50 833 57 877 .. +482 732 968 113 486 710 439 747 174 260 877 474 841 422 .. +280 684 330 910 791 322 404 403 519 148 948 414 894 147 .. +73 297 97 651 380 67 582 973 143 732 624 518 847 113 .. +382 97 905 398 859 4 142 110 11 213 398 173 106 331 254 447 ; +//Constraint 4 +404 197 817 1000 44 307 39 659 46 334 448 599 931 776 .. +263 980 807 378 278 841 700 210 542 636 388 129 203 110 .. +817 502 657 804 662 989 585 645 113 436 610 948 919 115 .. +967 13 445 449 740 592 327 167 368 335 179 909 825 614 .. +987 350 179 415 821 525 774 283 427 275 659 392 73 896 .. +68 982 697 421 246 672 649 731 191 514 983 886 95 846 .. +689 206 417 14 735 267 822 977 302 687 118 990 323 993 525 322; +//Constraint 5 +475 36 287 577 45 700 803 654 196 844 657 387 518 143 .. +515 335 942 701 332 803 265 922 908 139 995 845 487 100 .. +447 653 649 738 424 475 425 926 795 47 136 801 904 740 .. +768 460 76 660 500 915 897 25 716 557 72 696 653 933 .. +420 582 810 861 758 647 237 631 271 91 75 756 409 440 .. +483 336 765 637 981 980 202 35 594 689 602 76 767 693 .. +893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ; +]; +nbVar = size(c,1); +b=[11927 13727 11551 13056 13460 ]; +// Lower Bound of variables +lb = repmat(0,1,nbVar); +// Upper Bound of variables +ub = repmat(1,1,nbVar); +// Lower Bound of constrains +intcon = []; +for i = 1:nbVar +intcon = [intcon i]; +end +options = list('MaxTime', 25); +// The expected solution : +// Output variables +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 .. +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 .. +0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0]; +// Optimal value +fopt = [ 24381 ] +// Calling cbc +[x,f,status,output] = cbcintlinprog(c,intcon,A,b,[],[],lb,ub,options); |
Solves a multi-variable optimization problem on a bounded interval
xopt = intfminbnd(f,intcon,x1,x2) +xopt = intfminbnd(f,intcon,x1,x2,options) +[xopt,fopt] = intfminbnd(.....) +[xopt,fopt,exitflag]= intfminbnd(.....) +[xopt,fopt,exitflag,output]=intfminbnd(.....) +[xopt,fopt,exitflag,gradient,hessian]=intfminbnd(.....)
a function, representing the objective function of the problem
a vector, containing the lower bound of the variables.
a vector, containing the upper bound of the variables.
a vector of integers, represents which variables are constrained to be integers
a list, containing the option for user to specify. See below for details.
a vector of doubles, containing the the computed solution of the optimization problem.
a scalar of double, containing the the function value at x.
a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.
a vector of doubles, containing the Objective's gradient of the solution.
a matrix of doubles, containing the Objective's hessian of the solution.
Search the minimum of a multi-variable function on bounded interval specified by : +Find the minimum of f(x) such that
++
The routine calls Bonmin for solving the Bounded Optimization problem, Bonmin is a library written in C++.
+The options allows the user to set various parameters of the Optimization problem. +It should be defined as type "list" and contains the following fields. +
The exitflag allows to know the status of the optimization which is given back by Ipopt. +
For more details on exitflag see the Bonmin documentation, go to http://www.coin-or.org/Bonmin
+//Find x in R^6 such that it minimizes: +//f(x)= sin(x1) + sin(x2) + sin(x3) + sin(x4) + sin(x5) + sin(x6) +//-2 <= x1,x2,x3,x4,x5,x6 <= 2 +//Objective function to be minimised +function y=f(x) +y=0 +for i =1:6 +y=y+sin(x(i)); +end +endfunction +//Variable bounds +x1 = [-2, -2, -2, -2, -2, -2]; +x2 = [2, 2, 2, 2, 2, 2]; +intcon = [2 3 4] +//Options +options=list("MaxIter",[1500],"CpuTime", [100]) +[x,fval] =intfminbnd(f ,intcon, x1, x2, options) +// Press ENTER to continue |
//The below problem is an unbounded problem: +//Find x in R^2 such that it minimizes: +//f(x)= -[(x1-1)^2 + (x2-1)^2] +//-inf <= x1,x2 <= inf +//Objective function to be minimised +function y=f(x) +y=-((x(1)-1)^2+(x(2)-1)^2); +endfunction +//Variable bounds +x1 = [-%inf , -%inf]; +x2 = [ %inf , %inf]; +//Options +options=list("MaxIter",[1500],"CpuTime", [100]) +[x,fval,exitflag,output,lambda] =intfminbnd(f,intcon, x1, x2, options) |
Solves a constrainted multi-variable mixed integer non linear programming problem
xopt = intfmincon(f,x0,intcon,A,b) +xopt = intfmincon(f,x0,intcon,A,b,Aeq,beq) +xopt = intfmincon(f,x0,intcon,A,b,Aeq,beq,lb,ub) +xopt = intfmincon(f,x0,intcon,A,b,Aeq,beq,lb,ub,nlc) +xopt = intfmincon(f,x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options) +[xopt,fopt] = intfmincon(.....) +[xopt,fopt,exitflag]= intfmincon(.....) +[xopt,fopt,exitflag,gradient]=intfmincon(.....) +[xopt,fopt,exitflag,gradient,hessian]=intfmincon(.....)
a function, representing the objective function of the problem
a vector of doubles, containing the starting values of variables.
a vector of integers, represents which variables are constrained to be integers
a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a matrix of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.
Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.
a function, representing the Non-linear Constraints functions(both Equality and Inequality) of the problem. It is declared in such a way that non-linear inequality constraints are defined first as a single row vector (c), followed by non-linear equality constraints as another single row vector (ceq). Refer Example for definition of Constraint function.
a list, containing the option for user to specify. See below for details.
a vector of doubles, containing the the computed solution of the optimization problem.
a scalar of double, containing the the function value at x.
a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.
a vector of doubles, containing the Objective's gradient of the solution.
a matrix of doubles, containing the Objective's hessian of the solution.
Search the minimum of a mixed integer constrained optimization problem specified by : +Find the minimum of f(x) such that
++
The routine calls Bonmin for solving the Bounded Optimization problem, Bonmin is a library written in C++.
+The options allows the user to set various parameters of the Optimization problem. +It should be defined as type "list" and contains the following fields. +
The exitflag allows to know the status of the optimization which is given back by Ipopt. +
For more details on exitflag see the Bonmin documentation, go to http://www.coin-or.org/Bonmin
+//Find x in R^2 such that it minimizes: +//f(x)= -x1 -x2/3 +//x0=[0,0] +//constraint-1 (c1): x1 + x2 <= 2 +//constraint-2 (c2): x1 + x2/4 <= 1 +//constraint-3 (c3): x1 - x2 <= 2 +//constraint-4 (c4): -x1/4 - x2 <= 1 +//constraint-5 (c5): -x1 - x2 <= -1 +//constraint-6 (c6): -x1 + x2 <= 2 +//constraint-7 (c7): x1 + x2 = 2 +//Objective function to be minimised +function [y, dy]=f(x) +y=-x(1)-x(2)/3; +dy= [-1,-1/3]; +endfunction +//Starting point, linear constraints and variable bounds +x0=[0 , 0]; +intcon = [1] +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq=[1,1]; +beq=[2]; +lb=[]; +ub=[]; +nlc=[]; +//Options +options=list("GradObj", "on"); +//Calling Ipopt +[x,fval,exitflag,grad,hessian] =intfmincon(f, x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options) +// Press ENTER to continue |
//Find x in R^3 such that it minimizes: +//f(x)= x1*x2 + x2*x3 +//x0=[0.1 , 0.1 , 0.1] +//constraint-1 (c1): x1^2 - x2^2 + x3^2 <= 2 +//constraint-2 (c2): x1^2 + x2^2 + x3^2 <= 10 +//Objective function to be minimised +function [y, dy]=f(x) +y=x(1)*x(2)+x(2)*x(3); +dy= [x(2),x(1)+x(3),x(2)]; +endfunction +//Starting point, linear constraints and variable bounds +x0=[0.1 , 0.1 , 0.1]; +intcon = [2] +A=[]; +b=[]; +Aeq=[]; +beq=[]; +lb=[]; +ub=[]; +//Nonlinear constraints +function [c, ceq, cg, cgeq]=nlc(x) +c = [x(1)^2 - x(2)^2 + x(3)^2 - 2 , x(1)^2 + x(2)^2 + x(3)^2 - 10]; +ceq = []; +cg=[2*x(1) , -2*x(2) , 2*x(3) ; 2*x(1) , 2*x(2) , 2*x(3)]; +cgeq=[]; +endfunction +//Options +options=list("MaxIter", [1500], "CpuTime", [500], "GradObj", "on","GradCon", "on"); +//Calling Ipopt +[x,fval,exitflag,output] =intfmincon(f, x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options) +// Press ENTER to continue |
//The below problem is an unbounded problem: +//Find x in R^3 such that it minimizes: +//f(x)= -(x1^2 + x2^2 + x3^2) +//x0=[0.1 , 0.1 , 0.1] +// x1 <= 0 +// x2 <= 0 +// x3 <= 0 +//Objective function to be minimised +function y=f(x) +y=-(x(1)^2+x(2)^2+x(3)^2); +endfunction +//Starting point, linear constraints and variable bounds +x0=[0.1 , 0.1 , 0.1]; +intcon = [3] +A=[]; +b=[]; +Aeq=[]; +beq=[]; +lb=[]; +ub=[0,0,0]; +//Options +options=list("MaxIter", [1500], "CpuTime", [500]); +//Calling Ipopt +[x,fval,exitflag,grad,hessian] =intfmincon(f, x0,intcon,A,b,Aeq,beq,lb,ub,[],options) +// Press ENTER to continue |
//The below problem is an infeasible problem: +//Find x in R^3 such that in minimizes: +//f(x)=x1*x2 + x2*x3 +//x0=[1,1,1] +//constraint-1 (c1): x1^2 <= 1 +//constraint-2 (c2): x1^2 + x2^2 <= 1 +//constraint-3 (c3): x3^2 <= 1 +//constraint-4 (c4): x1^3 = 0.5 +//constraint-5 (c5): x2^2 + x3^2 = 0.75 +// 0 <= x1 <=0.6 +// 0.2 <= x2 <= inf +// -inf <= x3 <= 1 +//Objective function to be minimised +function [y, dy]=f(x) +y=x(1)*x(2)+x(2)*x(3); +dy= [x(2),x(1)+x(3),x(2)]; +endfunction +//Starting point, linear constraints and variable bounds +x0=[1,1,1]; +intcon = [2] +A=[]; +b=[]; +Aeq=[]; +beq=[]; +lb=[0 0.2,-%inf]; +ub=[0.6 %inf,1]; +//Nonlinear constraints +function [c, ceq, cg, cgeq]=nlc(x) +c=[x(1)^2-1,x(1)^2+x(2)^2-1,x(3)^2-1]; +ceq=[x(1)^3-0.5,x(2)^2+x(3)^2-0.75]; +cg = [2*x(1),0,0;2*x(1),2*x(2),0;0,0,2*x(3)]; +cgeq = [3*x(1)^2,0,0;0,2*x(2),2*x(3)]; +endfunction +//Options +options=list("MaxIter", [1500], "CpuTime", [500], "GradObj", "on","GradCon", "on"); +//Calling Ipopt +[x,fval,exitflag,grad,hessian] =intfmincon(f, x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options) +// Press ENTER to continue |
Solves minimax constraint problem
xopt = intfminimax(fun,x0,intcon) +xopt = intfminimax(fun,x0,intcon,A,b) +xopt = intfminimax(fun,x0,intcon,A,b,Aeq,beq) +xopt = intfminimax(fun,x0,intcon,A,b,Aeq,beq,lb,ub) +xopt = intfminimax(fun,x0,intcon,A,b,Aeq,beq,lb,ub,nonlinfun) +xopt = intfminimax(fun,x0,intcon,A,b,Aeq,beq,lb,ub,nonlinfun,options) +[xopt, fval] = intfminimax(.....) +[xopt, fval, maxfval]= intfminimax(.....) +[xopt, fval, maxfval, exitflag]= intfminimax(.....)
The function to be minimized. fun is a function that accepts a vector x and returns a vector F, the objective functions evaluated at x.
a vector of double, contains initial guess of variables.
a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a vector of integers, represents which variables are constrained to be integers
a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a matrix of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, contains lower bounds of the variables.
a vector of double, contains upper bounds of the variables.
function that computes the nonlinear inequality constraints c⋅x ≤ 0 and nonlinear equality constraints c⋅x = 0.
a vector of double, the computed solution of the optimization problem.
a double, the value of the function at x.
a 1x1 matrix of doubles, the maximum value in vector fval
The exit status. See below for details.
The structure consist of statistics about the optimization. See below for details.
The structure consist of the Lagrange multipliers at the solution of problem. See below for details.
intfminimax minimizes the worst-case (largest) value of a set of multivariable functions, starting at an initial estimate. This is generally referred to as the minimax problem.
++
Currently, intfminimax calls intfmincon which uses the bonmin algorithm.
+max-min problems can also be solved with intfminimax, using the identity
++
The options allows the user to set various parameters of the Optimization problem. +It should be defined as type "list" and contains the following fields. +
By default, the gradient options for intfminimax are turned off and and intfmincon does the gradient opproximation of objective function. In case the GradObj option is off and GradConstr option is on, intfminimax approximates Objective function gradient using numderivative toolbox.
+If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.
+ +The exitflag allows to know the status of the optimization which is given back by Ipopt. +
For more details on exitflag see the ipopt documentation, go to http://www.coin-or.org/bonmin/
+// A case where we provide the gradient of the objective +// functions and the Jacobian matrix of the constraints. +// The objective function and its gradient +function [f, G]=myfun(x) +f(1)= 2*x(1)^2 + x(2)^2 - 48*x(1) - 40*x(2) + 304; +f(2)= -x(1)^2 - 3*x(2)^2; +f(3)= x(1) + 3*x(2) -18; +f(4)= -x(1) - x(2); +f(5)= x(1) + x(2) - 8; +G = [ 4*x(1) - 48, -2*x(1), 1, -1, 1; +2*x(2) - 40, -6*x(2), 3, -1, 1; ]' +endfunction +// The nonlinear constraints +function [c, ceq, DC, DCeq]=confun(x) +// Inequality constraints +c = [1.5 + x(1)*x(2) - x(1) - x(2), -x(1)*x(2) - 10] +// No nonlinear equality constraints +ceq=[] +DC= [x(2)-1, -x(2); +x(1)-1, -x(1)]' +DCeq = []' +endfunction +// Test with both gradient of objective and gradient of constraints +minimaxOptions = list("GradObj","on","GradCon","on"); +// The initial guess +x0 = [0,10]; +intcon = [2] +// Run intfminimax +[x,fval,maxfval,exitflag] = intfminimax(myfun,x0,intcon,[],[],[],[],[],[], confun, minimaxOptions) |
Solves an unconstrainted multi-variable mixed integer non linear programming optimization problem
xopt = intfminunc(f,x0) +xopt = intfminunc(f,x0,intcon) +xopt = intfminunc(f,x0,intcon,options) +[xopt,fopt] = intfminunc(.....) +[xopt,fopt,exitflag]= intfminunc(.....) +[xopt,fopt,exitflag,gradient,hessian]= intfminunc(.....)
a function, representing the objective function of the problem
a vector of doubles, containing the starting of variables.
a vector of integers, represents which variables are constrained to be integers
a list, containing the option for user to specify. See below for details.
a vector of doubles, the computed solution of the optimization problem.
a scalar of double, the function value at x.
a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.
a vector of doubles, containing the Objective's gradient of the solution.
a matrix of doubles, containing the Objective's hessian of the solution.
Search the minimum of a multi-variable mixed integer non linear programming unconstrained optimization problem specified by : +Find the minimum of f(x) such that
++
The routine calls Bonmin for solving the Un-constrained Optimization problem, Bonmin is a library written in C++.
+The options allows the user to set various parameters of the Optimization problem. +It should be defined as type "list" and contains the following fields. +
The exitflag allows to know the status of the optimization which is given back by Bonmin. +
For more details on exitflag see the Bonmin page, go to http://www.coin-or.org/Bonmin
+//Find x in R^2 such that it minimizes the Rosenbrock function +//f = 100*(x2 - x1^2)^2 + (1-x1)^2 +//Objective function to be minimised +function y=f(x) +y= 100*(x(2) - x(1)^2)^2 + (1-x(1))^2; +endfunction +//Starting point +x0=[-1,2]; +intcon = [2] +//Options +options=list("MaxIter", [1500], "CpuTime", [500]); +//Calling +[xopt,fopt,exitflag,gradient,hessian]=intfminunc(f,x0,intcon,options) +// Press ENTER to continue |
//The below problem is an unbounded problem: +//Find x in R^2 such that the below function is minimum +//f = - x1^2 - x2^2 +//Objective function to be minimised +function [y, g, h]=f(x) +y = -x(1)^2 - x(2)^2; +g = [-2*x(1),-2*x(2)]; +h = [-2,0;0,-2]; +endfunction +//Starting point +x0=[2,1]; +intcon = [1] +options = list("gradobj","ON","hessian","on"); +[xopt,fopt,exitflag,gradient,hessian]=intfminunc(f,x0,intcon,options) |
Solves a linear quadratic problem.
xopt = intqpipopt(H,f) +xopt = intqpipopt(H,f,intcon) +xopt = intqpipopt(H,f,intcon,A,b) +xopt = intqpipopt(H,f,intcon,A,b,Aeq,beq) +xopt = intqpipopt(H,f,intcon,A,b,Aeq,beq,lb,ub) +xopt = intqpipopt(H,f,intcon,A,b,Aeq,beq,lb,ub,x0) +xopt = intqpipopt(H,f,intcon,A,b,Aeq,beq,lb,ub,x0,options) +xopt = intqpipopt(H,f,intcon,A,b,Aeq,beq,lb,ub,x0,options,"file_path") +[xopt,fopt,exitflag,output] = intqpipopt( ... )
a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.
a vector of double, represents coefficients of linear in the quadratic problem
a vector of integers, represents which variables are constrained to be integers
a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.
a matrix of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, represents the linear coefficients in the equality constraints Aeqâ‹…x = beq.
a vector of double, contains lower bounds of the variables.
a vector of double, contains upper bounds of the variables.
a vector of double, contains initial guess of variables.
a list containing the parameters to be set.
path to bonmin opt file if used.
a vector of double, the computed solution of the optimization problem.
a double, the value of the function at x.
The exit status. See below for details.
The structure consist of statistics about the optimization. See below for details.
Search the minimum of a constrained linear quadratic optimization problem specified by :
++
The routine calls Bonmin for solving the quadratic problem, Bonmin is a library written in C++.
+The exitflag allows to know the status of the optimization which is given back by Bonmin. +
For more details on exitflag see the Bonmin page, go to http://www.coin-or.org/Bonmin
+The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +
//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'*H*x + f'*x with +f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); +intcon = [2 4]; +[xopt,fopt,exitflag,output]=intqpipopt(H,f,intcon,A,b,Aeq,beq,lb,ub,x0,param) |