Ask Your Question

Revision history [back]

best_known_objective_bound()

Hi,

I am using sage Version 6.5, Release Date: 2015-02-17. I have MILP problem and trying to solve it. However, I defined time limit and used try and except to get the best_known_objective_bound(). Unfortunately, I am getting AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

I even tried the following simple example (posted here http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/backends/glpk_backend.html#sage.numerical.backends.glpk_backend.GLPKBackend.best_known_objective_bound). However, I am facing the same issue for the example as well.

sage: g = graphs.CubeGraph(9)

sage: p = MixedIntegerLinearProgram(solver="GLPK")

sage: p.solver_parameter("mip_gap_tolerance",100)

sage: b = p.new_variable(binary=True)

sage: p.set_objective(p.sum(b[v] for v in g))

sage: for v in g:

....: p.add_constraint(b[v]+p.sum(b[u] for u in g.neighbors(v)) <= 1)

sage: p.add_constraint(b[v] == 1) # Force an easy non-0 solution

sage: p.solve() # rel tol 100

1.0

sage: backend = p.get_backend()

sage: backend.best_known_objective_bound() # random

AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

What I want is to get the best known optimum answer by time limit. Anyone knows how should i get it?

Thanks a lot! Cheers, Aissan

best_known_objective_bound()

Hi,

I am using sage Version 6.5, Release Date: 2015-02-17. I have MILP problem and trying to solve it. However, I defined time limit and used try and except to get the best_known_objective_bound(). Unfortunately, I am getting AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

I even tried the following simple example (posted here http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/backends/glpk_backend.html#sage.numerical.backends.glpk_backend.GLPKBackend.best_known_objective_bound). However, I am facing the same issue for the example as well.

sage: g = graphs.CubeGraph(9)

sage: p = MixedIntegerLinearProgram(solver="GLPK")

sage: p.solver_parameter("mip_gap_tolerance",100)

sage: b = p.new_variable(binary=True)

sage: p.set_objective(p.sum(b[v] for v in g))

sage: for v in g:

....: p.add_constraint(b[v]+p.sum(b[u] for u in g.neighbors(v)) <= 1)

sage: p.add_constraint(b[v] == 1) # Force an easy non-0 solution

sage: p.solve() # rel tol 100

1.0

sage: backend = p.get_backend()

sage: backend.best_known_objective_bound() # random

AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

What I want is to get the best known optimum answer by time limit. Anyone knows how should i get it?

Thanks a lot! Cheers, Aissan

best_known_objective_bound()

Hi,

I am using sage Version 6.5, Release Date: 2015-02-17. I have MILP problem and trying to solve it. However, I defined time limit and used try and except to get the best_known_objective_bound(). Unfortunately, I am getting AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

I even tried the following simple example (posted here http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/backends/glpk_backend.html#sage.numerical.backends.glpk_backend.GLPKBackend.best_known_objective_bound). However, I am facing the same issue for the example as well.

sage: g = graphs.CubeGraph(9)

sage: p = MixedIntegerLinearProgram(solver="GLPK")

sage: p.solver_parameter("mip_gap_tolerance",100)

sage: b = p.new_variable(binary=True)

sage: p.set_objective(p.sum(b[v] for v in g))

sage: for v in g:

....: p.add_constraint(b[v]+p.sum(b[u] for u in g.neighbors(v)) <= 1)

sage: p.add_constraint(b[v] == 1) # Force an easy non-0 solution

sage: p.solve() # rel tol 100

1.0

sage: backend = p.get_backend()

sage: backend.best_known_objective_bound() # random

AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

What I want is to get the best known optimum answer by time limit. Anyone knows how should i get it?

Thanks a lot! Cheers, Aissan

best_known_objective_bound()

Hi,

I am using sage Version 6.5, Release Date: 2015-02-17. I have MILP problem and trying to solve it. However, I defined time limit and used try and except to get the best_known_objective_bound(). Unfortunately, I am getting AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

I even tried the following simple example (posted here http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/backends/glpk_backend.html#sage.numerical.backends.glpk_backend.GLPKBackend.best_known_objective_bound). However, I am facing the same issue for the example as well.

sage: g = graphs.CubeGraph(9)

sage: p = MixedIntegerLinearProgram(solver="GLPK")

sage: p.solver_parameter("mip_gap_tolerance",100)

sage: b = p.new_variable(binary=True)

sage: p.set_objective(p.sum(b[v] for v in g))

sage: for v in g:

....: p.add_constraint(b[v]+p.sum(b[u] for u in g.neighbors(v)) <= 1)

sage: p.add_constraint(b[v] == 1) # Force an easy non-0 solution

sage: p.solve() # rel tol 100

1.0

sage: backend = p.get_backend()

sage: backend.best_known_objective_bound() # random

AttributeError: 'sage.numerical.backends.glpk_backend.GLPKBackend' object has no attribute 'best_known_objective_bound'

What I want is to get the best known optimum answer by time limit. Anyone knows how should i get it?

Thanks a lot! Cheers, Aissan