Skip to content

XPRESS is crashing when using SetTimeLimit #1951

@davidhdezf

Description

@davidhdezf

What version of OR-tools and what language are you using?
Version: source V7.5 stable

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
XPRESS

What operating system (Linux, Windows, ...) and version?
Windows 10

What did you do?
Tried to use mySolver.SetTimeLimit([time in ms]);

What did you expect to see
The solver should use that value as Walltime

What did you see instead?
Xpress crashed

Problem/Solution
The wrong function is being used in xpress_interface.cc

It is assumed that the parameter is a double parameter:
XPRSsetdblcontrol(mLp, XPRS_MAXTIME, -1.0 * solver_->time_limit_in_secs())

But, the correct function is the integer:

XPRSsetintcontrol(mLp, XPRS_MAXTIME, -1.0 * solver_->time_limit_in_secs())

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions