summaryrefslogtreecommitdiff
path: root/symphonymat
diff options
context:
space:
mode:
Diffstat (limited to 'symphonymat')
-rw-r--r--symphonymat/symphonymat_b1.sce26
-rw-r--r--symphonymat/symphonymat_c1.sce26
-rw-r--r--symphonymat/symphonymat_input1.sce26
-rw-r--r--symphonymat/symphonymat_input2.sce26
-rw-r--r--symphonymat/symphonymat_intcon1.sce26
-rw-r--r--symphonymat/symphonymat_intcon2.sce26
-rw-r--r--symphonymat/symphonymat_intcon3.sce26
-rw-r--r--symphonymat/symphonymat_lb1.sce26
-rw-r--r--symphonymat/symphonymat_logical1.sce55
-rw-r--r--symphonymat/symphonymat_logical2.sce53
-rw-r--r--symphonymat/symphonymat_options1.sce28
-rw-r--r--symphonymat/symphonymat_options2.sce28
-rw-r--r--symphonymat/symphonymat_ub1.sce26
13 files changed, 398 insertions, 0 deletions
diff --git a/symphonymat/symphonymat_b1.sce b/symphonymat/symphonymat_b1.sce
new file mode 100644
index 0000000..68975c3
--- /dev/null
+++ b/symphonymat/symphonymat_b1.sce
@@ -0,0 +1,26 @@
+// Check for size of Objective Coefficients
+// Objective function
+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]
+
+intcon = [1 2 3 4];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+//Error
+//Symphonymat: The equality constraint upper bound is not equal to the number of equality constraint
+//at line 239 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_c1.sce b/symphonymat/symphonymat_c1.sce
new file mode 100644
index 0000000..6b8d5f8
--- /dev/null
+++ b/symphonymat/symphonymat_c1.sce
@@ -0,0 +1,26 @@
+// Check for size of Objective Coefficients
+// Objective function
+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)
+
+//Error
+//Symphonymat: Objective Coefficients should be a column matrix
+//at line 160 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_input1.sce b/symphonymat/symphonymat_input1.sce
new file mode 100644
index 0000000..b5ee515
--- /dev/null
+++ b/symphonymat/symphonymat_input1.sce
@@ -0,0 +1,26 @@
+// Check for size of input for symphony
+// Objective function
+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,[],[])
+
+//Error
+//Symphony: Unexpected number of input arguments : 10 provided while should be in the set [4 6 8 9]
+//at line 149 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,[],[])
diff --git a/symphonymat/symphonymat_input2.sce b/symphonymat/symphonymat_input2.sce
new file mode 100644
index 0000000..4be6d87
--- /dev/null
+++ b/symphonymat/symphonymat_input2.sce
@@ -0,0 +1,26 @@
+// Check for size of input for symphony
+// Objective function
+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)
+
+//Error
+//Symphony: Unexpected number of input arguments : 2 provided while should be in the set [4 6 8 9]
+//at line 149 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon)
diff --git a/symphonymat/symphonymat_intcon1.sce b/symphonymat/symphonymat_intcon1.sce
new file mode 100644
index 0000000..0c24f4c
--- /dev/null
+++ b/symphonymat/symphonymat_intcon1.sce
@@ -0,0 +1,26 @@
+// Check for size of Objective Coefficients
+// Objective function
+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 10];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+//Error
+//Symphonymat: Objective Coefficients should be a column matrix
+//at line 160 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_intcon2.sce b/symphonymat/symphonymat_intcon2.sce
new file mode 100644
index 0000000..47b7572
--- /dev/null
+++ b/symphonymat/symphonymat_intcon2.sce
@@ -0,0 +1,26 @@
+// Check for size of Objective Coefficients
+// Objective function
+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 -10];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+//Error
+//Symphonymat: The values inside intcon should be greater than 0
+//at line 218 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_intcon3.sce b/symphonymat/symphonymat_intcon3.sce
new file mode 100644
index 0000000..e644967
--- /dev/null
+++ b/symphonymat/symphonymat_intcon3.sce
@@ -0,0 +1,26 @@
+// Check if the user have given floating value in intcon
+// Objective function
+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.5 4];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+//Error
+//Symphonymat: The values inside intcon should be integer
+//at line 223 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_lb1.sce b/symphonymat/symphonymat_lb1.sce
new file mode 100644
index 0000000..f9a4b29
--- /dev/null
+++ b/symphonymat/symphonymat_lb1.sce
@@ -0,0 +1,26 @@
+// Check for size of lower bound
+// Objective function
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
+
+// Lower Bound of variable
+lb = repmat(0,1,5);
+
+// 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)
+
+//Error
+//Symphonymat: The Lower Bound is not equal to the number of variables
+//at line 245 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
diff --git a/symphonymat/symphonymat_logical1.sce b/symphonymat/symphonymat_logical1.sce
new file mode 100644
index 0000000..117b59b
--- /dev/null
+++ b/symphonymat/symphonymat_logical1.sce
@@ -0,0 +1,55 @@
+// Objective function
+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];
+
+options = list("time_limit",250);
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+disp("x",x,"f",f,"status",status,"output",output);
+//Output
+//setting of double parameter function executed successfully
+//Problem loaded into environment.
+//
+//Note: Time limit has been set to 250.000000.
+//
+//An optimal solution has been found.
+//
+// 0.
+//
+// Iterations: 1
+//
+// output
+//
+// 227.
+//
+// status
+//
+// 8495.
+//
+// f
+//
+// 1.
+// 1.
+// 0.
+// 1.
+// 7.25
+// 0.
+// 0.25
+// 3.5
+//
+// x
diff --git a/symphonymat/symphonymat_logical2.sce b/symphonymat/symphonymat_logical2.sce
new file mode 100644
index 0000000..6bdd1b3
--- /dev/null
+++ b/symphonymat/symphonymat_logical2.sce
@@ -0,0 +1,53 @@
+// Check for size of Objective Coefficient
+// A basic case :
+
+// Objective function
+c = -1*[20,10,15]';
+
+// Lower Bound of variable
+lb = repmat(0,3,1);
+
+// Upper Bound of variables
+ub = repmat(%inf,3,1);
+
+// Constraint Matrix
+A = [3,2,5;
+ 2,1,1;
+ 1,1,3;
+ 5,2,4]
+
+// Upper Bound of constrains
+b = [ 55;26;30;57]
+
+// Row Matrix for telling symphony that the is integer or not
+intcon = [];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub)
+disp("x",x,"f",f,"status",status,"output",output);
+// Output
+//Problem loaded into environment.
+//
+//Note: There is no limit on time.
+//
+//An optimal solution has been found.
+//
+// 0.
+//
+// Iterations: 1
+//
+// output
+//
+// 227.
+//
+// status
+//
+// - 268.
+//
+// f
+//
+// 1.8
+// 20.8
+// 1.6
+//
+// x
diff --git a/symphonymat/symphonymat_options1.sce b/symphonymat/symphonymat_options1.sce
new file mode 100644
index 0000000..8da8547
--- /dev/null
+++ b/symphonymat/symphonymat_options1.sce
@@ -0,0 +1,28 @@
+// Check for size of input of options
+// Objective function
+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];
+
+options = list("time_limit");
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
+//Error
+//Symphonymat: Size of parameters should be even
+//at line 272 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
diff --git a/symphonymat/symphonymat_options2.sce b/symphonymat/symphonymat_options2.sce
new file mode 100644
index 0000000..89d3e14
--- /dev/null
+++ b/symphonymat/symphonymat_options2.sce
@@ -0,0 +1,28 @@
+// Check for the type of option
+// Objective function
+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];
+
+options = ["time_limit" 250];
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
+//Error
+//Symphonymat: Options should be a list
+//at line 266 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
diff --git a/symphonymat/symphonymat_ub1.sce b/symphonymat/symphonymat_ub1.sce
new file mode 100644
index 0000000..fdf345a
--- /dev/null
+++ b/symphonymat/symphonymat_ub1.sce
@@ -0,0 +1,26 @@
+// Check for size of lower bound
+// Objective function
+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,2) 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)
+
+//Error
+//Symphonymat: The Upper Bound is not equal to the number of variables
+//at line 251 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)