# Revision history [back]

### Computing polyhedron from MIP

I want to run the following code (I'm using SAGE v6.10 release version 2015-12-18):

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(RR, 3, 2);
P.polyhedron()


However, it outputs the error message:

AttributeError: type object 'float' has no attribute 'fraction_field'

I notices that if instead of using real variables I use only integer variables, then it works fine. For instance:

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(ZZ, 3, 2);
P.polyhedron()


outputs:

A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 2 rays

What do you suggest to overcome this problem?

Thanks

### Computing polyhedron from MIP

I want to run the following code (I'm using SAGE v6.10 release version 2015-12-18):

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(RR, 3, 2);
P.polyhedron()


However, it outputs the error message:

AttributeError: type object 'float' has no attribute 'fraction_field'

I notices noticed that if instead of using real variables I use only integer variables, then it works fine. For instance:

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(ZZ, 3, 2);
P.polyhedron()


outputs:

A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 2 rays

What do you suggest to overcome this problem?

Thanks

 3 retagged FrédéricC 2306 ●3 ●27 ●46

### Computing polyhedron from MIP

I want to run the following code (I'm using SAGE v6.10 release version 2015-12-18):

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(RR, 3, 2);
P.polyhedron()


However, it outputs the error message:

AttributeError: type object 'float' has no attribute 'fraction_field'

I noticed that if instead of using real variables I use only integer variables, then it works fine. For instance:

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(ZZ, 3, 2);
P.polyhedron()


outputs:

A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 2 rays

What do you suggest to overcome this problem?

Thanks

 4 retagged tmonteil 19428 ●22 ●138 ●362 http://wiki.sagemath.o...

### Computing polyhedron from MIP

I want to run the following code (I'm using SAGE v6.10 release version 2015-12-18):

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(RR, 3, 2);
P.polyhedron()


However, it outputs the error message:

AttributeError: type object 'float' has no attribute 'fraction_field'

I noticed that if instead of using real variables I use only integer variables, then it works fine. For instance:

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(ZZ, 3, 2);
P.polyhedron()


outputs:

A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 2 rays

What do you suggest to overcome this problem?

Thanks

 5 retagged tmonteil 19428 ●22 ●138 ●362 http://wiki.sagemath.o...

### Computing polyhedron from MIP

I want to run the following code (I'm using SAGE v6.10 release version 2015-12-18):

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(RR, 3, 2);
P.polyhedron()


However, it outputs the error message:

AttributeError: type object 'float' has no attribute 'fraction_field'

I noticed that if instead of using real variables I use only integer variables, then it works fine. For instance:

P = MixedIntegerLinearProgram()
x = P.new_variable()
A = random_matrix(ZZ, 3, 2);