0
votes

I am working on Business Problem for factory and developing Linear programming Solution. problem has thousands of Constraints and variables. I want to give priority sequence to constraints so that constraints which are lower in priority can be breached if no optimum solution.

My Question is how to Set the constraint priority sequnece for CPLEX/Gurobi Solver.I am using java as language ,Do we have any specific format/function etc?

1
Welcome to Stack Overflow. Please read "How to Ask" including the links. Your question is very broad as we don't know your expertise level so good answers would border on a tutorial, which isn't what SO is for. We'd like to see your effort toward solving the problem: Where did you search and why didn't those pages tell you what you need, and, what did you try and what's wrong with your code? meta.stackoverflow.com/q/261592/128421 is very useful reading. - the Tin Man

1 Answers

2
votes

This is usually done at the modeling level. Add slacks to the equations, and add a term to the objective that minimizes the slack using a penalty or cost coefficient. Sometimes you can even use some dollar figures for the cost (e.g. storage capacity constraint: then cost is something like the price of renting extra storage space). This process is sometimes called making the model elastic, or introducing hard and soft constraints and is quite often used in practical models.