Skip to content

PPL backend re-solves the problem every time get_variable_value or get_objective_value is called #20361

@mkoeppe

Description

@mkoeppe

The PPL backend sets up a new PPL problem and re-solves it from scratch every time that get_variable_value or get_objective_value is called.

sage: p = MixedIntegerLinearProgram(solver='ppl', maximization=True)
sage: x = p.new_variable()
sage: p.set_objective(p.sum((i+20)*x[i] for i in range(1000)))
sage: p.add_constraint(p.sum((i+15)*x[i] for i in range(1000)), max=20000)
sage: x.set_max(1)
sage: p.solve()  # takes a few seconds
11438750/507
sage: p.get_objective_value()  # takes a few seconds, should be instant
11438750/507
sage: p.get_values(x)  # takes forever, should be instant

CC: @dimpase @videlec @jdemeyer

Component: numerical

Author: Matthias Koeppe

Branch/Commit: df42b5b

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/20361

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions