Questions tagged [constraint]

For questions related to constraints, i.e. any restriction or relation a set of decision variables has to satisfy.

Filter by
Sorted by
Tagged with
9
votes
1answer
102 views

Static stochastic knapsack problem: unbounded version

In the static stochastic knapsack problem (SSKP) the weights $w_i$ of the items are distributed according to a probability distribution. Each item $i \in I$ can be selected at most once. So, ...
11
votes
3answers
881 views

Soft constraints and hard constraints

The terms "soft constraints" and "hard constraints" are used in the context of optimization modeling. Is there any standard way to figure out which is which in some of the complicated models?
9
votes
1answer
51 views

Change coefficient in PuLP

Once a model is implemented in PuLP, how do you change a coefficient (e.g., $a_{ij}$, $b_i$ or $c_j$) of a program of the from $\min\{c^{\top}x: Ax=b, x\geq0\}$? Specifically: How to update ...
10
votes
2answers
176 views

Fast validation of time windows in a routing problem

When solving a routing problem with time windows, unless you go for the arc-based math program that describes it, you have to check time windows "manually." For example, generating routes with any ...
3
votes
0answers
52 views

If and then constraint for a special case [duplicate]

I have the following constraint: $$f\geq C_1\left(d-z-E_1-E_2\right)+C_2\left(E_1+E_2\right).$$ Here $f, d,z\in \mathbb{R}_{\geq 0}$ and $y\in \{0,1\}$ are variables and $C_1$, $C_2$, $E_1$, and $E_2$...
11
votes
3answers
174 views

Is my approach to my internship project good? Optimal allocation of product across stores, constrained optimization

Context: I am a CS student currently in a non-CS internship (logistics, supply chain). My manager wants to leverage my knowledge of programming to build a program to solve the following problem: As ...
6
votes
1answer
272 views

KKT inequality conditions

Let's say I have an objective function $$f(x_1,x_2, \cdots, x_n)$$ and $N$ constraints $$x_i \ge 0. $$ I am trying to solve it with KKT conditions. Now the objective function becomes $$f(x_1,x_2,...
10
votes
1answer
368 views

How to formulate maximum function in a constraint?

How to formulate (linearize) a maximum function in a constraint? Suppose $C = \max \{c_1, c_2\}$, where both $c_1$ and $c_2$ are variables. If the objective function is minimizing $C$, then it can be ...
14
votes
1answer
108 views

Can we replace a binary variable with a continuous variable using a quadratic equality constraint?

Is it possible to replace a binary variable $x$ with a continuous variable that satisfies the quadratic equality constraint $x^2 - x=0$? The function $f(x) = x^2 -x$ is not a convex function. Can ...
14
votes
2answers
92 views

Is the Irreducible Infeasible Subset (IIS) of an LP unique?

The IIS is a standard part of most modern solvers, but is it unique for an LP? My intuition tells me that it should be, but I could find any proof.
11
votes
1answer
83 views

Difference between lazy callbacks and using lazy constraints directly

I'm trying to use lazy constraints to solve an optimization problem. In some software such as CPLEX or GUROBI, they have some tools to handle them directly (in the original model) or using callback ...
10
votes
3answers
222 views

How to handle real-world (soft) constraints in an optimization problem?

Cross-posted at Stats.SE (aka Cross Validated) I am working on a problem which involves optimizing for minimum power consumption in a large compressor network interconnected through pipelines (think ...
9
votes
4answers
116 views

Is there a canonical name for Score Folding (multiplying a priority soft constraint by a big weight)?

I've regularly encountered that there are too many constraints to categorize into just hard and soft constraints. For example: Physical constraints (very hard), e.g. 1 person can only be at 1 spot ...
13
votes
1answer
133 views

What is the difference between integer programming and constraint programming?

At first glance both approaches appear to be very similar. So, I wondered where lie the major differences between integer programming and constraint programming?
10
votes
1answer
67 views

Simplest way to eliminate redundant constraints due to a new cut

I have a polyhedral set for constraining $x$: \begin{align} \mathcal{P} = \{x \in \mathbb{R}^n_{+} : \ Dx \leq d \} \end{align} where $D \in \mathbb{R}^{m \times n}, d \in \mathbb{R}^m$. I find the ...
14
votes
2answers
182 views

In an integer program, how I can force a binary variable to equal 1 if some condition holds?

Suppose we have a binary or continuous variable $x$, a binary variable $y$, and a constant $b$, and we want to enforce a relationship like If $x \gtreqless b$, then $y = 1$. How can we write this ...
12
votes
1answer
125 views

2 stage stochastic programming to approximate many stage problems

There are many naturally multi-stage (i.e., more than two) stochastic programming problems that are approximated by a two-stage stochastic programming model due to the complete intractability of the '...
15
votes
1answer
173 views

Working with absolute values in constraint in a LP or MILP

Having all the approaches explained in the blog called "OR in an OB World" (this address) in my mind, I would like to ask the following question: What is the best practice to make a constraint linear ...