summaryrefslogtreecommitdiff
path: root/qpipoptmat
diff options
context:
space:
mode:
Diffstat (limited to 'qpipoptmat')
-rw-r--r--qpipoptmat/qpipoptmat_A1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_Aeq1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_H1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_b1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_beq1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_f1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_lb1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_logical1.sce26
-rw-r--r--qpipoptmat/qpipoptmat_param1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_param1.sce~22
-rw-r--r--qpipoptmat/qpipoptmat_param2.sce22
-rw-r--r--qpipoptmat/qpipoptmat_param2.sce~22
-rw-r--r--qpipoptmat/qpipoptmat_param3.sce22
-rw-r--r--qpipoptmat/qpipoptmat_param3.sce~22
-rw-r--r--qpipoptmat/qpipoptmat_ub1.sce22
-rw-r--r--qpipoptmat/qpipoptmat_x01.sce20
16 files changed, 354 insertions, 0 deletions
diff --git a/qpipoptmat/qpipoptmat_A1.sce b/qpipoptmat/qpipoptmat_A1.sce
new file mode 100644
index 0000000..1c8d055
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_A1.sce
@@ -0,0 +1,22 @@
+// Check for the size of A matrix
+//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,0,2,1,1];
+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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of columns in A must be the same as the number of elements of f
+//at line 222 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_Aeq1.sce b/qpipoptmat/qpipoptmat_Aeq1.sce
new file mode 100644
index 0000000..be35586
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_Aeq1.sce
@@ -0,0 +1,22 @@
+// Check for the size of Aeq matrix
+//Find x in R^6 such that:
+
+Aeq= [1,-1,1,0,3,;
+-1,0,-3,-4,5,;
+2,5,3,0,1,];
+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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of columns in Aeq must be the same as the number of elements of f
+//at line 228 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_H1.sce b/qpipoptmat/qpipoptmat_H1.sce
new file mode 100644
index 0000000..0bc90df
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_H1.sce
@@ -0,0 +1,22 @@
+// Check for the size of H matrix
+//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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(4,4);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of rows and columns in H must be equal the number of elements of f
+//at line 215 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_b1.sce b/qpipoptmat/qpipoptmat_b1.sce
new file mode 100644
index 0000000..f039833
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_b1.sce
@@ -0,0 +1,22 @@
+// Check for the size of b matrix
+//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];
+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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of rows in A must be the same as the number of elementsof b
+//at line 247 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_beq1.sce b/qpipoptmat/qpipoptmat_beq1.sce
new file mode 100644
index 0000000..2641ac4
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_beq1.sce
@@ -0,0 +1,22 @@
+// Check for the size of beq matrix
+//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];
+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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of rows in Aeq must be the same as the number of elements of beq
+//at line 253 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_f1.sce b/qpipoptmat/qpipoptmat_f1.sce
new file mode 100644
index 0000000..7f55175
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_f1.sce
@@ -0,0 +1,22 @@
+// Check for the size of f matrix
+//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);
+f=[1; 2; 3; 4; 5]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The number of rows and columns in H must be equal the number of elements of f
+//at line 215 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_lb1.sce b/qpipoptmat/qpipoptmat_lb1.sce
new file mode 100644
index 0000000..e96150e
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_lb1.sce
@@ -0,0 +1,22 @@
+// Check for the size of lb matrix
+//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];
+ub=[10000; 100; 1.5; 100; 100; 1000];
+x0 = repmat(0,6,1);
+param = list("MaxIter", 300, "CpuTime", 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The Lower Bound is not equal to the number of variables
+//at line 235 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_logical1.sce b/qpipoptmat/qpipoptmat_logical1.sce
new file mode 100644
index 0000000..39957b5
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_logical1.sce
@@ -0,0 +1,26 @@
+// Check for the Q to be a symmetric matrix
+
+f=[2 -35 -47]';
+H =[5 -2 -1; -2 4 3; -1 3 5];
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f)
+
+//Output
+// lambda =
+//
+// lower: [0,0,0]
+// upper: [0,0,0]
+// constraint: [0x0 constant]
+// output =
+//
+// Iterations: 1
+// exitflag =
+//
+// 0
+// fopt =
+//
+// - 249.
+// xopt =
+//
+// 3.
+// 5.
+// 7.
diff --git a/qpipoptmat/qpipoptmat_param1.sce b/qpipoptmat/qpipoptmat_param1.sce
new file mode 100644
index 0000000..ba3915e
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param1.sce
@@ -0,0 +1,22 @@
+//Check if the user gives uneven number of parameters
+//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, 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: Size of parameters should be even
+//at line 153 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_param1.sce~ b/qpipoptmat/qpipoptmat_param1.sce~
new file mode 100644
index 0000000..a56877f
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param1.sce~
@@ -0,0 +1,22 @@
+// Check for the size of H matrix
+//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, 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: Size of parameters should be even
+//at line 153 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_param2.sce b/qpipoptmat/qpipoptmat_param2.sce
new file mode 100644
index 0000000..801e0f9
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param2.sce
@@ -0,0 +1,22 @@
+// Check if the user gives different parameter other than predefined
+//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, "Time", 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: Unrecognized parameter name 'Time'.
+//at line 170 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_param2.sce~ b/qpipoptmat/qpipoptmat_param2.sce~
new file mode 100644
index 0000000..d5e5b31
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param2.sce~
@@ -0,0 +1,22 @@
+// Check for the size of H matrix
+//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, "Time", 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: Unrecognized parameter name 'Time'.
+//at line 170 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_param3.sce b/qpipoptmat/qpipoptmat_param3.sce
new file mode 100644
index 0000000..e9198e6
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param3.sce
@@ -0,0 +1,22 @@
+// Check if the user for a list for the param
+//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 = ["MaxIter", "CpuTime"];
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipopt: param should be a list
+//at line 147 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_param3.sce~ b/qpipoptmat/qpipoptmat_param3.sce~
new file mode 100644
index 0000000..26f6453
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_param3.sce~
@@ -0,0 +1,22 @@
+// Check for the size of H matrix
+//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 = ["MaxIter", "CpuTime"];
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipopt: param should be a list
+//at line 147 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_ub1.sce b/qpipoptmat/qpipoptmat_ub1.sce
new file mode 100644
index 0000000..28ec92e
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_ub1.sce
@@ -0,0 +1,22 @@
+// Check for the size of ub matrix
+//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];
+x0 = repmat(0,6,1);
+param = list("MaxIter", 300, "CpuTime", 100);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,6,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Error
+//qpipoptmat: The Upper Bound is not equal to the number of variables
+//at line 241 of function qpipoptmat called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/qpipoptmat/qpipoptmat_x01.sce b/qpipoptmat/qpipoptmat_x01.sce
new file mode 100644
index 0000000..59710bb
--- /dev/null
+++ b/qpipoptmat/qpipoptmat_x01.sce
@@ -0,0 +1,20 @@
+// Check for the size of H matrix
+//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);
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
+x0 = repmat(0,5,1);
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+// Warning
+//WARNING: qpipopt: Ignoring initial guess of variables as it is not equal to the number of variables