Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array[1..3] of float: foo;
- array[1..3] of float: target;
- array[1..2] of float: shared;
- array[1..2] of float: left;
- array[1..2] of float: right;
- foo = [1.0,1.1,2.0];
- target = [1.0,2.0,3.0];
- shared = [1.0,2.0];
- left = [1.0,2.0];
- right = [1.0,2.0];
- var float: f;
- var float: t;
- var float: s;
- var float: l;
- var float: r;
- constraint f in foo;
- constraint t in target;
- constraint s in shared;
- constraint l in left;
- constraint r in right;
- constraint if f == 1.1 then l=1.0 endif;
- constraint if f ==1.1 then r=1.0 endif;
- constraint if l==1.0 then s>=1.0 endif;
- constraint if r ==1.0 then s =1.0 endif;
- constraint if s ==1.0 then t<=2.0 endif;
- solve satisfy;
- output ["f = \(f).0, t = \(t).0, s = \(s).0, l = \(l).0, r = \(r).0"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement