[gecode-users] fzn-gecode and float_lin_eq

Tommy Persson tommy.persson at liu.se
Tue Sep 16 23:49:53 CEST 2014


Is float_lin_eq supposed to work with fzn-gecode?

I have tried a lot of varaints to get it to parse but have not found 
anything that works. My problem is:

/opt/gecode-4.3.0/bin/fzn-gecode camera.fzn
Error: Type error: float literal expected

And the camera.fzn is:




float: hfov = 0.7;
float: vfov = 0.52;
float: hfov2 = 0.35;
float: vfov2 = 0.26;
float: period = 0.1;

var float: speed :: output_var;
var float: alt :: output_var;
var float: hfov_tan;
var float: vfov_tan;
var float: max_speed;
var float: h;
array [1..1] of var float: a;
array [1..1] of var float: b;

constraint float_eq(alt, 5.0);
constraint float_eq(vfov_tan, 0.7);

%constraint float_eq(a[1], vfov_tan);
%constraint float_eq(b[1], alt);
constraint float_eq(a[1], 0.5);
constraint float_eq(b[1], 6.0);
constraint float_le(alt, 30.0);
constraint float_le(5.0, alt);
constraint float_le(speed, 15.0);
constraint float_le(3.0, speed);
constraint float_tan(hfov2, hfov_tan);
constraint float_tan(vfov2, vfov_tan);
constraint float_lin_eq(a, b, h);

solve satisfy;

--------


What I want to do is multiply two floats.

/Tommy Persson
Linköping University



More information about the users mailing list