From 436f0daf6e4f241b8fa582a943bad09ddc091f59 Mon Sep 17 00:00:00 2001
From: Harpreet
Date: Fri, 11 Dec 2015 12:51:00 +0530
Subject: lsqnonneg added
---
demos/lsqnonneg.dem.sce | 20 +++
demos/symphonymat.dem.sce | 7 +-
help/en_US/lsqlin.xml | 11 +-
help/en_US/lsqnonneg.xml | 102 +++++++++++
help/en_US/master_help.xml | 2 +
help/en_US/qpipopt.xml | 2 +-
help/en_US/qpipoptmat.xml | 8 +-
help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 7351 -> 7489 bytes
.../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | Bin 850 -> 862 bytes
.../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | Bin 266 -> 273 bytes
.../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 35734 -> 36150 bytes
help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 +-
help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 16384 -> 16384 bytes
.../scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png | Bin 0 -> 1508 bytes
help/en_US/scilab_en_US_help/index.html | 6 +
help/en_US/scilab_en_US_help/jhelpmap.jhm | 1 +
help/en_US/scilab_en_US_help/jhelptoc.xml | 1 +
help/en_US/scilab_en_US_help/lsqlin.html | 17 +-
help/en_US/scilab_en_US_help/lsqnonneg.html | 106 ++++++++++++
help/en_US/scilab_en_US_help/qpipopt.html | 6 +-
help/en_US/scilab_en_US_help/qpipoptmat.html | 8 +-
.../section_19f4f1e5726c01d683e8b82be0a7e910.html | 6 +
help/en_US/scilab_en_US_help/symphony.html | 2 +-
help/en_US/scilab_en_US_help/symphonymat.html | 12 +-
help/en_US/symphony.xml | 2 +-
help/en_US/symphonymat.xml | 12 +-
jar/scilab_en_US_help.jar | Bin 209125 -> 214010 bytes
macros/lib | Bin 528 -> 528 bytes
macros/lsqlin.bin | Bin 51024 -> 51108 bytes
macros/lsqlin.sci | 10 +-
macros/lsqnonneg.bin | Bin 0 -> 23532 bytes
macros/lsqnonneg.sci | 186 +++++++++++++++++++++
macros/names | 2 +-
macros/qpipopt.bin | Bin 49496 -> 49368 bytes
macros/qpipopt.sci | 2 +-
macros/qpipoptmat.bin | Bin 51124 -> 50868 bytes
macros/qpipoptmat.sci | 4 +-
macros/symphony.bin | Bin 54860 -> 54708 bytes
macros/symphony.sci | 2 +-
macros/symphonymat.bin | Bin 60860 -> 60820 bytes
macros/symphonymat.sci | 7 +-
41 files changed, 491 insertions(+), 55 deletions(-)
create mode 100644 demos/lsqnonneg.dem.sce
create mode 100644 help/en_US/lsqnonneg.xml
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/lsqnonneg.html
create mode 100644 macros/lsqnonneg.bin
create mode 100644 macros/lsqnonneg.sci
diff --git a/demos/lsqnonneg.dem.sce b/demos/lsqnonneg.dem.sce
new file mode 100644
index 0000000..f9d5d78
--- /dev/null
+++ b/demos/lsqnonneg.dem.sce
@@ -0,0 +1,20 @@
+mode(1)
+//
+// Demo of lsqnonneg.sci
+//
+
+A basic lsqnonneg problem
+C = [
+0.0372 0.2869
+0.6861 0.7071
+0.6233 0.6245
+0.6344 0.6170];
+d = [
+0.8587
+0.1781
+0.0747
+0.8405];
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+halt() // Press return to continue
+
+//========= E N D === O F === D E M O =========//
diff --git a/demos/symphonymat.dem.sce b/demos/symphonymat.dem.sce
index f069d38..553cd99 100644
--- a/demos/symphonymat.dem.sce
+++ b/demos/symphonymat.dem.sce
@@ -4,7 +4,7 @@ mode(1)
//
// Objective function
-c = [350*5,330*3,310*4,280*6,500,450,400,100]'
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
// Upper Bound of variables
@@ -36,8 +36,7 @@ objCoef = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
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
-
+//Constraint Matrix
conMatrix = [ //Constraint 1
42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
@@ -79,7 +78,7 @@ conMatrix = [ //Constraint 1
483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
];
-nbVar = size(objCoef,1)
+nbVar = size(objCoef,2)
conUB=[11927 13727 11551 13056 13460 ];
// Lower Bound of variables
lb = repmat(0,1,nbVar)
diff --git a/help/en_US/lsqlin.xml b/help/en_US/lsqlin.xml
index 92dbd91..1216bae 100644
--- a/help/en_US/lsqlin.xml
+++ b/help/en_US/lsqlin.xml
@@ -50,17 +50,19 @@
a vector of doubles, represents the linear coefficients in the equality constraints a vector of doubles, where n is number of variables, contains lower bounds of the variables. a vector of doubles, contains lower bounds of the variables. a vector of doubles, where n is number of variables, contains upper bounds of the variables. a vector of doubles, contains upper bounds of the variables. a vector of doubles, contains initial guess of variables. a list containing the the parameters to be set. a vector of doubles, the computed solution of the optimization problem. a double, the function value at x. a double, objective value returned as the scalar value norm(C*x-d)^2. a vector of doubles, solution residuals returned as the vector C*x-d. Integer identifying the reason the algorithm terminated. Structure containing the Lagrange multipliers at the solution x (separated by constraint type). Search the minimum of a constrained linear least square problem specified by :
-find the minimum of f(x) such that Search the minimum of a constrained linear least square problem specified by : We are calling IPOpt for solving the linear least square problem, IPOpt is a library written in C++. The code has been written by Andreas Wächter and Carl Laird.
- qpipopt >>
+ lsqnonneg >>
@@ -58,17 +58,19 @@
Description
-
Solves nonnegative least-squares curve fitting problems.
x = lsqnonneg(C,d) +x = lsqnonneg(C,d,param) +[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg( ... )
a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.
a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.
a vector of doubles, the computed solution of the optimization problem.
a double, objective value returned as the scalar value norm(C*x-d)^2.
a vector of doubles, solution residuals returned as the vector C*x-d.
Integer identifying the reason the algorithm terminated.
Structure containing information about the optimization.
Structure containing the Lagrange multipliers at the solution x (separated by constraint type).
Solves nonnegative least-squares curve fitting problems specified by :
+We are calling IPOpt for solving the nonnegative least-squares curve fitting problems, IPOpt is a library written in C++. The code has been written by Andreas Wächter and Carl Laird.
+