summaryrefslogtreecommitdiff
path: root/docal.sce
diff options
context:
space:
mode:
Diffstat (limited to 'docal.sce')
-rw-r--r--docal.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/docal.sce b/docal.sce
new file mode 100644
index 0000000..dc21e14
--- /dev/null
+++ b/docal.sce
@@ -0,0 +1,20 @@
+ulink();
+exec builder.sce
+exec loader.sce
+
+function y=f(x)
+ y=-(x(1)+x(2)+x(3));
+endfunction
+
+function [c,ceq]=nlc(x)
+ c=((x(2)-0.5)^2 + (x(3)-0.5)^2 - 0.25 );
+ ceq = [];
+endfunction
+
+A = [1 -1 0 0;1 0 1 1;]
+b = [0 2]';
+lb =[0 0 0 0]
+ub = [1 %inf %inf 5]
+intcon = [1 4]
+x0 = [0 0 0 0]
+[x,fval,exitflag] =intfmincon(f, x0,intcon,A,b,[],[],lb,ub,nlc); \ No newline at end of file