summaryrefslogtreecommitdiff
path: root/tests/general_tests/symphonymat
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general_tests/symphonymat')
-rw-r--r--tests/general_tests/symphonymat/symphonymat_logical2.sce34
-rw-r--r--tests/general_tests/symphonymat/symphonymat_logical3.sce43
-rw-r--r--tests/general_tests/symphonymat/symphonymat_logical4.sce46
3 files changed, 98 insertions, 25 deletions
diff --git a/tests/general_tests/symphonymat/symphonymat_logical2.sce b/tests/general_tests/symphonymat/symphonymat_logical2.sce
index 4f3923f..98a3b70 100644
--- a/tests/general_tests/symphonymat/symphonymat_logical2.sce
+++ b/tests/general_tests/symphonymat/symphonymat_logical2.sce
@@ -2,55 +2,39 @@
// 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 = [];
// Output
//Problem loaded into environment.
-//
+
//Note: There is no limit on time.
-//
+
//An optimal solution has been found.
-//
-// 0.
+// output =
//
// Iterations: 1
-//
-// output
+// status =
//
// 227.
-//
-// status
+// f =
//
// - 268.
-//
-// f
+// x =
//
// 1.8
// 20.8
-// 1.6
-//
-// x
+// 1.6
// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub)
-disp("x",x,"f",f,"status",status,"output",output);
+[x,f,status,output] = symphonymat(c,intcon,A,b)
diff --git a/tests/general_tests/symphonymat/symphonymat_logical3.sce b/tests/general_tests/symphonymat/symphonymat_logical3.sce
new file mode 100644
index 0000000..1b2b60c
--- /dev/null
+++ b/tests/general_tests/symphonymat/symphonymat_logical3.sce
@@ -0,0 +1,43 @@
+// An example with equality constraints and variable bounds
+
+// A basic case :
+
+c = -1*[20,10,15]';
+
+A = [3,2,5;
+ 2,1,1;
+ 1,1,3;
+ 5,2,4]
+
+b = [ 55;26;30;57]
+
+Aeq = [2 3 5]
+
+beq = [5]
+
+intcon = [];
+
+// Output
+//Problem loaded into environment.
+//
+//Note: There is no limit on time.
+//
+//An optimal solution has been found.
+// output =
+//
+// Iterations: 1
+// status =
+//
+// 227.
+// f =
+//
+// - 233.5
+// x =
+//
+// 15.6
+// 0.1
+// - 5.3
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,A,b,Aeq,beq)
+
diff --git a/tests/general_tests/symphonymat/symphonymat_logical4.sce b/tests/general_tests/symphonymat/symphonymat_logical4.sce
new file mode 100644
index 0000000..ccb53a5
--- /dev/null
+++ b/tests/general_tests/symphonymat/symphonymat_logical4.sce
@@ -0,0 +1,46 @@
+// An example with equality constraints and variable bounds
+
+// A basic case :
+
+c = -1*[20,10,15]';
+
+A = [3,2,5;
+ 2,1,1;
+ 1,1,3;
+ 5,2,4]
+
+b = [ 55;26;30;57]
+
+Aeq = [2 3 5]
+
+beq = [5]
+
+intcon = [];
+
+lb = repmat(0,3,1);
+ub = repmat(8,3,1);
+
+// Output
+//Problem loaded into environment.
+
+//Note: There is no limit on time.
+
+//An optimal solution has been found.
+// output =
+//
+// Iterations: 1
+// status =
+//
+// 227.
+// f =
+//
+// - 50.
+// x =
+//
+// 2.5
+// 0.
+// 0.
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub)
+