Frequently asked questions

How can I set a timeout when solving models?

The kep_solver.model.Model.solve() and kep_solver.pool.Pool.solve_single() functions both support a parameter called solver, which is a PuLP solver object. Amongst other things, this solver can be configured with a timeout or time limit as follows:

from pulp import apis
time_limited_solver = apis.COIN_CMD(timeLimit=60)

Note that PuLP supports many other solvers that you can try, but some of them may not be available.