I have a dummy question that I need to know its answer. I'm working on a project that requires AMPL and CPLEX as a solver. Now this problem normally takes more than 140 seconds to be solved. While I was searching, I came into an option called timelimit
. I used this option with value option cplex_options 'timelimit=5'
and the results were shown within 5 seconds. Now my questions is, does the output meet all the constraints and is within the boundaries I set in the code? Or did I just terminate the process and the results were the current "being processed" data? Thanks for helping.
相关问题
- How do I speed up profiled NumPy code - vectorizin
- GLPK MathProg sets and groups
- How to change option value with Jquery?
- parallel/multithread differential evolution in pyt
- NLopt SLSQP discards good solution in favour of ol
相关文章
- Scipy.optimize.minimize method='SLSQP' ign
- Add selected attribute to option in select menu wi
- How to perform discrete optimization of functions
- Why does Rust need the `if let` syntax?
- C# - Finding Peaks within a Given Width via Quadra
- NMinimize eats all memory b/c of unnecessary symbo
- How to choose value from an option list using PyQt
- How to use constraint programming for optimizing s
If you don't set the timelimit parameter, the run time is the time to get to a provably optimal solution within the relative tolerance (default is 1e-6). By setting a time limit, you are telling cplex to stop at 5 seconds. In that case, it will return the best solution it has found, regardless of the quality of the objective function. cplex will not, however, give you a solution that violates constraints. If it can't find a feasible solution in the time allotted, then you will not get a solution. You can check the
exitcode
suffix of the model to see if there was a solution found.