I am solving a large MIP in Gurobi 6.0. My advisor wants to set a time limit of 12 hours on the problem. I have found that I can set the TimeLimit parameter and that will kill the solver after the alloted time, but I don't know how to retrieve the best feasible solution at that time, just the objective value and optimality gap. Is there a way to get the best feasible solution?
Get best-known feasible answer after time limit
2.1k views Asked by Chris Hagmann At
2
There are 2 answers
0
MMSt
On
Have you tried using the Xn attribute, possibly in the combination with the SolutionNumber parameter? Although for your case you should keep the default 0 value of SolutionNumber.
You can start from here: http://www.gurobi.com/documentation/6.0/reference-manual/xn.
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in MATHEMATICAL-OPTIMIZATION
- Best way of finding KKT points for a Sympy polynomial
- CVXPY : Minimising with parameter set to 0 and minimising without parameter gives different answers
- Implementing Constraints in OPL Using CPLEX
- Assigning resources to consumers according lists of preferences
- Dynamic Pricing optimization with volume weighted price constraint
- About MATLAB intlinprog
- Trouble with Refinery Optimization Python Script
- How to handle nondeterministic objective function with scipy.optimization.differential_evolution?
- Non linear programming float decision variable in CPLEX
- If else then constraint to linearization
- How to write solution file for an LP problem with Coin-or Cbc Solver?
- Defining the value of one variable in a constraint in relation to another variable without making the problem nonlinear in Pyomo
- ortools solvers GLOP, PDLP instantly writes that the model is infeasible
- Is there a constraint to pieces of the stateFunction only go in ascending or descending order?
- issues with template <> during scip installation
Related Questions in LINEAR-PROGRAMMING
- Error in running a multi-level mixed effects model on microbiome data
- Distribute a list of positive numbers into a desired number of sets, aiming to have sums as close as possible between them
- Linearlization of quadratic constraint
- Linear program solver CBC seems to give 'optimal' solutions with different objective for the exact same problem (and code)
- PYOMO: LP Heat storage optimalization problem, I want to define the domain of a variable with discrete floats
- How to interpret shadow price array shape in Gekko
- Simultaneous Spacing and Duration Constraints with time gaps in Gekko
- Time-based spacing constraints in Gekko
- Dealing with Non-Optimal Solutions from Gekko
- How to use layered conditional constraints in Gekko
- How to enforce specific elements in a vector to be in an optimization solution in Gekko
- How to write solution file for an LP problem with Coin-or Cbc Solver?
- Randomized Relaxation of Complex Linear Assignment Problem
- ortools solvers GLOP, PDLP instantly writes that the model is infeasible
- Binary and Integer Program in Python
Related Questions in GUROBI
- PYOMO: LP Heat storage optimalization problem, I want to define the domain of a variable with discrete floats
- gurobi constraint to prevent repeated solution
- What is the role of Pyomo/JuMP/Yalmip in solving optimization model using Python/Julia/Matlab and Gurobi Solver?
- Gurobi unable to find the most optimal Link Utilization
- Python app unable to call a method from C# that uses a third party library (Can't Find Gurobi Dependency)
- Python Data to Dict handling
- How to define multiple indices for Gurobi with Python API where indices are of different data types and depend on each other?
- Gurobi License verification Error as invalid
- How to resolve gurobipy license/version incompatibility?
- How does Gurobi handle the Piecewise Linear constraints inside its core program?
- Python and Pyomo for multi objective optimisation
- GurobiError: No Gurobi license found
- Get real count of solutions of MIP Gurobi model
- How to use gurobi to describe the process of finding the rank of matrix?
- Parallelization of Gurobi with joblib on WLS License in Python
Related Questions in INTEGER-PROGRAMMING
- About MATLAB intlinprog
- Binary and Integer Program in Python
- Use min/max operator inside integer linear programming constraint
- Stuck formulating an adjacency constraint with pyomo
- Formulating a constraint with pyomo
- Does the Order of Modeling Affect Computational Speed in Pulp for Integer Programming Problems?
- Gekko not solving Integer Programming Problem
- Mibs exception FileNotFoundError: [Errno 2] No such file or directory: 'mibs.mps'
- PAO.Pyomo model sets two variables x and y to be unique
- How to implement non-zero count constraint for cvxpy in integer programming
- Keeping count of variable occurence in google OR Tools
- Order elements in a matrix based on another matrix
- How to convert the following if-else conditions to Linear integer programming constraints?
- How to define this complex labor rule as a constraint in MIP?
- setting a lower bound constraint based on condition in gekko
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
To obtain the best feasible answer so far, you should first verify that there is a feasible solution by checking the Status attribute on your model object, then querying the
Xattribute on your variable objects. If you have named your variables (with the name parameter on e neat way to do it with the python api is to create a dictionary with the nonzero values.