From 03241d180c9d65fa1e75ceac4c257df44438a1ce Mon Sep 17 00:00:00 2001 From: Harpreet Date: Wed, 24 Feb 2016 16:22:06 +0530 Subject: fmincon examples added --- cleaner.sce | 38 ++ help/en_US/master_help.xml | 164 +++++++ help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 0 -> 6704 bytes .../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | Bin 0 -> 917 bytes .../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | Bin 0 -> 256 bytes .../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 0 -> 36126 bytes help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 + help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 0 -> 16384 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 help/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 .../scilab_en_US_help/_LaTeX_fgoalattain.xml_1.png | Bin 0 -> 4343 bytes .../scilab_en_US_help/_LaTeX_fminbnd.xml_1.png | Bin 0 -> 1792 bytes .../scilab_en_US_help/_LaTeX_fmincon.xml_1.png | Bin 0 -> 3781 bytes .../scilab_en_US_help/_LaTeX_fminimax.xml_1.png | Bin 0 -> 5367 bytes .../scilab_en_US_help/_LaTeX_fminimax.xml_2.png | Bin 0 -> 1295 bytes .../scilab_en_US_help/_LaTeX_fminunc.xml_1.png | Bin 0 -> 714 bytes .../scilab_en_US_help/_LaTeX_linprog.xml_1.png | Bin 0 -> 2509 bytes .../scilab_en_US_help/_LaTeX_lsqlin.xml_1.png | Bin 0 -> 3046 bytes .../scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png | Bin 0 -> 1456 bytes .../scilab_en_US_help/_LaTeX_qpipopt.xml_1.png | Bin 0 -> 3304 bytes .../scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png | Bin 0 -> 3148 bytes .../scilab_en_US_help/_LaTeX_symphony.xml_1.png | Bin 0 -> 3383 bytes .../scilab_en_US_help/_LaTeX_symphonymat.xml_1.png | Bin 0 -> 3140 bytes help/en_US/scilab_en_US_help/c_code.css | 54 +++ help/en_US/scilab_en_US_help/fgoalattain.html | 187 ++++++++ help/en_US/scilab_en_US_help/fminbnd.html | 176 ++++++++ help/en_US/scilab_en_US_help/fmincon.html | 305 +++++++++++++ help/en_US/scilab_en_US_help/fminimax.html | 237 ++++++++++ help/en_US/scilab_en_US_help/fminunc.html | 180 ++++++++ help/en_US/scilab_en_US_help/index.html | 352 +++++++++++++++ help/en_US/scilab_en_US_help/jhelpidx.xml | 3 + help/en_US/scilab_en_US_help/jhelpmap.jhm | 77 ++++ help/en_US/scilab_en_US_help/jhelpset.hs | 28 ++ help/en_US/scilab_en_US_help/jhelptoc.xml | 80 ++++ help/en_US/scilab_en_US_help/linprog.html | 192 ++++++++ help/en_US/scilab_en_US_help/lsqlin.html | 175 ++++++++ help/en_US/scilab_en_US_help/lsqnonneg.html | 129 ++++++ help/en_US/scilab_en_US_help/qpipopt.html | 175 ++++++++ help/en_US/scilab_en_US_help/qpipoptmat.html | 171 +++++++ help/en_US/scilab_en_US_help/scilab_code.css | 96 ++++ .../section_19f4f1e5726c01d683e8b82be0a7e910.html | 352 +++++++++++++++ .../section_508f0b211d17ea6769714cc144e6b731.html | 285 ++++++++++++ help/en_US/scilab_en_US_help/style.css | 350 +++++++++++++++ help/en_US/scilab_en_US_help/sym_addConstr.html | 91 ++++ help/en_US/scilab_en_US_help/sym_addVar.html | 93 ++++ help/en_US/scilab_en_US_help/sym_close.html | 84 ++++ .../en_US/scilab_en_US_help/sym_deleteConstrs.html | 81 ++++ help/en_US/scilab_en_US_help/sym_deleteVars.html | 81 ++++ .../scilab_en_US_help/sym_getConstrActivity.html | 83 ++++ .../scilab_en_US_help/sym_getConstrLower.html | 83 ++++ .../scilab_en_US_help/sym_getConstrRange.html | 83 ++++ .../scilab_en_US_help/sym_getConstrSense.html | 83 ++++ .../scilab_en_US_help/sym_getConstrUpper.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getDblParam.html | 81 ++++ help/en_US/scilab_en_US_help/sym_getInfinity.html | 82 ++++ help/en_US/scilab_en_US_help/sym_getIntParam.html | 81 ++++ help/en_US/scilab_en_US_help/sym_getIterCount.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getMatrix.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getNumConstr.html | 82 ++++ .../scilab_en_US_help/sym_getNumElements.html | 82 ++++ help/en_US/scilab_en_US_help/sym_getNumVar.html | 82 ++++ help/en_US/scilab_en_US_help/sym_getObjCoeff.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getObjSense.html | 82 ++++ help/en_US/scilab_en_US_help/sym_getObjVal.html | 83 ++++ .../scilab_en_US_help/sym_getPrimalBound.html | 82 ++++ help/en_US/scilab_en_US_help/sym_getRhs.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getStatus.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getStrParam.html | 81 ++++ help/en_US/scilab_en_US_help/sym_getVarLower.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getVarSoln.html | 83 ++++ help/en_US/scilab_en_US_help/sym_getVarUpper.html | 83 ++++ help/en_US/scilab_en_US_help/sym_isAbandoned.html | 83 ++++ help/en_US/scilab_en_US_help/sym_isBinary.html | 83 ++++ help/en_US/scilab_en_US_help/sym_isContinuous.html | 83 ++++ help/en_US/scilab_en_US_help/sym_isEnvActive.html | 82 ++++ help/en_US/scilab_en_US_help/sym_isInfeasible.html | 83 ++++ help/en_US/scilab_en_US_help/sym_isInteger.html | 77 ++++ .../scilab_en_US_help/sym_isIterLimitReached.html | 84 ++++ help/en_US/scilab_en_US_help/sym_isOptimal.html | 84 ++++ .../scilab_en_US_help/sym_isTargetGapAchieved.html | 83 ++++ .../scilab_en_US_help/sym_isTimeLimitReached.html | 83 ++++ help/en_US/scilab_en_US_help/sym_loadMPS.html | 82 ++++ help/en_US/scilab_en_US_help/sym_loadProblem.html | 102 +++++ .../scilab_en_US_help/sym_loadProblemBasic.html | 103 +++++ help/en_US/scilab_en_US_help/sym_open.html | 84 ++++ help/en_US/scilab_en_US_help/sym_resetParams.html | 80 ++++ .../scilab_en_US_help/sym_setConstrLower.html | 85 ++++ .../en_US/scilab_en_US_help/sym_setConstrType.html | 91 ++++ .../scilab_en_US_help/sym_setConstrUpper.html | 85 ++++ .../en_US/scilab_en_US_help/sym_setContinuous.html | 81 ++++ help/en_US/scilab_en_US_help/sym_setDblParam.html | 83 ++++ help/en_US/scilab_en_US_help/sym_setIntParam.html | 83 ++++ help/en_US/scilab_en_US_help/sym_setInteger.html | 81 ++++ help/en_US/scilab_en_US_help/sym_setObjCoeff.html | 85 ++++ help/en_US/scilab_en_US_help/sym_setObjSense.html | 83 ++++ .../scilab_en_US_help/sym_setPrimalBound.html | 83 ++++ help/en_US/scilab_en_US_help/sym_setStrParam.html | 83 ++++ help/en_US/scilab_en_US_help/sym_setVarLower.html | 85 ++++ help/en_US/scilab_en_US_help/sym_setVarSoln.html | 84 ++++ help/en_US/scilab_en_US_help/sym_setVarUpper.html | 85 ++++ help/en_US/scilab_en_US_help/sym_solve.html | 81 ++++ help/en_US/scilab_en_US_help/symphony.html | 224 ++++++++++ help/en_US/scilab_en_US_help/symphonymat.html | 213 +++++++++ help/en_US/scilab_en_US_help/xml_code.css | 94 ++++ jar/scilab_en_US_help.jar | Bin 0 -> 226396 bytes loader.sce | 10 + macros/Checkdims.bin | Bin 0 -> 8188 bytes macros/Checklhs.bin | Bin 0 -> 10312 bytes macros/Checkrhs.bin | Bin 0 -> 12852 bytes macros/Checktype.bin | Bin 0 -> 9156 bytes macros/Checkvector.bin | Bin 0 -> 9696 bytes macros/fgoalattain.bin | Bin 0 -> 76660 bytes macros/fminbnd.bin | Bin 0 -> 54876 bytes macros/fminbnd.sci | 70 ++- macros/fmincon.bin | Bin 0 -> 156196 bytes macros/fmincon.sci | 404 +++++++++-------- macros/fminimax.bin | Bin 0 -> 86532 bytes macros/fminimax.sci | 10 +- macros/fminunc.bin | Bin 0 -> 60896 bytes macros/fminunc.sci | 82 +++- macros/lib | Bin 0 -> 864 bytes macros/linprog.bin | Bin 0 -> 30012 bytes macros/lsqcurvefit.bin | Bin 0 -> 64252 bytes macros/lsqcurvefit.sci | 439 ++++++++++++++++++ macros/lsqlin.bin | Bin 0 -> 64528 bytes macros/lsqnonneg.bin | Bin 0 -> 33808 bytes macros/matrix_linprog.bin | Bin 0 -> 31100 bytes macros/mps_linprog.bin | Bin 0 -> 10064 bytes macros/names | 22 + macros/qpipopt.bin | Bin 0 -> 63432 bytes macros/qpipoptmat.bin | Bin 0 -> 65684 bytes macros/setOptions.bin | Bin 0 -> 3040 bytes macros/symphony.bin | Bin 0 -> 62044 bytes macros/symphony_call.bin | Bin 0 -> 4592 bytes macros/symphonymat.bin | Bin 0 -> 65436 bytes sci_gateway/cpp/cleaner.sce | 22 + sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c | 156 +++++++ sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so | Bin 0 -> 194948 bytes sci_gateway/cpp/loader.sce | 84 ++++ sci_gateway/cpp/minconNLP.hpp | 8 +- sci_gateway/cpp/sci_ipoptfmincon.cpp | 70 +-- sci_gateway/cpp/sci_minconNLP.cpp | 491 ++++++--------------- sci_gateway/loader_gateway.sce | 24 + tests/general_tests/fminbnd/fminbnd_f.sce | 15 + tests/general_tests/fminbnd/fminbnd_lb1.sce | 18 + tests/general_tests/fminbnd/fminbnd_lb2.sce | 18 + tests/general_tests/fminbnd/fminbnd_lbub.sce | 19 + tests/general_tests/fminbnd/fminbnd_logical1.sce | 38 ++ tests/general_tests/fminbnd/fminbnd_logical2.sce | 38 ++ tests/general_tests/fminbnd/fminbnd_options1.sce | 18 + tests/general_tests/fminbnd/fminbnd_options2.sce | 18 + tests/general_tests/fminbnd/fminbnd_options3.sce | 17 + tests/general_tests/fminbnd/fminbnd_ub1.sce | 18 + tests/general_tests/fminbnd/fminbnd_ub2.sce | 18 + tests/general_tests/fmincon/fmincon_A.sce | 20 + tests/general_tests/fmincon/fmincon_Aeq.sce | 22 + tests/general_tests/fmincon/fmincon_b1.sce | 20 + tests/general_tests/fmincon/fmincon_b2.sce | 20 + tests/general_tests/fmincon/fmincon_b3.sce | 20 + tests/general_tests/fmincon/fmincon_beq1.sce | 22 + tests/general_tests/fmincon/fmincon_beq2.sce | 22 + tests/general_tests/fmincon/fmincon_beq3.sce | 22 + tests/general_tests/fmincon/fmincon_cputime.sce | 56 +++ tests/general_tests/fmincon/fmincon_f.sce | 18 + tests/general_tests/fmincon/fmincon_lb1.sce | 24 + tests/general_tests/fmincon/fmincon_lb2.sce | 24 + tests/general_tests/fmincon/fmincon_lb3.sce | 24 + tests/general_tests/fmincon/fmincon_lb4.sce | 24 + tests/general_tests/fmincon/fmincon_lbub.sce | 24 + tests/general_tests/fmincon/fmincon_logical1.sce | 45 ++ tests/general_tests/fmincon/fmincon_logical10.sce | 66 +++ tests/general_tests/fmincon/fmincon_logical11.sce | 46 ++ tests/general_tests/fmincon/fmincon_logical2.sce | 47 ++ tests/general_tests/fmincon/fmincon_logical3.sce | 49 ++ tests/general_tests/fmincon/fmincon_logical4.sce | 54 +++ tests/general_tests/fmincon/fmincon_logical5.sce | 56 +++ tests/general_tests/fmincon/fmincon_logical6.sce | 45 ++ tests/general_tests/fmincon/fmincon_logical7.sce | 45 ++ tests/general_tests/fmincon/fmincon_logical8.sce | 60 +++ tests/general_tests/fmincon/fmincon_logical9.sce | 63 +++ tests/general_tests/fmincon/fmincon_maxiter.sce | 56 +++ tests/general_tests/fmincon/fmincon_ub1.sce | 24 + tests/general_tests/fmincon/fmincon_ub2.sce | 24 + tests/general_tests/fmincon/fmincon_ub3.sce | 24 + tests/general_tests/fmincon/fmincon_ub4.sce | 24 + tests/general_tests/fmincon/fmincon_x0a.sce | 20 + tests/general_tests/fmincon/fmincon_x0b.sce | 20 + tests/general_tests/fminunc/fminunc_f.sce | 15 + tests/general_tests/fminunc/fminunc_gradient1.sce | 15 + tests/general_tests/fminunc/fminunc_gradient2.sce | 15 + tests/general_tests/fminunc/fminunc_gradient3.sce | 16 + tests/general_tests/fminunc/fminunc_gradient4.sce | 20 + tests/general_tests/fminunc/fminunc_hessian1.sce | 16 + tests/general_tests/fminunc/fminunc_hessian2.sce | 15 + tests/general_tests/fminunc/fminunc_hessian3.sce | 16 + tests/general_tests/fminunc/fminunc_hessian4.sce | 19 + tests/general_tests/fminunc/fminunc_logical1.sce | 35 ++ tests/general_tests/fminunc/fminunc_logical2.sce | 35 ++ tests/general_tests/fminunc/fminunc_logical3.sce | 42 ++ tests/general_tests/fminunc/fminunc_logical4.sce | 42 ++ tests/general_tests/fminunc/fminunc_options1.sce | 16 + tests/general_tests/fminunc/fminunc_options2.sce | 16 + tests/general_tests/fminunc/fminunc_x0a.sce | 16 + tests/general_tests/fminunc/fminunc_x0b.sce | 16 + thirdparty/linux/lib/x64/libCgl.la | 35 -- thirdparty/linux/lib/x64/libClp.la | 35 -- thirdparty/linux/lib/x64/libClpSolver.la | 35 -- thirdparty/linux/lib/x64/libCoinUtils.la | 35 -- thirdparty/linux/lib/x64/libOsi.la | 35 -- thirdparty/linux/lib/x64/libOsiClp.la | 35 -- thirdparty/linux/lib/x64/libOsiCommonTests.la | 35 -- thirdparty/linux/lib/x64/libOsiSym.la | 35 -- thirdparty/linux/lib/x64/libSym.la | 35 -- thirdparty/linux/lib/x64/libcoinblas.la | 35 -- thirdparty/linux/lib/x64/libcoinlapack.la | 35 -- thirdparty/linux/lib/x64/libcoinmumps.la | 35 -- thirdparty/linux/lib/x64/libipopt.la | 35 -- thirdparty/linux/lib/x86/libCgl.la | 35 -- thirdparty/linux/lib/x86/libClp.la | 35 -- thirdparty/linux/lib/x86/libClpSolver.la | 35 -- thirdparty/linux/lib/x86/libCoinUtils.la | 35 -- thirdparty/linux/lib/x86/libOsi.la | 35 -- thirdparty/linux/lib/x86/libOsiClp.la | 35 -- thirdparty/linux/lib/x86/libOsiCommonTests.la | 35 -- thirdparty/linux/lib/x86/libOsiSym.la | 35 -- thirdparty/linux/lib/x86/libSym.la | 35 -- thirdparty/linux/lib/x86/libcoinblas.la | 35 -- thirdparty/linux/lib/x86/libcoinlapack.la | 35 -- thirdparty/linux/lib/x86/libcoinmumps.la | 35 -- thirdparty/linux/lib/x86/libipopt.la | 35 -- unloader.sce | 14 + 236 files changed, 12217 insertions(+), 1529 deletions(-) create mode 100644 cleaner.sce create mode 100644 help/en_US/master_help.xml create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA create mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP create mode 100644 help/en_US/scilab_en_US_help/ScilabCaution.png create mode 100644 help/en_US/scilab_en_US_help/ScilabEdit.png create mode 100644 help/en_US/scilab_en_US_help/ScilabExecute.png create mode 100644 help/en_US/scilab_en_US_help/ScilabImportant.png create mode 100644 help/en_US/scilab_en_US_help/ScilabNote.png create mode 100644 help/en_US/scilab_en_US_help/ScilabTip.png create mode 100644 help/en_US/scilab_en_US_help/ScilabWarning.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fgoalattain.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fminbnd.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fmincon.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_fminunc.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_linprog.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png 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_symphonymat.xml_1.png create mode 100644 help/en_US/scilab_en_US_help/c_code.css create mode 100644 help/en_US/scilab_en_US_help/fgoalattain.html create mode 100644 help/en_US/scilab_en_US_help/fminbnd.html create mode 100644 help/en_US/scilab_en_US_help/fmincon.html create mode 100644 help/en_US/scilab_en_US_help/fminimax.html create mode 100644 help/en_US/scilab_en_US_help/fminunc.html create mode 100644 help/en_US/scilab_en_US_help/index.html create mode 100644 help/en_US/scilab_en_US_help/jhelpidx.xml create mode 100644 help/en_US/scilab_en_US_help/jhelpmap.jhm create mode 100644 help/en_US/scilab_en_US_help/jhelpset.hs create mode 100644 help/en_US/scilab_en_US_help/jhelptoc.xml create mode 100644 help/en_US/scilab_en_US_help/linprog.html create mode 100644 help/en_US/scilab_en_US_help/lsqlin.html create mode 100644 help/en_US/scilab_en_US_help/lsqnonneg.html create mode 100644 help/en_US/scilab_en_US_help/qpipopt.html create mode 100644 help/en_US/scilab_en_US_help/qpipoptmat.html create mode 100644 help/en_US/scilab_en_US_help/scilab_code.css create mode 100644 help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html create mode 100644 help/en_US/scilab_en_US_help/section_508f0b211d17ea6769714cc144e6b731.html create mode 100644 help/en_US/scilab_en_US_help/style.css create mode 100644 help/en_US/scilab_en_US_help/sym_addConstr.html create mode 100644 help/en_US/scilab_en_US_help/sym_addVar.html create mode 100644 help/en_US/scilab_en_US_help/sym_close.html create mode 100644 help/en_US/scilab_en_US_help/sym_deleteConstrs.html create mode 100644 help/en_US/scilab_en_US_help/sym_deleteVars.html create mode 100644 help/en_US/scilab_en_US_help/sym_getConstrActivity.html create mode 100644 help/en_US/scilab_en_US_help/sym_getConstrLower.html create mode 100644 help/en_US/scilab_en_US_help/sym_getConstrRange.html create mode 100644 help/en_US/scilab_en_US_help/sym_getConstrSense.html create mode 100644 help/en_US/scilab_en_US_help/sym_getConstrUpper.html create mode 100644 help/en_US/scilab_en_US_help/sym_getDblParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_getInfinity.html create mode 100644 help/en_US/scilab_en_US_help/sym_getIntParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_getIterCount.html create mode 100644 help/en_US/scilab_en_US_help/sym_getMatrix.html create mode 100644 help/en_US/scilab_en_US_help/sym_getNumConstr.html create mode 100644 help/en_US/scilab_en_US_help/sym_getNumElements.html create mode 100644 help/en_US/scilab_en_US_help/sym_getNumVar.html create mode 100644 help/en_US/scilab_en_US_help/sym_getObjCoeff.html create mode 100644 help/en_US/scilab_en_US_help/sym_getObjSense.html create mode 100644 help/en_US/scilab_en_US_help/sym_getObjVal.html create mode 100644 help/en_US/scilab_en_US_help/sym_getPrimalBound.html create mode 100644 help/en_US/scilab_en_US_help/sym_getRhs.html create mode 100644 help/en_US/scilab_en_US_help/sym_getStatus.html create mode 100644 help/en_US/scilab_en_US_help/sym_getStrParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_getVarLower.html create mode 100644 help/en_US/scilab_en_US_help/sym_getVarSoln.html create mode 100644 help/en_US/scilab_en_US_help/sym_getVarUpper.html create mode 100644 help/en_US/scilab_en_US_help/sym_isAbandoned.html create mode 100644 help/en_US/scilab_en_US_help/sym_isBinary.html create mode 100644 help/en_US/scilab_en_US_help/sym_isContinuous.html create mode 100644 help/en_US/scilab_en_US_help/sym_isEnvActive.html create mode 100644 help/en_US/scilab_en_US_help/sym_isInfeasible.html create mode 100644 help/en_US/scilab_en_US_help/sym_isInteger.html create mode 100644 help/en_US/scilab_en_US_help/sym_isIterLimitReached.html create mode 100644 help/en_US/scilab_en_US_help/sym_isOptimal.html create mode 100644 help/en_US/scilab_en_US_help/sym_isTargetGapAchieved.html create mode 100644 help/en_US/scilab_en_US_help/sym_isTimeLimitReached.html create mode 100644 help/en_US/scilab_en_US_help/sym_loadMPS.html create mode 100644 help/en_US/scilab_en_US_help/sym_loadProblem.html create mode 100644 help/en_US/scilab_en_US_help/sym_loadProblemBasic.html create mode 100644 help/en_US/scilab_en_US_help/sym_open.html create mode 100644 help/en_US/scilab_en_US_help/sym_resetParams.html create mode 100644 help/en_US/scilab_en_US_help/sym_setConstrLower.html create mode 100644 help/en_US/scilab_en_US_help/sym_setConstrType.html create mode 100644 help/en_US/scilab_en_US_help/sym_setConstrUpper.html create mode 100644 help/en_US/scilab_en_US_help/sym_setContinuous.html create mode 100644 help/en_US/scilab_en_US_help/sym_setDblParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_setIntParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_setInteger.html create mode 100644 help/en_US/scilab_en_US_help/sym_setObjCoeff.html create mode 100644 help/en_US/scilab_en_US_help/sym_setObjSense.html create mode 100644 help/en_US/scilab_en_US_help/sym_setPrimalBound.html create mode 100644 help/en_US/scilab_en_US_help/sym_setStrParam.html create mode 100644 help/en_US/scilab_en_US_help/sym_setVarLower.html create mode 100644 help/en_US/scilab_en_US_help/sym_setVarSoln.html create mode 100644 help/en_US/scilab_en_US_help/sym_setVarUpper.html create mode 100644 help/en_US/scilab_en_US_help/sym_solve.html create mode 100644 help/en_US/scilab_en_US_help/symphony.html create mode 100644 help/en_US/scilab_en_US_help/symphonymat.html create mode 100644 help/en_US/scilab_en_US_help/xml_code.css create mode 100644 jar/scilab_en_US_help.jar create mode 100644 loader.sce create mode 100644 macros/Checkdims.bin create mode 100644 macros/Checklhs.bin create mode 100644 macros/Checkrhs.bin create mode 100644 macros/Checktype.bin create mode 100644 macros/Checkvector.bin create mode 100644 macros/fgoalattain.bin create mode 100644 macros/fminbnd.bin create mode 100644 macros/fmincon.bin create mode 100644 macros/fminimax.bin create mode 100644 macros/fminunc.bin create mode 100644 macros/lib create mode 100644 macros/linprog.bin create mode 100644 macros/lsqcurvefit.bin create mode 100644 macros/lsqcurvefit.sci create mode 100644 macros/lsqlin.bin create mode 100644 macros/lsqnonneg.bin create mode 100644 macros/matrix_linprog.bin create mode 100644 macros/mps_linprog.bin create mode 100644 macros/names create mode 100644 macros/qpipopt.bin create mode 100644 macros/qpipoptmat.bin create mode 100644 macros/setOptions.bin create mode 100644 macros/symphony.bin create mode 100644 macros/symphony_call.bin create mode 100644 macros/symphonymat.bin create mode 100644 sci_gateway/cpp/cleaner.sce create mode 100644 sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c create mode 100755 sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so create mode 100644 sci_gateway/cpp/loader.sce create mode 100644 sci_gateway/loader_gateway.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_f.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_lb1.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_lb2.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_lbub.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_logical1.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_logical2.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_options1.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_options2.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_options3.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_ub1.sce create mode 100644 tests/general_tests/fminbnd/fminbnd_ub2.sce create mode 100644 tests/general_tests/fmincon/fmincon_A.sce create mode 100644 tests/general_tests/fmincon/fmincon_Aeq.sce create mode 100644 tests/general_tests/fmincon/fmincon_b1.sce create mode 100644 tests/general_tests/fmincon/fmincon_b2.sce create mode 100644 tests/general_tests/fmincon/fmincon_b3.sce create mode 100644 tests/general_tests/fmincon/fmincon_beq1.sce create mode 100644 tests/general_tests/fmincon/fmincon_beq2.sce create mode 100644 tests/general_tests/fmincon/fmincon_beq3.sce create mode 100644 tests/general_tests/fmincon/fmincon_cputime.sce create mode 100644 tests/general_tests/fmincon/fmincon_f.sce create mode 100644 tests/general_tests/fmincon/fmincon_lb1.sce create mode 100644 tests/general_tests/fmincon/fmincon_lb2.sce create mode 100644 tests/general_tests/fmincon/fmincon_lb3.sce create mode 100644 tests/general_tests/fmincon/fmincon_lb4.sce create mode 100644 tests/general_tests/fmincon/fmincon_lbub.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical1.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical10.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical11.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical2.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical3.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical4.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical5.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical6.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical7.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical8.sce create mode 100644 tests/general_tests/fmincon/fmincon_logical9.sce create mode 100644 tests/general_tests/fmincon/fmincon_maxiter.sce create mode 100644 tests/general_tests/fmincon/fmincon_ub1.sce create mode 100644 tests/general_tests/fmincon/fmincon_ub2.sce create mode 100644 tests/general_tests/fmincon/fmincon_ub3.sce create mode 100644 tests/general_tests/fmincon/fmincon_ub4.sce create mode 100644 tests/general_tests/fmincon/fmincon_x0a.sce create mode 100644 tests/general_tests/fmincon/fmincon_x0b.sce create mode 100644 tests/general_tests/fminunc/fminunc_f.sce create mode 100644 tests/general_tests/fminunc/fminunc_gradient1.sce create mode 100644 tests/general_tests/fminunc/fminunc_gradient2.sce create mode 100644 tests/general_tests/fminunc/fminunc_gradient3.sce create mode 100644 tests/general_tests/fminunc/fminunc_gradient4.sce create mode 100644 tests/general_tests/fminunc/fminunc_hessian1.sce create mode 100644 tests/general_tests/fminunc/fminunc_hessian2.sce create mode 100644 tests/general_tests/fminunc/fminunc_hessian3.sce create mode 100644 tests/general_tests/fminunc/fminunc_hessian4.sce create mode 100644 tests/general_tests/fminunc/fminunc_logical1.sce create mode 100644 tests/general_tests/fminunc/fminunc_logical2.sce create mode 100644 tests/general_tests/fminunc/fminunc_logical3.sce create mode 100644 tests/general_tests/fminunc/fminunc_logical4.sce create mode 100644 tests/general_tests/fminunc/fminunc_options1.sce create mode 100644 tests/general_tests/fminunc/fminunc_options2.sce create mode 100644 tests/general_tests/fminunc/fminunc_x0a.sce create mode 100644 tests/general_tests/fminunc/fminunc_x0b.sce delete mode 100755 thirdparty/linux/lib/x64/libCgl.la delete mode 100755 thirdparty/linux/lib/x64/libClp.la delete mode 100755 thirdparty/linux/lib/x64/libClpSolver.la delete mode 100755 thirdparty/linux/lib/x64/libCoinUtils.la delete mode 100755 thirdparty/linux/lib/x64/libOsi.la delete mode 100755 thirdparty/linux/lib/x64/libOsiClp.la delete mode 100755 thirdparty/linux/lib/x64/libOsiCommonTests.la delete mode 100755 thirdparty/linux/lib/x64/libOsiSym.la delete mode 100755 thirdparty/linux/lib/x64/libSym.la delete mode 100755 thirdparty/linux/lib/x64/libcoinblas.la delete mode 100755 thirdparty/linux/lib/x64/libcoinlapack.la delete mode 100755 thirdparty/linux/lib/x64/libcoinmumps.la delete mode 100755 thirdparty/linux/lib/x64/libipopt.la delete mode 100755 thirdparty/linux/lib/x86/libCgl.la delete mode 100755 thirdparty/linux/lib/x86/libClp.la delete mode 100755 thirdparty/linux/lib/x86/libClpSolver.la delete mode 100755 thirdparty/linux/lib/x86/libCoinUtils.la delete mode 100755 thirdparty/linux/lib/x86/libOsi.la delete mode 100755 thirdparty/linux/lib/x86/libOsiClp.la delete mode 100755 thirdparty/linux/lib/x86/libOsiCommonTests.la delete mode 100755 thirdparty/linux/lib/x86/libOsiSym.la delete mode 100755 thirdparty/linux/lib/x86/libSym.la delete mode 100755 thirdparty/linux/lib/x86/libcoinblas.la delete mode 100755 thirdparty/linux/lib/x86/libcoinlapack.la delete mode 100755 thirdparty/linux/lib/x86/libcoinmumps.la delete mode 100755 thirdparty/linux/lib/x86/libipopt.la create mode 100644 unloader.sce diff --git a/cleaner.sce b/cleaner.sce new file mode 100644 index 0000000..370c68f --- /dev/null +++ b/cleaner.sce @@ -0,0 +1,38 @@ +// This file is released under the 3-clause BSD license. See COPYING-BSD. +// Generated by builder.sce: Please, do not edit this file + +try + getversion("scilab"); +catch + error("Scilab 5.0 or more is required."); +end +function perform_clean() + root_tlbx = get_absolute_file_path('cleaner.sce'); + + if isfile(root_tlbx + '/macros/cleanmacros.sce') then + exec(root_tlbx+'/macros/cleanmacros.sce'); + end + + if isfile(root_tlbx + '/src/cleaner_src.sce') then + exec(root_tlbx+'/src/cleaner_src.sce'); + end + + if isfile(root_tlbx + "/sci_gateway/cleaner_gateway.sce") then + exec(root_tlbx + "/sci_gateway/cleaner_gateway.sce"); + mdelete(root_tlbx + "/sci_gateway/cleaner_gateway.sce"); + end + + if isfile(root_tlbx + "/help/cleaner_help.sce") then + exec(root_tlbx + "/help/cleaner_help.sce"); + end + + if isfile(root_tlbx + "/loader.sce") then + mdelete(root_tlbx + "/loader.sce"); + end + + if isfile(root_tlbx + "/unloader.sce") then + mdelete(root_tlbx + "/unloader.sce"); + end +endfunction +perform_clean(); +clear perform_clean; diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml new file mode 100644 index 0000000..73ec952 --- /dev/null +++ b/help/en_US/master_help.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + FOSSEE Optimization Toolbox + + + +FOSSEE Optimization Toolbox +&a745e19a6383796e6f5680cdcc44cfcce; +&a2b24cb19de46f878f11e6be9eb411170; +&a52664d077cac340a0384efe1ac107088; +&a0184dce5b9269d9795f0858d46c1c6f0; +&a14f1077f437dbe35eb1cac51fed7a9fc; +&aa809ed678033fc05c9b60a71de55b2ce; +&a3d4ec65684b561d91f7a255acd23f51c; +&aa4a031935f5eed6cfc8fc4a49823b00b; +&a6b85f6e0c98751f20b68663a23cb4cd2; +&a8549a3935858ed104f4749ca2243456a; +&aca972f273143ecb39f56b42e4723ac67; +&a9910ada35b57b0581e8a77d145abac4a; + +Symphony Native Functions +&acc223314e8a8bc290a13618df33a6237; +&a5e032b3334f53385f0ce250f0d5c18f2; +&a11ac5af5f92741f96e56398fe6113c1a; +&a54f913b8b4e581654c3f9d37a7f0353a; +&aa30f7f7c36bd510b4f02727f52f4a3ce; +&a1f3452caf3162b6385df305f81346e5b; +&a3b149fd278245d4b3a24e4517225c98b; +&a6e5609fb4e5eebcf24b457f44e0fdae3; +&aa893b53c826a7def860105c158f070f8; +&a06bad82642d672e569c4b95454548dc4; +&aa5d59eb05be10280b50c527e88194603; +&a65cdfe78fc72edc8c5a47ad2bfe65892; +&a26a6886e109925cf0cc77c6cc7cc5bbb; +&aecee265206afdf2b5baf3e6f0ce05b2a; +&a559f913f0e9f21d38c9c27a33a9953ae; +&a3e540ecd4a9a3e666b31579fa5662aba; +&adb9eed3182459e3dce170977880cc253; +&a6ce3ca192828a09725815663579482db; +&a338f3184d5c61f0f7de92b171be041d1; +&af15d4928d3cbab7d87e64eb2b52a1496; +&a5cacaf92073795f5fd6c7cb6084c4015; +&a2aee40916b0f8c5631a8808aaf9da74e; +&a89689c9684bb1222009a56e0ee157ad4; +&a7fea9b7273bacb6e59272590a9ef8690; +&a14f8d21effef06b5b04029cc11d54b55; +&a46ee22cafdff1a8bcf08c9fd522ab5b8; +&aca3cb89179616e3be06b228b87f32ddb; +&ad6f09bc2a57af9aa5a557497c6bddbc3; +&a7cf13c8ec3cbc1862da713ab233e0f2a; +&a6a1928ddadf9dbd1f71b463c55ae9a7c; +&a8db20054b5db402260af3fc2bbcbbc02; +&aa495e78c64e2a62b8cfceb6d3e0dd306; +&a8b17974e4691a1119aa9189d5d21af50; +&abf0fa3e575e638636e94ae387f7f4465; +&a68289eac582fd1515c510bd447640fea; +&a3e4b8cb708b6af8648f58c658c54a466; +&a0c555f679ba4b9b3f0c128fba8c97784; +&a149fad015c8f9764fb817f2f32b6433a; +&a58e4ad13d7f92aa2106f346e6f667cef; +&a6d3922ed2f332c444391d0b3bfe149a5; +&ac0309772a676ae0f19c4906587629055; +&af1c8a28c8b6a57e72bfadc71f30e391b; +&a6c72196376a25e3ad51c8918e6ac00be; +&a9c990f2279c1b39e9ff9161319700972; +&a8e7ffd33fb83a6c6438da917911f5378; +&ae35adb60ff83c89fc44b30fda7c87af4; +&a10ea3c81046dff7b2c8ae794f470c7b9; +&af90e3534d92ac40286440b627aee484b; +&a5fa728194634dbc83868f69db2dcb00b; +&ac00d47c17e27b147886626cb5a5b9b21; +&a495915b72119ba0fbfa1a3574c89a579; +&af551a253e20452196acaf8e4f8097d1e; +&a69dcdf35892e94bf931551457037cf7c; +&a1bf9d00f2bdb2ccf20bb88fd425ae817; +&af2559ac6a3ee305a9d34197886b7d9f1; +&a69ab58762cd50faa3908e15b52605000; +&a33e3ef3ff532c54b58f3ed5c2c0b3154; +&ad6943c0d89d69c96ade13f4b338e5ed8; + + + diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS new file mode 100644 index 0000000..a5dd8d0 Binary files /dev/null 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 new file mode 100644 index 0000000..497453b Binary files /dev/null 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 new file mode 100644 index 0000000..9f06801 Binary files /dev/null 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 new file mode 100644 index 0000000..708749d Binary files /dev/null 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 new file mode 100644 index 0000000..9c2220b --- /dev/null +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -0,0 +1,2 @@ +JavaSearch 1.0 +TMAP bs=2048 rt=1 fl=-1 id1=1479 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP new file mode 100644 index 0000000..bed7ce2 Binary files /dev/null and b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP differ diff --git a/help/en_US/scilab_en_US_help/ScilabCaution.png b/help/en_US/scilab_en_US_help/ScilabCaution.png new file mode 100644 index 0000000..8edb56e Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabCaution.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabEdit.png b/help/en_US/scilab_en_US_help/ScilabEdit.png new file mode 100644 index 0000000..e139988 Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabEdit.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabExecute.png b/help/en_US/scilab_en_US_help/ScilabExecute.png new file mode 100644 index 0000000..4acd4b9 Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabExecute.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabImportant.png b/help/en_US/scilab_en_US_help/ScilabImportant.png new file mode 100644 index 0000000..3b51020 Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabImportant.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabNote.png b/help/en_US/scilab_en_US_help/ScilabNote.png new file mode 100644 index 0000000..ed46c3e Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabNote.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabTip.png b/help/en_US/scilab_en_US_help/ScilabTip.png new file mode 100644 index 0000000..ed46c3e Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabTip.png differ diff --git a/help/en_US/scilab_en_US_help/ScilabWarning.png b/help/en_US/scilab_en_US_help/ScilabWarning.png new file mode 100644 index 0000000..8edb56e Binary files /dev/null and b/help/en_US/scilab_en_US_help/ScilabWarning.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fgoalattain.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fgoalattain.xml_1.png new file mode 100644 index 0000000..7d7a4b6 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fgoalattain.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminbnd.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fminbnd.xml_1.png new file mode 100644 index 0000000..2634ce3 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fminbnd.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fmincon.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fmincon.xml_1.png new file mode 100644 index 0000000..07910ed Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fmincon.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png new file mode 100644 index 0000000..cc11a01 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png new file mode 100644 index 0000000..6a9edc4 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fminimax.xml_2.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_fminunc.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_fminunc.xml_1.png new file mode 100644 index 0000000..5250091 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_fminunc.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_linprog.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_linprog.xml_1.png new file mode 100644 index 0000000..1dd1d5e Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_linprog.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png new file mode 100644 index 0000000..9015755 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png new file mode 100644 index 0000000..3dd57aa Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png new file mode 100644 index 0000000..e2fbbde Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png new file mode 100644 index 0000000..3846115 Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png 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..9155e8f 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_symphonymat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png new file mode 100644 index 0000000..9c2039f Binary files /dev/null and b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png differ diff --git a/help/en_US/scilab_en_US_help/c_code.css b/help/en_US/scilab_en_US_help/c_code.css new file mode 100644 index 0000000..948d2ee --- /dev/null +++ b/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/help/en_US/scilab_en_US_help/fgoalattain.html b/help/en_US/scilab_en_US_help/fgoalattain.html new file mode 100644 index 0000000..2981e47 --- /dev/null +++ b/help/en_US/scilab_en_US_help/fgoalattain.html @@ -0,0 +1,187 @@ + + + fgoalattain + + + +
+ + + + +
+ << FOSSEE Optimization Toolbox + + + FOSSEE Optimization Toolbox + + + fminbnd >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > fgoalattain + +

+

fgoalattain

+

Solves a multiobjective goal attainment problem

+ + +

Calling Sequence

+
xopt = fgoalattain(fun,x0,goal,weight)
+xopt = fgoalattain(fun,x0,goal,weight,A,b)
+xopt = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq)
+xopt = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub)
+xopt = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon)
+xopt = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon,options)
+[xopt,fval] = fgoalattain(...)
+[xopt,fval,attainfactor] = fgoalattain(...)
+[xopt,fval,attainfactor,exitflag] = fgoalattain(...)
+[xopt,fval,attainfactor,exitflag,output] = fgoalattain(...)
+[xopt,fval,attainfactor,exitflag,output,lambda] = fgoalattain(...)
+ +

Parameters

+
fun: +

a function that accepts a vector x and returns a vector F

+
x0 : +

a vector of double, contains initial guess of variables.

+
A : +

a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
lb : +

a vector of double, contains lower bounds of the variables.

+
ub : +

a vector of double, contains upper bounds of the variables.

+
nonlcon: +

a function, the nonlinear constraints

+
options : +

a list, containing the option for user to specify. See below for details.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
attainfactor: +

The amount of over- or underachievement of the goals,γ at the solution.

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

fgoalattain solves the goal attainment problem, which is one formulation for minimizing a multiobjective optimization problem. +Finds the minimum of a problem specified by: +Minimise Y such that

+

+

The solver makes use of fmincon to find the minimum.

+

The fgoalattain finds out the maximum value of Y for the objectives evaluated at the starting point and +adds that as another variable to the vector x +This is passed to the fmincon function to get the optimised value of Y +Hence, the algorithm used mainly is "ipopt" to obtain the optimum solution +The relations between f(x), Y, weights and goals are added as additional non-linear inequality constraints

+

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 fminimax are turned off and and fmincon does the gradient opproximation of gattainObjfun. In case the GradObj option is off and GradConstr option is on, fminimax approximates gattainObjfun gradient using numderivative toolbox.

+

If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.

+

Furthermore, we must enable the "GradObj" option with the statement : +

minimaxOptions = list("GradObj",fGrad);
+This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function. Note that, fGrad should be mentioned in the form of N x n where n is the number of variables, N is the number of functions in objective function.

+

The constraint function must have header : +

[c, ceq] = confun(x)
+where x is a n x 1 matrix of doubles, c is a 1 x nni matrix of doubles and ceq is a 1 x nne matrix of doubles (nni : number of nonlinear inequality constraints, nne : number of nonlinear equality constraints). +On input, the variable x contains the current point and, on output, the variable c must contain the nonlinear inequality constraints and ceq must contain the nonlinear equality constraints.

+

By default, the gradient options for fminimax are turned off and and fmincon does the gradient opproximation of confun. In case the GradObj option is on and GradCons option is off, fminimax approximates confun gradient using numderivative toolbox.

+

If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.

+

Furthermore, we must enable the "GradCon" option with the statement : +

minimaxOptions = list("GradCon",confunGrad);
+This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function.

+

The constraint derivative function must have header : +

[dc,dceq] = confungrad(x)
+where dc is a nni x n matrix of doubles and dceq is a nne x n matrix of doubles.

+

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/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
function f1=gattainObjfun(x)
+f1(1)=2*x(1)*x(1)+x(2)*x(2)-48*x(1)-40*x(2)+304
+f1(2)=-x(1)*x(1)-3*x(2)*x(2)
+f1(3)=x(1)+3*x(2)-18
+f1(4)=-x(1)-x(2)
+f1(5)=x(1)+x(2)-8
+endfunction
+x0=[-1,1];
+goal=[-5,-3,-2,-1,-4];
+weight=abs(goal)
+//gval  =[- 0.0000011 -63.999998 -2.0000002 -8 3.485D-08]
+//z  = [4 3.99]
+//Run fgoalattain
+[x,fval,attainfactor,exitflag,output,lambda]=fgoalattain(gattainObjfun,x0,goal,weight)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << FOSSEE Optimization Toolbox + + + FOSSEE Optimization Toolbox + + + fminbnd >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/fminbnd.html b/help/en_US/scilab_en_US_help/fminbnd.html new file mode 100644 index 0000000..46755f8 --- /dev/null +++ b/help/en_US/scilab_en_US_help/fminbnd.html @@ -0,0 +1,176 @@ + + + fminbnd + + + +
+ + + + +
+ << fgoalattain + + + FOSSEE Optimization Toolbox + + + fmincon >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > fminbnd + +

+

fminbnd

+

Solves a multi-variable optimization problem on a bounded interval

+ + +

Calling Sequence

+
xopt = fminbnd(f,x1,x2)
+xopt = fminbnd(f,x1,x2,options)
+[xopt,fopt] = fminbnd(.....)
+[xopt,fopt,exitflag]= fminbnd(.....)
+[xopt,fopt,exitflag,output]=fminbnd(.....)
+[xopt,fopt,exitflag,output,lambda]=fminbnd(.....)
+ +

Parameters

+
f : +

a function, representing the objective function of the problem

+
x1 : +

a vector, containing the lower bound of the variables of size (1 X n) or (n X 1) where 'n' is the number of Variables, where n is number of Variables

+
x2 : +

a vector, containing the upper bound of the variables of size (1 X n) or (n X 1) or (0 X 0) where 'n' is the number of Variables. If x2 is empty it means upper bound is +infinity

+
options : +

a list, containing the option for user to specify. See below for details.

+
xopt : +

a vector of doubles, containing the the computed solution of the optimization problem.

+
fopt : +

a scalar of double, containing the the function value at x.

+
exitflag : +

a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.

+
output : +

a structure, containing the information about the optimization. See below for details.

+
lambda : +

a structure, containing the Lagrange multipliers of lower bound and upper bound at the optimized point. See below for details.

+ +

Description

+

Search the minimum of a multi-variable function on bounded interval specified by : +Find the minimum of f(x) such that

+

+

The routine calls Ipopt for solving the Bounded Optimization problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//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];
+//Options
+options=list("MaxIter",[1500],"CpuTime", [100],"TolX",[1e-6])
+//Calling Ipopt
+[x,fval] =fminbnd(f, x1, x2, options)
+// Press ENTER to continue
+ +

Examples

+
//Find x in R such that it minimizes:
+//f(x)= 1/x^2
+//0 <= x <= 1000
+//Objective function to be minimised
+function y=f(x)
+y=1/x^2
+endfunction
+//Variable bounds
+x1 = [0];
+x2 = [1000];
+//Calling Ipopt
+[x,fval,exitflag,output,lambda] =fminbnd(f, x1, x2)
+// Press ENTER to continue
+ +

Examples

+
//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 = [];
+//Options
+options=list("MaxIter",[1500],"CpuTime", [100],"TolX",[1e-6])
+//Calling Ipopt
+[x,fval,exitflag,output,lambda] =fminbnd(f, x1, x2, options)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << fgoalattain + + + FOSSEE Optimization Toolbox + + + fmincon >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/fmincon.html b/help/en_US/scilab_en_US_help/fmincon.html new file mode 100644 index 0000000..ea3077f --- /dev/null +++ b/help/en_US/scilab_en_US_help/fmincon.html @@ -0,0 +1,305 @@ + + + fmincon + + + +
+ + + + +
+ << fminbnd + + + FOSSEE Optimization Toolbox + + + fminimax >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > fmincon + +

+

fmincon

+

Solves a multi-variable constrainted optimization problem

+ + +

Calling Sequence

+
xopt = fmincon(f,x0,A,b)
+xopt = fmincon(f,x0,A,b,Aeq,beq)
+xopt = fmincon(f,x0,A,b,Aeq,beq,lb,ub)
+xopt = fmincon(f,x0,A,b,Aeq,beq,lb,ub,nlc)
+xopt = fmincon(f,x0,A,b,Aeq,beq,lb,ub,nlc,options)
+[xopt,fopt] = fmincon(.....)
+[xopt,fopt,exitflag]= fmincon(.....)
+[xopt,fopt,exitflag,output]= fmincon(.....)
+[xopt,fopt,exitflag,output,lambda]=fmincon(.....)
+[xopt,fopt,exitflag,output,lambda,gradient]=fmincon(.....)
+[xopt,fopt,exitflag,output,lambda,gradient,hessian]=fmincon(.....)
+ +

Parameters

+
f : +

a function, representing the objective function of the problem

+
x0 : +

a vector of doubles, containing the starting values of variables of size (1 X n) or (n X 1) where 'n' is the number of Variables

+
A : +

a matrix of doubles, containing the coefficients of linear inequality constraints of size (m X n) where 'm' is the number of linear inequality constraints

+
b : +

a vector of doubles, related to 'A' and containing the the Right hand side equation of the linear inequality constraints of size (m X 1)

+
Aeq : +

a matrix of doubles, containing the coefficients of linear equality constraints of size (m1 X n) where 'm1' is the number of linear equality constraints

+
beq : +

a vector of doubles, related to 'Aeq' and containing the the Right hand side equation of the linear equality constraints of size (m1 X 1)

+
lb : +

a vector of doubles, containing the lower bounds of the variables of size (1 X n) or (n X 1) where 'n' is the number of Variables

+
ub : +

a vector of doubles, containing the upper bounds of the variables of size (1 X n) or (n X 1) where 'n' is the number of Variables

+
nlc : +

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.

+
options : +

a list, containing the option for user to specify. See below for details.

+
xopt : +

a vector of doubles, cointating the computed solution of the optimization problem

+
fopt : +

a scalar of double, containing the the function value at x

+
exitflag : +

a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.

+
output : +

a structure, containing the information about the optimization. See below for details.

+
lambda : +

a structure, containing the Lagrange multipliers of lower bound, upper bound and constraints at the optimized point. See below for details.

+
gradient : +

a vector of doubles, containing the Objective's gradient of the solution.

+
hessian : +

a matrix of doubles, containing the Lagrangian's hessian of the solution.

+ +

Description

+

Search the minimum of a constrained optimization problem specified by : +Find the minimum of f(x) such that

+

+

The routine calls Ipopt for solving the Constrained Optimization problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//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=f(x)
+y=-x(1)-x(2)/3;
+endfunction
+//Starting point, linear constraints and variable bounds
+x0=[0 , 0];
+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=[];
+//Gradient of objective function
+function y=fGrad(x)
+y= [-1,-1/3];
+endfunction
+//Hessian of lagrangian
+function y=lHess(x, obj, lambda)
+y= obj*[0,0;0,0]
+endfunction
+//Options
+options=list("GradObj", fGrad, "Hessian", lHess);
+//Calling Ipopt
+[x,fval,exitflag,output,lambda,grad,hessian] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,nlc,options)
+// Press ENTER to continue
+ +

Examples

+
//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=f(x)
+y=x(1)*x(2)+x(2)*x(3);
+endfunction
+//Starting point, linear constraints and variable bounds
+x0=[0.1 , 0.1 , 0.1];
+A=[];
+b=[];
+Aeq=[];
+beq=[];
+lb=[];
+ub=[];
+//Nonlinear constraints
+function [c, ceq]=nlc(x)
+c = [x(1)^2 - x(2)^2 + x(3)^2 - 2 , x(1)^2 + x(2)^2 + x(3)^2 - 10];
+ceq = [];
+endfunction
+//Gradient of objective function
+function y=fGrad(x)
+y= [x(2),x(1)+x(3),x(2)];
+endfunction
+//Hessian of the Lagrange Function
+function y=lHess(x, obj, lambda)
+y= obj*[0,1,0;1,0,1;0,1,0] + lambda(1)*[2,0,0;0,-2,0;0,0,2] + lambda(2)*[2,0,0;0,2,0;0,0,2]
+endfunction
+//Gradient of Non-Linear Constraints
+function [cg, ceqg]=cGrad(x)
+cg=[2*x(1) , -2*x(2) , 2*x(3) ; 2*x(1) , 2*x(2) , 2*x(3)];
+ceqg=[];
+endfunction
+//Options
+options=list("MaxIter", [1500], "CpuTime", [500], "GradObj", fGrad, "Hessian", lHess,"GradCon", cGrad);
+//Calling Ipopt
+[x,fval,exitflag,output] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,nlc,options)
+// Press ENTER to continue
+ +

Examples

+
//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];
+A=[];
+b=[];
+Aeq=[];
+beq=[];
+lb=[];
+ub=[0,0,0];
+//Options
+options=list("MaxIter", [1500], "CpuTime", [500]);
+//Calling Ipopt
+[x,fval,exitflag,output,lambda,grad,hessian] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,[],options)
+// Press ENTER to continue
+ +

Examples

+
//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=f(x)
+y=x(1)*x(2)+x(2)*x(3);
+endfunction
+//Starting point, linear constraints and variable bounds
+x0=[1,1,1];
+A=[];
+b=[];
+Aeq=[];
+beq=[];
+lb=[0 0.2,-%inf];
+ub=[0.6 %inf,1];
+//Nonlinear constraints
+function [c, ceq]=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];
+endfunction
+//Gradient of objective function
+function y=fGrad(x)
+y= [x(2),x(1)+x(3),x(2)];
+endfunction
+//Hessian of the Lagrange Function
+function y=lHess(x, obj, lambda)
+y= obj*[0,1,0;1,0,1;0,1,0] + lambda(1)*[2,0,0;0,0,0;0,0,0] + lambda(2)*[2,0,0;0,2,0;0,0,0] +lambda(3)*[0,0,0;0,0,0;0,0,2] + lambda(4)*[6*x(1    ),0,0;0,0,0;0,0,0] + lambda(5)*[0,0,0;0,2,0;0,0,2];
+endfunction
+//Gradient of Non-Linear Constraints
+function [cg, ceqg]=cGrad(x)
+cg = [2*x(1),0,0;2*x(1),2*x(2),0;0,0,2*x(3)];
+ceqg = [3*x(1)^2,0,0;0,2*x(2),2*x(3)];
+endfunction
+//Options
+options=list("MaxIter", [1500], "CpuTime", [500], "GradObj", fGrad, "Hessian", lHess,"GradCon", cGrad);
+//Calling Ipopt
+[x,fval,exitflag,output,lambda,grad,hessian] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,nlc,options)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << fminbnd + + + FOSSEE Optimization Toolbox + + + fminimax >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/fminimax.html b/help/en_US/scilab_en_US_help/fminimax.html new file mode 100644 index 0000000..a701aa7 --- /dev/null +++ b/help/en_US/scilab_en_US_help/fminimax.html @@ -0,0 +1,237 @@ + + + fminimax + + + +
+ + + + +
+ << fmincon + + + FOSSEE Optimization Toolbox + + + fminunc >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > fminimax + +

+

fminimax

+

Solves minimax constraint problem

+ + +

Calling Sequence

+
xopt = fminimax(fun,x0)
+xopt = fminimax(fun,x0,A,b)
+xopt = fminimax(fun,x0,A,b,Aeq,beq)
+xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub)
+xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub,nonlinfun)
+xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub,nonlinfun,options)
+[xopt, fval] = fmincon(.....)
+[xopt, fval, maxfval]= fmincon(.....)
+[xopt, fval, maxfval, exitflag]= fmincon(.....)
+[xopt, fval, maxfval, exitflag, output]= fmincon(.....)
+[xopt, fval, maxfval, exitflag, output, lambda]= fmincon(.....)
+ +

Parameters

+
fun: +

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.

+
x0 : +

a vector of double, contains initial guess of variables.

+
A : +

a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
lb : +

a vector of double, contains lower bounds of the variables.

+
ub : +

a vector of double, contains upper bounds of the variables.

+
nonlinfun: +

function that computes the nonlinear inequality constraints c⋅x ≤ 0 and nonlinear equality constraints c⋅x = 0.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
maxfval: +

a 1x1 matrix of doubles, the maximum value in vector fval

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

fminimax 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, fminimax calls fmincon which uses the ip-opt algorithm.

+

max-min problems can also be solved with fminimax, 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. +

+

The objective function must have header : +

F = fun(x)
+where x is a n x 1 matrix of doubles and F is a m x 1 matrix of doubles where m is the total number of objective functions inside F. +On input, the variable x contains the current point and, on output, the variable F must contain the objective function values.

+

By default, the gradient options for fminimax are turned off and and fmincon does the gradient opproximation of minmaxObjfun. In case the GradObj option is off and GradConstr option is on, fminimax approximates minmaxObjfun gradient using numderivative toolbox.

+

If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.

+

Furthermore, we must enable the "GradObj" option with the statement : +

minimaxOptions = list("GradObj",fGrad);
+This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function. Note that, fGrad should be mentioned in the form of N x n where n is the number of variables, N is the number of functions in objective function.

+

The constraint function must have header : +

[c, ceq] = confun(x)
+where x is a n x 1 matrix of dominmaxUbles, c is a 1 x nni matrix of doubles and ceq is a 1 x nne matrix of doubles (nni : number of nonlinear inequality constraints, nne : number of nonlinear equality constraints). +On input, the variable x contains the current point and, on output, the variable c must contain the nonlinear inequality constraints and ceq must contain the nonlinear equality constraints.

+

By default, the gradient options for fminimax are turned off and and fmincon does the gradient opproximation of confun. In case the GradObj option is on and GradCons option is off, fminimax approximates confun gradient using numderivative toolbox.

+

If we can provide exact gradients, we should do so since it improves the convergence speed of the optimization algorithm.

+

Furthermore, we must enable the "GradCon" option with the statement : +

minimaxOptions = list("GradCon",confunGrad);
+This will let fminimax know that the exact gradient of the objective function is known, so that it can change the calling sequence to the objective function.

+

The constraint derivative function must have header : +

[dc,dceq] = confungrad(x)
+where dc is a nni x n matrix of doubles and dceq is a nne x n matrix of doubles.

+

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/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
// A basic case :
+// we provide only the objective function and the nonlinear constraint
+// function
+function f=myfun(x)
+f(1)= 2*x(1)^2 + x(2)^2 - 48*x(1) - 40*x(2) + 304;     //Objectives
+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;
+endfunction
+// The initial guess
+x0 = [0.1,0.1];
+// The expected solution : only 4 digits are guaranteed
+xopt = [4 4]
+fopt = [0 -64 -2 -8 0]
+maxfopt = 0
+// Run fminimax
+[x,fval,maxfval,exitflag,output,lambda] = fminimax(myfun, x0)
+// Press ENTER to continue
+ +

Examples

+
// 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=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;
+endfunction
+// Defining gradient of myfun
+function G=myfungrad(x)
+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 and the Jacobian
+// matrix of the constraints
+function [c, ceq]=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=[]
+endfunction
+// Defining gradient of confungrad
+function [DC, DCeq]=cgrad(x)
+// DC(:,i) = gradient of the i-th constraint
+// DC = [
+//   Dc1/Dx1  Dc1/Dx2
+//   Dc2/Dx1  Dc2/Dx2
+//   ]
+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",myfungrad,"GradCon",cgrad);
+// The initial guess
+x0 = [0,10];
+// The expected solution : only 4 digits are guaranteed
+xopt = [0.92791 7.93551]
+fopt = [6.73443  -189.778  6.73443  -8.86342  0.86342]
+maxfopt = 6.73443
+// Run fminimax
+[x,fval,maxfval,exitflag,output] = fminimax(myfun,x0,[],[],[],[],[],[], confun, minimaxOptions)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << fmincon + + + FOSSEE Optimization Toolbox + + + fminunc >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/fminunc.html b/help/en_US/scilab_en_US_help/fminunc.html new file mode 100644 index 0000000..636ea68 --- /dev/null +++ b/help/en_US/scilab_en_US_help/fminunc.html @@ -0,0 +1,180 @@ + + + fminunc + + + +
+ + + + +
+ << fminimax + + + FOSSEE Optimization Toolbox + + + linprog >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > fminunc + +

+

fminunc

+

Solves a multi-variable unconstrainted optimization problem

+ + +

Calling Sequence

+
xopt = fminunc(f,x0)
+xopt = fminunc(f,x0,options)
+[xopt,fopt] = fminunc(.....)
+[xopt,fopt,exitflag]= fminunc(.....)
+[xopt,fopt,exitflag,output]= fminunc(.....)
+[xopt,fopt,exitflag,output,gradient]=fminunc(.....)
+[xopt,fopt,exitflag,output,gradient,hessian]=fminunc(.....)
+ +

Parameters

+
f : +

a function, representing the objective function of the problem

+
x0 : +

a vector of doubles, containing the starting of variables.

+
options: +

a list, containing the option for user to specify. See below for details.

+
xopt : +

a vector of doubles, the computed solution of the optimization problem.

+
fopt : +

a scalar of double, the function value at x.

+
exitflag : +

a scalar of integer, containing the flag which denotes the reason for termination of algorithm. See below for details.

+
output : +

a structure, containing the information about the optimization. See below for details.

+
gradient : +

a vector of doubles, containing the the gradient of the solution.

+
hessian : +

a matrix of doubles, containing the the hessian of the solution.

+ +

Description

+

Search the minimum of an unconstrained optimization problem specified by : +Find the minimum of f(x) such that

+

+

The routine calls Ipopt for solving the Un-constrained Optimization problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//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];
+//Gradient of objective function
+function y=fGrad(x)
+y= [-400*x(1)*x(2) + 400*x(1)^3 + 2*x(1)-2, 200*(x(2)-x(1)^2)];
+endfunction
+//Hessian of Objective Function
+function y=fHess(x)
+y= [1200*x(1)^2- 400*x(2) + 2, -400*x(1);-400*x(1), 200 ];
+endfunction
+//Options
+options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", fGrad, "Hessian", fHess);
+//Calling Ipopt
+[xopt,fopt,exitflag,output,gradient,hessian]=fminunc(f,x0,options)
+// Press ENTER to continue
+ +

Examples

+
//Find x in R^2 such that the below function is minimum
+//f = x1^2 + x2^2
+//Objective function to be minimised
+function y=f(x)
+y= x(1)^2 + x(2)^2;
+endfunction
+//Starting point
+x0=[2,1];
+//Calling Ipopt
+[xopt,fopt]=fminunc(f,x0)
+// Press ENTER to continue
+ +

Examples

+
//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=f(x)
+y= -x(1)^2 - x(2)^2;
+endfunction
+//Starting point
+x0=[2,1];
+//Gradient of objective function
+function y=fGrad(x)
+y= [-2*x(1),-2*x(2)];
+endfunction
+//Hessian of Objective Function
+function y=fHess(x)
+y= [-2,0;0,-2];
+endfunction
+//Options
+options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", fGrad, "Hessian", fHess);
+//Calling Ipopt
+[xopt,fopt,exitflag,output,gradient,hessian]=fminunc(f,x0,options)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << fminimax + + + FOSSEE Optimization Toolbox + + + linprog >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/index.html b/help/en_US/scilab_en_US_help/index.html new file mode 100644 index 0000000..7bbe95e --- /dev/null +++ b/help/en_US/scilab_en_US_help/index.html @@ -0,0 +1,352 @@ + + + + + + +
+ + + + +
+ + + + + +
+
+
+ + + + +

+

FOSSEE Optimization Toolbox

+ +
+ +
+ + + + + + +
Report an issue
+ + + + + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/jhelpidx.xml b/help/en_US/scilab_en_US_help/jhelpidx.xml new file mode 100644 index 0000000..aa5a66e --- /dev/null +++ b/help/en_US/scilab_en_US_help/jhelpidx.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelpmap.jhm b/help/en_US/scilab_en_US_help/jhelpmap.jhm new file mode 100644 index 0000000..f46a5e3 --- /dev/null +++ b/help/en_US/scilab_en_US_help/jhelpmap.jhm @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelpset.hs b/help/en_US/scilab_en_US_help/jhelpset.hs new file mode 100644 index 0000000..373577e --- /dev/null +++ b/help/en_US/scilab_en_US_help/jhelpset.hs @@ -0,0 +1,28 @@ + + + +FOSSEE Optimization Toolbox + +top + + + +TOC + +javax.help.TOCView +jhelptoc.xml + + +Index + +javax.help.IndexView +jhelpidx.xml + + +Search + +javax.help.SearchView +JavaHelpSearch + + \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelptoc.xml b/help/en_US/scilab_en_US_help/jhelptoc.xml new file mode 100644 index 0000000..c4d5a12 --- /dev/null +++ b/help/en_US/scilab_en_US_help/jhelptoc.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/linprog.html b/help/en_US/scilab_en_US_help/linprog.html new file mode 100644 index 0000000..157265a --- /dev/null +++ b/help/en_US/scilab_en_US_help/linprog.html @@ -0,0 +1,192 @@ + + + linprog + + + +
+ + + + +
+ << fminunc + + + FOSSEE Optimization Toolbox + + + lsqlin >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > linprog + +

+

linprog

+

Solves a linear programming problem.

+ + +

Calling Sequence

+
xopt = linprog(c,A,b)
+xopt = linprog(c,A,b,Aeq,beq)
+xopt = linprog(c,A,b,Aeq,beq,lb,ub)
+xopt = linprog(c,A,b,Aeq,beq,lb,ub,param)
+xopt = linprog(file)
+xopt = linprog(file,param)
+[xopt,fopt,exitflag,output,lambda] = linprog( ... )
+ +

Parameters

+
c : +

a vector of double, contains coefficients of the variables in the objective

+
A : +

a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
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 parameters to be set.

+
file : +

a string describing the path to the mps file.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
status : +

status flag returned from symphony. See below for details.

+
output : +

The output data structure contains detailed information about the optimization process. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

OSI-CLP is used for solving the linear programming problems, OSI-CLP is a library written in C++. +Search the minimum of a constrained linear programming problem specified by :

+

+

The routine calls Clp for solving the linear programming problem, Clp 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. In the current version it only contains maxiter. +

+

The exitflag allows to know the status of the optimization which is given back by CLP. +

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//Optimal problems
+//Linear program, linear inequality constraints
+c=[-1,-1/3]'
+A=[1,1;1,1/4;1,-1;-1/4,-1;-1,-1;-1,1]
+b=[2,1,2,1,-1,2]
+[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b)
+// Press ENTER to continue
+ +

Examples

+
//Linear program with Linear Inequalities and Equalities`
+c=[-1,-1/3]'
+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/4]
+beq=[1/2]
+[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b, Aeq, beq)
+// Press ENTER to continue
+ +

Examples

+
//Linear program with all constraint types
+c=[-1,-1/3]'
+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/4]
+beq=[1/2]
+lb=[-1,-0.5]
+ub=[1.5,1.25]
+[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b, Aeq, beq, lb, ub)
+// Press ENTER to continue
+ +

Examples

+
//Primal Infeasible Problem
+c=[-1,-1,-1]'
+A=[1,2,-1]
+b=[-4]
+Aeq=[1,5,3;1,1,0]
+beq=[10,100]
+lb=[0,0,0]
+ub=[%inf,%inf,%inf]
+[xopt,fopt,exitflag,output,lambda]= linprog(c,A,b,Aeq,beq,lb,ub)
+// Press ENTER to continue
+ +

Examples

+
//Dual Infeasible Problem
+c=[3,5,-7]'
+A=[-1,-1,4;1,1,4]
+b=[-8,5]
+Aeq=[]
+beq=[]
+lb=[-%inf,-%inf,-%inf]
+ub=[%inf,%inf,%inf]
+[xopt,fopt,exitflag,output,lambda]= linprog(c,A,b,Aeq,beq,lb,ub)
+// Press ENTER to continue
+ +

Examples

+
filepath = get_absolute_file_path('linprog.dem.sce');
+filepath = filepath + "exmip1.mps"
+[xopt,fopt,exitflag,output,lambda] =linprog(filepath)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << fminunc + + + FOSSEE Optimization Toolbox + + + lsqlin >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/lsqlin.html b/help/en_US/scilab_en_US_help/lsqlin.html new file mode 100644 index 0000000..1343385 --- /dev/null +++ b/help/en_US/scilab_en_US_help/lsqlin.html @@ -0,0 +1,175 @@ + + + lsqlin + + + +
+ + + + +
+ << linprog + + + FOSSEE Optimization Toolbox + + + lsqnonneg >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > lsqlin + +

+

lsqlin

+

Solves a linear quadratic problem.

+ + +

Calling Sequence

+
xopt = lsqlin(C,d,A,b)
+xopt = lsqlin(C,d,A,b,Aeq,beq)
+xopt = lsqlin(C,d,A,b,Aeq,beq,lb,ub)
+xopt = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0)
+xopt = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0,param)
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin( ... )
+ +

Parameters

+
C : +

a matrix of double, represents the multiplier of the solution x in the expression C⋅x - d. Number of columns in C is equal to the number of elements in x.

+
d : +

a vector of double, represents the additive constant term in the expression C⋅x - d. Number of elements in d is equal to the number of rows in C matrix.

+
A : +

a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
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 parameters to be set.

+
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 double, solution residuals returned as the vector d-C⋅x.

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

Search the minimum of a constrained linear least square problem specified by :

+

+

The routine calls Ipopt for solving the linear least square problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//A simple linear least square example
+C = [ 2 0;
+-1 1;
+0 2]
+d = [1
+0
+-1];
+A = [10 -2;
+-2 10];
+b = [4
+-4];
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+// Press ENTER to continue
+ +

Examples

+
//A basic example for equality, inequality constraints and variable bounds
+C = [1 1 1;
+1 1 0;
+0 1 1;
+1 0 0;
+0 0 1]
+d = [89;
+67;
+53;
+35;
+20;]
+A = [3 2 1;
+2 3 4;
+1 2 3];
+b = [191
+209
+162];
+Aeq = [1 2 1];
+beq = 10;
+lb = repmat(0.1,3,1);
+ub = repmat(4,3,1);
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << linprog + + + FOSSEE Optimization Toolbox + + + lsqnonneg >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/lsqnonneg.html b/help/en_US/scilab_en_US_help/lsqnonneg.html new file mode 100644 index 0000000..a095226 --- /dev/null +++ b/help/en_US/scilab_en_US_help/lsqnonneg.html @@ -0,0 +1,129 @@ + + + lsqnonneg + + + +
+ + + + +
+ << lsqlin + + + FOSSEE Optimization Toolbox + + + qpipopt >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > lsqnonneg + +

+

lsqnonneg

+

Solves nonnegative least-squares curve fitting problems.

+ + +

Calling Sequence

+
xopt = lsqnonneg(C,d)
+xopt = lsqnonneg(C,d,param)
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg( ... )
+ +

Parameters

+
C : +

a matrix of double, represents the multiplier of the solution x in the expression C⋅x - d. Number of columns in C is equal to the number of elements in x.

+
d : +

a vector of double, represents the additive constant term in the expression C⋅x - d. Number of elements in d is equal to the number of rows in C matrix.

+
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 double, solution residuals returned as the vector d-C⋅x.

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

Solves nonnegative least-squares curve fitting problems specified by :

+

+

The routine calls Ipopt for solving the nonnegative least-squares curve fitting problems, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
// A basic lsqnonneg problem
+C = [1 1 1;
+1 1 0;
+0 1 1;
+1 0 0;
+0 0 1]
+d = [89;
+67;
+53;
+35;
+20;]
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << lsqlin + + + FOSSEE Optimization Toolbox + + + qpipopt >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/qpipopt.html b/help/en_US/scilab_en_US_help/qpipopt.html new file mode 100644 index 0000000..1a6911b --- /dev/null +++ b/help/en_US/scilab_en_US_help/qpipopt.html @@ -0,0 +1,175 @@ + + + qpipopt + + + +
+ + + + +
+ << lsqnonneg + + + FOSSEE Optimization Toolbox + + + qpipoptmat >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > qpipopt + +

+

qpipopt

+

Solves a linear quadratic problem.

+ + +

Calling Sequence

+
xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
+xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0)
+xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+[xopt,fopt,exitflag,output,lamda] = qpipopt( ... )
+ +

Parameters

+
nbVar : +

a double, number of variables

+
nbCon : +

a double, number of constraints

+
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

+
lb : +

a vector of double, contains lower bounds of the variables.

+
ub : +

a vector of double, contains upper bounds of the variables.

+
A : +

a matrix of double, contains the constraint matrix conLB ≤ A⋅x ≤ conUB.

+
conLB : +

a vector of double, contains lower bounds of the constraints conLB ≤ A⋅x ≤ conUB.

+
conUB : +

a vector of double, contains upper bounds of the constraints conLB ≤ A⋅x ≤ conUB.

+
x0 : +

a vector of double, contains initial guess of variables.

+
param : +

a list containing the parameters to be set.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

Search the minimum of a constrained linear quadratic optimization problem specified by :

+

+

The routine calls Ipopt for solving the quadratic problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//Ref : example 14 :
+//https://www.me.utexas.edu/~jensen/ORMM/supplements/methods/nlpmethod/S2_quadratic.pdf
+// min. -8*x1*x1 -16*x2*x2 + x1 + 4*x2
+// such that
+//    x1 + x2 <= 5,
+//    x1 <= 3,
+//    x1 >= 0,
+//    x2 >= 0
+H = [2 0
+0 8];
+f = [-8; -16];
+A = [1 1;1 0];
+conUB = [5;3];
+conLB = [-%inf; -%inf];
+lb = [0; 0];
+ub = [%inf; %inf];
+nbVar = 2;
+nbCon = 2;
+[xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
+//Press ENTER to continue
+ +

Examples

+
//Find x in R^6 such that:
+A= [1,-1,1,0,3,1;
+-1,0,-3,-4,5,6;
+2,5,3,0,1,0
+0,1,0,1,2,-1;
+-1,0,2,1,1,0];
+conLB=[1;2;3;-%inf;-%inf];
+conUB = [1;2;3;-1;2.5];
+lb=[-1000;-10000; 0; -1000; -1000; -1000];
+ub=[10000; 100; 1.5; 100; 100; 1000];
+//and minimize 0.5*x'⋅H⋅x + f'⋅x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+nbVar = 6;
+nbCon = 5;
+x0 = repmat(0,nbVar,1);
+param = list("MaxIter", 300, "CpuTime", 100);
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << lsqnonneg + + + FOSSEE Optimization Toolbox + + + qpipoptmat >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/qpipoptmat.html b/help/en_US/scilab_en_US_help/qpipoptmat.html new file mode 100644 index 0000000..f5498bf --- /dev/null +++ b/help/en_US/scilab_en_US_help/qpipoptmat.html @@ -0,0 +1,171 @@ + + + qpipoptmat + + + +
+ + + + +
+ << qpipopt + + + FOSSEE Optimization Toolbox + + + symphony >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > qpipoptmat + +

+

qpipoptmat

+

Solves a linear quadratic problem.

+ + +

Calling Sequence

+
xopt = qpipoptmat(H,f)
+xopt = qpipoptmat(H,f,A,b)
+xopt = qpipoptmat(H,f,A,b,Aeq,beq)
+xopt = qpipoptmat(H,f,A,b,Aeq,beq,lb,ub)
+xopt = qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0)
+xopt = qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0,param)
+[xopt,fopt,exitflag,output,lamda] = qpipoptmat( ... )
+ +

Parameters

+
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 matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
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 parameters to be set.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
exitflag : +

The exit status. See below for details.

+
output : +

The structure consist of statistics about the optimization. See below for details.

+
lambda : +

The structure consist of the Lagrange multipliers at the solution of problem. See below for details.

+ +

Description

+

Search the minimum of a constrained linear quadratic optimization problem specified by :

+

+

The routine calls Ipopt for solving the quadratic problem, Ipopt 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 ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//Ref : example 14 :
+//https://www.me.utexas.edu/~jensen/ORMM/supplements/methods/nlpmethod/S2_quadratic.pdf
+// min. -8*x1*x1 -16*x2*x2 + x1 + 4*x2
+// such that
+//    x1 + x2 <= 5,
+//    x1 <= 3,
+//    x1 >= 0,
+//    x2 >= 0
+H = [2 0
+0 8];
+f = [-8; -16];
+A = [1 1;1 0];
+b = [5;3];
+lb = [0; 0];
+ub = [%inf; %inf];
+[xopt,fopt,exitflag,output,lambda] = qpipoptmat(H,f,A,b,[],[],lb,ub)
+// 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);
+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);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0,param)
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << qpipopt + + + FOSSEE Optimization Toolbox + + + symphony >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/scilab_code.css b/help/en_US/scilab_en_US_help/scilab_code.css new file mode 100644 index 0000000..658f42e --- /dev/null +++ b/help/en_US/scilab_en_US_help/scilab_code.css @@ -0,0 +1,96 @@ +.scilabcomment { + font-style: italic; + color: #01a801 +} + +.scilabdefault { + font-style: normal; + color: #000000 +} + +.scilabspecial { + font-style: normal; + color: #ffaa00 +} + +.scilabconstants { + font-style: normal; + color: #da70d6 +} + +.scilaboperator { + font-style: normal; + color: #5c5c5c +} + +.scilabnumber { + font-style: normal; + color: #bc8f8f +} + +.scilabfkeyword { + font-style: normal; + color: #b01813 +} + +.scilabskeyword { + font-style: normal; + color: #a020f0 +} + +.scilabckeyword { + font-style: normal; + color: #5f9ea0 +} + +.scilabcommand { + font-style: normal; + color: #32b9b9 +} + +.scilabmacro { + font-style: normal; + color: #ae5cb0 +} + +a.scilabcommand { + font-style: normal; + text-decoration: underline; + color: #32b9b9 +} + +a.scilabmacro { + font-style: normal; + text-decoration: underline; + color: #ae5cb0 +} + +.scilabstring { + font-style: normal; + color: #bc8f8f +} + +.scilabid { + font-style: normal; + color: #000000 +} + +.scilabinputoutputargs { + font-weight: bold; + color: #834310 +} + +.scilabfunctionid { + font-weight: bold; + color: #000000 +} + +.scilabfield { + font-style: normal; + color: #aaaaaa +} + +.scilabopenclose { + font-style: normal; + color: #4a55db +} diff --git a/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html b/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html new file mode 100644 index 0000000..b34093f --- /dev/null +++ b/help/en_US/scilab_en_US_help/section_19f4f1e5726c01d683e8b82be0a7e910.html @@ -0,0 +1,352 @@ + + + + + + +
+ + + + +
+ + + FOSSEE Optimization Toolbox + + + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox + +

+

FOSSEE Optimization Toolbox

+ +
+ +
+ + + + + + +
Report an issue
+ + + FOSSEE Optimization Toolbox + + + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/section_508f0b211d17ea6769714cc144e6b731.html b/help/en_US/scilab_en_US_help/section_508f0b211d17ea6769714cc144e6b731.html new file mode 100644 index 0000000..b3b3135 --- /dev/null +++ b/help/en_US/scilab_en_US_help/section_508f0b211d17ea6769714cc144e6b731.html @@ -0,0 +1,285 @@ + + + + + + +
+ + + + +
+ << symphonymat + + + FOSSEE Optimization Toolbox + + + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions + +

+

Symphony Native Functions

+ +
+ +
+ + + + + + +
Report an issue
+ << symphonymat + + + FOSSEE Optimization Toolbox + + + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/style.css b/help/en_US/scilab_en_US_help/style.css new file mode 100644 index 0000000..0fe8923 --- /dev/null +++ b/help/en_US/scilab_en_US_help/style.css @@ -0,0 +1,350 @@ +body { + color:#000000; + background-color:#ffffff; + font-family:sans-serif; + font-size:100%; + margin:5px; + padding:0; + background : url("/img/body.png"); + background-repeat : repeat-x; +} + +.para { + padding-left: 10px; +} + +.refname { + color: #ff6c0a; +} +.refpurpose { + font-size: 110%; +} + +.synopsis { + border: 1px solid black; + width:80%; + padding: 0.5em; +} + +.editbar { + text-align: right; +} + +.term { + color:#800000; + font-size:100%; +} + +h3 { + color: #000063; + font-weight: bold; + font-size:130%; + margin-bottom: 10px; +} + +.programlisting { + font-family: monospace; + font-size: 100%; + background-color:#EEEEFF; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + width:80%; + color:#333333; + line-height:120%; + padding:10px; +} + +.literal { + font-family: monospace; + font-size: 100%; +} + +.option { + font-family: monospace; + font-style: italic; + font-size: 100%; +} + +.command { + font-family: monospace; + font-size: 100%; + color: #32b9b9; +} + +.function { + font-family: monospace; + font-size: 100%; + color: #32b9b9; +} + +.varname { + font-family: monospace; + font-weight: bold; + font-size: 100%; +} + +.constant { + font-family: monospace; + font-size: 100%; + color: #da70d6; +} + +a { + color: blue; + text-decoration:none; +} + +a:hover { + text-decoration:underline; +} + +.itemizedlist { + list-style-type: disk; +} + +.inline-list li { + display: inline; + list-style-type: disk; +} + +.vert-list { + list-style-type: disk; +} + +pre { + margin-bottom: 0px; + margin-top: 0px; +} + +.leftpart { + position:absolute; + float:left; + width: 186px; + padding: 5px; + font-size: smaller; +} + +.content { + margin-top: 100px; + margin-left: 196px +} + +.container { + margin: 0 auto; + width:1024px; +} + +ul.toc li.list-active { + list-style-type:disc; + font-weight:bold; +} + +ul.toc li.parent { + font-size: 115%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} + +ul.toc li.root { + font-size: 135%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} + +ul.toc li { + font-size: 85%; + margin: 1px 0 1px 1px; + padding: 1px 0 1px 11px; + background-repeat: no-repeat; + background-position: center left; + list-style-type: circle; +} + +.next { + float:right; + text-align: right; +} + +.center { + text-align: center; +} + +.screen { + font-family: monospace; + font-size: 100%; + background-color:#FFFFFF; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + width:80%; + color:#333333; + line-height:120%; + padding:10px; +} + +/* Top and bottom navigation controls on manual pages --------------------- */ +div.manualnavbar { + background-color: #E0E0E0; + color: inherit; + padding: 4px; + margin-bottom: 10px; +} +div.manualnavbar .prev { + padding-right: 4px; +} +div.manualnavbar .next { + text-align: right; + padding-left: 4px; +} + +div.manualnavbar .top { + text-align: center; + display: block; +} + +div.manualnavbar hr { + color: #cccccc; + background-color: #cccccc; +} + +/* Footer navigation area ------------------------------------------------- */ + +#pagefooter { + position: relative; + font-size: 75%; + color: inherit; + background-color: #e5e5e5; + width: 100%; +} + +#pagefooterleft { + top: 0px; + left: 0px; + padding: 6px; + margin-right: 30%; +} + +#pagefooterright { + text-align: right; + margin-left: 50%; + padding: 6px; +} +#footnav { + color: inherit; + background-color: #9999cc; + border-width: 1px 0px; + border-color: #333366; + border-style: solid; + text-align: right; + padding-right: 6px; +} + + + + + #global{ +/* width: 90%; */ + max-width: 90em; +/* min-width: 850px; */ + margin-left: auto; + margin-right: auto; + } + + #myHeader{ + background-color:#000000; + color:white; + margin-bottom : 10px; + position : relative; + text-align: center; +/* width : 1024px;*/ + height : 100px; + padding-left : 20px; + background : url("http://atoms.scilab.org/images/homepage/cadre_head.png"); + background-repeat : no-repeat; + background-position : 0px 0px; + + } + + #myFooter{ + background-color:#E5E5E5; + font-color:black; +/* width: 90%;*/ + max-width: 90em; +/* min-width: 850px; + margin-left: 5%; + margin-right: 5%;*/ + margin-top:10px; + padding:10px; + } + + #mainArea{ + width: 100%; + overflow: hidden; + } + + #myLeftArea{ + color:white; + float: left; + width: 180px; + padding:5px; + } + + #myMiddleArea{ + color:black; + margin-left: 200px; + padding: 10px 20px; + } + + #myRightArea{ + color:white; + float: right; + width: 200px; + padding: 12px 20px; + } + + +div#cadre_head +{ + position : relative; + text-align: center; +/* width : 1024px;*/ + height : 100px; + padding-left : 20px; + background : url("/img/cadre_head.png"); + background-repeat : no-repeat; + background-position : 0px 0px; +} + + +div#slogan{ + position: absolute; + top : 50px; + left:251px; + color:#0000AA; + font: 120%, Georgia,Serif; +} +div#cadre_help +{ + position: absolute; + top:45px; + right:0px; + font-size:0.8em; + color:#0000AA; +} + +table.revhistory +{ + width:80%; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + margin-bottom: 10px; +} + +table.revhistory tr.title td +{ + background-color: #9999CC; +} \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/sym_addConstr.html b/help/en_US/scilab_en_US_help/sym_addConstr.html new file mode 100644 index 0000000..230d2f8 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_addConstr.html @@ -0,0 +1,91 @@ + + + sym_addConstr + + + +
+ + + + +
+ << Symphony Native Functions + + + Symphony Native Functions + + + sym_addVar >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_addConstr + +

+

sym_addConstr

+

Add a new constraint

+ +

Calling Sequence

+
sym_addConstr(coeff,type,bound1[,bound2])
+ +

Description

+ +

This function adds a new constraint from scratch. Supported types of constraints are less than or equal to, more than or equal to, equal to, or ranged.

+

The last argument is only required for ranged constraints. For the other types of constraints, only the third argument is required.

+ +

Arguments

+ +
coeff +

Sparse matrix representing coefficients of the variables in the new constraint (must have 1 row and number of columns equal to number of variables)

+
type +

Type of the new constraint. Supported types: less than or equal to ("L"), greater than or equal to ("G"), equal to ("E"), or ranged ("R")

+
bound1 +

The first (or only) bound for the constraint

+
bound2 +

The second bound for ranged constraints. The two bounds for ranged constraints can be in any order.

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_addConstr(sparse([0,0,1,0,2]),"R",0,10)
+
sym_addConstr(sparse([0,0,1,1,0]),"G",4)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << Symphony Native Functions + + + Symphony Native Functions + + + sym_addVar >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_addVar.html b/help/en_US/scilab_en_US_help/sym_addVar.html new file mode 100644 index 0000000..29cb8c6 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_addVar.html @@ -0,0 +1,93 @@ + + + sym_addVar + + + +
+ + + + +
+ << sym_addConstr + + + Symphony Native Functions + + + sym_close >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_addVar + +

+

sym_addVar

+

Add a new variable

+ +

Calling Sequence

+
sym_addVar(coeff,lower,upper,obj,isInt,name)
+ +

Description

+ +

This function adds a new variable from scratch.

+ +

Arguments

+ +
coeff +

Sparse matrix representing coefficients of the new variable in the existing constraints (must have 1 column and number of rows equal to number of constraints)

+
lower +

Lower bound of the new variable

+
upper +

Upper bound of the new variable

+
obj +

Coefficient of the variable in the objective function

+
isInt +

Wether the variable is constrainted to be an integer (boolean %t or %f)

+
name +

Name of the new variable

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_addVar(sparse([0;0;1;2;0;0]),0,%inf,1.2,%t,"part1")
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_addConstr + + + Symphony Native Functions + + + sym_close >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_close.html b/help/en_US/scilab_en_US_help/sym_close.html new file mode 100644 index 0000000..c78dd36 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_close.html @@ -0,0 +1,84 @@ + + + sym_close + + + +
+ + + + +
+ << sym_addVar + + + Symphony Native Functions + + + sym_deleteConstrs >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_close + +

+

sym_close

+

Close the Symphony environment

+ +

Calling Sequence

+
sym_close()
+ +

Description

+ +

Closes the already open Symphony environment.

+

Warning: All data loaded into the environment is deleted.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns 1 if the environment was successfully closed and 0 otherwise

+ +

Examples

+ +
sym_close()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_addVar + + + Symphony Native Functions + + + sym_deleteConstrs >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_deleteConstrs.html b/help/en_US/scilab_en_US_help/sym_deleteConstrs.html new file mode 100644 index 0000000..6f269ef --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_deleteConstrs.html @@ -0,0 +1,81 @@ + + + sym_deleteConstrs + + + +
+ + + + +
+ << sym_close + + + Symphony Native Functions + + + sym_deleteVars >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_deleteConstrs + +

+

sym_deleteConstrs

+

This routine is used to delete rows from the original constraint matrix.

+ +

Calling Sequence

+
sym_deleteConstrs(indices)
+ +

Description

+ +

Arguments

+ +
indices +

An array indicating the indices of the rows to be deleted.

+ +

Return value

+ +

Returns 0 if the constraints specified in the indices are deleted successfully and 0 if it returns corresponding to an error value.

+ +

Examples

+ +
status=sym_deleteConstrs([1,2])
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_close + + + Symphony Native Functions + + + sym_deleteVars >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_deleteVars.html b/help/en_US/scilab_en_US_help/sym_deleteVars.html new file mode 100644 index 0000000..37d9dcb --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_deleteVars.html @@ -0,0 +1,81 @@ + + + sym_deleteVars + + + +
+ + + + +
+ << sym_deleteConstrs + + + Symphony Native Functions + + + sym_getConstrActivity >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_deleteVars + +

+

sym_deleteVars

+

This routine is used to delete columns from the original problem description.

+ +

Calling Sequence

+
sym_deleteVars(indices)
+ +

Description

+ +

Arguments

+ +
indices +

Pointer to an integer type array indicating the indices of the column numbers(variables) to be deleted.

+ +

Return value

+ +

Returns 0 if the column numbers specified are deleted successfully and 0 if the deletion of column indices did not execute successfully and it returns with an error return value

+ +

Examples

+ +
status=sym_deleteVars([1,2])
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_deleteConstrs + + + Symphony Native Functions + + + sym_getConstrActivity >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getConstrActivity.html b/help/en_US/scilab_en_US_help/sym_getConstrActivity.html new file mode 100644 index 0000000..01f5b1e --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getConstrActivity.html @@ -0,0 +1,83 @@ + + + sym_getConstrActivity + + + +
+ + + + +
+ << sym_deleteVars + + + Symphony Native Functions + + + sym_getConstrLower >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getConstrActivity + +

+

sym_getConstrActivity

+

Get the activity of the constraints in the solution

+ +

Calling Sequence

+
sym_getConstrActivity()
+ +

Description

+ +

Get the activity of the constraints in the solution.

+

This function may fail if the problem has not been solved already. Use sym_solve() in this case.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns a matrix with 1 column and number of rows equal to number of constraints, that represents the activities of those constraints

+ +

Examples

+ +
sym_getConstrActivity()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_deleteVars + + + Symphony Native Functions + + + sym_getConstrLower >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getConstrLower.html b/help/en_US/scilab_en_US_help/sym_getConstrLower.html new file mode 100644 index 0000000..12e89e0 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getConstrLower.html @@ -0,0 +1,83 @@ + + + sym_getConstrLower + + + +
+ + + + +
+ << sym_getConstrActivity + + + Symphony Native Functions + + + sym_getConstrRange >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getConstrLower + +

+

sym_getConstrLower

+

To get the lower bounds of the constraints.

+ +

Calling Sequence

+
sym_getConstrLower()
+ +

Description

+ +

This routine is used to get lower bounds of constraints.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a column vector of lower bounds of constraints.

+ +

Examples

+ +
ans=sym_getConstrLower()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getConstrActivity + + + Symphony Native Functions + + + sym_getConstrRange >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getConstrRange.html b/help/en_US/scilab_en_US_help/sym_getConstrRange.html new file mode 100644 index 0000000..214e500 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getConstrRange.html @@ -0,0 +1,83 @@ + + + sym_getConstrRange + + + +
+ + + + +
+ << sym_getConstrLower + + + Symphony Native Functions + + + sym_getConstrSense >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getConstrRange + +

+

sym_getConstrRange

+

To to get the constraint ranges.

+ +

Calling Sequence

+
sym_getConstrRange()
+ +

Description

+ +

This routine is used to get the constraint ranges.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a column vector of the constraint ranges.

+ +

Examples

+ +
ans=sym_getConstrRange()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getConstrLower + + + Symphony Native Functions + + + sym_getConstrSense >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getConstrSense.html b/help/en_US/scilab_en_US_help/sym_getConstrSense.html new file mode 100644 index 0000000..e0802be --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getConstrSense.html @@ -0,0 +1,83 @@ + + + sym_getConstrSense + + + +
+ + + + +
+ << sym_getConstrRange + + + Symphony Native Functions + + + sym_getConstrUpper >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getConstrSense + +

+

sym_getConstrSense

+

To get the row senses.

+ +

Calling Sequence

+
sym_getConstrSense()
+ +

Description

+ +

This routine is used to get the row senses.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a column vector of the row senses.

+ +

Examples

+ +
ans=sym_getConstrSense()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getConstrRange + + + Symphony Native Functions + + + sym_getConstrUpper >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getConstrUpper.html b/help/en_US/scilab_en_US_help/sym_getConstrUpper.html new file mode 100644 index 0000000..df3f2eb --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getConstrUpper.html @@ -0,0 +1,83 @@ + + + sym_getConstrUpper + + + +
+ + + + +
+ << sym_getConstrSense + + + Symphony Native Functions + + + sym_getDblParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getConstrUpper + +

+

sym_getConstrUpper

+

To get the upper bounds of the constraints.

+ +

Calling Sequence

+
sym_getConstrUpper()
+ +

Description

+ +

This routine is used to get upper bounds of the constraints.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a column vector of upper bounds of constraints.

+ +

Examples

+ +
ans=sym_getConstrUpper()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getConstrSense + + + Symphony Native Functions + + + sym_getDblParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getDblParam.html b/help/en_US/scilab_en_US_help/sym_getDblParam.html new file mode 100644 index 0000000..39c59e2 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getDblParam.html @@ -0,0 +1,81 @@ + + + sym_getDblParam + + + +
+ + + + +
+ << sym_getConstrUpper + + + Symphony Native Functions + + + sym_getInfinity >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getDblParam + +

+

sym_getDblParam

+

This routine is used to get the value of a double type parameter.

+ +

Calling Sequence

+
sym_getDblParam(key)
+ +

Description

+ +

Arguments

+ +
key +

The name of the double parameter whose value has to be retrieved. Note: should be given within " "

+ +

Return value

+ +

Returns 0 if the parameter's value has been successfully retrieved and displayed on the console ,else 1 is returned corressponding to an error value for the unsuccessful execution of the function

+ +

Examples

+ +
status=sym_getDblParam("time_limit")
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getConstrUpper + + + Symphony Native Functions + + + sym_getInfinity >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getInfinity.html b/help/en_US/scilab_en_US_help/sym_getInfinity.html new file mode 100644 index 0000000..29696da --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getInfinity.html @@ -0,0 +1,82 @@ + + + sym_getInfinity + + + +
+ + + + +
+ << sym_getDblParam + + + Symphony Native Functions + + + sym_getIntParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getInfinity + +

+

sym_getInfinity

+

Get Symphony's infinity value

+ +

Calling Sequence

+
sym_getInfinity()
+ +

Description

+ +

Get the value that Symphony considers to be infinity. This is equal to 10^20.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns the infinity value of Symphony

+ +

Examples

+ +
sym_getInfinity()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getDblParam + + + Symphony Native Functions + + + sym_getIntParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getIntParam.html b/help/en_US/scilab_en_US_help/sym_getIntParam.html new file mode 100644 index 0000000..55dc0eb --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getIntParam.html @@ -0,0 +1,81 @@ + + + sym_getIntParam + + + +
+ + + + +
+ << sym_getInfinity + + + Symphony Native Functions + + + sym_getIterCount >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getIntParam + +

+

sym_getIntParam

+

This routine is used to get the value of an integer type parameter.

+ +

Calling Sequence

+
sym_getIntParam(key)
+ +

Description

+ +

Arguments

+ +
key +

The name of the integer parameter whose value has to be retrieved. Note: should be given within " "

+ +

Return value

+ +

Returns 0 if the parameter's value has been successfully retrieved and displayed on the console ,else 1 is returned corressponding to an error value for the unsuccessful execution of the function

+ +

Examples

+ +
status=sym_getIntParam("verbosity")
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getInfinity + + + Symphony Native Functions + + + sym_getIterCount >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getIterCount.html b/help/en_US/scilab_en_US_help/sym_getIterCount.html new file mode 100644 index 0000000..ee3757b --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getIterCount.html @@ -0,0 +1,83 @@ + + + sym_getIterCount + + + +
+ + + + +
+ << sym_getIntParam + + + Symphony Native Functions + + + sym_getMatrix >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getIterCount + +

+

sym_getIterCount

+

To get the number of the analyzed nodes of the branching tree after solving the problem.

+ +

Calling Sequence

+
sym_getIterCount()
+ +

Description

+ +

This routine is used to get the number of the analyzed nodes of the branching tree after solving the problem.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns iteration count.

+ +

Examples

+ +
ans=sym_getIterCount()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getIntParam + + + Symphony Native Functions + + + sym_getMatrix >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getMatrix.html b/help/en_US/scilab_en_US_help/sym_getMatrix.html new file mode 100644 index 0000000..9f0f608 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getMatrix.html @@ -0,0 +1,83 @@ + + + sym_getMatrix + + + +
+ + + + +
+ << sym_getIterCount + + + Symphony Native Functions + + + sym_getNumConstr >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getMatrix + +

+

sym_getMatrix

+

To get the constraint matrix.

+ +

Calling Sequence

+
sym_getMatrix()
+ +

Description

+ +

This routine is used to get the constraint matrix as sparse matrix in a standard row-ordered format.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a row-ordered sparse matrix.

+ +

Examples

+ +
ans=sym_getMatrix()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getIterCount + + + Symphony Native Functions + + + sym_getNumConstr >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getNumConstr.html b/help/en_US/scilab_en_US_help/sym_getNumConstr.html new file mode 100644 index 0000000..7b54f83 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getNumConstr.html @@ -0,0 +1,82 @@ + + + sym_getNumConstr + + + +
+ + + + +
+ << sym_getMatrix + + + Symphony Native Functions + + + sym_getNumElements >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getNumConstr + +

+

sym_getNumConstr

+

To get the number of the constraints of the current problem.

+ +

Calling Sequence

+
sym_getNumConstr()
+ +

Description

+ +

This routine is used to get the number of the constraints of the current problem.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

If there was an error it prints error message to Scilab console and returns -1, else it returns a number ( >=0 ) as number of constraints.

+ +

Examples

+ +
ans=sym_getNumConstr()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getMatrix + + + Symphony Native Functions + + + sym_getNumElements >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getNumElements.html b/help/en_US/scilab_en_US_help/sym_getNumElements.html new file mode 100644 index 0000000..8f59387 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getNumElements.html @@ -0,0 +1,82 @@ + + + sym_getNumElements + + + +
+ + + + +
+ << sym_getNumConstr + + + Symphony Native Functions + + + sym_getNumVar >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getNumElements + +

+

sym_getNumElements

+

To get the number of non-zero entries of the constraint matrix of the current problem.

+ +

Calling Sequence

+
sym_getNumElements()
+ +

Description

+ +

This routine is used to get the number of non-zero entries of the constraint matrix of the current problem.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

If there was an error, it prints error message to Scilab console and returns -1, else it returns a number ( >=0 ) as number of non-zero elements.

+ +

Examples

+ +
ans=sym_getNumElements()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getNumConstr + + + Symphony Native Functions + + + sym_getNumVar >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getNumVar.html b/help/en_US/scilab_en_US_help/sym_getNumVar.html new file mode 100644 index 0000000..f5ba3f6 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getNumVar.html @@ -0,0 +1,82 @@ + + + sym_getNumVar + + + +
+ + + + +
+ << sym_getNumElements + + + Symphony Native Functions + + + sym_getObjCoeff >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getNumVar + +

+

sym_getNumVar

+

To get the number of the variables of the current problem.

+ +

Calling Sequence

+
sym_getNumVar()
+ +

Description

+ +

This routine is used to get the number of the variables of the current problem.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

If there was an error it prints error message to Scilab console and returns -1, else it returns a number ( >=0 ) as number of variables.

+ +

Examples

+ +
ans=sym_getNumVar()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getNumElements + + + Symphony Native Functions + + + sym_getObjCoeff >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getObjCoeff.html b/help/en_US/scilab_en_US_help/sym_getObjCoeff.html new file mode 100644 index 0000000..2178b5d --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getObjCoeff.html @@ -0,0 +1,83 @@ + + + sym_getObjCoeff + + + +
+ + + + +
+ << sym_getNumVar + + + Symphony Native Functions + + + sym_getObjSense >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getObjCoeff + +

+

sym_getObjCoeff

+

To get the objective vector.

+ +

Calling Sequence

+
sym_getObjCoeff()
+ +

Description

+ +

This routine is used to get the objective vector.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a row vector of coefficients of variables in objective.

+ +

Examples

+ +
ans=sym_getObjCoeff()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getNumVar + + + Symphony Native Functions + + + sym_getObjSense >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getObjSense.html b/help/en_US/scilab_en_US_help/sym_getObjSense.html new file mode 100644 index 0000000..9137bdc --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getObjSense.html @@ -0,0 +1,82 @@ + + + sym_getObjSense + + + +
+ + + + +
+ << sym_getObjCoeff + + + Symphony Native Functions + + + sym_getObjVal >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getObjSense + +

+

sym_getObjSense

+

Get the objective sense

+ +

Calling Sequence

+
sym_getObjSense()
+ +

Description

+ +

This function gets the sense of the objective function (minimization/maximization).

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns 1 if the objective is to be minimized and -1 if the objective is to be maximized

+ +

Examples

+ +
sym_getObjSense()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getObjCoeff + + + Symphony Native Functions + + + sym_getObjVal >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getObjVal.html b/help/en_US/scilab_en_US_help/sym_getObjVal.html new file mode 100644 index 0000000..712c695 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getObjVal.html @@ -0,0 +1,83 @@ + + + sym_getObjVal + + + +
+ + + + +
+ << sym_getObjSense + + + Symphony Native Functions + + + sym_getPrimalBound >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getObjVal + +

+

sym_getObjVal

+

Get the optimized objective value

+ +

Calling Sequence

+
sym_getObjVal()
+ +

Description

+ +

Get the optimized objective value after after solving the problem.

+

This function may fail if the problem has not been solved already. Use sym_solve() in this case.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns the optimized objective value

+ +

Examples

+ +
sym_getObjVal()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getObjSense + + + Symphony Native Functions + + + sym_getPrimalBound >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getPrimalBound.html b/help/en_US/scilab_en_US_help/sym_getPrimalBound.html new file mode 100644 index 0000000..eef1de0 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getPrimalBound.html @@ -0,0 +1,82 @@ + + + sym_getPrimalBound + + + +
+ + + + +
+ << sym_getObjVal + + + Symphony Native Functions + + + sym_getRhs >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getPrimalBound + +

+

sym_getPrimalBound

+

Get the primal bound of the problem

+ +

Calling Sequence

+
sym_getPrimalBound()
+ +

Description

+ +

Get the primal bound of the loaded problem.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns the primal bound of the problem

+ +

Examples

+ +
sym_getPrimalBound()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getObjVal + + + Symphony Native Functions + + + sym_getRhs >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getRhs.html b/help/en_US/scilab_en_US_help/sym_getRhs.html new file mode 100644 index 0000000..3b4eb7f --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getRhs.html @@ -0,0 +1,83 @@ + + + sym_getRhs + + + +
+ + + + +
+ << sym_getPrimalBound + + + Symphony Native Functions + + + sym_getStatus >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getRhs + +

+

sym_getRhs

+

To to get the right hand side vector(column vector).

+ +

Calling Sequence

+
sym_getRhs()
+ +

Description

+ +

This routine is used to get the right hand side vector(coumn vector).

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a column vector of the right hand side values of constraints.

+ +

Examples

+ +
ans=sym_getRhs()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getPrimalBound + + + Symphony Native Functions + + + sym_getStatus >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getStatus.html b/help/en_US/scilab_en_US_help/sym_getStatus.html new file mode 100644 index 0000000..8880566 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getStatus.html @@ -0,0 +1,83 @@ + + + sym_getStatus + + + +
+ + + + +
+ << sym_getRhs + + + Symphony Native Functions + + + sym_getStrParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getStatus + +

+

sym_getStatus

+

To get status of the problem solver.

+ +

Calling Sequence

+
sym_getStatus()
+ +

Description

+ +

This post-solution query routine is used to learn the termination status of the solution procedure.

+

It prints status of the problem solver to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if it receives any return-value indicating an error message or 0 if it receives any return-value indicating a non-error message.

+ +

Examples

+ +
status=sym_getStatus()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getRhs + + + Symphony Native Functions + + + sym_getStrParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getStrParam.html b/help/en_US/scilab_en_US_help/sym_getStrParam.html new file mode 100644 index 0000000..f3d3671 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getStrParam.html @@ -0,0 +1,81 @@ + + + sym_getStrParam + + + +
+ + + + +
+ << sym_getStatus + + + Symphony Native Functions + + + sym_getVarLower >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getStrParam + +

+

sym_getStrParam

+

This routine is used to get the value of a string type parameter.

+ +

Calling Sequence

+
sym_getStrParam(key)
+ +

Description

+ +

Arguments

+ +
key +

The name of the strung parameter whose value has to be retrieved. Note: should be given within " "

+ +

Return value

+ +

Returns 0 if the parameter's value has been successfully retrieved and displayed on the console ,else 1 is returned corressponding to an error value for the unsuccessful execution of the function

+ +

Examples

+ +
status=sym_getStrParam("source_path")
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getStatus + + + Symphony Native Functions + + + sym_getVarLower >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getVarLower.html b/help/en_US/scilab_en_US_help/sym_getVarLower.html new file mode 100644 index 0000000..7804681 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getVarLower.html @@ -0,0 +1,83 @@ + + + sym_getVarLower + + + +
+ + + + +
+ << sym_getStrParam + + + Symphony Native Functions + + + sym_getVarSoln >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getVarLower + +

+

sym_getVarLower

+

To get the lower bounds of the variables.

+ +

Calling Sequence

+
sym_getVarLower()
+ +

Description

+ +

This routine is used to get the lower bounds of the variables.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a row vector of lower bounds of the variables.

+ +

Examples

+ +
ans=sym_getVarLower()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getStrParam + + + Symphony Native Functions + + + sym_getVarSoln >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getVarSoln.html b/help/en_US/scilab_en_US_help/sym_getVarSoln.html new file mode 100644 index 0000000..3b6b932 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getVarSoln.html @@ -0,0 +1,83 @@ + + + sym_getVarSoln + + + +
+ + + + +
+ << sym_getVarLower + + + Symphony Native Functions + + + sym_getVarUpper >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getVarSoln + +

+

sym_getVarSoln

+

Get the solution for the problem

+ +

Calling Sequence

+
sym_getVarSoln()
+ +

Description

+ +

Get the solution for the problem after solving it.

+

This function may fail if the problem has not been solved already. Use sym_solve() in this case.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns a matrix with 1 row and number of columns equal to number of variables, that represents the solutions for those variables

+ +

Examples

+ +
sym_getVarSoln()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getVarLower + + + Symphony Native Functions + + + sym_getVarUpper >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_getVarUpper.html b/help/en_US/scilab_en_US_help/sym_getVarUpper.html new file mode 100644 index 0000000..bc8d0ca --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_getVarUpper.html @@ -0,0 +1,83 @@ + + + sym_getVarUpper + + + +
+ + + + +
+ << sym_getVarSoln + + + Symphony Native Functions + + + sym_isAbandoned >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_getVarUpper + +

+

sym_getVarUpper

+

To get the upper bounds of the variables.

+ +

Calling Sequence

+
sym_getVarUpper()
+ +

Description

+ +

This routine is used to get the upper bounds of the variables.

+

If there was an error it prints to Scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns a row vector of upper bounds of the variables.

+ +

Examples

+ +
ans=sym_getVarUpper()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getVarSoln + + + Symphony Native Functions + + + sym_isAbandoned >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isAbandoned.html b/help/en_US/scilab_en_US_help/sym_isAbandoned.html new file mode 100644 index 0000000..7f22d84 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isAbandoned.html @@ -0,0 +1,83 @@ + + + sym_isAbandoned + + + +
+ + + + +
+ << sym_getVarUpper + + + Symphony Native Functions + + + sym_isBinary >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isAbandoned + +

+

sym_isAbandoned

+

To check whether the problem was abandoned for some reason.

+ +

Calling Sequence

+
sym_isAbandoned()
+ +

Description

+ +

This post-solution query routine is used to learn whether the problem was abandoned for some reason.

+

It prints whether or not the problem was abandoned for some reason to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the problem was abandoned or 0 if the problem was not abandoned or -1 if there was an error.

+ +

Examples

+ +
status=sym_isAbandoned()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_getVarUpper + + + Symphony Native Functions + + + sym_isBinary >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isBinary.html b/help/en_US/scilab_en_US_help/sym_isBinary.html new file mode 100644 index 0000000..904c383 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isBinary.html @@ -0,0 +1,83 @@ + + + sym_isBinary + + + +
+ + + + +
+ << sym_isAbandoned + + + Symphony Native Functions + + + sym_isContinuous >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isBinary + +

+

sym_isBinary

+

Check if a variable is constrained to be binary

+ +

Calling Sequence

+
sym_isBinary(index)
+ +

Description

+ +

This function checks if a variable is constrained to be binary (0 or 1).

+ +

Arguments

+ +
index +

Index of the variable to check. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+ +

Return value

+ +

Returns 1 if the variable is constrained to be binary and 0 if it is not.

+ +

Examples

+ +
sym_isBinary(2)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isAbandoned + + + Symphony Native Functions + + + sym_isContinuous >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isContinuous.html b/help/en_US/scilab_en_US_help/sym_isContinuous.html new file mode 100644 index 0000000..22d6f4d --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isContinuous.html @@ -0,0 +1,83 @@ + + + sym_isContinuous + + + +
+ + + + +
+ << sym_isBinary + + + Symphony Native Functions + + + sym_isEnvActive >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isContinuous + +

+

sym_isContinuous

+

Check if a variable is continuous

+ +

Calling Sequence

+
sym_isContinuous(index)
+ +

Description

+ +

This function checks if a variable is continuous.

+ +

Arguments

+ +
index +

Index of the variable to check. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+ +

Return value

+ +

Returns 1 if the variable is continuous and 0 if it is not.

+ +

Examples

+ +
sym_isContinuous(2)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isBinary + + + Symphony Native Functions + + + sym_isEnvActive >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isEnvActive.html b/help/en_US/scilab_en_US_help/sym_isEnvActive.html new file mode 100644 index 0000000..4997879 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isEnvActive.html @@ -0,0 +1,82 @@ + + + sym_isEnvActive + + + +
+ + + + +
+ << sym_isContinuous + + + Symphony Native Functions + + + sym_isInfeasible >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isEnvActive + +

+

sym_isEnvActive

+

Check if Symphony environment is active

+ +

Calling Sequence

+
sym_isEnvActive()
+ +

Description

+ +

Check if Symphony environment is active (open). Most Symphony functions will require the environment to be open.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns 1 if the environment is active and 0 otherwise

+ +

Examples

+ +
sym_isEnvActive()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isContinuous + + + Symphony Native Functions + + + sym_isInfeasible >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isInfeasible.html b/help/en_US/scilab_en_US_help/sym_isInfeasible.html new file mode 100644 index 0000000..2ea8048 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isInfeasible.html @@ -0,0 +1,83 @@ + + + sym_isInfeasible + + + +
+ + + + +
+ << sym_isEnvActive + + + Symphony Native Functions + + + sym_isInteger >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isInfeasible + +

+

sym_isInfeasible

+

To check whether the problem was proven to be infeasible.

+ +

Calling Sequence

+
sym_isInfeasible()
+ +

Description

+ +

This post-solution query routine is used to learn whether the problem was proven to be infeasible.

+

It prints whether or not the problem was proven to be infeasible to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the problem was solved proven to be infeasible or 0 if it was not proven to be infeasible or -1 if there was an error.

+ +

Examples

+ +
status=sym_isInfeasible()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isEnvActive + + + Symphony Native Functions + + + sym_isInteger >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isInteger.html b/help/en_US/scilab_en_US_help/sym_isInteger.html new file mode 100644 index 0000000..3843b5b --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isInteger.html @@ -0,0 +1,77 @@ + + + sym_isInteger + + + +
+ + + + +
+ << sym_isInfeasible + + + Symphony Native Functions + + + sym_isIterLimitReached >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isInteger + +

+

sym_isInteger

+ +

Check if a variable is constrained to be an integer

+ +

Calling Sequence

+ +
sym_isInteger(index)
+ +

Description

+ +

This function checks if a variable is constrained to be an integer.

+

index : Index of the variable to check. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+ +

Examples

+ +
sym_isInteger(2)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isInfeasible + + + Symphony Native Functions + + + sym_isIterLimitReached >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isIterLimitReached.html b/help/en_US/scilab_en_US_help/sym_isIterLimitReached.html new file mode 100644 index 0000000..7081962 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isIterLimitReached.html @@ -0,0 +1,84 @@ + + + sym_isIterLimitReached + + + +
+ + + + +
+ << sym_isInteger + + + Symphony Native Functions + + + sym_isOptimal >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isIterLimitReached + +

+

sym_isIterLimitReached

+

To know whether the iteration limit (node limit) was reached.

+ +

Calling Sequence

+
sym_isIterLimitReached()
+ +

Description

+ +

This post-solution query routine is used to learn whether the iteration limit(node limit) was reached.

+

It prints whether or not the iteration limit (node limit) was reached to scilab console.

+

It can also be used if "find first feasible" parameter was set to true before solving the problem.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the iteration limit is reached or 0 if the iteration limit is not reached or -1 if there was an error.

+ +

Examples

+ +
status=sym_isIterLimitReached()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isInteger + + + Symphony Native Functions + + + sym_isOptimal >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isOptimal.html b/help/en_US/scilab_en_US_help/sym_isOptimal.html new file mode 100644 index 0000000..929b01b --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isOptimal.html @@ -0,0 +1,84 @@ + + + sym_isOptimal + + + +
+ + + + +
+ << sym_isIterLimitReached + + + Symphony Native Functions + + + sym_isTargetGapAchieved >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isOptimal + +

+

sym_isOptimal

+

To check whether the problem was solved to optimality.

+ +

Calling Sequence

+
sym_isOptimal()
+ +

Description

+ +

This post-solution query routine is used to learn whether the problem was solved to

+

optimality.

+

It prints whether or not the problem was solved to optimality to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the problem was solved to optimality or 0 if it was not solved to optimality or -1 if there was an error.

+ +

Examples

+ +
status=sym_isOptimal()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isIterLimitReached + + + Symphony Native Functions + + + sym_isTargetGapAchieved >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isTargetGapAchieved.html b/help/en_US/scilab_en_US_help/sym_isTargetGapAchieved.html new file mode 100644 index 0000000..91d5a7f --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isTargetGapAchieved.html @@ -0,0 +1,83 @@ + + + sym_isTargetGapAchieved + + + +
+ + + + +
+ << sym_isOptimal + + + Symphony Native Functions + + + sym_isTimeLimitReached >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isTargetGapAchieved + +

+

sym_isTargetGapAchieved

+

To know whether the target gap was reached.

+ +

Calling Sequence

+
sym_isTargetGapAchieved()
+ +

Description

+ +

This post-solution query routine is used to learn whether the target gap was reached.

+

It print whether or not the target gap was reached.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the target gap was reached or 0 if the target gap was not reached or -1 if there was an error.

+ +

Examples

+ +
status=sym_isTargetGapAchieved()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isOptimal + + + Symphony Native Functions + + + sym_isTimeLimitReached >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_isTimeLimitReached.html b/help/en_US/scilab_en_US_help/sym_isTimeLimitReached.html new file mode 100644 index 0000000..ce96eae --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_isTimeLimitReached.html @@ -0,0 +1,83 @@ + + + sym_isTimeLimitReached + + + +
+ + + + +
+ << sym_isTargetGapAchieved + + + Symphony Native Functions + + + sym_loadMPS >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_isTimeLimitReached + +

+

sym_isTimeLimitReached

+

To know whether the time limit was reached.

+ +

Calling Sequence

+
sym_isTimeLimitReached()
+ +

Description

+ +

This post-solution query routine is used to learn whether the time limit was reached.

+

It prints whether or not the time limit was reached to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if the time limit was reached or 0 if the time limit was not reached or -1 if there was an error.

+ +

Examples

+ +
status=sym_isTimeLimitReached()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isTargetGapAchieved + + + Symphony Native Functions + + + sym_loadMPS >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_loadMPS.html b/help/en_US/scilab_en_US_help/sym_loadMPS.html new file mode 100644 index 0000000..4046026 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_loadMPS.html @@ -0,0 +1,82 @@ + + + sym_loadMPS + + + +
+ + + + +
+ << sym_isTimeLimitReached + + + Symphony Native Functions + + + sym_loadProblem >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_loadMPS + +

+

sym_loadMPS

+

This routine is used to load an instance from an MPS file.

+ +

Calling Sequence

+
sym_loadMPS(filename)
+ +

Description

+ +

Arguments

+ +
filename +

It is a string that has the path of the .mps file to loaded.It has to be given within double quotes ("")

+ +

Return value

+ +

Returns 0 if the .mps file is loaded properly to symphony and 0 if there is an error reading the mps file or the function returns with an error return value

+ +

Examples

+ +
status=sym_loadMPS("./sample.mps")  -mps file present in the current directory of execution can be mentioned this way also
+
status=sym_loadMPS("/home/Desktop/sample.mps")  -mps file present at a different location must be specified with their entire path
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_isTimeLimitReached + + + Symphony Native Functions + + + sym_loadProblem >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_loadProblem.html b/help/en_US/scilab_en_US_help/sym_loadProblem.html new file mode 100644 index 0000000..7e29c9b --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_loadProblem.html @@ -0,0 +1,102 @@ + + + sym_loadProblem + + + +
+ + + + +
+ << sym_loadMPS + + + Symphony Native Functions + + + sym_loadProblemBasic >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_loadProblem + +

+

sym_loadProblem

+

Load a problem into Symphony

+ +

Calling Sequence

+
sym_loadProblem(nbVar,nbConstr,varLB,varUB,objCoeff,isInt,objSense,conMatrix,conLB,conUB)
+ +

Description

+ +

Loads a MIP problem into Symphony. All the necessary data can be given through a single function call.

+

The type of constraint is automatically deduced from the constraint bounds.

+ +

Arguments

+ +
nbVar +

Number of variables

+
nbConstr +

Number of constraints

+
varLB +

Matrix containing lower bounds of the variables (must have size 1 row and nbVar columns). Bound can be negative infinity

+
varUB +

Matrix containing upper bounds of the variables (must have size 1 row and nbVar columns). Bound can be infinity

+
objCoeff +

Matrix containing coefficients of the variables in the objective (must have size 1 row and nbVar columns)

+
isInt +

Boolean matrix representing wether a variable is constrained to be an integer (must have size 1 row and nbVar columns)

+
objSense +

The sense (maximization/minimization) of the objective. Use sym_minimize or sym_maximize here

+
conMatrix +

Sparse matrix representing the constraint matrix (must have size nbConstr rows and nbVar columns)

+
conLB +

Matrix containing lower bounds of the constraints (must have size nbConstr rows and 1 column)

+
conUB +

Matrix containing upper bounds of the constraints (must have size nbConstr rows and 1 column)

+ +

Return value

+ +

Returns 0 if the problem was successfully loaded into Symphony

+ +

Examples

+ +
sym_loadProblem(2,2,[0,0],[%inf,%inf],[1,1],[%t,%t],sym_maximize,sparse([1,2;2,1]),[0;0],[7;6.5])
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_loadMPS + + + Symphony Native Functions + + + sym_loadProblemBasic >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_loadProblemBasic.html b/help/en_US/scilab_en_US_help/sym_loadProblemBasic.html new file mode 100644 index 0000000..23f690e --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_loadProblemBasic.html @@ -0,0 +1,103 @@ + + + sym_loadProblemBasic + + + +
+ + + + +
+ << sym_loadProblem + + + Symphony Native Functions + + + sym_open >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_loadProblemBasic + +

+

sym_loadProblemBasic

+

Load a problem into Symphony (basic version)

+ +

Calling Sequence

+
sym_loadProblemBasic(nbVar,nbConstr,varLB,varUB,objCoeff,isInt,objSense,conMatrix,conLB,conUB)
+ +

Description

+ +

Loads a MIP problem into Symphony. All the necessary data can be given through a single function call.

+

The type of constraint is automatically deduced from the constraint bounds.

+

This version of the problem loader does not support sparse matrices and hence is only useful for small problems.

+ +

Arguments

+ +
nbVar +

Number of variables

+
nbConstr +

Number of constraints

+
varLB +

Matrix containing lower bounds of the variables (must have size 1 row and nbVar columns). Bound can be negative infinity

+
varUB +

Matrix containing upper bounds of the variables (must have size 1 row and nbVar columns). Bound can be infinity

+
objCoeff +

Matrix containing coefficients of the variables in the objective (must have size 1 row and nbVar columns)

+
isInt +

Boolean matrix representing wether a variable is constrained to be an integer (must have size 1 row and nbVar columns)

+
objSense +

The sense (maximization/minimization) of the objective. Use sym_minimize or sym_maximize here

+
conMatrix +

Matrix (normal) representing the constraint matrix (must have size nbConstr rows and nbVar columns)

+
conLB +

Matrix containing lower bounds of the constraints (must have size nbConstr rows and 1 column)

+
conUB +

Matrix containing upper bounds of the constraints (must have size nbConstr rows and 1 column)

+ +

Return value

+ +

Returns 0 if the problem was successfully loaded into Symphony

+ +

Examples

+ +
sym_loadProblemBasic(2,2,[0,0],[%inf,%inf],[1,1],[%t,%t],sym_maximize,[1,2;2,1],[0;0],[7;6.5])
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_loadProblem + + + Symphony Native Functions + + + sym_open >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_open.html b/help/en_US/scilab_en_US_help/sym_open.html new file mode 100644 index 0000000..7347781 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_open.html @@ -0,0 +1,84 @@ + + + sym_open + + + +
+ + + + +
+ << sym_loadProblemBasic + + + Symphony Native Functions + + + sym_resetParams >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_open + +

+

sym_open

+

Open the Symphony environment

+ +

Calling Sequence

+
sym_open()
+ +

Description

+ +

Opens the Symphony environment. The environment and all data loaded into it is maintained across function calls.

+

This function fails if the environment is already open.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns 1 if the environment was successfully opened and 0 otherwise

+ +

Examples

+ +
sym_open()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_loadProblemBasic + + + Symphony Native Functions + + + sym_resetParams >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_resetParams.html b/help/en_US/scilab_en_US_help/sym_resetParams.html new file mode 100644 index 0000000..a28d629 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_resetParams.html @@ -0,0 +1,80 @@ + + + sym_resetParams + + + +
+ + + + +
+ << sym_open + + + Symphony Native Functions + + + sym_setConstrLower >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_resetParams + +

+

sym_resetParams

+

This routine sets all the environment variables and parameters to their default values.

+ +

Calling Sequence

+
sym_resetParams()
+ +

Description

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

Returns 0 if the environment variables and parameters are set to their default value and 1 if a value corresponding to an error is returned

+ +

Examples

+ +
status=sym_resetParams()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_open + + + Symphony Native Functions + + + sym_setConstrLower >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setConstrLower.html b/help/en_US/scilab_en_US_help/sym_setConstrLower.html new file mode 100644 index 0000000..937983f --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setConstrLower.html @@ -0,0 +1,85 @@ + + + sym_setConstrLower + + + +
+ + + + +
+ << sym_resetParams + + + Symphony Native Functions + + + sym_setConstrType >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setConstrLower + +

+

sym_setConstrLower

+

Set the lower bound of a constraint

+ +

Calling Sequence

+
sym_setConstrLower(index,newBound)
+ +

Description

+ +

This function changes the lower bound of a constraint

+ +

Arguments

+ +
index +

Index of the constraint to modify. Must be in {0,1,2,...n-1} where n is the number of constraints in the problem

+
newBound +

The new lower bound for the constraint

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setConstrLower(2,-100)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_resetParams + + + Symphony Native Functions + + + sym_setConstrType >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setConstrType.html b/help/en_US/scilab_en_US_help/sym_setConstrType.html new file mode 100644 index 0000000..3ad6e86 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setConstrType.html @@ -0,0 +1,91 @@ + + + sym_setConstrType + + + +
+ + + + +
+ << sym_setConstrLower + + + Symphony Native Functions + + + sym_setConstrUpper >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setConstrType + +

+

sym_setConstrType

+

Set the type of a constraint

+ +

Calling Sequence

+
sym_setConstrType(index,type,bound1[,bound2])
+ +

Description

+ +

This function completely modifies the type of a constraint. Supported types of constraints are less than or equal to, more than or equal to, equal to, or ranged.

+

The last argument is only required for ranged constraints. For the other types of constraints, only the third argument is required.

+ +

Arguments

+ +
index +

Index of the constraint to modify. Must be in {0,1,2,...n-1} where n is the number of constraints in the problem

+
type +

New type of the constraint. Supported types: less than or equal to ("L"), greater than or equal to ("G"), equal to ("E"), or ranged ("R")

+
bound1 +

The first (or only) bound for the constraint

+
bound2 +

The second bound for ranged constraints. The two bounds for ranged constraints can be in any order.

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setConstrType(2,"R",-10,10)
+
sym_setConstrType(3,"E",100)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setConstrLower + + + Symphony Native Functions + + + sym_setConstrUpper >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setConstrUpper.html b/help/en_US/scilab_en_US_help/sym_setConstrUpper.html new file mode 100644 index 0000000..11086a0 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setConstrUpper.html @@ -0,0 +1,85 @@ + + + sym_setConstrUpper + + + +
+ + + + +
+ << sym_setConstrType + + + Symphony Native Functions + + + sym_setContinuous >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setConstrUpper + +

+

sym_setConstrUpper

+

Set the upper bound of a constraint

+ +

Calling Sequence

+
sym_setConstrUpper(index,newBound)
+ +

Description

+ +

This function changes the upper bound of a constraint

+ +

Arguments

+ +
index +

Index of the constraint to modify. Must be in {0,1,2,...n-1} where n is the number of constraints in the problem

+
newBound +

The new upper bound for the constraint

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setConstrUpper(2,-100)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setConstrType + + + Symphony Native Functions + + + sym_setContinuous >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setContinuous.html b/help/en_US/scilab_en_US_help/sym_setContinuous.html new file mode 100644 index 0000000..d794b27 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setContinuous.html @@ -0,0 +1,81 @@ + + + sym_setContinuous + + + +
+ + + + +
+ << sym_setConstrUpper + + + Symphony Native Functions + + + sym_setDblParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setContinuous + +

+

sym_setContinuous

+

This routine is used to set the type of a variable to be continuous.

+ +

Calling Sequence

+
sym_setContinuous(index)
+ +

Description

+ +

Arguments

+ +
index +

Index of the variable to be set continuous

+ +

Return value

+ +

Returns 0 if the variable type has been set as continuous and 0 if an error value is returned.

+ +

Examples

+ +
status=sym_setContinuous(1)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setConstrUpper + + + Symphony Native Functions + + + sym_setDblParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setDblParam.html b/help/en_US/scilab_en_US_help/sym_setDblParam.html new file mode 100644 index 0000000..e35cb84 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setDblParam.html @@ -0,0 +1,83 @@ + + + sym_setDblParam + + + +
+ + + + +
+ << sym_setContinuous + + + Symphony Native Functions + + + sym_setIntParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setDblParam + +

+

sym_setDblParam

+

This routine is used to set a double type parameter.

+ +

Calling Sequence

+
sym_setDblParam(key,value)
+ +

Description

+ +

Arguments

+ +
key +

The name of the double type parameter to be set. Note: should be given within " "

+
value +

New value of the corresponding double parameter

+ +

Return value

+ +

Returns 0 if the parameter specified is set to the value mentioned and 0 if setting of the double parameter was unsuccessful due to invalid inputs

+ +

Examples

+ +
status=sym_setDblParam("time_limit",5)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setContinuous + + + Symphony Native Functions + + + sym_setIntParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setIntParam.html b/help/en_US/scilab_en_US_help/sym_setIntParam.html new file mode 100644 index 0000000..0f9b8ce --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setIntParam.html @@ -0,0 +1,83 @@ + + + sym_setIntParam + + + +
+ + + + +
+ << sym_setDblParam + + + Symphony Native Functions + + + sym_setInteger >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setIntParam + +

+

sym_setIntParam

+

This routine is used to set an integer type parameter.

+ +

Calling Sequence

+
sym_setIntParam(key,value)
+ +

Description

+ +

Arguments

+ +
key +

The name of the parameter to be set. Note:should be given within " "

+
value +

New value of the corresponding integer parameter

+ +

Return value

+ +

Returns 0 if the parameter specified is set to the value mentioned and 0 if setting of the integer parameter was unsuccessful due to invalid inputs

+ +

Examples

+ +
status=sym_setIntParam("verbosity",5)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setDblParam + + + Symphony Native Functions + + + sym_setInteger >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setInteger.html b/help/en_US/scilab_en_US_help/sym_setInteger.html new file mode 100644 index 0000000..4402005 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setInteger.html @@ -0,0 +1,81 @@ + + + sym_setInteger + + + +
+ + + + +
+ << sym_setIntParam + + + Symphony Native Functions + + + sym_setObjCoeff >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setInteger + +

+

sym_setInteger

+

This routine is used to set the type of a variable to be integer.

+ +

Calling Sequence

+
sym_setInteger(index)
+ +

Description

+ +

Arguments

+ +
index +

The index of the variable type to be modified as integer. Note that, it has to be at most the number of columns.

+ +

Return value

+ +

Returns 0 if the variable type has been set as integer and 0 if an error value is returned.

+ +

Examples

+ +
status=sym_setInteger(1)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setIntParam + + + Symphony Native Functions + + + sym_setObjCoeff >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setObjCoeff.html b/help/en_US/scilab_en_US_help/sym_setObjCoeff.html new file mode 100644 index 0000000..b8fa629 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setObjCoeff.html @@ -0,0 +1,85 @@ + + + sym_setObjCoeff + + + +
+ + + + +
+ << sym_setInteger + + + Symphony Native Functions + + + sym_setObjSense >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setObjCoeff + +

+

sym_setObjCoeff

+

Set coefficient of a variable in the objective

+ +

Calling Sequence

+
sym_setObjCoeff(index,newCoeff)
+ +

Description

+ +

This function changes the coefficient of a variable in the objective function

+ +

Arguments

+ +
index +

Index of the variable to modify. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+
newCoeff +

The new coefficient of the variable

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setObjCoeff(2,1.5)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setInteger + + + Symphony Native Functions + + + sym_setObjSense >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setObjSense.html b/help/en_US/scilab_en_US_help/sym_setObjSense.html new file mode 100644 index 0000000..69b7093 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setObjSense.html @@ -0,0 +1,83 @@ + + + sym_setObjSense + + + +
+ + + + +
+ << sym_setObjCoeff + + + Symphony Native Functions + + + sym_setPrimalBound >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setObjSense + +

+

sym_setObjSense

+

Set the objective sense

+ +

Calling Sequence

+
sym_setObjSense(sense)
+ +

Description

+ +

This function sets the sense of the objective function (minimization/maximization).

+ +

Arguments

+ +
sense +

The new sense of the objective function. Use sym_minimize or sym_maximize here

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setObjSense(sym_minimize)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setObjCoeff + + + Symphony Native Functions + + + sym_setPrimalBound >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setPrimalBound.html b/help/en_US/scilab_en_US_help/sym_setPrimalBound.html new file mode 100644 index 0000000..3040f55 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setPrimalBound.html @@ -0,0 +1,83 @@ + + + sym_setPrimalBound + + + +
+ + + + +
+ << sym_setObjSense + + + Symphony Native Functions + + + sym_setStrParam >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setPrimalBound + +

+

sym_setPrimalBound

+

Set the primal bound of the problem

+ +

Calling Sequence

+
sym_setPrimalBound(bound)
+ +

Description

+ +

Set the primal bound of the loaded problem.

+ +

Arguments

+ +
bound +

The new primal bound for the problem

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setPrimalBound(10)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setObjSense + + + Symphony Native Functions + + + sym_setStrParam >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setStrParam.html b/help/en_US/scilab_en_US_help/sym_setStrParam.html new file mode 100644 index 0000000..2fa67ca --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setStrParam.html @@ -0,0 +1,83 @@ + + + sym_setStrParam + + + +
+ + + + +
+ << sym_setPrimalBound + + + Symphony Native Functions + + + sym_setVarLower >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setStrParam + +

+

sym_setStrParam

+

This routine is used to set a string type parameter.

+ +

Calling Sequence

+
sym_setStrParam(key,value)
+ +

Description

+ +

Arguments

+ +
key +

The name of the string type parameter to be set. Note: should be given within " "

+
value +

New value of the corresponding string parameter. Note: should be given within " "

+ +

Return value

+ +

Returns 0 if the parameter specified is set to the value mentioned and 0 if setting of the string parameter was unsuccessful due to invalid inputs

+ +

Examples

+ +
status=sym_setStrParam("source_path","..")
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setPrimalBound + + + Symphony Native Functions + + + sym_setVarLower >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setVarLower.html b/help/en_US/scilab_en_US_help/sym_setVarLower.html new file mode 100644 index 0000000..2b977d2 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setVarLower.html @@ -0,0 +1,85 @@ + + + sym_setVarLower + + + +
+ + + + +
+ << sym_setStrParam + + + Symphony Native Functions + + + sym_setVarSoln >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setVarLower + +

+

sym_setVarLower

+

Set lower bound of a variable

+ +

Calling Sequence

+
sym_setVarLower(index,newBound)
+ +

Description

+ +

This function changes the lower bound of a variable to a new value

+ +

Arguments

+ +
index +

Index of the variable to modify. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+
newBound +

The new lower bound for the variable

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setVarLower(2,-%inf)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setStrParam + + + Symphony Native Functions + + + sym_setVarSoln >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setVarSoln.html b/help/en_US/scilab_en_US_help/sym_setVarSoln.html new file mode 100644 index 0000000..f8c73c7 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setVarSoln.html @@ -0,0 +1,84 @@ + + + sym_setVarSoln + + + +
+ + + + +
+ << sym_setVarLower + + + Symphony Native Functions + + + sym_setVarUpper >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setVarSoln + +

+

sym_setVarSoln

+

Set a solution for the problem

+ +

Calling Sequence

+
sym_setVarSoln(solution)
+ +

Description

+ +

Sets a known solution for the problem.

+

This function fails if the solution entered does not satisfy all bounds or is worse than another currently known solution.

+ +

Arguments

+ +
solution +

Matrix containing solutions for the variables (must have size 1 row and number of columns equal to number of variables)

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setVarSoln([1,2,3.2,4])
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setVarLower + + + Symphony Native Functions + + + sym_setVarUpper >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_setVarUpper.html b/help/en_US/scilab_en_US_help/sym_setVarUpper.html new file mode 100644 index 0000000..16659ce --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_setVarUpper.html @@ -0,0 +1,85 @@ + + + sym_setVarUpper + + + +
+ + + + +
+ << sym_setVarSoln + + + Symphony Native Functions + + + sym_solve >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_setVarUpper + +

+

sym_setVarUpper

+

Set upper bound of a variable

+ +

Calling Sequence

+
sym_setVarUpper(index,newBound)
+ +

Description

+ +

This function changes the upper bound of a variable to a new value

+ +

Arguments

+ +
index +

Index of the variable to modify. Must be in {0,1,2,...n-1} where n is the number of variables in the problem

+
newBound +

The new upper bound for the variable

+ +

Return value

+ +

Returns 0

+ +

Examples

+ +
sym_setVarUpper(2,100)
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setVarSoln + + + Symphony Native Functions + + + sym_solve >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/sym_solve.html b/help/en_US/scilab_en_US_help/sym_solve.html new file mode 100644 index 0000000..67e43f5 --- /dev/null +++ b/help/en_US/scilab_en_US_help/sym_solve.html @@ -0,0 +1,81 @@ + + + sym_solve + + + +
+ + + + +
+ << sym_setVarUpper + + + Symphony Native Functions + + + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > Symphony Native Functions > sym_solve + +

+

sym_solve

+

To solve the currently loaded MILP problem from scratch.

+ +

Calling Sequence

+
sym_solve()
+ +

Description

+ +

This routine solves the currently loaded MILP problem from scratch.

+

It prints status of the problem solver to scilab console.

+ +

Arguments

+ +

This function takes no arguments

+ +

Return value

+ +

It returns 1 if it receives any return-value indicating an error message or 0 if it receives any return-value indicating a non-error message.

+ +

Examples

+ +
status=sym_solve()
+ +

Authors

+ +
+
+ +
+ + + + + + +
Report an issue
+ << sym_setVarUpper + + + Symphony Native Functions + + + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/symphony.html b/help/en_US/scilab_en_US_help/symphony.html new file mode 100644 index 0000000..a27f8e8 --- /dev/null +++ b/help/en_US/scilab_en_US_help/symphony.html @@ -0,0 +1,224 @@ + + + symphony + + + +
+ + + + +
+ << qpipoptmat + + + FOSSEE Optimization Toolbox + + + symphonymat >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > symphony + +

+

symphony

+

Solves a mixed integer linear programming constrained optimization problem.

+ + +

Calling Sequence

+
xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB)
+xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense)
+xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense,options)
+[xopt,fopt,status,output] = symphony( ... )
+ +

Parameters

+
nbVar : +

a double, number of variables.

+
nbCon : +

a double, number of constraints.

+
c : +

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 double, represents lower bounds of the variables.

+
ub : +

a vector of double, represents upper bounds of the variables.

+
A : +

a matrix of double, represents matrix representing the constraint matrix conLB ≤ A⋅x ≤ conUB.

+
conLB : +

a vector of double, represents lower bounds of the constraints conLB ≤ A⋅x ≤ conUB.

+
conUB : +

a vector of double, represents upper bounds of the constraints conLB ≤ A⋅x ≤ conUB.

+
objSense : +

The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.

+
options : +

a list containing the parameters to be set.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
status : +

status flag returned from symphony.See below for details.

+
output : +

The output data structure contains detailed information about the optimization process. See below for details.

+ +

Description

+

Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :

+

+

The routine calls SYMPHONY written in C by gateway files for the actual computation.

+

The status allows to know the status of the optimization which is given back by Ipopt. +

+

For more details on status see the symphony documentation, go to http://www.coin-or.org/SYMPHONY/man-5.6/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
//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.
+// Objective function
+c = [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
+ub = [repmat(1,4,1);repmat(%inf,4,1)];
+// Constraint Matrix
+A = [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;]
+// Lower Bound of constraints
+conlb = [ 25; 1.25; 1.25]
+// Upper Bound of constraints
+conub = [ 25; 1.25; 1.25]
+// Row Matrix for telling symphony that the is integer or not
+isInt = [repmat(%t,1,4) repmat(%f,1,4)];
+xopt = [1 1 0 1 7.25 0 0.25 3.5]
+fopt = [8495]
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+// Press ENTER to continue
+ +

Examples

+
// 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 = [   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;
+//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 ;
+];
+nbCon = size(A,1)
+nbVar = size(A,2)
+// Lower Bound of variables
+lb = repmat(0,nbVar,1)
+// Upper Bound of variables
+ub = repmat(1,nbVar,1)
+// Row Matrix for telling symphony that the is integer or not
+isInt = repmat(%t,1,nbVar)
+// Lower Bound of constraints
+conLB=repmat(0,nbCon,1);
+// Upper Bound of constraints
+conUB=[11927 13727 11551 13056 13460 ]';
+options = list("time_limit", 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 Symphony
+[x,f,status,output] = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,-1,options);
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << qpipoptmat + + + FOSSEE Optimization Toolbox + + + symphonymat >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/symphonymat.html b/help/en_US/scilab_en_US_help/symphonymat.html new file mode 100644 index 0000000..75edb56 --- /dev/null +++ b/help/en_US/scilab_en_US_help/symphonymat.html @@ -0,0 +1,213 @@ + + + symphonymat + + + +
+ + + + +
+ << symphony + + + FOSSEE Optimization Toolbox + + + Symphony Native Functions >> + +
+
+
+ + + + FOSSEE Optimization Toolbox >> FOSSEE Optimization Toolbox > symphonymat + +

+

symphonymat

+

Solves a mixed integer linear programming constrained optimization problem in intlinprog format.

+ + +

Calling Sequence

+
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

+
c : +

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 : +

a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
b : +

a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.

+
Aeq : +

a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
beq : +

a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.

+
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 parameters to be set.

+
xopt : +

a vector of double, the computed solution of the optimization problem.

+
fopt : +

a double, the value of the function at x.

+
status : +

status flag returned from symphony. See below for details.

+
output : +

The output data structure contains detailed information about the optimization process. See below for details.

+ +

Description

+

Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :

+

+

The routine calls SYMPHONY written in C by gateway files for the actual computation.

+

The status allows to know the status of the optimization which is given back by Ipopt. +

+

For more details on status see the symphony documentation, go to http://www.coin-or.org/SYMPHONY/man-5.6/

+

The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +

+

+ +

Examples

+
// 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] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+// Press ENTER to continue
+ +

Examples

+
// 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;
+//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(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("time_limit", 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 Symphony
+[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub,options);
+ +

Authors

+
+
+ +
+ + + + + + +
Report an issue
+ << symphony + + + FOSSEE Optimization Toolbox + + + Symphony Native Functions >> + +
+
+
+ + diff --git a/help/en_US/scilab_en_US_help/xml_code.css b/help/en_US/scilab_en_US_help/xml_code.css new file mode 100644 index 0000000..9e4c27f --- /dev/null +++ b/help/en_US/scilab_en_US_help/xml_code.css @@ -0,0 +1,94 @@ +.xmlcomment { + font-style: italic; + color: #01a801 +} + +.xmldefault { + font-style: normal; + color: #000000 +} + +.xmlentity { + font-style: normal; + color: #ffaa00 +} + +.xmlopeninstr { + font-style: normal; + color: #000000 +} + +.xmlcloseinstr { + font-style: normal; + color: #000000 +} + +.xmlinstrname { + font-style: normal; + color: #9965a6 +} + +.xmllowtag { + font-style: normal; + color: #000000 +} + +.xmltagname { + font-style: normal; + color: #0303ff +} + +.xmllowclose { + font-style: normal; + color: #000000 +} + +.xmlopencomment { + font-style: italic; + color: #01a801 +} + +.xmlcommentend { + font-style: italic; + color: #01a801 +} + +.xmlcomment { + font-style: italic; + color: #01a801 +} + +.xmlopencdata { + font-style: normal; + color: #c45555 +} + +.xmlcdataend { + font-style: normal; + color: #c45555 +} + +.xmlcdata { + font-style: normal; + color: #000000 +} + +.xmlattributename { + font-style: normal; + color: #9965a6 +} + +.xmlequal { + font-style: normal; + color: #000000 +} + +.xmlattributevalue { + font-style: normal; + color: #973964 +} + +.xmlautoclose { + font-style: normal; + color: #000000 +} diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar new file mode 100644 index 0000000..04f7231 Binary files /dev/null and b/jar/scilab_en_US_help.jar differ diff --git a/loader.sce b/loader.sce new file mode 100644 index 0000000..573167b --- /dev/null +++ b/loader.sce @@ -0,0 +1,10 @@ +// This file is released under the 3-clause BSD license. See COPYING-BSD. +// Generated by builder.sce: Please, do not edit this file + +try + getversion("scilab"); +catch + error("Scilab 5.0 or more is required."); +end; + +exec(get_absolute_file_path("loader.sce")+"etc/"+"FOSSEE_Optimization_Toolbox.start"); diff --git a/macros/Checkdims.bin b/macros/Checkdims.bin new file mode 100644 index 0000000..40e385a Binary files /dev/null and b/macros/Checkdims.bin differ diff --git a/macros/Checklhs.bin b/macros/Checklhs.bin new file mode 100644 index 0000000..7156107 Binary files /dev/null and b/macros/Checklhs.bin differ diff --git a/macros/Checkrhs.bin b/macros/Checkrhs.bin new file mode 100644 index 0000000..2c45876 Binary files /dev/null and b/macros/Checkrhs.bin differ diff --git a/macros/Checktype.bin b/macros/Checktype.bin new file mode 100644 index 0000000..bbe1585 Binary files /dev/null and b/macros/Checktype.bin differ diff --git a/macros/Checkvector.bin b/macros/Checkvector.bin new file mode 100644 index 0000000..dfe03ab Binary files /dev/null and b/macros/Checkvector.bin differ diff --git a/macros/fgoalattain.bin b/macros/fgoalattain.bin new file mode 100644 index 0000000..faa0821 Binary files /dev/null and b/macros/fgoalattain.bin differ diff --git a/macros/fminbnd.bin b/macros/fminbnd.bin new file mode 100644 index 0000000..97b00fc Binary files /dev/null and b/macros/fminbnd.bin differ diff --git a/macros/fminbnd.sci b/macros/fminbnd.sci index 2c29b03..b8772ae 100644 --- a/macros/fminbnd.sci +++ b/macros/fminbnd.sci @@ -75,6 +75,7 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) // output.Cpu_Time: The total cpu-time spend during the search // output.Objective_Evaluation: The number of Objective Evaluations performed during the search // output.Dual_Infeasibility: The Dual Infeasiblity of the final soution + // output.Message: The output message for the problem // // // The lambda data structure contains the Lagrange multipliers at the end @@ -157,7 +158,7 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) //To check whether the 1st Input argument (fun) is a function or not if (type(fun) ~= 13 & type(fun) ~= 11) then - errmsg = msprintf(gettext("%s: Expected function for Objective (1st Parameter)"), "fmincon"); + errmsg = msprintf(gettext("%s: Expected function for Objective (1st Parameter)"), "fminbnd"); error(errmsg); end @@ -198,6 +199,12 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) end s=size(x1); + //To check the match between f (1st Parameter) and x1 (2nd Parameter) + if(execstr('init=fun(x1)','errcatch')==21) then + errmsg = msprintf(gettext("%s: Objective function and x1 did not match"), "fminbnd"); + error(errmsg); + end + //To check whether the 3rd Input argument (x2) is a vector/scalar if (type(x2) ~= 1) then errmsg = msprintf(gettext("%s: Expected Vector/Scalar for Upper Bound Vector (3rd Parameter)"), "fminbnd"); @@ -225,9 +232,15 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) x2=x2'; end + //To check the match between f (1st Parameter) and x2 (3rd Parameter) + if(execstr('init=fun(x2)','errcatch')==21) then + errmsg = msprintf(gettext("%s: Objective function and x2 did not match"), "fminbnd"); + error(errmsg); + end + //To check the contents of x1 and x2 (2nd & 3rd Parameter) - for i = 1:s(2) + for i = 1:s(1) if (x1(i) == %inf) then errmsg = msprintf(gettext("%s: Value of Lower Bound can not be infinity"), "fminbnd"); error(errmsg); @@ -237,7 +250,7 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) error(errmsg); end if(x2(i)-x1(i)<=1e-6) then - errmsg = msprintf(gettext("%s: Difference between Upper Bound and Lower bound should be atleast > 10^6 for variable number= %d "), "fminbnd", i); + errmsg = msprintf(gettext("%s: Difference between Upper Bound and Lower bound should be atleast > 10^-6 for variable number= %d "), "fminbnd", i); error(errmsg) end end @@ -255,11 +268,26 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) for i = 1:(size(param))/2 select convstr(param(2*i-1),'l') case "maxiter" then - options(2*i) = param(2*i); + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Iteration should be a Constant"), "fminbnd"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum number of iterations as per user entry + end case "cputime" then - options(2*i) = param(2*i); + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Cpu-time should be a Constant"), "fminbnd"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum CPU time as per user entry + end case "tolx" then - options(2*i) = param(2*i); + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Tolerance should be a Constant"), "fminbnd"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the tolerance as per user entry + end else errmsg = msprintf(gettext("%s: Unrecognized parameter name %s."), "fminbnd", param(2*i-1)); error(errmsg) @@ -304,7 +332,7 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) //Calculating the values for the output xopt = xopt'; exitflag = status; - output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; output.Objective_Evaluation = obj_eval; @@ -315,7 +343,7 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) if( status~=0 & status~=1 & status~=2 & status~=3 & status~=4 & status~=7 ) then xopt=[] fopt=[] - output = struct("Iterations", [],"Cpu_Time",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; lambda = struct("lower",[],"upper",[]); @@ -326,38 +354,54 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) case 0 then printf("\nOptimal Solution Found.\n"); + output.Message="Optimal Solution Found"; case 1 then printf("\nMaximum Number of Iterations Exceeded. Output may not be optimal.\n"); + output.Message="Maximum Number of Iterations Exceeded. Output may not be optimal"; case 2 then - printf("\nMaximum CPU Time exceeded. Output may not be optimal.\n"); + printf("\nMaximum CPU Time exceeded. Output may not be optimal.\n"); + output.Message="Maximum CPU Time exceeded. Output may not be optimal"; case 3 then printf("\nStop at Tiny Step\n"); + output.Message="Stop at Tiny Step"; case 4 then printf("\nSolved To Acceptable Level\n"); + output.Message="Solved To Acceptable Level"; case 5 then printf("\nConverged to a point of local infeasibility.\n"); + output.Message="Converged to a point of local infeasibility"; case 6 then printf("\nStopping optimization at current point as requested by user.\n"); + output.Message="Stopping optimization at current point as requested by user"; case 7 then printf("\nFeasible point for square problem found.\n"); + output.Message="Feasible point for square problem found"; case 8 then printf("\nIterates diverging; problem might be unbounded.\n"); + output.Message="Iterates diverging; problem might be unbounded"; case 9 then printf("\nRestoration Failed!\n"); + output.Message="Restoration Failed!"; case 10 then printf("\nError in step computation (regularization becomes too large?)!\n"); - case 12 then + output.Message="Error in step computation (regularization becomes too large?)!"; + case 11 then printf("\nProblem has too few degrees of freedom.\n"); + output.Message="Problem has too few degrees of freedom"; + case 12 then + printf("\nInvalid option thrown back by Ipopt\n"); + output.Message="Invalid option thrown back by Ipopt"; case 13 then - printf("\nInvalid option thrown back by Ipopt\n"); - case 14 then printf("\nNot enough memory.\n"); + output.Message="Not enough memory"; case 15 then printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n"); + output.Message="INTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors"; else printf("\nInvalid status returned. Notify the Toolbox authors\n"); + output.Message="Invalid status returned. Notify the Toolbox authors"; break; - end + end endfunction diff --git a/macros/fmincon.bin b/macros/fmincon.bin new file mode 100644 index 0000000..c9ba515 Binary files /dev/null and b/macros/fmincon.bin differ diff --git a/macros/fmincon.sci b/macros/fmincon.sci index 2393649..9faefc4 100644 --- a/macros/fmincon.sci +++ b/macros/fmincon.sci @@ -93,6 +93,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin // output.Cpu_Time: The total cpu-time spend during the search // output.Objective_Evaluation: The number of Objective Evaluations performed during the search // output.Dual_Infeasibility: The Dual Infeasiblity of the final soution + // output.Message: The output message for the problem // // // The lambda data structure contains the Lagrange multipliers at the end @@ -260,6 +261,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin // options=list("MaxIter", [1500], "CpuTime", [500], "GradObj", fGrad, "Hessian", lHess,"GradCon", cGrad); // //Calling Ipopt // [x,fval,exitflag,output,lambda,grad,hessian] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,nlc,options) + // // Press ENTER to continue // Authors // R.Vidyadhar , Vignesh Kannan @@ -268,10 +270,15 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin [lhs , rhs] = argn(); //To check the number of arguments given by the user - if ( rhs<4 | rhs==5 | rhs==7 | rhs>10 ) then + if ( rhs<4 | rhs>10 ) then errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while it should be 4,6,8,9,10"), "fmincon", rhs); error(errmsg) end + + if (rhs==5 | rhs==7) then + errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while it should be 4,6,8,9,10s"), "fmincon", rhs); + error(errmsg) + end //Storing the Input Parameters fun = varargin(1); @@ -299,16 +306,10 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin end //To check whether the 1st Input argument (fun) is a function or not - if (type(fun) ~= 13 & type(fun) ~= 11) then - errmsg = msprintf(gettext("%s: Expected function for Objective (1st Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", fun, "f", 1, "function"); //To check whether the 2nd Input argument (x0) is a vector/scalar - if (type(x0) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Vector/Scalar for Starting Point (2nd Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", x0, "x0", 2, "constant"); //To check and convert the 2nd Input argument (x0) to a row vector if((size(x0,1)~=1) & (size(x0,2)~=1)) then @@ -346,10 +347,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin endfunction //To check whether the 3rd Input argument (A) is a Matrix/Vector - if (type(A) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Matrix/Vector for Constraint Matrix A (3rd parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", A, "A", 3, "constant"); //To check for correct size of A(3rd paramter) if(size(A,2)~=s(2) & size(A,2)~=0) then @@ -360,10 +358,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin s1=size(A); //To check whether the 4th Input argument (b) is a vector/scalar - if (type(b) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Vector/Scalar for b (4th Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", b, "b", 4, "constant"); //To check for the correct size of b (4th paramter) and convert it into a column vector which is required for Ipopt if(s1(2)==0) then @@ -389,10 +384,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin end //To check whether the 5th Input argument (Aeq) is a matrix/vector - if (type(Aeq) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Matrix/Vector for Equality Constraint Matrix Aeq (5th Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", Aeq, "Aeq", 5, "constant"); //To check for the correct size of Aeq (5th paramter) if(size(Aeq,2)~=s(2) & size(Aeq,2)~=0) then @@ -403,10 +395,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin s2=size(Aeq); //To check whether the 6th Input argument(beq) is a vector/scalar - if (type(beq) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Vector/Scalar for beq (6th Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", beq, "beq", 6, "constant"); //To check for the correct size of beq(6th paramter) and convert it into a column vector which is required for Ipopt if(s2(2)==0) then @@ -433,10 +422,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin //To check whether the 7th Input argument (lb) is a vector/scalar - if (type(lb) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Vector/Scalar for Lower Bound Vector (7th Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", lb, "lb", 7, "constant"); //To check for the correct size and data of lb (7th paramter) and convert it into a column vector as required by Ipopt if (size(lb,2)==0) then @@ -459,10 +445,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin end //To check whether the 8th Input argument (ub) is a vector/scalar - if (type(ub) ~= 1) then - errmsg = msprintf(gettext("%s: Expected Vector/Scalar for Upper Bound Vector (8th Parameter)"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", ub, "ub", 8, "constant"); //To check for the correct size and data of ub (8th paramter) and convert it into a column vector as required by Ipopt if (size(ub,2)==0) then @@ -497,7 +480,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin end if(ub(i)-lb(i)<=1e-6) then - errmsg = msprintf(gettext("%s: Difference between Upper Bound and Lower bound should be atleast > 10^6 for variable number= %d "), "fmincon", i); + errmsg = msprintf(gettext("%s: Difference between Upper Bound and Lower bound should be atleast > 10^-6 for variable number= %d "), "fmincon", i); error(errmsg) end end @@ -530,7 +513,6 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin no_nlic = size(sample_c,2); no_nlec = size(sample_ceq,2); no_nlc = no_nlic + no_nlec; - //Constructing a single output variable function for nlc function y = addnlc(x) [c,ceq] = nlc(x); @@ -580,74 +562,13 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin end //If options has been entered, then check its type for 'list' - if (type(param) ~= 15) then - errmsg = msprintf(gettext("%s: Options (10th parameter) should be a list"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", param, "options", 10, "list"); //If options has been entered, then check whether an even number of entires has been entered if (modulo(size(param),2)) then errmsg = msprintf(gettext("%s: Size of Options (list) should be even"), "fmincon"); error(errmsg); end - - - //Defining a function to calculate Gradient or Hessian if the respective user entry is OFF - function [y,check] = gradhess(x,t) - if t==1 then //To return Gradient - if(execstr('y=numderivative(fun,x)','errcatch')==10000) - y=0; - check=1; - else - y=numderivative(fun,x); - if (isreal(y)==%F) then - y=0; - check=1; - else - check=0; - end - end - elseif t==2 then //To return Hessian - if(execstr('[grad,y]=numderivative(fun,x)','errcatch')==10000) - y=0; - check=1; - else - [grad,y]=numderivative(fun,x); - if (isreal(y)==%F) then - y=0; - check=1; - else - check=0; - end - end - elseif t==3 then //To return Gradient - if(execstr('y=numderivative(addnlc,x)','errcatch')==10000) - y=0; - check=1; - else - y=numderivative(addnlc,x); - if (isreal(y)==%F) then - y=0; - check=1; - else - check=0; - end - end - elseif t==4 then //To return Hessian - if(execstr('[grad,y]=numderivative(addnlc,x)','errcatch')==10000) - y=0; - check=1; - else - [grad,y]=numderivative(addnlc,x); - if (isreal(y)==%F) then - y=0; - check=1; - else - check=0; - end - end - end - endfunction //To set default values for options, if user doesn't enter options options = list("MaxIter", [3000], "CpuTime", [600]); @@ -669,31 +590,65 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin //To check the user entry for options and storing it for i = 1:(size(param))/2 select convstr(param(2*i-1),'l') - case "maxiter" then - options(2*i) = param(2*i); //Setting the maximum number of iterations as per user entry + case "maxiter" then + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Iteration should be a Constant"), "fmincon"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum number of iterations as per user entry + end case "cputime" then - options(2*i) = param(2*i); //Setting the maximum CPU time as per user entry + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Cpu-time should be a Constant"), "fmincon"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum CPU time as per user entry + end case "gradobj" then - flag1=1; - fGrad=param(2*i); + if (type(param(2*i))==10) then + if (convstr(param(2*i))=="off") then + flag1 =0; + else + errmsg = msprintf(gettext("%s: Unrecognized String [%s] entered for the option- %s."), "fmincon",param(2*i), param(2*i-1)); + error(errmsg); + end + else + flag1 = 1; + fGrad = param(2*i); + end case "hessian" then - flag2=1; - lHess=param(2*i); + if (type(param(2*i))==10) then + if (convstr(param(2*i))=="off") then + flag2 =0; + else + errmsg = msprintf(gettext("%s: Unrecognized String [%s] entered for the option- %s."), "fmincon",param(2*i), param(2*i-1)); + error(errmsg); + end + else + flag2 = 1; + lHess = param(2*i); + end case "gradcon" then - flag3=1; - cGrad=param(2*i); + if (type(param(2*i))==10) then + if (convstr(param(2*i))=="off") then + flag3 =0; + else + errmsg = msprintf(gettext("%s: Unrecognized String [%s] entered for the option- %s."), "fmincon",param(2*i), param(2*i-1)); + error(errmsg); + end + else + flag3 = 1; + cGrad = param(2*i); + end else errmsg = msprintf(gettext("%s: Unrecognized parameter name %s."), "fmincon", param(2*i-1)); error(errmsg); end end - //To check for correct input of Gradient and Hessian functions from the user + //To check for correct input of Objective Gradient function from the user if (flag1==1) then - if (type(fGrad) ~= 11 & type(fGrad) ~= 13) then - errmsg = msprintf(gettext("%s: Expected function for Gradient of Objective"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", fGrad, "fGrad", 10, "function"); if(execstr('sample_fGrad=fGrad(x0)','errcatch')==21) errmsg = msprintf(gettext("%s: Gradient function of Objective and x0 did not match "), "fmincon"); @@ -704,32 +659,16 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin if (size(sample_fGrad,1)==s(2) & size(sample_fGrad,2)==1) then elseif (size(sample_fGrad,1)==1 & size(sample_fGrad,2)==s(2)) then - elseif (size(sample_fGrad,1)~=1 & size(sample_fGrad,2)~=1) then - errmsg = msprintf(gettext("%s: Wrong Input for Objective Gradient function(10th Parameter)---->Vector function is Expected"), "fmincon"); + else + errmsg = msprintf(gettext("%s: Wrong Input for Objective Gradient function(3rd Parameter)---->Row Vector function of size [1 X %d] is Expected"), "fmincon",s(2)); error(errmsg); - end - - function [y,check] = fGrad1(x) - if(execstr('y=fGrad(x)','errcatch')==32 | execstr('y=fGrad(x)','errcatch')==27) - y = 0; - check=1; - else - y=fGrad(x); - if (isreal(y)==%F) then - y = 0; - check=1; - else - check=0; - end - end - endfunction - + end end + + //To check for correct input of Lagrangian Hessian function from the user if (flag2==1) then - if (type(lHess) ~= 11 & type(lHess) ~= 13) then - errmsg = msprintf(gettext("%s: Expected function for Hessian of Objective"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", lHess, "lHess", 10, "function"); + if(execstr('sample_lHess=lHess(x0,1,1:no_nlc)','errcatch')==21) errmsg = msprintf(gettext("%s: Hessian function of Objective and x0 did not match "), "fmincon"); error(errmsg); @@ -738,29 +677,12 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin if(size(sample_lHess,1)~=s(2) | size(sample_lHess,2)~=s(2)) then errmsg = msprintf(gettext("%s: Wrong Input for Objective Hessian function(10th Parameter)---->Symmetric Matrix function is Expected "), "fmincon"); error(errmsg); - end - - function [y,check] = lHess1(x,obj,lambda) - if(execstr('y=lHess(x,obj,lambda)','errcatch')==32 | execstr('y=lHess(x,obj,lambda)','errcatch')==27) - y = 0; - check=1; - else - y=lHess(x,obj,lambda); - if (isreal(y)==%F) then - y = 0; - check=1; - else - check=0; - end - end - endfunction - + end end + + //To check for correct input of Constraint Gradient function from the user if (flag3==1) then - if (type(cGrad) ~= 11 & type(cGrad) ~= 13) then - errmsg = msprintf(gettext("%s: Expected function for Gradient of Constraint function"), "fmincon"); - error(errmsg); - end + Checktype("fmincon", cGrad, "cGrad", 10, "function"); if(execstr('[sample_cGrad,sample_ceqg]=cGrad(x0)','errcatch')==21) errmsg = msprintf(gettext("%s: Gradient function of Constraint and x0 did not match "), "fmincon"); @@ -790,36 +712,149 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin errmsg = msprintf(gettext("%s: Wrong Input for Constraint Gradient function(10th Parameter) (Refer Help)"), "fmincon"); error(errmsg); end - - function [y,check] = addcGrad1(x) - if(execstr('y=addcGrad(x)','errcatch')==32 | execstr('y=addcGrad(x)','errcatch')==27) - y = 0; - check=1; - else - y=addcGrad(x); - if (isreal(y)==%F) then + end + + //Defining an inbuilt Objective gradient function + function [y,check] = fGrad1(x) + if flag1==1 then + if(execstr('y=fGrad(x)','errcatch')==32 | execstr('y=fGrad(x)','errcatch')==27) + y = 0; + check=1; + else + y=fGrad(x); + if (isreal(y)==%F) then + y = 0; + check=1; + else + check=0; + end + end + else + if(execstr('y=numderivative(fun,x)','errcatch')==10000) + y=0; + check=1; + else + y=numderivative(fun,x); + if (isreal(y)==%F) then + y=0; + check=1; + else + check=0; + end + end + end + endfunction + + //Defining an inbuilt Lagrangian Hessian function + function [y,check] = lHess1(x,obj,lambda) + if flag2==1 then + if(execstr('y=lHess(x,obj,lambda)','errcatch')==32 | execstr('y=lHess(x,obj,lambda)','errcatch')==27) y = 0; check=1; - else - check=0; + else + y=lHess(x,obj,lambda); + if (isreal(y)==%F) then + y = 0; + check=1; + else + check=0; + end end + else + if(execstr('[grad,y]=numderivative(fun,x)','errcatch')==10000) + check1=1; + else + [grad,y1]=numderivative(fun,x); + if (isreal(y1)==%F) then + check1=1; + else + check1=0; + end + end + + + if check1==0 then + if no_nlc~=0 then + if(execstr('[grad,y]=numderivative(addnlc,x)','errcatch')==10000) + check2=1; + else + [grad,y2]=numderivative(addnlc,x); + if (isreal(y2)==%F) then + check2=1; + else + check2=0; + end + end + if check2==0 then + y2=matrix(y2, no_nlc*s(2)*s(2),1) + for i = 1:s(2)*s(2) + y(i)=0; + for j = 1:no_nlc + y(i)= y(i) + lambda(j)*y2((i-1)*no_nlc+j); + end + end + + for i = 1:s(2)*s(2) + y(i) = y(i)+ obj*y1(i); + end + check=0; + else + check=1; + end + else + check=0; + for i = 1:s(2)*s(2) + y(i) = obj*y1(i); + end + end + else + check=1; + y=[0]; + end end - endfunction - end - - //To Convert the Gradient and Hessian into Error Debugable form + endfunction + //Defining an inbuilt Constraint gradient function + function [y,check] = addcGrad1(x) + if flag3==1 then + if(execstr('y=addcGrad(x)','errcatch')==32 | execstr('y=addcGrad(x)','errcatch')==27) + y = 0; + check=1; + else + y=addcGrad(x); + if (isreal(y)==%F) then + y = 0; + check=1; + else + check=0; + end + end + else + if(execstr('y=numderivative(addnlc,x)','errcatch')==10000) + y=0; + check=1; + else + y=numderivative(addnlc,x); + if (isreal(y)==%F) then + y=0; + check=1; + else + check=0; + end + end + end + endfunction + + //Creating a Dummy Variable for IPopt use + empty=[0]; - //Dummy variable which is used by Ipopt - empty=0; - //Calling the Ipopt function for solving the above problem - [xopt,fopt,status,iter,cpu,obj_eval,dual,lambda1,zl,zu,gradient,hessian1] = solveminconp (f,gradhess,A,b,Aeq,beq,lb,ub,no_nlc,no_nlic,addnlc1,flag1,fGrad1,flag2,lHess1,flag3,addcGrad1,x0,options,empty) + [xopt,fopt,status,iter,cpu,obj_eval,dual,lambda1,zl,zu,gradient,hessian1] = solveminconp(f,A,b,Aeq,beq,lb,ub,no_nlc,no_nlic,addnlc1,fGrad1,lHess1,addcGrad1,x0,options,empty) //Calculating the values for the output xopt = xopt'; exitflag = status; - output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; output.Objective_Evaluation = obj_eval; @@ -857,7 +892,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin lambda.ineqlin (j) = lambda1(i) j= j+1; end - lambda.ineqlin = lambda.ineqlin'; + lambda.ineqlin = lambda.ineqlin' end //Converting hessian of order (1 x (numberOfVariables)^2) received from Ipopt to order (numberOfVariables x numberOfVariables) @@ -872,7 +907,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin if( status~=0 & status~=1 & status~=2 & status~=3 & status~=4 & status~=7 ) then xopt=[]; fopt=[]; - output = struct("Iterations", [],"Cpu_Time",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; lambda = struct("lower",[],"upper",[],"ineqlin",[],"eqlin",[],"ineqnonlin",[],"eqnonlin",[]); @@ -886,37 +921,54 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin case 0 then printf("\nOptimal Solution Found.\n"); + output.Message="Optimal Solution Found"; case 1 then printf("\nMaximum Number of Iterations Exceeded. Output may not be optimal.\n"); + output.Message="Maximum Number of Iterations Exceeded. Output may not be optimal"; case 2 then printf("\nMaximum CPU Time exceeded. Output may not be optimal.\n"); + output.Message="Maximum CPU Time exceeded. Output may not be optimal"; case 3 then printf("\nStop at Tiny Step\n"); + output.Message="Stop at Tiny Step"; case 4 then printf("\nSolved To Acceptable Level\n"); + output.Message="Solved To Acceptable Level"; case 5 then printf("\nConverged to a point of local infeasibility.\n"); + output.Message="Converged to a point of local infeasibility"; case 6 then printf("\nStopping optimization at current point as requested by user.\n"); + output.Message="Stopping optimization at current point as requested by user"; case 7 then printf("\nFeasible point for square problem found.\n"); + output.Message="Feasible point for square problem found"; case 8 then printf("\nIterates diverging; problem might be unbounded.\n"); + output.Message="Iterates diverging; problem might be unbounded"; case 9 then printf("\nRestoration Failed!\n"); + output.Message="Restoration Failed!"; case 10 then printf("\nError in step computation (regularization becomes too large?)!\n"); + output.Message="Error in step computation (regularization becomes too large?)!"; case 11 then printf("\nProblem has too few degrees of freedom.\n"); + output.Message="Problem has too few degrees of freedom"; case 12 then printf("\nInvalid option thrown back by Ipopt\n"); + output.Message="Invalid option thrown back by Ipopt"; case 13 then printf("\nNot enough memory.\n"); + output.Message="Not enough memory"; case 15 then printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n"); + output.Message="INTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors"; else printf("\nInvalid status returned. Notify the Toolbox authors\n"); + output.Message="Invalid status returned. Notify the Toolbox authors"; break; end + endfunction diff --git a/macros/fminimax.bin b/macros/fminimax.bin new file mode 100644 index 0000000..c023720 Binary files /dev/null and b/macros/fminimax.bin differ diff --git a/macros/fminimax.sci b/macros/fminimax.sci index c775b1b..b649640 100644 --- a/macros/fminimax.sci +++ b/macros/fminimax.sci @@ -19,11 +19,11 @@ function [x,fval,maxfval,exitflag,output,lambda] = fminimax(varargin) // xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub) // xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub,nonlinfun) // xopt = fminimax(fun,x0,A,b,Aeq,beq,lb,ub,nonlinfun,options) - // [xopt, fval] = fmincon(.....) - // [xopt, fval, maxfval]= fmincon(.....) - // [xopt, fval, maxfval, exitflag]= fmincon(.....) - // [xopt, fval, maxfval, exitflag, output]= fmincon(.....) - // [xopt, fval, maxfval, exitflag, output, lambda]= fmincon(.....) + // [xopt, fval] = fminimax(.....) + // [xopt, fval, maxfval]= fminimax(.....) + // [xopt, fval, maxfval, exitflag]= fminimax(.....) + // [xopt, fval, maxfval, exitflag, output]= fminimax(.....) + // [xopt, fval, maxfval, exitflag, output, lambda]= fminimax(.....) // // Parameters // fun: 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. diff --git a/macros/fminunc.bin b/macros/fminunc.bin new file mode 100644 index 0000000..aa82fc3 Binary files /dev/null and b/macros/fminunc.bin differ diff --git a/macros/fminunc.sci b/macros/fminunc.sci index a936aa1..b8ff7b5 100644 --- a/macros/fminunc.sci +++ b/macros/fminunc.sci @@ -75,6 +75,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) // output.Cpu_Time: The total cpu-time spend during the search // output.Objective_Evaluation: The number of Objective Evaluations performed during the search // output.Dual_Infeasibility: The Dual Infeasiblity of the final soution + // output.Message: The output message for the problem // // // Examples @@ -143,7 +144,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) [lhs , rhs] = argn(); //To check the number of arguments given by the user - if ( rhs<2 | rhs>5 ) then + if ( rhs<2 | rhs>3 ) then errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be 2 or 5"), "fminunc", rhs); error(errmsg) end @@ -166,7 +167,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) //To check and convert the 2nd Input argument(x0) to a row vector if((size(x0,1)~=1) & (size(x0,2)~=1)) then - errmsg = msprintf(gettext("%s: Expected Row Vector or Column Vector for x0 (Initial Value) "), "fminunc", rhs); + errmsg = msprintf(gettext("%s: Expected Row Vector or Column Vector for x0 (Initial Value) "), "fminunc"); error(errmsg); else if(size(x0,2)==1) then @@ -266,22 +267,49 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) for i = 1:(size(param))/2 select convstr(param(2*i-1),'l') case "maxiter" then - options(2*i) = param(2*i); //Setting the maximum number of iterations as per user entry + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Iteration should be a Constant"), "fminunc"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum number of iterations as per user entry + end case "cputime" then - options(2*i) = param(2*i); //Setting the maximum CPU time as per user entry + if (type(param(2*i))~=1) then + errmsg = msprintf(gettext("%s: Value for Maximum Cpu-time should be a Constant"), "fminunc"); + error(errmsg); + else + options(2*i) = param(2*i); //Setting the maximum CPU time as per user entry + end case "gradient" then - flag1 = 1; - fGrad = param(2*i); + if (type(param(2*i))==10) then + if (convstr(param(2*i))=="off") then + flag1 =0; + else + errmsg = msprintf(gettext("%s: Unrecognized String [%s] entered for the option- %s."), "fminunc",param(2*i), param(2*i-1)); + error(errmsg); + end + else + flag1 = 1; + fGrad = param(2*i); + end case "hessian" then - flag2 = 1; - fHess = param(2*i); + if (type(param(2*i))==10) then + if (convstr(param(2*i))=="off") then + flag2 =0; + else + errmsg = msprintf(gettext("%s: Unrecognized String [%s] entered for the option- %s."), "fminunc",param(2*i), param(2*i-1)); + error(errmsg); + end + else + flag2 = 1; + fHess = param(2*i); + end else - errmsg = msprintf(gettext("%s: Unrecognized parameter name %s."), "fminbnd", param(2*i-1)); + errmsg = msprintf(gettext("%s: Unrecognized parameter name %s."), "fminunc", param(2*i-1)); error(errmsg) end end - //To check for correct input of Gradient and Hessian functions from the user if (flag1==1) then if (type(fGrad) ~= 13 & type(fGrad) ~= 11) then @@ -298,8 +326,8 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) if (size(samplefGrad,1)==s(2) & size(samplefGrad,2)==1) then elseif (size(samplefGrad,1)==1 & size(samplefGrad,2)==s(2)) then - elseif (size(samplefGrad,1)~=1 & size(samplefGrad,2)~=1) then - errmsg = msprintf(gettext("%s: Wrong Input for Objective Gradient function(3rd Parameter)---->Row Vector function is Expected"), "fminunc"); + else + errmsg = msprintf(gettext("%s: Wrong Input for Objective Gradient function(3rd Parameter)---->Row Vector function of size [1 X %d] is Expected"), "fminunc",s(2)); error(errmsg); end @@ -332,7 +360,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) samplefHess=fHess(x0); if(size(samplefHess,1)~=s(2) | size(samplefHess,2)~=s(2)) then - errmsg = msprintf(gettext("%s: Wrong Input for Objective Hessian function(3rd Parameter)---->Symmetric Matrix function is Expected "), "fminunc"); + errmsg = msprintf(gettext("%s: Wrong Input for Objective Hessian function(3rd Parameter)---->Symmetric Matrix function of size [%d X %d] is Expected "), "fminunc",s(2),s(2)); error(errmsg); end @@ -358,7 +386,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) //Calculating the values for output xopt = xopt'; exitflag = status; - output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Objective_Evaluation",[],"Dual_Infeasibility",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; output.Objective_Evaluation = obj_eval; @@ -377,7 +405,7 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) if( status~=0 & status~=1 & status~=2 & status~=3 & status~=4 & status~=7 ) then xopt=[] fopt=[] - output = struct("Iterations", [],"Cpu_Time",[]); + output = struct("Iterations", [],"Cpu_Time",[],"Message",""); output.Iterations = iter; output.Cpu_Time = cpu; gradient=[] @@ -390,38 +418,54 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) case 0 then printf("\nOptimal Solution Found.\n"); + output.Message="Optimal Solution Found"; case 1 then printf("\nMaximum Number of Iterations Exceeded. Output may not be optimal.\n"); + output.Message="Maximum Number of Iterations Exceeded. Output may not be optimal"; case 2 then printf("\nMaximum CPU Time exceeded. Output may not be optimal.\n"); + output.Message="Maximum CPU Time exceeded. Output may not be optimal"; case 3 then printf("\nStop at Tiny Step\n"); + output.Message="Stop at Tiny Step"; case 4 then printf("\nSolved To Acceptable Level\n"); + output.Message="Solved To Acceptable Level"; case 5 then printf("\nConverged to a point of local infeasibility.\n"); + output.Message="Converged to a point of local infeasibility"; case 6 then printf("\nStopping optimization at current point as requested by user.\n"); + output.Message="Stopping optimization at current point as requested by user"; case 7 then printf("\nFeasible point for square problem found.\n"); + output.Message="Feasible point for square problem found"; case 8 then printf("\nIterates diverging; problem might be unbounded.\n"); + output.Message="Iterates diverging; problem might be unbounded"; case 9 then printf("\nRestoration Failed!\n"); + output.Message="Restoration Failed!"; case 10 then printf("\nError in step computation (regularization becomes too large?)!\n"); - case 12 then + output.Message="Error in step computation (regularization becomes too large?)!"; + case 11 then printf("\nProblem has too few degrees of freedom.\n"); - case 13 then + output.Message="Problem has too few degrees of freedom"; + case 12 then printf("\nInvalid option thrown back by Ipopt\n"); - case 14 then + output.Message="Invalid option thrown back by Ipopt"; + case 13 then printf("\nNot enough memory.\n"); + output.Message="Not enough memory"; case 15 then printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n"); + output.Message="INTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors"; else printf("\nInvalid status returned. Notify the Toolbox authors\n"); + output.Message="Invalid status returned. Notify the Toolbox authors"; break; - end + end endfunction diff --git a/macros/lib b/macros/lib new file mode 100644 index 0000000..612b878 Binary files /dev/null and b/macros/lib differ diff --git a/macros/linprog.bin b/macros/linprog.bin new file mode 100644 index 0000000..1d3a5aa Binary files /dev/null and b/macros/linprog.bin differ diff --git a/macros/lsqcurvefit.bin b/macros/lsqcurvefit.bin new file mode 100644 index 0000000..20a8d0d Binary files /dev/null and b/macros/lsqcurvefit.bin differ diff --git a/macros/lsqcurvefit.sci b/macros/lsqcurvefit.sci new file mode 100644 index 0000000..10e8e48 --- /dev/null +++ b/macros/lsqcurvefit.sci @@ -0,0 +1,439 @@ +// Copyright (C) 2015 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Harpreet Singh +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function [xopt,resnorm,residual,exitflag,output,lambda] = lsqcurvefit (varargin) + // Solves a non linear data fitting problems. + // + // Calling Sequence + // xopt = lsqcurvefit(fun,x0,xdata,ydata) + // xopt = lsqcurvefit(fun,x0,xdata,ydata,lb,ub) + // xopt = lsqcurvefit(fun,x0,xdata,ydata,lb,ub,options) + // [xopt,resnorm] = lsqcurvefit( ... ) + // + // Parameters + // C : a matrix of double, represents the multiplier of the solution x in the expression C⋅x - d. Number of columns in C is equal to the number of elements in x. + // d : a vector of double, represents the additive constant term in the expression C⋅x - d. Number of elements in d is equal to the number of rows in C matrix. + // A : a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b. + // b : a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b. + // Aeq : a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq. + // beq : a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq. + // 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 parameters to be set. + // 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 double, solution residuals returned as the vector d-C⋅x. + // exitflag : The exit status. See below for details. + // output : The structure consist of statistics about the optimization. See below for details. + // lambda : The structure consist of the Lagrange multipliers at the solution of problem. See below for details. + // + // Description + // Search the minimum of a constrained linear least square problem specified by : + // + // + // \begin{eqnarray} + // &\mbox{min}_{x} + // & 1/2||C⋅x - d||_2^2 \\ + // & \text{subject to} & A⋅x \leq b \\ + // & & Aeq⋅x = beq \\ + // & & lb \leq x \leq ub \\ + // \end{eqnarray} + // + // + // The routine calls Ipopt for solving the linear least square problem, Ipopt 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. + // + // Syntax : options= list("MaxIter", [---], "CpuTime", [---]); + // MaxIter : a Scalar, containing the Maximum Number of Iteration that the solver should take. + // CpuTime : a Scalar, containing the Maximum amount of CPU Time that the solver should take. + // Default Values : options = list("MaxIter", [3000], "CpuTime", [600]); + // + // + // The exitflag allows to know the status of the optimization which is given back by Ipopt. + // + // exitflag=0 : Optimal Solution Found + // exitflag=1 : Maximum Number of Iterations Exceeded. Output may not be optimal. + // exitflag=2 : Maximum CPU Time exceeded. Output may not be optimal. + // exitflag=3 : Stop at Tiny Step. + // exitflag=4 : Solved To Acceptable Level. + // exitflag=5 : Converged to a point of local infeasibility. + // + // + // For more details on exitflag see the ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/ + // + // The output data structure contains detailed informations about the optimization process. + // It has type "struct" and contains the following fields. + // + // output.iterations: The number of iterations performed during the search + // output.constrviolation: The max-norm of the constraint violation. + // + // + // The lambda data structure contains the Lagrange multipliers at the end + // of optimization. In the current version the values are returned only when the the solution is optimal. + // It has type "struct" and contains the following fields. + // + // lambda.lower: The Lagrange multipliers for the lower bound constraints. + // lambda.upper: The Lagrange multipliers for the upper bound constraints. + // lambda.eqlin: The Lagrange multipliers for the linear equality constraints. + // lambda.ineqlin: The Lagrange multipliers for the linear inequality constraints. + // + // + // Examples + // //A simple linear least square example + // C = [ 2 0; + // -1 1; + // 0 2] + // d = [1 + // 0 + // -1]; + // A = [10 -2; + // -2 10]; + // b = [4 + // -4]; + // [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b) + // // Press ENTER to continue + // + // Examples + // //A basic example for equality, inequality constraints and variable bounds + // C = [1 1 1; + // 1 1 0; + // 0 1 1; + // 1 0 0; + // 0 0 1] + // d = [89; + // 67; + // 53; + // 35; + // 20;] + // A = [3 2 1; + // 2 3 4; + // 1 2 3]; + // b = [191 + // 209 + // 162]; + // Aeq = [1 2 1]; + // beq = 10; + // lb = repmat(0.1,3,1); + // ub = repmat(4,3,1); + // [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) + // Authors + // Harpreet Singh + + + //To check the number of input and output argument + [lhs , rhs] = argn(); + + //To check the number of argument given by user + if ( rhs < 4 | rhs == 5 | rhs == 7 | rhs > 10 ) then + errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be in the set of [4 6 8 9 10]"), "lsqlin", rhs); + error(errmsg) + end + +// Initializing all the values to empty matrix + C=[]; + d=[]; + A=[]; + b=[]; + Aeq=[]; + beq=[]; + lb=[]; + ub=[]; + x0=[]; + + C = varargin(1); + d = varargin(2); + A = varargin(3); + b = varargin(4); + nbVar = size(C,2); + + if(nbVar == 0) then + errmsg = msprintf(gettext("%s: Cannot determine the number of variables because input objective coefficients is empty"), "lsqlin"); + error(errmsg); + end + + if ( rhs<5 ) then + Aeq = [] + beq = [] + else + Aeq = varargin(5); + beq = varargin(6); + end + + if ( rhs<7 ) then + lb = repmat(-%inf,nbVar,1); + ub = repmat(%inf,nbVar,1); + else + lb = varargin(7); + ub = varargin(8); + end + + + if ( rhs<9 | size(varargin(9)) ==0 ) then + x0 = repmat(0,nbVar,1) + else + x0 = varargin(9); + end + + if ( rhs<10 | size(varargin(10)) ==0 ) then + param = list(); + else + param =varargin(10); + end + + if (size(lb,2)==0) then + lb = repmat(-%inf,nbVar,1); + end + + if (size(ub,2)==0) then + ub = repmat(%inf,nbVar,1); + end + + if (type(param) ~= 15) then + errmsg = msprintf(gettext("%s: param should be a list "), "lsqlin"); + error(errmsg); + end + + //Check type of variables + Checktype("lsqlin", C, "C", 1, "constant") + Checktype("lsqlin", d, "d", 2, "constant") + Checktype("lsqlin", A, "A", 3, "constant") + Checktype("lsqlin", b, "b", 4, "constant") + Checktype("lsqlin", Aeq, "Aeq", 5, "constant") + Checktype("lsqlin", beq, "beq", 6, "constant") + Checktype("lsqlin", lb, "lb", 7, "constant") + Checktype("lsqlin", ub, "ub", 8, "constant") + Checktype("lsqlin", x0, "x0", 9, "constant") + + if (modulo(size(param),2)) then + errmsg = msprintf(gettext("%s: Size of parameters should be even"), "lsqlin"); + error(errmsg); + end + + options = list( "MaxIter" , [3000], ... + "CpuTime" , [600] ... + ); + + for i = 1:(size(param))/2 + + select convstr(param(2*i-1),'l') + case "maxiter" then + options(2*i) = param(2*i); + case "cputime" then + options(2*i) = param(2*i); + else + errmsg = msprintf(gettext("%s: Unrecognized parameter name ''%s''."), "lsqlin", param(2*i-1)); + error(errmsg) + end + end + + nbConInEq = size(A,1); + nbConEq = size(Aeq,1); + + // Check if the user gives row vector + // and Changing it to a column matrix + + if (size(d,2)== [nbVar]) then + d=d'; + end + + if (size(lb,2)== [nbVar]) then + lb = lb'; + end + + if (size(ub,2)== [nbVar]) then + ub = ub'; + end + + if (size(b,2)==nbConInEq) then + b = b'; + end + + if (size(beq,2)== nbConEq) then + beq = beq'; + end + + if (size(x0,2)== [nbVar]) then + x0=x0'; + end + + //Check the size of d which should equal to the number of variable + if ( size(d,1) ~= size(C,1)) then + errmsg = msprintf(gettext("%s: The number of rows in C must be equal the number of elements of d"), "lsqlin"); + error(errmsg); + end + + //Check the size of inequality constraint which should be equal to the number of variables + if ( size(A,2) ~= nbVar & size(A,2) ~= 0) then + errmsg = msprintf(gettext("%s: The number of columns in A must be the same as the number of columns in C"), "lsqlin"); + error(errmsg); + end + + //Check the size of equality constraint which should be equal to the number of variables + if ( size(Aeq,2) ~= nbVar & size(Aeq,2) ~= 0 ) then + errmsg = msprintf(gettext("%s: The number of columns in Aeq must be the same as the number of columns in C"), "lsqlin"); + error(errmsg); + end + + //Check the size of Lower Bound which should be equal to the number of variables + if ( size(lb,1) ~= nbVar) then + errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "lsqlin"); + error(errmsg); + end + + //Check the size of Upper Bound which should equal to the number of variables + if ( size(ub,1) ~= nbVar) then + errmsg = msprintf(gettext("%s: The Upper Bound is not equal to the number of variables"), "lsqlin"); + error(errmsg); + end + + //Check the size of constraints of Lower Bound which should equal to the number of constraints + if ( size(b,1) ~= nbConInEq & size(b,1) ~= 0) then + errmsg = msprintf(gettext("%s: The number of rows in A must be the same as the number of elements of b"), "lsqlin"); + error(errmsg); + end + + //Check the size of constraints of Upper Bound which should equal to the number of constraints + if ( size(beq,1) ~= nbConEq & size(beq,1) ~= 0) then + errmsg = msprintf(gettext("%s: The number of rows in Aeq must be the same as the number of elements of beq"), "lsqlin"); + error(errmsg); + end + + //Check the size of initial of variables which should equal to the number of variables + if ( size(x0,1) ~= nbVar) then + warnmsg = msprintf(gettext("%s: Ignoring initial guess of variables as it is not equal to the number of variables"), "lsqlin"); + warning(warnmsg); + x0 = repmat(0,nbVar,1); + end + + //Check if the user gives a matrix instead of a vector + + if ((size(d,1)~=1)& (size(d,2)~=1)) then + errmsg = msprintf(gettext("%s: d should be a vector"), "lsqlin"); + error(errmsg); + end + + if (size(lb,1)~=1)& (size(lb,2)~=1) then + errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "lsqlin"); + error(errmsg); + end + + if (size(ub,1)~=1)& (size(ub,2)~=1) then + errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "lsqlin"); + error(errmsg); + end + + if (nbConInEq) then + if ((size(b,1)~=1)& (size(b,2)~=1)) then + errmsg = msprintf(gettext("%s: Constraint Lower Bound should be a vector"), "lsqlin"); + error(errmsg); + end + end + + if (nbConEq) then + if (size(beq,1)~=1)& (size(beq,2)~=1) then + errmsg = msprintf(gettext("%s: Constraint should be a vector"), "lsqlin"); + error(errmsg); + end + end + + for i = 1:nbConInEq + if (b(i) == -%inf) + errmsg = msprintf(gettext("%s: Value of b can not be negative infinity"), "lsqlin"); + error(errmsg); + end + end + + for i = 1:nbConEq + if (beq(i) == -%inf) + errmsg = msprintf(gettext("%s: Value of beq can not be negative infinity"), "lsqlin"); + error(errmsg); + end + end + + for i = 1:nbVar + if(lb(i)>ub(i)) + errmsg = msprintf(gettext("%s: Problem has inconsistent variable bounds"), "lsqlin"); + error(errmsg); + end + end + + //Converting it into Quadratic Programming Problem + + H = C'*C; + f = [-C'*d]'; + op_add = d'*d; + lb = lb'; + ub = ub'; + x0 = x0'; + conMatrix = [Aeq;A]; + nbCon = size(conMatrix,1); + conLB = [beq; repmat(-%inf,nbConInEq,1)]'; + conUB = [beq;b]' ; + [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,H,f,conMatrix,conLB,conUB,lb,ub,x0,options); + + xopt = xopt'; + residual = d-C*xopt; + resnorm = residual'*residual; + exitflag = status; + output = struct("Iterations" , [], .. + "ConstrViolation" ,[]); + output.Iterations = iter; + output.ConstrViolation = max([0;norm(Aeq*xopt-beq, 'inf');(lb'-xopt);(xopt-ub');(A*xopt-b)]); + lambda = struct("lower" , [], .. + "upper" , [], .. + "eqlin" , [], .. + "ineqlin" , []); + + lambda.lower = Zl; + lambda.upper = Zu; + lambda.eqlin = lmbda(1:nbConEq); + lambda.ineqlin = lmbda(nbConEq+1:nbCon); + + select status + case 0 then + printf("\nOptimal Solution Found.\n"); + case 1 then + printf("\nMaximum Number of Iterations Exceeded. Output may not be optimal.\n"); + case 2 then + printf("\nMaximum CPU Time exceeded. Output may not be optimal.\n"); + case 3 then + printf("\nStop at Tiny Step\n"); + case 4 then + printf("\nSolved To Acceptable Level\n"); + case 5 then + printf("\nConverged to a point of local infeasibility.\n"); + case 6 then + printf("\nStopping optimization at current point as requested by user.\n"); + case 7 then + printf("\nFeasible point for square problem found.\n"); + case 8 then + printf("\nIterates diverging; problem might be unbounded.\n"); + case 9 then + printf("\nRestoration Failed!\n"); + case 10 then + printf("\nError in step computation (regularization becomes too large?)!\n"); + case 12 then + printf("\nProblem has too few degrees of freedom.\n"); + case 13 then + printf("\nInvalid option thrown back by Ipopt\n"); + case 14 then + printf("\nNot enough memory.\n"); + case 15 then + printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n"); + else + printf("\nInvalid status returned. Notify the Toolbox authors\n"); + break; + end + +endfunction diff --git a/macros/lsqlin.bin b/macros/lsqlin.bin new file mode 100644 index 0000000..7baf7be Binary files /dev/null and b/macros/lsqlin.bin differ diff --git a/macros/lsqnonneg.bin b/macros/lsqnonneg.bin new file mode 100644 index 0000000..32620d0 Binary files /dev/null and b/macros/lsqnonneg.bin differ diff --git a/macros/matrix_linprog.bin b/macros/matrix_linprog.bin new file mode 100644 index 0000000..e3a9db3 Binary files /dev/null and b/macros/matrix_linprog.bin differ diff --git a/macros/mps_linprog.bin b/macros/mps_linprog.bin new file mode 100644 index 0000000..c0d2e3e Binary files /dev/null and b/macros/mps_linprog.bin differ diff --git a/macros/names b/macros/names new file mode 100644 index 0000000..36793aa --- /dev/null +++ b/macros/names @@ -0,0 +1,22 @@ +Checkdims +Checklhs +Checkrhs +Checktype +Checkvector +fgoalattain +fminbnd +fmincon +fminimax +fminunc +linprog +lsqcurvefit +lsqlin +lsqnonneg +matrix_linprog +mps_linprog +qpipopt +qpipoptmat +setOptions +symphony +symphony_call +symphonymat diff --git a/macros/qpipopt.bin b/macros/qpipopt.bin new file mode 100644 index 0000000..e2ba3de Binary files /dev/null and b/macros/qpipopt.bin differ diff --git a/macros/qpipoptmat.bin b/macros/qpipoptmat.bin new file mode 100644 index 0000000..b9c741f Binary files /dev/null and b/macros/qpipoptmat.bin differ diff --git a/macros/setOptions.bin b/macros/setOptions.bin new file mode 100644 index 0000000..8d23e73 Binary files /dev/null and b/macros/setOptions.bin differ diff --git a/macros/symphony.bin b/macros/symphony.bin new file mode 100644 index 0000000..2c3a43a Binary files /dev/null and b/macros/symphony.bin differ diff --git a/macros/symphony_call.bin b/macros/symphony_call.bin new file mode 100644 index 0000000..5e0d5e1 Binary files /dev/null and b/macros/symphony_call.bin differ diff --git a/macros/symphonymat.bin b/macros/symphonymat.bin new file mode 100644 index 0000000..7dffa2f Binary files /dev/null and b/macros/symphonymat.bin differ diff --git a/sci_gateway/cpp/cleaner.sce b/sci_gateway/cpp/cleaner.sce new file mode 100644 index 0000000..333775c --- /dev/null +++ b/sci_gateway/cpp/cleaner.sce @@ -0,0 +1,22 @@ +// This file is released under the 3-clause BSD license. See COPYING-BSD. +// Generated by builder.sce : Please, do not edit this file +// cleaner.sce +// ------------------------------------------------------ +curdir = pwd(); +cleaner_path = get_file_path('cleaner.sce'); +chdir(cleaner_path); +// ------------------------------------------------------ +if fileinfo('loader.sce') <> [] then + mdelete('loader.sce'); +end +// ------------------------------------------------------ +if fileinfo('libFOSSEE_Optimization_Toolbox.so') <> [] then + mdelete('libFOSSEE_Optimization_Toolbox.so'); +end +// ------------------------------------------------------ +if fileinfo('libFOSSEE_Optimization_Toolbox.c') <> [] then + mdelete('libFOSSEE_Optimization_Toolbox.c'); +end +// ------------------------------------------------------ +chdir(curdir); +// ------------------------------------------------------ diff --git a/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c new file mode 100644 index 0000000..cd53066 --- /dev/null +++ b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.c @@ -0,0 +1,156 @@ +#ifdef __cplusplus +extern "C" { +#endif +#include +#include +#include +#include +static int direct_gateway(char *fname,void F(void)) { F();return 0;}; +extern Gatefunc sci_sym_open; +extern Gatefunc sci_sym_close; +extern Gatefunc sci_sym_isEnvActive; +extern Gatefunc sci_sym_set_defaults; +extern Gatefunc sci_sym_set_int_param; +extern Gatefunc sci_sym_get_int_param; +extern Gatefunc sci_sym_set_dbl_param; +extern Gatefunc sci_sym_get_dbl_param; +extern Gatefunc sci_sym_set_str_param; +extern Gatefunc sci_sym_get_str_param; +extern Gatefunc sci_sym_getInfinity; +extern Gatefunc sci_sym_loadProblemBasic; +extern Gatefunc sci_sym_loadProblem; +extern Gatefunc sci_sym_load_mps; +extern Gatefunc sci_sym_get_num_int; +extern Gatefunc sci_sym_get_num_int; +extern Gatefunc sci_sym_get_num_int; +extern Gatefunc sci_sym_isContinuous; +extern Gatefunc sci_sym_isBinary; +extern Gatefunc sci_sym_isInteger; +extern Gatefunc sci_sym_set_continuous; +extern Gatefunc sci_sym_set_integer; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_setVarBound; +extern Gatefunc sci_sym_setVarBound; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_setObjCoeff; +extern Gatefunc sci_sym_getObjSense; +extern Gatefunc sci_sym_setObjSense; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_get_dbl_arr; +extern Gatefunc sci_sym_setConstrBound; +extern Gatefunc sci_sym_setConstrBound; +extern Gatefunc sci_sym_setConstrType; +extern Gatefunc sci_sym_get_matrix; +extern Gatefunc sci_sym_get_row_sense; +extern Gatefunc sci_sym_addConstr; +extern Gatefunc sci_sym_addVar; +extern Gatefunc sci_sym_delete_cols; +extern Gatefunc sci_sym_delete_rows; +extern Gatefunc sci_sym_getPrimalBound; +extern Gatefunc sci_sym_setPrimalBound; +extern Gatefunc sci_sym_setColSoln; +extern Gatefunc sci_sym_solve; +extern Gatefunc sci_sym_get_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_get_solver_status; +extern Gatefunc sci_sym_getVarSoln; +extern Gatefunc sci_sym_getObjVal; +extern Gatefunc sci_sym_get_iteration_count; +extern Gatefunc sci_sym_getRowActivity; +extern Gatefunc sci_linearprog; +extern Gatefunc sci_rmps; +extern Gatefunc sci_solveqp; +extern Gatefunc sci_solveminuncp; +extern Gatefunc sci_solveminbndp; +extern Gatefunc sci_solveminconp; +static GenericTable Tab[]={ + {(Myinterfun)sci_gateway,sci_sym_open,"sym_open"}, + {(Myinterfun)sci_gateway,sci_sym_close,"sym_close"}, + {(Myinterfun)sci_gateway,sci_sym_isEnvActive,"sym_isEnvActive"}, + {(Myinterfun)sci_gateway,sci_sym_set_defaults,"sym_resetParams"}, + {(Myinterfun)sci_gateway,sci_sym_set_int_param,"sym_setIntParam"}, + {(Myinterfun)sci_gateway,sci_sym_get_int_param,"sym_getIntParam"}, + {(Myinterfun)sci_gateway,sci_sym_set_dbl_param,"sym_setDblParam"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_param,"sym_getDblParam"}, + {(Myinterfun)sci_gateway,sci_sym_set_str_param,"sym_setStrParam"}, + {(Myinterfun)sci_gateway,sci_sym_get_str_param,"sym_getStrParam"}, + {(Myinterfun)sci_gateway,sci_sym_getInfinity,"sym_getInfinity"}, + {(Myinterfun)sci_gateway,sci_sym_loadProblemBasic,"sym_loadProblemBasic"}, + {(Myinterfun)sci_gateway,sci_sym_loadProblem,"sym_loadProblem"}, + {(Myinterfun)sci_gateway,sci_sym_load_mps,"sym_loadMPS"}, + {(Myinterfun)sci_gateway,sci_sym_get_num_int,"sym_getNumConstr"}, + {(Myinterfun)sci_gateway,sci_sym_get_num_int,"sym_getNumVar"}, + {(Myinterfun)sci_gateway,sci_sym_get_num_int,"sym_getNumElements"}, + {(Myinterfun)sci_gateway,sci_sym_isContinuous,"sym_isContinuous"}, + {(Myinterfun)sci_gateway,sci_sym_isBinary,"sym_isBinary"}, + {(Myinterfun)sci_gateway,sci_sym_isInteger,"sym_isInteger"}, + {(Myinterfun)sci_gateway,sci_sym_set_continuous,"sym_setContinuous"}, + {(Myinterfun)sci_gateway,sci_sym_set_integer,"sym_setInteger"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getVarLower"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getVarUpper"}, + {(Myinterfun)sci_gateway,sci_sym_setVarBound,"sym_setVarLower"}, + {(Myinterfun)sci_gateway,sci_sym_setVarBound,"sym_setVarUpper"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getObjCoeff"}, + {(Myinterfun)sci_gateway,sci_sym_setObjCoeff,"sym_setObjCoeff"}, + {(Myinterfun)sci_gateway,sci_sym_getObjSense,"sym_getObjSense"}, + {(Myinterfun)sci_gateway,sci_sym_setObjSense,"sym_setObjSense"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getRhs"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getConstrRange"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getConstrLower"}, + {(Myinterfun)sci_gateway,sci_sym_get_dbl_arr,"sym_getConstrUpper"}, + {(Myinterfun)sci_gateway,sci_sym_setConstrBound,"sym_setConstrLower"}, + {(Myinterfun)sci_gateway,sci_sym_setConstrBound,"sym_setConstrUpper"}, + {(Myinterfun)sci_gateway,sci_sym_setConstrType,"sym_setConstrType"}, + {(Myinterfun)sci_gateway,sci_sym_get_matrix,"sym_getMatrix"}, + {(Myinterfun)sci_gateway,sci_sym_get_row_sense,"sym_getConstrSense"}, + {(Myinterfun)sci_gateway,sci_sym_addConstr,"sym_addConstr"}, + {(Myinterfun)sci_gateway,sci_sym_addVar,"sym_addVar"}, + {(Myinterfun)sci_gateway,sci_sym_delete_cols,"sym_deleteVars"}, + {(Myinterfun)sci_gateway,sci_sym_delete_rows,"sym_deleteConstrs"}, + {(Myinterfun)sci_gateway,sci_sym_getPrimalBound,"sym_getPrimalBound"}, + {(Myinterfun)sci_gateway,sci_sym_setPrimalBound,"sym_setPrimalBound"}, + {(Myinterfun)sci_gateway,sci_sym_setColSoln,"sym_setVarSoln"}, + {(Myinterfun)sci_gateway,sci_sym_solve,"sym_solve"}, + {(Myinterfun)sci_gateway,sci_sym_get_status,"sym_getStatus"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isOptimal"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isInfeasible"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isAbandoned"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isIterLimitReached"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isTimeLimitReached"}, + {(Myinterfun)sci_gateway,sci_sym_get_solver_status,"sym_isTargetGapAchieved"}, + {(Myinterfun)sci_gateway,sci_sym_getVarSoln,"sym_getVarSoln"}, + {(Myinterfun)sci_gateway,sci_sym_getObjVal,"sym_getObjVal"}, + {(Myinterfun)sci_gateway,sci_sym_get_iteration_count,"sym_getIterCount"}, + {(Myinterfun)sci_gateway,sci_sym_getRowActivity,"sym_getConstrActivity"}, + {(Myinterfun)sci_gateway,sci_linearprog,"linearprog"}, + {(Myinterfun)sci_gateway,sci_rmps,"rmps"}, + {(Myinterfun)sci_gateway,sci_solveqp,"solveqp"}, + {(Myinterfun)sci_gateway,sci_solveminuncp,"solveminuncp"}, + {(Myinterfun)sci_gateway,sci_solveminbndp,"solveminbndp"}, + {(Myinterfun)sci_gateway,sci_solveminconp,"solveminconp"}, +}; + +int C2F(libFOSSEE_Optimization_Toolbox)() +{ + Rhs = Max(0, Rhs); + if (*(Tab[Fin-1].f) != NULL) + { + if(pvApiCtx == NULL) + { + pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx)); + } + pvApiCtx->pstName = (char*)Tab[Fin-1].name; + (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F); + } + return 0; +} +#ifdef __cplusplus +} +#endif diff --git a/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so new file mode 100755 index 0000000..9a4caf4 Binary files /dev/null and b/sci_gateway/cpp/libFOSSEE_Optimization_Toolbox.so differ diff --git a/sci_gateway/cpp/loader.sce b/sci_gateway/cpp/loader.sce new file mode 100644 index 0000000..1ec953f --- /dev/null +++ b/sci_gateway/cpp/loader.sce @@ -0,0 +1,84 @@ +// This file is released under the 3-clause BSD license. See COPYING-BSD. +// Generated by builder.sce : Please, do not edit this file +// ---------------------------------------------------------------------------- +// +libFOSSEE_Optimizat_path = get_absolute_file_path('loader.sce'); +// +// ulink previous function with same name +[bOK, ilib] = c_link('libFOSSEE_Optimization_Toolbox'); +if bOK then + ulink(ilib); +end +// +list_functions = [ 'sym_open'; + 'sym_close'; + 'sym_isEnvActive'; + 'sym_resetParams'; + 'sym_setIntParam'; + 'sym_getIntParam'; + 'sym_setDblParam'; + 'sym_getDblParam'; + 'sym_setStrParam'; + 'sym_getStrParam'; + 'sym_getInfinity'; + 'sym_loadProblemBasic'; + 'sym_loadProblem'; + 'sym_loadMPS'; + 'sym_getNumConstr'; + 'sym_getNumVar'; + 'sym_getNumElements'; + 'sym_isContinuous'; + 'sym_isBinary'; + 'sym_isInteger'; + 'sym_setContinuous'; + 'sym_setInteger'; + 'sym_getVarLower'; + 'sym_getVarUpper'; + 'sym_setVarLower'; + 'sym_setVarUpper'; + 'sym_getObjCoeff'; + 'sym_setObjCoeff'; + 'sym_getObjSense'; + 'sym_setObjSense'; + 'sym_getRhs'; + 'sym_getConstrRange'; + 'sym_getConstrLower'; + 'sym_getConstrUpper'; + 'sym_setConstrLower'; + 'sym_setConstrUpper'; + 'sym_setConstrType'; + 'sym_getMatrix'; + 'sym_getConstrSense'; + 'sym_addConstr'; + 'sym_addVar'; + 'sym_deleteVars'; + 'sym_deleteConstrs'; + 'sym_getPrimalBound'; + 'sym_setPrimalBound'; + 'sym_setVarSoln'; + 'sym_solve'; + 'sym_getStatus'; + 'sym_isOptimal'; + 'sym_isInfeasible'; + 'sym_isAbandoned'; + 'sym_isIterLimitReached'; + 'sym_isTimeLimitReached'; + 'sym_isTargetGapAchieved'; + 'sym_getVarSoln'; + 'sym_getObjVal'; + 'sym_getIterCount'; + 'sym_getConstrActivity'; + 'linearprog'; + 'rmps'; + 'solveqp'; + 'solveminuncp'; + 'solveminbndp'; + 'solveminconp'; +]; +addinter(libFOSSEE_Optimizat_path + filesep() + 'libFOSSEE_Optimization_Toolbox' + getdynlibext(), 'libFOSSEE_Optimization_Toolbox', list_functions); +// remove temp. variables on stack +clear libFOSSEE_Optimizat_path; +clear bOK; +clear ilib; +clear list_functions; +// ---------------------------------------------------------------------------- diff --git a/sci_gateway/cpp/minconNLP.hpp b/sci_gateway/cpp/minconNLP.hpp index df496ce..0dcaf26 100644 --- a/sci_gateway/cpp/minconNLP.hpp +++ b/sci_gateway/cpp/minconNLP.hpp @@ -24,12 +24,6 @@ class minconNLP : public TNLP Index numConstr_; //Number of constraints - Number flag1_; //Gradient of objective ON or OFF - - Number flag2_; //Hessian of objective ON or OFF - - Number flag3_; //Jacobian of constraints ON or OFF - Number nonlinCon_; //Number of non-linear constraints Number nonlinIneqCon_; //Number of non-linear inequality constraints @@ -101,7 +95,7 @@ class minconNLP : public TNLP public: /** user defined constructor */ - minconNLP(Index nV, Index nC, Number *x0 ,Number *A, Number *b, Number* Aeq, Number *beq, Index Arows, Index Acols, Index brows, Index bcols, Index Aeqrows, Index Aeqcols, Index beqrows, Index beqcols, Number* LB, Number* UB, Number nlC, Number nlIC, Number f1, Number f2, Number f3) : numVars_(nV), numConstr_(nC), varGuess_(x0), A_(A), b_(b), Aeq_(Aeq), beq_(beq), Arows_(Arows), Acols_(Acols), brows_(brows), bcols_(bcols), Aeqrows_(Aeqrows), Aeqcols_(Aeqcols), beqrows_(beqrows), beqcols_(beqcols), varLB_(LB), varUB_(UB), nonlinCon_(nlC), nonlinIneqCon_(nlIC), flag1_(f1), flag2_(f2), flag3_(f3), finalX_(0), finalZl_(0), finalZu_(0), finalGradient_(0), finalHessian_(0), finalObjVal_(1e20){ } + minconNLP(Index nV, Index nC, Number *x0 ,Number *A, Number *b, Number* Aeq, Number *beq, Index Arows, Index Acols, Index brows, Index bcols, Index Aeqrows, Index Aeqcols, Index beqrows, Index beqcols, Number* LB, Number* UB, Number nlC, Number nlIC) : numVars_(nV), numConstr_(nC), varGuess_(x0), A_(A), b_(b), Aeq_(Aeq), beq_(beq), Arows_(Arows), Acols_(Acols), brows_(brows), bcols_(bcols), Aeqrows_(Aeqrows), Aeqcols_(Aeqcols), beqrows_(beqrows), beqcols_(beqcols), varLB_(LB), varUB_(UB), nonlinCon_(nlC), nonlinIneqCon_(nlIC), finalX_(0), finalZl_(0), finalZu_(0), finalGradient_(0), finalHessian_(0), finalObjVal_(1e20){ } /** default destructor */ virtual ~minconNLP(); diff --git a/sci_gateway/cpp/sci_ipoptfmincon.cpp b/sci_gateway/cpp/sci_ipoptfmincon.cpp index 551af41..18218a5 100644 --- a/sci_gateway/cpp/sci_ipoptfmincon.cpp +++ b/sci_gateway/cpp/sci_ipoptfmincon.cpp @@ -30,17 +30,15 @@ int sci_solveminconp(char *fname) { using namespace Ipopt; - CheckInputArgument(pvApiCtx, 20, 20); + CheckInputArgument(pvApiCtx, 16, 16); CheckOutputArgument(pvApiCtx, 12, 12); // Error management variable SciErr sciErr; //Function pointers, input matrix(Starting point) pointer, flag variable - int* funptr=NULL; - int* gradhesptr=NULL; double *x0ptr=NULL, *lbptr=NULL, *ubptr=NULL,*Aptr=NULL, *bptr=NULL, *Aeqptr=NULL, *beqptr=NULL; - double flag1=0,flag2=0,flag3=0,nonlinCon=0,nonlinIneqCon=0; + double nonlinCon=0,nonlinIneqCon=0; // Input arguments @@ -49,7 +47,7 @@ int sci_solveminconp(char *fname) unsigned int temp1 = 0,temp2 = 0, iret = 0; int x0_rows=0, x0_cols=0, lb_rows=0, lb_cols=0, ub_rows=0, ub_cols=0, A_rows=0, A_cols=0, b_rows=0, b_cols=0, Aeq_rows=0, Aeq_cols=0, beq_rows=0, beq_cols=0; - // Output arguments + // Output arguments double *fX = NULL, ObjVal=0,iteration=0,cpuTime=0,fobj_eval=0; double dual_inf, constr_viol, complementarity, kkt_error; double *fGrad = NULL; @@ -61,98 +59,70 @@ int sci_solveminconp(char *fname) int int_fobj_eval, int_constr_eval, int_fobj_grad_eval, int_constr_jac_eval, int_hess_eval; ////////// Manage the input argument ////////// - - //Objective Function - if(getFunctionFromScilab(1,&funptr)) - { - return 1; - } - - //Function for gradient and hessian - if(getFunctionFromScilab(2,&gradhesptr)) - { - return 1; - } - - //x0(starting point) matrix from scilab - if(getDoubleMatrixFromScilab(18, &x0_rows, &x0_cols, &x0ptr)) - { - return 1; - } - - //Getting number of iterations - if(getFixedSizeDoubleMatrixInList(19,2,temp1,temp2,&max_iter)) - { - return 1; - } - - //Getting Cpu Time - if(getFixedSizeDoubleMatrixInList(19,4,temp1,temp2,&cpu_time)) - { - return 1; - } + //Getting matrix representing linear inequality constraints - if(getDoubleMatrixFromScilab(3, &A_rows, &A_cols, &Aptr)) + if(getDoubleMatrixFromScilab(2, &A_rows, &A_cols, &Aptr)) { return 1; } //Getting matrix representing bounds of linear inequality constraints - if(getDoubleMatrixFromScilab(4, &b_rows, &b_cols, &bptr)) + if(getDoubleMatrixFromScilab(3, &b_rows, &b_cols, &bptr)) { return 1; } //Getting matrix representing linear equality constraints - if(getDoubleMatrixFromScilab(5, &Aeq_rows, &Aeq_cols, &Aeqptr)) + if(getDoubleMatrixFromScilab(4, &Aeq_rows, &Aeq_cols, &Aeqptr)) { return 1; } //Getting matrix representing bounds of linear inequality constraints - if(getDoubleMatrixFromScilab(6, &beq_rows, &beq_cols, &beqptr)) + if(getDoubleMatrixFromScilab(5, &beq_rows, &beq_cols, &beqptr)) { return 1; } //Getting matrix representing linear inequality constraints - if(getDoubleMatrixFromScilab(7, &lb_rows, &lb_cols, &lbptr)) + if(getDoubleMatrixFromScilab(6, &lb_rows, &lb_cols, &lbptr)) { return 1; } //Getting matrix representing linear inequality constraints - if(getDoubleMatrixFromScilab(8, &ub_rows, &ub_cols, &ubptr)) + if(getDoubleMatrixFromScilab(7, &ub_rows, &ub_cols, &ubptr)) { return 1; } //Number of non-linear constraints - if(getDoubleFromScilab(9, &nonlinCon)) + if(getDoubleFromScilab(8, &nonlinCon)) { return 1; } //Number of non-linear inequality constraints - if(getDoubleFromScilab(10, &nonlinIneqCon)) + if(getDoubleFromScilab(9, &nonlinIneqCon)) { return 1; } - - //Getting the required flag variables - - if(getDoubleFromScilab(12, &flag1)) + + //x0(starting point) matrix from scilab + if(getDoubleMatrixFromScilab(14, &x0_rows, &x0_cols, &x0ptr)) { return 1; } - if(getDoubleFromScilab(14, &flag2)) + //Getting number of iterations + if(getFixedSizeDoubleMatrixInList(15,2,temp1,temp2,&max_iter)) { return 1; } - if(getDoubleFromScilab(16, &flag3)) + //Getting Cpu Time + if(getFixedSizeDoubleMatrixInList(15,4,temp1,temp2,&cpu_time)) { return 1; } @@ -164,7 +134,7 @@ int sci_solveminconp(char *fname) // Starting Ipopt - SmartPtr Prob = new minconNLP(nVars, nCons, x0ptr, Aptr, bptr, Aeqptr, beqptr, A_rows, A_cols, b_rows, b_cols, Aeq_rows, Aeq_cols, beq_rows, beq_cols, lbptr, ubptr, nonlinCon, nonlinIneqCon, flag1, flag2, flag3); + SmartPtr Prob = new minconNLP(nVars, nCons, x0ptr, Aptr, bptr, Aeqptr, beqptr, A_rows, A_cols, b_rows, b_cols, Aeq_rows, Aeq_cols, beq_rows, beq_cols, lbptr, ubptr, nonlinCon, nonlinIneqCon); SmartPtr app = IpoptApplicationFactory(); app->RethrowNonIpoptException(true); diff --git a/sci_gateway/cpp/sci_minconNLP.cpp b/sci_gateway/cpp/sci_minconNLP.cpp index 2c6d6af..600aed6 100644 --- a/sci_gateway/cpp/sci_minconNLP.cpp +++ b/sci_gateway/cpp/sci_minconNLP.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015 - IIT Bombay - FOSSEE +// Copyright (C) 1815 - IIT Bombay - FOSSEE // // Author: R.Vidyadhar & Vignesh Kannan // Organization: FOSSEE, IIT Bombay @@ -49,7 +49,7 @@ bool minconNLP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g, Index& nnz_h_ m=numConstr_; // Number of constraints nnz_jac_g = n*m; // No. of elements in Jacobian of constraints - nnz_h_lag = n*(n+1)/2; // No. of elements in lower traingle of Hessian of the Lagrangian. + nnz_h_lag = n*n; // No. of elements in lower traingle of Hessian of the Lagrangian. index_style=C_STYLE; // Index style of matrices return true; @@ -80,7 +80,7 @@ bool minconNLP::get_bounds_info(Index n, Number* x_l, Number* x_u, Index m, Numb //bounds of non-linear inequality constraints for(i=0;i 10^-6 for variable number= 2 +//at line 242 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + diff --git a/tests/general_tests/fminbnd/fminbnd_logical1.sce b/tests/general_tests/fminbnd/fminbnd_logical1.sce new file mode 100644 index 0000000..87da61d --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_logical1.sce @@ -0,0 +1,38 @@ +//Find x in R^2 such that: +//An Example which results in exceeding Maximum Iterations + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [0,0]; +x2 = [1,2]; +options=list("MaxIter", [8], "CpuTime", [500],"TolX",[1e-6]); + +//Output +// +//Maximum Number of Iterations Exceeded. Output may not be optimal. +// lambda = +// +// lower: [0.0026488,0.0024921] +// upper: [8.873D-08,4.494D-08] +// output = +// +// Iterations: 8 +// Cpu_Time: 0.012 +// Objective_Evaluation: 9 +// Dual_Infeasibility: 2.632D-12 +// Message: "Maximum Number of Iterations Exceeded. Output may not be optimal" +// exitflag = +// +// 1 +// fopt = +// +// 0.0000033 +// xopt = +// +// 0.0013244 +// 0.0012460 + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + diff --git a/tests/general_tests/fminbnd/fminbnd_logical2.sce b/tests/general_tests/fminbnd/fminbnd_logical2.sce new file mode 100644 index 0000000..65ebee6 --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_logical2.sce @@ -0,0 +1,38 @@ +//Find x in R^2 such that: +//An Example which results in exceeding Maximum CPU-Time + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [0,0]; +x2 = [1,2]; +options=list("MaxIter", [100], "CpuTime", [0.01],"TolX",[1e-6]); + +//Output +// +//Maximum CPU Time exceeded. Output may not be optimal. +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// output = +// +// Iterations: 3 +// Cpu_Time: 0.012 +// Objective_Evaluation: 4 +// Dual_Infeasibility: 9.406D-11 +// Message: "Maximum CPU Time exceeded. Output may not be optimal" +// exitflag = +// +// 2 +// fopt = +// +// 0. +// xopt = +// +// 0.0381891 +// 0.0353974 + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + diff --git a/tests/general_tests/fminbnd/fminbnd_options1.sce b/tests/general_tests/fminbnd/fminbnd_options1.sce new file mode 100644 index 0000000..bc98cae --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_options1.sce @@ -0,0 +1,18 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [1,2]; +x2 = [3,4]; +options=list("MaxIter", "", "CpuTime", [500],"TolX",[1e-6]); + +//Error +//fminbnd: Value for Maximum Iteration should be a Constant +//at line 261 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + diff --git a/tests/general_tests/fminbnd/fminbnd_options2.sce b/tests/general_tests/fminbnd/fminbnd_options2.sce new file mode 100644 index 0000000..b4a9f13 --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_options2.sce @@ -0,0 +1,18 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [1,2]; +x2 = [3,4]; +options=list("MaxIter", [1000], "CpuTime", "TolX",[1e-6]); + +//Error +//fminbnd: Value for Maximum Cpu-time should be a Constant +//at line 268 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + diff --git a/tests/general_tests/fminbnd/fminbnd_options3.sce b/tests/general_tests/fminbnd/fminbnd_options3.sce new file mode 100644 index 0000000..5699cf9 --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_options3.sce @@ -0,0 +1,17 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [1,2]; +x2 = [3,4]; +options=list("MaxIter", [1000], "CpuTime", [100], "TolX", " "); + +//Error +//fminbnd: Value for Tolerance should be a Constant +//at line 275 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options); + diff --git a/tests/general_tests/fminbnd/fminbnd_ub1.sce b/tests/general_tests/fminbnd/fminbnd_ub1.sce new file mode 100644 index 0000000..daf1487 --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_ub1.sce @@ -0,0 +1,18 @@ +//Find x in R^2 such that: +// Check if a upper bound is of correct size + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [1,2]; +x2 = [1]; +options=list("MaxIter", [1500], "CpuTime", [500],"TolX",[1e-6]); + +//Error +//fminbnd: Upper Bound and Lower Bound are not matching +//at line 213 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + diff --git a/tests/general_tests/fminbnd/fminbnd_ub2.sce b/tests/general_tests/fminbnd/fminbnd_ub2.sce new file mode 100644 index 0000000..82c446d --- /dev/null +++ b/tests/general_tests/fminbnd/fminbnd_ub2.sce @@ -0,0 +1,18 @@ +//Find x in R^2 such that: +// Check the type of Upperbound + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x1 = [1;2]; +x2 = list(2,3); +options=list("MaxIter", [1500], "CpuTime", [500],"TolX",[1e-6]); + +//Error +//fminbnd: Expected Vector/Scalar for Upper Bound Vector (3rd Parameter) +//at line 199 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + + +[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options) + diff --git a/tests/general_tests/fmincon/fmincon_A.sce b/tests/general_tests/fmincon/fmincon_A.sce new file mode 100644 index 0000000..dd0df48 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_A.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies coefficients of linear inequality contraints of the correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4,5,6]; +b = [7,9]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Matrix of size (No of linear inequality constraints X No of Variables) or an Empty Matrix for Linear Inequality Constraint coefficient Matrix A +//at line 343 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_A.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_Aeq.sce b/tests/general_tests/fmincon/fmincon_Aeq.sce new file mode 100644 index 0000000..17d8756 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_Aeq.sce @@ -0,0 +1,22 @@ + +// Check if a user specifies coefficients of linear equality contraints of the correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = [1,4,9]; +beq = [2]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Matrix of size (No of linear equality constraints X No of Variables) or an Empty Matrix for Linear Equality Constraint coefficient Matrix Aeq +//at line 380 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); +//at line 22 of exec file called by : +//exec fmincon_Aeq.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); diff --git a/tests/general_tests/fmincon/fmincon_b1.sce b/tests/general_tests/fmincon/fmincon_b1.sce new file mode 100644 index 0000000..e43a866 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_b1.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies upper bounds of linear inequality contraints in accordance with starting point dimensions and coefficient matrix of linear inequality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7,9,10,20]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Row Vector (1 X number of linear inequality constraints) for b (4th Parameter) +//at line 368 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_b.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_b2.sce b/tests/general_tests/fmincon/fmincon_b2.sce new file mode 100644 index 0000000..65cfc90 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_b2.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies upper bounds of linear inequality contraints in accordance with starting point dimensions and coefficient matrix of linear inequality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = []; +b = [8,3]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Row Vector (1 X number of linear inequality constraints) for b (4th Parameter) +//at line 368 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_b.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_b3.sce b/tests/general_tests/fmincon/fmincon_b3.sce new file mode 100644 index 0000000..982ad69 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_b3.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies upper bounds of linear inequality contraints in accordance with starting point dimensions and coefficient matrix of linear inequality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [5,8]; +b = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Non empty Row/Column Vector for b (4th Parameter) for your Inputs +//at line 360 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_b3.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_beq1.sce b/tests/general_tests/fmincon/fmincon_beq1.sce new file mode 100644 index 0000000..6133b77 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_beq1.sce @@ -0,0 +1,22 @@ + +// Check if a user specifies value of linear equality contraints in accordance with starting point dimensions and coefficient matrix of linear equality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = [1,4]; +beq = [2,6]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Matrix of size (No of linear equality constraints X No of Variables) or an Empty Matrix for Linear Equality Constraint coefficient Matrix Aeq +//at line 380 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); +//at line 22 of exec file called by : +//exec fmincon_Aeq.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); diff --git a/tests/general_tests/fmincon/fmincon_beq2.sce b/tests/general_tests/fmincon/fmincon_beq2.sce new file mode 100644 index 0000000..7d2af88 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_beq2.sce @@ -0,0 +1,22 @@ + +// Check if a user specifies value of linear equality contraints in accordance with starting point dimensions and coefficient matrix of linear equality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = [2,6]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: As Linear Equality Constraint coefficient Matrix Aeq (5th parameter) is empty, beq (6th Parameter) should also be empty +//at line 392 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); +//at line 22 of exec file called by : +//exec fmincon_beq2.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); diff --git a/tests/general_tests/fmincon/fmincon_beq3.sce b/tests/general_tests/fmincon/fmincon_beq3.sce new file mode 100644 index 0000000..0605fdb --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_beq3.sce @@ -0,0 +1,22 @@ + +// Check if a user specifies value of linear equality contraints in accordance with starting point dimensions and coefficient matrix of linear equality constraints + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = [7,5]; +beq = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Non empty Row/Column Vector for beq (6th Parameter) +//at line 397 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); +//at line 22 of exec file called by : +//exec fmincon_beq3.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq); diff --git a/tests/general_tests/fmincon/fmincon_cputime.sce b/tests/general_tests/fmincon/fmincon_cputime.sce new file mode 100644 index 0000000..25e5aef --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_cputime.sce @@ -0,0 +1,56 @@ +// Example where maxiter exceeds the preset value + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +options = list("MaxIter", [150], "CpuTime", [0.005]) + +//Output +//Maximum CPU Time exceeded. Output may not be optimal. +// hessian = +// +// 1.79D-316 3.95D-323 +// 2.12D-314 4.34D+276 +// gradient = +// +// 3.96 2.97 +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [0,0,0,0,0,0] +// eqlin: 0 +// ineqnonlin: [0,0] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 0 +// Cpu_Time: 0.016 +// Objective_Evaluation: 1 +// Dual_Infeasibility: 1.4815294 +// exitflag = +// +// 2 +// fopt = +// +// 0. +// xopt = +// +// 1.98 +// 1.485 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nlc, options) diff --git a/tests/general_tests/fmincon/fmincon_f.sce b/tests/general_tests/fmincon/fmincon_f.sce new file mode 100644 index 0000000..ec89f33 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_f.sce @@ -0,0 +1,18 @@ + +// Check if a user specifies function or not + +fun = []; +x0 = [1,2,3,4,5,6]; +A = [2,4,8,9,3,5]; +b = [1,5,7,3,9,6]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected type ["function"] for input argument f at input #1, but got "constant" instead. +//at line 56 of function Checktype called by : +//at line 297 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 18 of exec file called by : +//exec fmincon_f.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_lb1.sce b/tests/general_tests/fmincon/fmincon_lb1.sce new file mode 100644 index 0000000..17b8eea --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_lb1.sce @@ -0,0 +1,24 @@ + +//Check if lower bound is a vector + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2,4;5,9]; +ub = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Lower Bound (7th Parameter) should be a vector +//at line 422 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_lb1.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_lb2.sce b/tests/general_tests/fmincon/fmincon_lb2.sce new file mode 100644 index 0000000..4420a12 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_lb2.sce @@ -0,0 +1,24 @@ + +//Check if lower bound is row vector of correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2,4,9]; +ub = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Row Vector (1 X number of Variables) for lower bound (7th Parameter) +//at line 430 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_lb2.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_lb3.sce b/tests/general_tests/fmincon/fmincon_lb3.sce new file mode 100644 index 0000000..dc0b528 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_lb3.sce @@ -0,0 +1,24 @@ + +//Check if lower bound is column vector of correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2;4;9]; +ub = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Column Vector (number of Variables X 1) for lower bound (7th Parameter) +//at line 425 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_lb3.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_lb4.sce b/tests/general_tests/fmincon/fmincon_lb4.sce new file mode 100644 index 0000000..643af5a --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_lb4.sce @@ -0,0 +1,24 @@ + +//Check if lower bound is not infinity + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [%inf,4]; +ub = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Value of Lower Bound can not be infinity +//at line 462 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_lb4.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_lbub.sce b/tests/general_tests/fmincon/fmincon_lbub.sce new file mode 100644 index 0000000..d4c42ac --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_lbub.sce @@ -0,0 +1,24 @@ + +//Check if upper bound is greater than lower bound by atleast 1e-6 + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [1,0]; +ub = [0,1]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Difference between Upper Bound and Lower bound should be atleast > 10^6 for variable number= 1 +//at line 472 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_lbub.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_logical1.sce b/tests/general_tests/fmincon/fmincon_logical1.sce new file mode 100644 index 0000000..9cbaf57 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical1.sce @@ -0,0 +1,45 @@ +// Example with objective function and inequality constraints + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; + +//Output +//Optimal Solution Found. +// hessian = +// +// 2. - 7.451D-09 +// - 7.451D-09 2. +// gradient = +// +// 1.0000000 1. +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [9.087D-09,2.424D-08,4.546D-09,5.596D-09,1,4.544D-09] +// eqlin: [0x0 constant] +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 8 +// Cpu_Time: 0.112 +// Objective_Evaluation: 9 +// Dual_Infeasibility: 1.299D-11 +// exitflag = +// +// 0 +// fopt = +// +// 0.5 +// xopt = +// +// 0.5000000 +// 0.5000000 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b) diff --git a/tests/general_tests/fmincon/fmincon_logical10.sce b/tests/general_tests/fmincon/fmincon_logical10.sce new file mode 100644 index 0000000..45ffdf3 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical10.sce @@ -0,0 +1,66 @@ +//Example where user provides hessian + +function y=f(x) +y=x(1)*x(2)+x(2)*x(3); +endfunction +//Starting point, linear constraints and variable bounds +x0=[0.1 , 0.1 , 0.1]; +A=[]; +b=[]; +Aeq=[]; +beq=[]; +lb=[]; +ub=[]; +//Nonlinear constraints +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + x(3)^2 - 2 , x(1)^2 + x(2)^2 + x(3)^2 - 10]; +ceq = []; +endfunction + +//Hessian of the Lagrange Function +function y= lHess(x,obj,lambda) +y= obj*[0,1,0;1,0,1;0,1,0] + lambda(1)*[2,0,0;0,-2,0;0,0,2] + lambda(2)*[2,0,0;0,2,0;0,0,2] +endfunction + +//Options +options=list("MaxIter", [1500], "CpuTime", [500], "Hessian", lHess); + +//Output +//Optimal Solution Found. +// hessian = +// +// 1.4142136 1.72D-322 2.12D-314 +// 1. 0. 5.82D+252 +// 1. 1.4142136 1. +// gradient = +// +// 2.236068 - 3.1622776 2.236068 +// lambda = +// +// lower: [0,0,0] +// upper: [0,0,0] +// ineqlin: [0x0 constant] +// eqlin: [0x0 constant] +// ineqnonlin: [4.545D-09,0.7071068] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 23 +// Cpu_Time: 0.164 +// Objective_Evaluation: 24 +// Dual_Infeasibility: 6.124D-08 +// Message: "Optimal Solution Found" +// exitflag = +// +// 0 +// fopt = +// +// - 7.0710678 +// xopt = +// +// - 1.5811388 +// 2.236068 +// - 1.5811388 + +//Calling Ipopt +[xopt,fopt,exitflag,output,lambda,gradient,hessian] =fmincon(f, x0,A,b,Aeq,beq,lb,ub,nlc,options) diff --git a/tests/general_tests/fmincon/fmincon_logical11.sce b/tests/general_tests/fmincon/fmincon_logical11.sce new file mode 100644 index 0000000..0fe17ee --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical11.sce @@ -0,0 +1,46 @@ +// Example with objective function using log functions + +function y=fun(x) +y=log(x(1)+x(2)); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; + +//Output +//Optimal Solution Found. +// hessian = +// +// - 1.0000001 3.95D-323 +// - 1. - 1. +// gradient = +// +// 1. 1. +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [9.091D-09,1.384D-08,3.304D-09,4.768D-09,1,7.281D-09] +// eqlin: [0x0 constant] +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 13 +// Cpu_Time: 0.228 +// Objective_Evaluation: 14 +// Dual_Infeasibility: 3.040D-09 +// Message: "Optimal Solution Found" +// exitflag = +// +// 0 +// fopt = +// +// - 9.091D-10 +// xopt = +// +// 0.1243037 +// 0.8756963 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b) diff --git a/tests/general_tests/fmincon/fmincon_logical2.sce b/tests/general_tests/fmincon/fmincon_logical2.sce new file mode 100644 index 0000000..94e91f1 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical2.sce @@ -0,0 +1,47 @@ +// Example with objective function, equality and inequality constraints + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [1.5] + +//Output +//Optimal Solution Found. +// hessian = +// +// 2. 0. +// 0. 2. +// gradient = +// +// 1.5 0.5000000 +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [9.089D-09,4.842D-08,6.059D-09,6.324D-09,2.0000001,3.637D-09] +// eqlin: 0.5000000 +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 8 +// Cpu_Time: 0.092 +// Objective_Evaluation: 9 +// Dual_Infeasibility: 1.869D-11 +// exitflag = +// +// 0 +// fopt = +// +// 0.6250000 +// xopt = +// +// 0.7500000 +// 0.25 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b,Aeq,beq) diff --git a/tests/general_tests/fmincon/fmincon_logical3.sce b/tests/general_tests/fmincon/fmincon_logical3.sce new file mode 100644 index 0000000..9c56f7b --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical3.sce @@ -0,0 +1,49 @@ +// Example with objective function, equality, inequality constraints and variable bounds + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +//Output +//Optimal Solution Found. +// hessian = +// +// 2. 0. +// 0. 2. +// gradient = +// +// 0.9999999 3. +// lambda = +// +// lower: [1.820D-08,6.060D-09] +// upper: [6.059D-09,0.7267088] +// ineqlin: [0.3633544,7.251D-08,3.030D-09,3.463D-09,9.093D-09,9.096D-09] +// eqlin: -1.3633544 +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 21 +// Cpu_Time: 0.2 +// Objective_Evaluation: 26 +// Dual_Infeasibility: 9.075D-11 +// exitflag = +// +// 0 +// fopt = +// +// 2.5 +// xopt = +// +// 0.5000000 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub) diff --git a/tests/general_tests/fmincon/fmincon_logical4.sce b/tests/general_tests/fmincon/fmincon_logical4.sce new file mode 100644 index 0000000..31221c8 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical4.sce @@ -0,0 +1,54 @@ +// Example with objective function, equality, inequality constraints, variable bounds and non linear function + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +//Output +//Optimal Solution Found. +// hessian = +// +// 3970695.7 3.311D-10 +// 3.311D-10 3970695.5 +// gradient = +// +// 1.0000000 3. +// lambda = +// +// lower: [1.818D-08,6.061D-09] +// upper: [6.061D-09,0.7272728] +// ineqlin: [0.3636363,7.273D-08,3.030D-09,3.463D-09,9.091D-09,9.091D-09] +// eqlin: -2.2698905 +// ineqnonlin: [6.061D-09,0.9062541] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 20 +// Cpu_Time: 0.4 +// Objective_Evaluation: 23 +// Dual_Infeasibility: 5.171D-09 +// exitflag = +// +// 0 +// fopt = +// +// 2.5 +// xopt = +// +// 0.5000000 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub,nlc) diff --git a/tests/general_tests/fmincon/fmincon_logical5.sce b/tests/general_tests/fmincon/fmincon_logical5.sce new file mode 100644 index 0000000..dbba29a --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical5.sce @@ -0,0 +1,56 @@ +// Example with objective function, equality, inequality constraints, variable bounds, non linear function and options + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +options = list("MaxIter", [1500], "CpuTime", [500]) + +//Output +//Optimal Solution Found. +// hessian = +// +// 3970695.7 3.311D-10 +// 3.311D-10 3970695.5 +// gradient = +// +// 1.0000000 3. +// lambda = +// +// lower: [1.818D-08,6.061D-09] +// upper: [6.061D-09,0.7272728] +// ineqlin: [0.3636363,7.273D-08,3.030D-09,3.463D-09,9.091D-09,9.091D-09] +// eqlin: -2.2698905 +// ineqnonlin: [6.061D-09,0.9062541] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 20 +// Cpu_Time: 0.4 +// Objective_Evaluation: 23 +// Dual_Infeasibility: 5.171D-09 +// exitflag = +// +// 0 +// fopt = +// +// 2.5 +// xopt = +// +// 0.5000000 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nlc, options) diff --git a/tests/general_tests/fmincon/fmincon_logical6.sce b/tests/general_tests/fmincon/fmincon_logical6.sce new file mode 100644 index 0000000..b99cca1 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical6.sce @@ -0,0 +1,45 @@ +// Example with objective function using sinusoidal functions + +function y=fun(x) +y=sin(x(1))+cos(x(2)); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; + +//Output +//Optimal Solution Found. +// hessian = +// +// 0.2129952 0. +// 0. 0.2129198 +// gradient = +// +// 0.9770613 - 0.9770613 +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [2.270D-08,1.202D-08,2.272D-09,3.316D-09,1.571D-08,0.9770613] +// eqlin: [0x0 constant] +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 12 +// Cpu_Time: 0.132 +// Objective_Evaluation: 15 +// Dual_Infeasibility: 7.674D-10 +// exitflag = +// +// 0 +// fopt = +// +// - 0.4259168 +// xopt = +// +// - 0.2146019 +// 1.7853981 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b) diff --git a/tests/general_tests/fmincon/fmincon_logical7.sce b/tests/general_tests/fmincon/fmincon_logical7.sce new file mode 100644 index 0000000..48d83b4 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical7.sce @@ -0,0 +1,45 @@ +// Example with objective function using exponential input + +function y=fun(x) +y=exp(x(2)*x(1)); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4]; +b=[2;1]; + +//Output +//Optimal Solution Found. +// hessian = +// +// 0.0000010 - 0.0000007 +// - 0.0000007 0.0000005 +// gradient = +// +// 7.127D-08 - 5.690D-08 +// lambda = +// +// lower: [0,0] +// upper: [0,0] +// ineqlin: [6.963D-09,2.501D-09] +// eqlin: [0x0 constant] +// ineqnonlin: [0x0 constant] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 15 +// Cpu_Time: 0.132 +// Objective_Evaluation: 16 +// Dual_Infeasibility: 8.073D-08 +// exitflag = +// +// 0 +// fopt = +// +// 1.500D-08 +// xopt = +// +// - 3.7925137 +// 4.7501487 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b) diff --git a/tests/general_tests/fmincon/fmincon_logical8.sce b/tests/general_tests/fmincon/fmincon_logical8.sce new file mode 100644 index 0000000..7e24211 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical8.sce @@ -0,0 +1,60 @@ +// Example where user provides gradient of the objective function + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +function y= fGrad(x) +y= [2*x(1),2*x(2)]; +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +options = list("MaxIter", [150], "CpuTime", [500], "GradObj", fGrad) + +//Output +//Optimal Solution Found. +// hessian = +// +// 3970695.6 3.311D-10 +// 3.311D-10 3970695.4 +// gradient = +// +// 1.0000000 3. +// lambda = +// +// lower: [1.818D-08,6.061D-09] +// upper: [6.061D-09,0.7272728] +// ineqlin: [0.3636363,7.273D-08,3.030D-09,3.463D-09,9.091D-09,9.091D-09] +// eqlin: -2.2698905 +// ineqnonlin: [6.061D-09,0.9062542] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 20 +// Cpu_Time: 0.852 +// Objective_Evaluation: 23 +// Dual_Infeasibility: 1.884D-09 +// exitflag = +// +// 0 +// fopt = +// +// 2.5 +// xopt = +// +// 0.5000000 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nlc, options) diff --git a/tests/general_tests/fmincon/fmincon_logical9.sce b/tests/general_tests/fmincon/fmincon_logical9.sce new file mode 100644 index 0000000..129601b --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_logical9.sce @@ -0,0 +1,63 @@ +// Example where user provides gradient of the constraints + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +//Gradient of Non-Linear Constraints +function [cg,ceqg] = cGrad(x) +cg=[2*x(1) , -2*x(2); 2*x(1) , 2*x(2)]; +ceqg=[]; +endfunction + +options = list("MaxIter", [150], "CpuTime", [500], "GradCon", cGrad) + +//Output +//Optimal Solution Found. +// hessian = +// +// 3353468.3 3.95D-323 +// 0. 0. +// gradient = +// +// 1.0000000 3. +// lambda = +// +// lower: [1.818D-08,6.061D-09] +// upper: [6.061D-09,0.6917463] +// ineqlin: [0.3458731,7.273D-08,3.030D-09,3.463D-09,9.091D-09,9.091D-09] +// eqlin: -2.2520096 +// ineqnonlin: [6.061D-09,0.9061364] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 20 +// Cpu_Time: 0.34 +// Objective_Evaluation: 23 +// Dual_Infeasibility: 2.793D-09 +// Message: "Optimal Solution Found" +// exitflag = +// +// 0 +// fopt = +// +// 2.5 +// xopt = +// +// 0.5000000 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nlc, options) diff --git a/tests/general_tests/fmincon/fmincon_maxiter.sce b/tests/general_tests/fmincon/fmincon_maxiter.sce new file mode 100644 index 0000000..57d46b6 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_maxiter.sce @@ -0,0 +1,56 @@ +// Example where maxiter exceeds the preset value + +function y=fun(x) +y=x(1)*x(1)+x(2)*x(2); +endfunction + +x0 = [1,2]; +A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; +b=[2;1;2;1;-1;2]; +Aeq = [1,3] +beq= [5] +lb = [0 0] +ub = [2 1.5] + +function [c,ceq]=nlc(x) +c = [x(1)^2 - x(2)^2 + 0.5 , x(1)^2 + x(2)^2 - 2.5]; +ceq = []; +endfunction + +options = list("MaxIter", [15], "CpuTime", [500]) + +//Output +//Maximum Number of Iterations Exceeded. Output may not be optimal. +// hessian = +// +// 335.44736 0. +// 0. 335.18088 +// gradient = +// +// 1.0000122 2.9999999 +// lambda = +// +// lower: [0.1999999,0.0666667] +// upper: [0.0666667,1803365.5] +// ineqlin: [486161.41,0.7135096,0.0332561,0.0381089,0.1000596,0.1000605] +// eqlin: -486461.97 +// ineqnonlin: [0.0666348,299.08034] +// eqnonlin: [0x0 constant] +// output = +// +// Iterations: 15 +// Cpu_Time: 0.252 +// Objective_Evaluation: 17 +// Dual_Infeasibility: 831041.12 +// exitflag = +// +// 1 +// fopt = +// +// 2.500006 +// xopt = +// +// 0.5000061 +// 1.5 + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nlc, options) diff --git a/tests/general_tests/fmincon/fmincon_ub1.sce b/tests/general_tests/fmincon/fmincon_ub1.sce new file mode 100644 index 0000000..acbe99a --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_ub1.sce @@ -0,0 +1,24 @@ + +//Check if upper bound is a vector + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2,4]; +ub = [3,4;7,2]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Upper Bound (8th Parameter) should be a vector +//at line 445 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_ub1.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_ub2.sce b/tests/general_tests/fmincon/fmincon_ub2.sce new file mode 100644 index 0000000..dc4d790 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_ub2.sce @@ -0,0 +1,24 @@ + +//Check if upper bound is row vector of correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2,4]; +ub = [3,4,7]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Row Vector (1 X number of Variables) for upper bound (8th Parameter) +//at line 453 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_ub2.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_ub3.sce b/tests/general_tests/fmincon/fmincon_ub3.sce new file mode 100644 index 0000000..034abc7 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_ub3.sce @@ -0,0 +1,24 @@ + +//Check if lower bound is column vector of correct dimensions + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = [2,4]; +ub = [3;4;7]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Column Vector (number of Variables X 1) for upper bound (8th Parameter) +//at line 448 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_ub3.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_ub4.sce b/tests/general_tests/fmincon/fmincon_ub4.sce new file mode 100644 index 0000000..26dc579 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_ub4.sce @@ -0,0 +1,24 @@ + +//Check if upper bound is not -infinity + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1,2]; +A = [3,4]; +b = [7]; +Aeq = []; +beq = []; +lb = []; +ub = [-%inf,6]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Value of Upper Bound can not be negative infinity +//at line 467 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); +//at line 24 of exec file called by : +//exec fmincon_ub4.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub); diff --git a/tests/general_tests/fmincon/fmincon_x0a.sce b/tests/general_tests/fmincon/fmincon_x0a.sce new file mode 100644 index 0000000..68bf5f1 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_x0a.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies a starting point or not + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = []; +A = [3,4]; +b = [7,9]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Expected Row Vector or Column Vector for x0 (Starting Point) or Starting Point cannot be Empty +//at line 305 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_x0a.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fmincon/fmincon_x0b.sce b/tests/general_tests/fmincon/fmincon_x0b.sce new file mode 100644 index 0000000..2b72f92 --- /dev/null +++ b/tests/general_tests/fmincon/fmincon_x0b.sce @@ -0,0 +1,20 @@ + +// Check if a user specifies a starting point of the correct dimensions with respect to the objective function + +function y=fun(x) +y=x(1)+x(2); +endfunction + +x0 = [1]; +A = [3,4]; +b = [7,9]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fmincon: Objective function and x0 did not match +//at line 318 of function fmincon called by : +//[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); +//at line 20 of exec file called by : +//exec fmincon_x0b.sce + +[xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (fun, x0, A, b); diff --git a/tests/general_tests/fminunc/fminunc_f.sce b/tests/general_tests/fminunc/fminunc_f.sce new file mode 100644 index 0000000..7fd0e2c --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_f.sce @@ -0,0 +1,15 @@ +//Find x in R^6 such that: +// Check if a user specifies function or not + +fun = []; +x0 = [1,2,3,4,5,6]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fminbnd: Expected function for Objective (1st Parameter) +//at line 150 of function fminbnd called by : +//[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, lb, ub, options); + + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + diff --git a/tests/general_tests/fminunc/fminunc_gradient1.sce b/tests/general_tests/fminunc/fminunc_gradient1.sce new file mode 100644 index 0000000..214ff89 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_gradient1.sce @@ -0,0 +1,15 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", "OFn", "Hessian", "OFF"); + +//Error +//fminunc: Unrecognized String [OFn] entered for the option- Gradient. +//at line 278 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_gradient2.sce b/tests/general_tests/fminunc/fminunc_gradient2.sce new file mode 100644 index 0000000..5c1c3d3 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_gradient2.sce @@ -0,0 +1,15 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", "", "Hessian", "OFF"); + +//Error +//fminunc: Unrecognized String [] entered for the option- Gradient. +//at line 278 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_gradient3.sce b/tests/general_tests/fminunc/fminunc_gradient3.sce new file mode 100644 index 0000000..f35f7f1 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_gradient3.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +grad = []; +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", grad, "Hessian", "OFF"); + +//Error +//fminunc: Expected function for Gradient of Objective +//at line 306 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_gradient4.sce b/tests/general_tests/fminunc/fminunc_gradient4.sce new file mode 100644 index 0000000..3a6a716 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_gradient4.sce @@ -0,0 +1,20 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +function y = grad(x) + y=[2*x(1)]; +endfunction +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", grad, "Hessian", "OFF"); + +//Error +//fminunc: Expected function for Hessian of Objective +//at line 313 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); +//at line 20 of exec file called by : +//exec fminunc_gradient4.sce + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_hessian1.sce b/tests/general_tests/fminunc/fminunc_hessian1.sce new file mode 100644 index 0000000..a8ba79b --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_hessian1.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options for hessian + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", "OFF", "Hessian", "OFn"); + +//Error +//fminunc: Unrecognized String [OFn] entered for the option- Hessian. +//at line 290 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_hessian2.sce b/tests/general_tests/fminunc/fminunc_hessian2.sce new file mode 100644 index 0000000..99fd6c1 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_hessian2.sce @@ -0,0 +1,15 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options for hessian + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", "OFf", "Hessian", ""); + +//Error +//fminunc: Unrecognized String [] entered for the option- Hessian. +//at line 290 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_hessian3.sce b/tests/general_tests/fminunc/fminunc_hessian3.sce new file mode 100644 index 0000000..7a1e625 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_hessian3.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options for hessian + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +hess = []; +options=list("MaxIter", [1000], "CpuTime", [100], "Hessian", hess); + +//Error +//fminunc: Expected function for Hessian of Objective +//at line 341 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_hessian4.sce b/tests/general_tests/fminunc/fminunc_hessian4.sce new file mode 100644 index 0000000..47ce1c4 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_hessian4.sce @@ -0,0 +1,19 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options for hessian + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +function y = hess(x) + y=[2,0]; +endfunction +options=list("MaxIter", [1000], "CpuTime", [100], "Gradient", "OFF", "Hessian", hess); + +//Error +//fminunc: Wrong Input for Objective Hessian function(3rd Parameter)---->Symmetric Matrix function of size [2 X 2] is Expected +//at line 353 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); diff --git a/tests/general_tests/fminunc/fminunc_logical1.sce b/tests/general_tests/fminunc/fminunc_logical1.sce new file mode 100644 index 0000000..54c4d7f --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_logical1.sce @@ -0,0 +1,35 @@ +//Find x in R^2 such that: +// An Unbounded Example + +function y = fun(x) + y = -(x(1)^2 + x(2)^2); +endfunction +x0 = [1,2]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Output +// +//Iterates diverging; problem might be unbounded. +// hessian = +// +// [] +// gradient = +// +// [] +// output = +// +// Iterations: 65 +// Cpu_Time: 0.112 +// Message: "Iterates diverging; problem might be unbounded" +// exitflag = +// +// 8 +// fopt = +// +// [] +// xopt = +// +// [] + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options) + diff --git a/tests/general_tests/fminunc/fminunc_logical2.sce b/tests/general_tests/fminunc/fminunc_logical2.sce new file mode 100644 index 0000000..27d6cdd --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_logical2.sce @@ -0,0 +1,35 @@ +//Find x in R^2 such that: +// An Infeasible Example (Solver will show this as "Regularization becomes too large") + +function y = fun(x) + y = log(x); +endfunction +x0 = [1]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Output +// +//Error in step computation (regularization becomes too large?)! +// hessian = +// +// [] +// gradient = +// +// [] +// output = +// +// Iterations: 26 +// Cpu_Time: 0.044 +// Message: "Error in step computation (regularization becomes too large?)!" +// exitflag = +// +// 10 +// fopt = +// +// [] +// xopt = +// +// [] + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options) + diff --git a/tests/general_tests/fminunc/fminunc_logical3.sce b/tests/general_tests/fminunc/fminunc_logical3.sce new file mode 100644 index 0000000..15ea3ad --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_logical3.sce @@ -0,0 +1,42 @@ +//Find x in R^2 such that: +// An Example which results in exceeding Maximum Iterations + +function y = fun(x) + y = (x(1)-x(2))^2 + x(1); +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Output +// +//Maximum Number of Iterations Exceeded. Output may not be optimal. +// hessian = +// +// 2. - 2. +// - 2. 2. +// gradient = +// +// 0.9999885 0. +// output = +// +// Iterations: 1000 +// Cpu_Time: 2.112 +// Objective_Evaluation: 1001 +// Dual_Infeasibility: 0.9999885 +// Message: "Maximum Number of Iterations Exceeded. Output may not be optimal" +// exitflag = +// +// 1 +// fopt = +// +// - 1.050D+18 +// xopt = +// +// 10^18 * +// +// - 1.0497354 +// - 1.0497354 + + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options) + diff --git a/tests/general_tests/fminunc/fminunc_logical4.sce b/tests/general_tests/fminunc/fminunc_logical4.sce new file mode 100644 index 0000000..60d75c5 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_logical4.sce @@ -0,0 +1,42 @@ +//Find x in R^2 such that: +// An Example which results in exceeding Maximum CPU-Time + +function y = fun(x) + y = (x(1)-x(2))^2 + x(1); +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", [1.5], "Gradient", "OFF", "Hessian", "OFF"); + +//Output +// +//Maximum CPU Time exceeded. Output may not be optimal. +// hessian = +// +// 2. - 2. +// - 2. 2. +// gradient = +// +// 0.9998408 0. +// output = +// +// Iterations: 732 +// Cpu_Time: 1.504 +// Objective_Evaluation: 733 +// Dual_Infeasibility: 0.9998408 +// Message: "Maximum CPU Time exceeded. Output may not be optimal" +// exitflag = +// +// 2 +// fopt = +// +// 0. +// xopt = +// +// 10^17 * +// +// - 7.6897384 +// - 7.6897384 + + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options) + diff --git a/tests/general_tests/fminunc/fminunc_options1.sce b/tests/general_tests/fminunc/fminunc_options1.sce new file mode 100644 index 0000000..eb939d5 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_options1.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", "", "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fminunc: Value for Maximum Iteration should be a Constant +//at line 261 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + diff --git a/tests/general_tests/fminunc/fminunc_options2.sce b/tests/general_tests/fminunc/fminunc_options2.sce new file mode 100644 index 0000000..1cf09ef --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_options2.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct options or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1,2]; +options=list("MaxIter", [1000], "CpuTime", , "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fminunc: Value for Maximum Cpu-time should be a Constant +//at line 268 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + diff --git a/tests/general_tests/fminunc/fminunc_x0a.sce b/tests/general_tests/fminunc/fminunc_x0a.sce new file mode 100644 index 0000000..e71b455 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_x0a.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct initial guess or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = []; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fminunc: Expected Row Vector or Column Vector for x0 (Initial Value) +//at line 160 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + diff --git a/tests/general_tests/fminunc/fminunc_x0b.sce b/tests/general_tests/fminunc/fminunc_x0b.sce new file mode 100644 index 0000000..a08b458 --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_x0b.sce @@ -0,0 +1,16 @@ +//Find x in R^2 such that: +// Check if a user specifies correct initial guess or not + +function y = fun(x) + y = x(1)^2 + x(2)^2; +endfunction +x0 = [1]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Error +//fminunc: Objective function and x0 did not match +//at line 174 of function fminunc called by : +//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options); + diff --git a/thirdparty/linux/lib/x64/libCgl.la b/thirdparty/linux/lib/x64/libCgl.la deleted file mode 100755 index 77507e6..0000000 --- a/thirdparty/linux/lib/x64/libCgl.la +++ /dev/null @@ -1,35 +0,0 @@ -# libCgl.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libCgl.so.1' - -# Names of this library. -library_names='libCgl.so.1.9.4 libCgl.so.1 libCgl.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsiClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClpSolver.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsi.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libCgl. -current=10 -age=9 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libClp.la b/thirdparty/linux/lib/x64/libClp.la deleted file mode 100755 index 20c88dd..0000000 --- a/thirdparty/linux/lib/x64/libClp.la +++ /dev/null @@ -1,35 +0,0 @@ -# libClp.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libClp.so.1' - -# Names of this library. -library_names='libClp.so.1.13.6 libClp.so.1 libClp.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libClp. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libClpSolver.la b/thirdparty/linux/lib/x64/libClpSolver.la deleted file mode 100755 index 6d24542..0000000 --- a/thirdparty/linux/lib/x64/libClpSolver.la +++ /dev/null @@ -1,35 +0,0 @@ -# libClpSolver.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libClpSolver.so.1' - -# Names of this library. -library_names='libClpSolver.so.1.13.6 libClpSolver.so.1 libClpSolver.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libClpSolver. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libCoinUtils.la b/thirdparty/linux/lib/x64/libCoinUtils.la deleted file mode 100755 index 5760a8d..0000000 --- a/thirdparty/linux/lib/x64/libCoinUtils.la +++ /dev/null @@ -1,35 +0,0 @@ -# libCoinUtils.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libCoinUtils.so.3' - -# Names of this library. -library_names='libCoinUtils.so.3.10.6 libCoinUtils.so.3 libCoinUtils.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs='' - -# Version information for libCoinUtils. -current=13 -age=10 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libOsi.la b/thirdparty/linux/lib/x64/libOsi.la deleted file mode 100755 index 9f9aa3d..0000000 --- a/thirdparty/linux/lib/x64/libOsi.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsi.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsi.so.1' - -# Names of this library. -library_names='libOsi.so.1.12.4 libOsi.so.1 libOsi.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libOsi. -current=13 -age=12 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libOsiClp.la b/thirdparty/linux/lib/x64/libOsiClp.la deleted file mode 100755 index 55f6198..0000000 --- a/thirdparty/linux/lib/x64/libOsiClp.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiClp.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiClp.so.1' - -# Names of this library. -library_names='libOsiClp.so.1.13.6 libOsiClp.so.1 libOsiClp.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsi.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libOsiClp. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libOsiCommonTests.la b/thirdparty/linux/lib/x64/libOsiCommonTests.la deleted file mode 100755 index 5df7087..0000000 --- a/thirdparty/linux/lib/x64/libOsiCommonTests.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiCommonTests.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiCommonTests.so.1' - -# Names of this library. -library_names='libOsiCommonTests.so.1.12.4 libOsiCommonTests.so.1 libOsiCommonTests.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsi.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libOsiCommonTests. -current=13 -age=12 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libOsiSym.la b/thirdparty/linux/lib/x64/libOsiSym.la deleted file mode 100755 index a55abff..0000000 --- a/thirdparty/linux/lib/x64/libOsiSym.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiSym.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiSym.so.3' - -# Names of this library. -library_names='libOsiSym.so.3.6.10 libOsiSym.so.3 libOsiSym.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libSym.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCgl.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsiClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClpSolver.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsi.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libOsiSym. -current=9 -age=6 -revision=10 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libSym.la b/thirdparty/linux/lib/x64/libSym.la deleted file mode 100755 index ba9cc4b..0000000 --- a/thirdparty/linux/lib/x64/libSym.la +++ /dev/null @@ -1,35 +0,0 @@ -# libSym.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libSym.so.3' - -# Names of this library. -library_names='libSym.so.3.6.10 libSym.so.3 libSym.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCgl.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsiClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClpSolver.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libClp.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libOsi.la /home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib/libCoinUtils.la' - -# Version information for libSym. -current=9 -age=6 -revision=10 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/symphony_work/SYMPHONY-5.6.10/build-debug/lib' diff --git a/thirdparty/linux/lib/x64/libcoinblas.la b/thirdparty/linux/lib/x64/libcoinblas.la deleted file mode 100755 index 10b255e..0000000 --- a/thirdparty/linux/lib/x64/libcoinblas.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinblas.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinblas.so.1' - -# Names of this library. -library_names='libcoinblas.so.1.4.4 libcoinblas.so.1 libcoinblas.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs='' - -# Version information for libcoinblas. -current=5 -age=4 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/Downloads/Ipopt-3.12.4/build/lib' diff --git a/thirdparty/linux/lib/x64/libcoinlapack.la b/thirdparty/linux/lib/x64/libcoinlapack.la deleted file mode 100755 index 8ba91df..0000000 --- a/thirdparty/linux/lib/x64/libcoinlapack.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinlapack.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinlapack.so.1' - -# Names of this library. -library_names='libcoinlapack.so.1.5.4 libcoinlapack.so.1 libcoinlapack.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/Downloads/Ipopt-3.12.4/build/lib/libcoinblas.la -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath' - -# Version information for libcoinlapack. -current=6 -age=5 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/Downloads/Ipopt-3.12.4/build/lib' diff --git a/thirdparty/linux/lib/x64/libcoinmumps.la b/thirdparty/linux/lib/x64/libcoinmumps.la deleted file mode 100755 index e64fd30..0000000 --- a/thirdparty/linux/lib/x64/libcoinmumps.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinmumps.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinmumps.so.1' - -# Names of this library. -library_names='libcoinmumps.so.1.5.4 libcoinmumps.so.1 libcoinmumps.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/Downloads/Ipopt-3.12.4/build/lib/libcoinblas.la -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lgfortran -lm -lquadmath' - -# Version information for libcoinmumps. -current=6 -age=5 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/Downloads/Ipopt-3.12.4/build/lib' diff --git a/thirdparty/linux/lib/x64/libipopt.la b/thirdparty/linux/lib/x64/libipopt.la deleted file mode 100755 index aebec3d..0000000 --- a/thirdparty/linux/lib/x64/libipopt.la +++ /dev/null @@ -1,35 +0,0 @@ -# libipopt.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libipopt.so.1' - -# Names of this library. -library_names='libipopt.so.1.10.4 libipopt.so.1 libipopt.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/harpreet/Downloads/Ipopt-3.12.4/build/lib/libcoinmumps.la /home/harpreet/Downloads/Ipopt-3.12.4/build/lib/libcoinlapack.la /home/harpreet/Downloads/Ipopt-3.12.4/build/lib/libcoinblas.la -lgfortran -lquadmath -ldl' - -# Version information for libipopt. -current=11 -age=10 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/harpreet/Downloads/Ipopt-3.12.4/build/lib' diff --git a/thirdparty/linux/lib/x86/libCgl.la b/thirdparty/linux/lib/x86/libCgl.la deleted file mode 100755 index 9b87221..0000000 --- a/thirdparty/linux/lib/x86/libCgl.la +++ /dev/null @@ -1,35 +0,0 @@ -# libCgl.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libCgl.so.1' - -# Names of this library. -library_names='libCgl.so.1.9.4 libCgl.so.1 libCgl.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libOsiClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClpSolver.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libOsi.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libCgl. -current=10 -age=9 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libClp.la b/thirdparty/linux/lib/x86/libClp.la deleted file mode 100755 index 41043c0..0000000 --- a/thirdparty/linux/lib/x86/libClp.la +++ /dev/null @@ -1,35 +0,0 @@ -# libClp.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libClp.so.1' - -# Names of this library. -library_names='libClp.so.1.13.6 libClp.so.1 libClp.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libClp. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libClpSolver.la b/thirdparty/linux/lib/x86/libClpSolver.la deleted file mode 100755 index c6ea9d2..0000000 --- a/thirdparty/linux/lib/x86/libClpSolver.la +++ /dev/null @@ -1,35 +0,0 @@ -# libClpSolver.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libClpSolver.so.1' - -# Names of this library. -library_names='libClpSolver.so.1.13.6 libClpSolver.so.1 libClpSolver.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libClpSolver. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libCoinUtils.la b/thirdparty/linux/lib/x86/libCoinUtils.la deleted file mode 100755 index 7c63c02..0000000 --- a/thirdparty/linux/lib/x86/libCoinUtils.la +++ /dev/null @@ -1,35 +0,0 @@ -# libCoinUtils.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libCoinUtils.so.3' - -# Names of this library. -library_names='libCoinUtils.so.3.10.6 libCoinUtils.so.3 libCoinUtils.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs='' - -# Version information for libCoinUtils. -current=13 -age=10 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libOsi.la b/thirdparty/linux/lib/x86/libOsi.la deleted file mode 100755 index 7d0e442..0000000 --- a/thirdparty/linux/lib/x86/libOsi.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsi.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsi.so.1' - -# Names of this library. -library_names='libOsi.so.1.12.4 libOsi.so.1 libOsi.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libOsi. -current=13 -age=12 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libOsiClp.la b/thirdparty/linux/lib/x86/libOsiClp.la deleted file mode 100755 index ac3e475..0000000 --- a/thirdparty/linux/lib/x86/libOsiClp.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiClp.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiClp.so.1' - -# Names of this library. -library_names='libOsiClp.so.1.13.6 libOsiClp.so.1 libOsiClp.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libOsi.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libOsiClp. -current=14 -age=13 -revision=6 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libOsiCommonTests.la b/thirdparty/linux/lib/x86/libOsiCommonTests.la deleted file mode 100755 index 2e4e4e3..0000000 --- a/thirdparty/linux/lib/x86/libOsiCommonTests.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiCommonTests.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiCommonTests.so.1' - -# Names of this library. -library_names='libOsiCommonTests.so.1.12.4 libOsiCommonTests.so.1 libOsiCommonTests.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libOsi.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libOsiCommonTests. -current=13 -age=12 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libOsiSym.la b/thirdparty/linux/lib/x86/libOsiSym.la deleted file mode 100755 index d520e52..0000000 --- a/thirdparty/linux/lib/x86/libOsiSym.la +++ /dev/null @@ -1,35 +0,0 @@ -# libOsiSym.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libOsiSym.so.3' - -# Names of this library. -library_names='libOsiSym.so.3.6.10 libOsiSym.so.3 libOsiSym.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libSym.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCgl.la /home/fossee/SYMPHONY-5.6.10/build/lib/libOsiClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClpSolver.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libOsi.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libOsiSym. -current=9 -age=6 -revision=10 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libSym.la b/thirdparty/linux/lib/x86/libSym.la deleted file mode 100755 index b20a336..0000000 --- a/thirdparty/linux/lib/x86/libSym.la +++ /dev/null @@ -1,35 +0,0 @@ -# libSym.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libSym.so.3' - -# Names of this library. -library_names='libSym.so.3.6.10 libSym.so.3 libSym.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/fossee/SYMPHONY-5.6.10/build/lib/libCgl.la /home/fossee/SYMPHONY-5.6.10/build/lib/libOsiClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClpSolver.la /home/fossee/SYMPHONY-5.6.10/build/lib/libClp.la /home/fossee/SYMPHONY-5.6.10/build/lib/libOsi.la /home/fossee/SYMPHONY-5.6.10/build/lib/libCoinUtils.la' - -# Version information for libSym. -current=9 -age=6 -revision=10 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/fossee/SYMPHONY-5.6.10/build/lib' diff --git a/thirdparty/linux/lib/x86/libcoinblas.la b/thirdparty/linux/lib/x86/libcoinblas.la deleted file mode 100755 index 9386e57..0000000 --- a/thirdparty/linux/lib/x86/libcoinblas.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinblas.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinblas.so.1' - -# Names of this library. -library_names='libcoinblas.so.1.4.4 libcoinblas.so.1 libcoinblas.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs='' - -# Version information for libcoinblas. -current=5 -age=4 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/mushirahmed/Desktop/Ipopt-3.12.4/build32_ipopt/lib' diff --git a/thirdparty/linux/lib/x86/libcoinlapack.la b/thirdparty/linux/lib/x86/libcoinlapack.la deleted file mode 100755 index 8c9b979..0000000 --- a/thirdparty/linux/lib/x86/libcoinlapack.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinlapack.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinlapack.so.1' - -# Names of this library. -library_names='libcoinlapack.so.1.5.4 libcoinlapack.so.1 libcoinlapack.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' -lblas' - -# Version information for libcoinlapack. -current=6 -age=5 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/mushirahmed/Desktop/Ipopt-3.12.4/build32_ipopt/lib' diff --git a/thirdparty/linux/lib/x86/libcoinmumps.la b/thirdparty/linux/lib/x86/libcoinmumps.la deleted file mode 100755 index 944fd37..0000000 --- a/thirdparty/linux/lib/x86/libcoinmumps.la +++ /dev/null @@ -1,35 +0,0 @@ -# libcoinmumps.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcoinmumps.so.1' - -# Names of this library. -library_names='libcoinmumps.so.1.5.4 libcoinmumps.so.1 libcoinmumps.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' -lblas -L/usr/lib/gcc/i686-linux-gnu/4.6 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath' - -# Version information for libcoinmumps. -current=6 -age=5 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/mushirahmed/Desktop/Ipopt-3.12.4/build32_ipopt/lib' diff --git a/thirdparty/linux/lib/x86/libipopt.la b/thirdparty/linux/lib/x86/libipopt.la deleted file mode 100755 index e7d4b76..0000000 --- a/thirdparty/linux/lib/x86/libipopt.la +++ /dev/null @@ -1,35 +0,0 @@ -# libipopt.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libipopt.so.1' - -# Names of this library. -library_names='libipopt.so.1.10.4 libipopt.so.1 libipopt.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' /home/mushirahmed/Desktop/Ipopt-3.12.4/build32_ipopt/lib/libcoinmumps.la -lgfortran -lquadmath -llapack -lblas -ldl' - -# Version information for libipopt. -current=11 -age=10 -revision=4 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/home/mushirahmed/Desktop/Ipopt-3.12.4/build32_ipopt/lib' diff --git a/unloader.sce b/unloader.sce new file mode 100644 index 0000000..8b09ac1 --- /dev/null +++ b/unloader.sce @@ -0,0 +1,14 @@ +// This file is released under the 3-clause BSD license. See COPYING-BSD. +// Generated by builder.sce: Please, do not edit this file + +try + getversion("scilab"); +catch + error("Scilab 5.4 or more is required."); +end; + +fileQuit = get_absolute_file_path("unloader.sce") + "etc/" + "FOSSEE_Optimization_Toolbox.quit"; +if isfile(fileQuit) then + exec(fileQuit); +end + -- cgit