From d8e0fa36cb1bd4e00307792008aca1d56043b15a Mon Sep 17 00:00:00 2001 From: Harpreet Date: Tue, 1 Sep 2015 02:57:49 +0530 Subject: Help and Symphony equivalent to intlinprog --- demos/symphony_knapsack.sce | 2 +- demos/symphony_mat_knapsack.sce | 88 ++++++ help/en_US/master_help.xml | 10 +- help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 3518 -> 5235 bytes .../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | Bin 489 -> 788 bytes .../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | Bin 192 -> 220 bytes .../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 17999 -> 22593 bytes help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 +- help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 12288 -> 16384 bytes .../scilab_en_US_help/_LaTeX_symphony.xml_1.png | Bin 0 -> 2986 bytes .../_LaTeX_symphony_mat.xml_1.png | Bin 0 -> 3094 bytes help/en_US/scilab_en_US_help/index.html | 16 +- help/en_US/scilab_en_US_help/index.html~ | 16 +- help/en_US/scilab_en_US_help/jhelpmap.jhm | 2 + help/en_US/scilab_en_US_help/jhelpset.hs | 2 +- help/en_US/scilab_en_US_help/jhelptoc.xml | 6 +- .../section_19f4f1e5726c01d683e8b82be0a7e910.html | 8 +- .../section_19f4f1e5726c01d683e8b82be0a7e910.html~ | 296 +++++++++++++++++++++ help/en_US/scilab_en_US_help/setOptions.html | 59 ++++ help/en_US/scilab_en_US_help/sym_addConstr.html | 10 +- help/en_US/scilab_en_US_help/sym_addVar.html | 6 +- help/en_US/scilab_en_US_help/sym_close.html | 6 +- .../en_US/scilab_en_US_help/sym_deleteConstrs.html | 6 +- help/en_US/scilab_en_US_help/sym_deleteVars.html | 6 +- .../scilab_en_US_help/sym_getConstrActivity.html | 6 +- .../scilab_en_US_help/sym_getConstrLower.html | 6 +- .../scilab_en_US_help/sym_getConstrRange.html | 6 +- .../scilab_en_US_help/sym_getConstrSense.html | 6 +- .../scilab_en_US_help/sym_getConstrUpper.html | 6 +- help/en_US/scilab_en_US_help/sym_getDblParam.html | 6 +- help/en_US/scilab_en_US_help/sym_getInfinity.html | 6 +- help/en_US/scilab_en_US_help/sym_getIntParam.html | 6 +- help/en_US/scilab_en_US_help/sym_getIterCount.html | 6 +- help/en_US/scilab_en_US_help/sym_getMatrix.html | 6 +- help/en_US/scilab_en_US_help/sym_getNumConstr.html | 6 +- .../scilab_en_US_help/sym_getNumElements.html | 6 +- help/en_US/scilab_en_US_help/sym_getNumVar.html | 6 +- help/en_US/scilab_en_US_help/sym_getObjCoeff.html | 6 +- help/en_US/scilab_en_US_help/sym_getObjSense.html | 6 +- help/en_US/scilab_en_US_help/sym_getObjVal.html | 6 +- .../scilab_en_US_help/sym_getPrimalBound.html | 6 +- help/en_US/scilab_en_US_help/sym_getRhs.html | 6 +- help/en_US/scilab_en_US_help/sym_getStatus.html | 6 +- help/en_US/scilab_en_US_help/sym_getStrParam.html | 6 +- help/en_US/scilab_en_US_help/sym_getVarLower.html | 6 +- help/en_US/scilab_en_US_help/sym_getVarSoln.html | 6 +- help/en_US/scilab_en_US_help/sym_getVarUpper.html | 6 +- help/en_US/scilab_en_US_help/sym_isAbandoned.html | 6 +- help/en_US/scilab_en_US_help/sym_isBinary.html | 6 +- help/en_US/scilab_en_US_help/sym_isContinuous.html | 6 +- help/en_US/scilab_en_US_help/sym_isEnvActive.html | 6 +- help/en_US/scilab_en_US_help/sym_isInfeasible.html | 6 +- help/en_US/scilab_en_US_help/sym_isInteger.html | 6 +- .../scilab_en_US_help/sym_isIterLimitReached.html | 6 +- help/en_US/scilab_en_US_help/sym_isOptimal.html | 6 +- .../scilab_en_US_help/sym_isTargetGapAchieved.html | 6 +- .../scilab_en_US_help/sym_isTimeLimitReached.html | 6 +- help/en_US/scilab_en_US_help/sym_loadMPS.html | 6 +- help/en_US/scilab_en_US_help/sym_loadProblem.html | 6 +- .../scilab_en_US_help/sym_loadProblemBasic.html | 6 +- help/en_US/scilab_en_US_help/sym_open.html | 6 +- help/en_US/scilab_en_US_help/sym_resetParams.html | 6 +- .../scilab_en_US_help/sym_setConstrLower.html | 6 +- .../en_US/scilab_en_US_help/sym_setConstrType.html | 6 +- .../scilab_en_US_help/sym_setConstrUpper.html | 6 +- .../en_US/scilab_en_US_help/sym_setContinuous.html | 6 +- help/en_US/scilab_en_US_help/sym_setDblParam.html | 6 +- help/en_US/scilab_en_US_help/sym_setIntParam.html | 6 +- help/en_US/scilab_en_US_help/sym_setInteger.html | 6 +- help/en_US/scilab_en_US_help/sym_setObjCoeff.html | 6 +- help/en_US/scilab_en_US_help/sym_setObjSense.html | 6 +- .../scilab_en_US_help/sym_setPrimalBound.html | 6 +- help/en_US/scilab_en_US_help/sym_setStrParam.html | 6 +- help/en_US/scilab_en_US_help/sym_setVarLower.html | 6 +- help/en_US/scilab_en_US_help/sym_setVarSoln.html | 6 +- help/en_US/scilab_en_US_help/sym_setVarUpper.html | 6 +- help/en_US/scilab_en_US_help/sym_solve.html | 12 +- help/en_US/scilab_en_US_help/symphony.html | 214 +++++++++++++++ help/en_US/scilab_en_US_help/symphony_call.html | 59 ++++ help/en_US/scilab_en_US_help/symphony_mat.html | 197 ++++++++++++++ help/en_US/scilab_en_US_help/symphony_mat.html~ | 197 ++++++++++++++ help/en_US/symphony.xml | 215 +++++++++++++++ help/en_US/symphony_mat.xml | 201 ++++++++++++++ jar/scilab_en_US_help.jar | Bin 122102 -> 144147 bytes macros/setOptions.bin | Bin 4100 -> 3164 bytes macros/setOptions.sci | 3 - macros/symphony.bin | Bin 18644 -> 42700 bytes macros/symphony.sci | 157 +++++++++-- macros/symphony_call.bin | Bin 3488 -> 3592 bytes macros/symphony_mat.bin | Bin 16464 -> 45256 bytes macros/symphony_mat.sci | 176 +++++++++--- tests/unit_tests/symphony_mat_base.dia.ref | 83 ++++++ tests/unit_tests/symphony_mat_base.tst | 83 ++++++ 93 files changed, 2185 insertions(+), 265 deletions(-) create mode 100644 demos/symphony_mat_knapsack.sce create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_symphony_mat.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html~ create mode 100644 help/en_US/scilab_en_US_help/setOptions.html create mode 100644 help/en_US/scilab_en_US_help/symphony_call.html create mode 100644 help/en_US/scilab_en_US_help/symphony_mat.html create mode 100644 help/en_US/scilab_en_US_help/symphony_mat.html~ create mode 100644 help/en_US/symphony.xml create mode 100644 help/en_US/symphony_mat.xml create mode 100644 tests/unit_tests/symphony_mat_base.dia.ref create mode 100644 tests/unit_tests/symphony_mat_base.tst diff --git a/demos/symphony_knapsack.sce b/demos/symphony_knapsack.sce index 854bf06..c6e5a51 100644 --- a/demos/symphony_knapsack.sce +++ b/demos/symphony_knapsack.sce @@ -95,7 +95,7 @@ conLB=repmat(0,nbCon,1); // Upper Bound of constraints conUB=[11927 13727 11551 13056 13460 ]'; -options = ["time_limit" "10"] +options = ["time_limit" "25"] // The expected solution : diff --git a/demos/symphony_mat_knapsack.sce b/demos/symphony_mat_knapsack.sce new file mode 100644 index 0000000..76fefee --- /dev/null +++ b/demos/symphony_mat_knapsack.sce @@ -0,0 +1,88 @@ +mode (-1) + +clc + +// Reference +// +// 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) +objCoef = -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 +conMatrix = [ //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; + //Constrain 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(objCoef,2) +conUB=[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 +// 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 Symphony +[x,f,iter] = symphony_mat(objCoef,intcon,conMatrix,conUB,[],[],lb,ub); + diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml index 9e9d044..ac0f06b 100644 --- a/help/en_US/master_help.xml +++ b/help/en_US/master_help.xml @@ -59,6 +59,8 @@ + + ]> - - Symphony Toolbox + + Symphony -Symphony Toolbox +Symphony &ad63afa57bd1e41e497243af3416a7a96; &a8247e87aade4dbfbcfc9153f85bf8990; &af05f97223726eec3eddcdaeb7913034b; @@ -133,5 +135,7 @@ &a3bb05f0eb958e796e0474de1226c67c3; &a33c0464a5b3293d925481bf20488ebc7; &a9c0f2487231abebc5433bb8ae36d82ae; +&aca972f273143ecb39f56b42e4723ac67; +&a9953e61e8dd264a86df73772d3055e7f; diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS index e03ff0a..432e718 100644 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS and b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB index 9aad308..03762b3 100644 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB and b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS index 162c59d..77778ea 100644 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS and b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS index 525881e..1b1ebd0 100644 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS and b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA index 5f90db9..216a7b2 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -1,2 +1,2 @@ JavaSearch 1.0 -TMAP bs=2048 rt=1 fl=-1 id1=769 id2=1 +TMAP bs=2048 rt=1 fl=-1 id1=1298 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP index 0257c36..820d482 100644 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP and b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png new file mode 100644 index 0000000..b3e5007 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_symphony_mat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphony_mat.xml_1.png new file mode 100644 index 0000000..d688e8a Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_symphony_mat.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/index.html b/help/en_US/scilab_en_US_help/index.html index 3aaf941..49e56d1 100644 --- a/help/en_US/scilab_en_US_help/index.html +++ b/help/en_US/scilab_en_US_help/index.html @@ -28,12 +28,17 @@

-

Symphony Toolbox

-