Questions tagged [constraint]
For questions related to constraints, i.e. any restriction or relation a set of decision variables has to satisfy.
311 questions
1
vote
0
answers
79
views
How can I express $ y \ln\!\left(1+\frac{x}{y}\right) \ge \frac{1}{u} $ as an exponential cone constraint?
I am an engineer trying to understand how to model the following inequality in a conic-optimization-compatible form:
$
y\ln\!\left(1+\frac{x}{y}\right) \ge \frac{1}{u}, \qquad x \ge 0,\; y>0,\; u&...
1
vote
1
answer
51
views
Percent change soft constraints in linear programming
In a linear program need to constrain the percent change between two decision variables, $a,b$ where the percent change formula, relative to $b$ is $\frac{a-b}{b}$.
I'm not sure that any arbitrary ...
0
votes
0
answers
35
views
Dual problem info for constraint relaxation in linear programming
Suppose that I have a number of what ideally would be hard constraints but I have reason to suspect that the problem might not be feasible. So I instead use soft constraints via slack variables.
...
2
votes
2
answers
156
views
What is the most efficient way to model an upper limit for sum of multiple decision variables in pyomo
This is somewhat related to this question. Here I consider the heat pump which mit be "fed" by different sources, which leads to different energy flows entering the heat pump. For example ...
1
vote
1
answer
77
views
How to model energy conservation constraint based on sign of decision variable
I model a battery with several energy flows flowing in and out, for example PV to battery $P^\mathrm{pb}_t\in\mathbb{R}_+$ (unidirectional), Battery to heat pump $P^\mathrm{bh}_t\in\mathbb{R}_+$ (...
0
votes
1
answer
142
views
How to prevent KeyError in indexed pyomo constraint
I try to implement an optimization in Python using pyomo.
It is a grid line with controllable loads and noncontrollable loads at certain nodes of the grid. What I try to implement is a constraint that ...
1
vote
0
answers
111
views
CPLEX doesn't respect the LazyConstraintCallback I added
I am trying to imitate the following code to implement some lazy cut myself.
https://github.com/IBMDecisionOptimization/docplex-examples/blob/master/examples/mp/callbacks/cut_callback.py
Here is my ...
1
vote
1
answer
224
views
How to properly present alternative mathematical constraints in an optimization model paper?
I have a rather "theoretical" question about the presentation of secondary conditions in a scientific paper. I have an MILP and now want to include various learning curves in this MILP. I ...
0
votes
1
answer
66
views
Linearize min function with a single variable
I have the following question. How can I linearize this expression?
$$x_{ij}=\min (1, y_{ij} +0.5)$$
I found this post, but there two variables are minimized and I was wondering if there is a shorter ...
0
votes
0
answers
81
views
Extending the Time Horizon to Handle Overlapping Patient Stays
I have the following problem. I have a planning model for the Patient to Therapist Assignment problem where I have the Length of Stay ($f_i$). I have the planning period of from $1$ to $K$, in which ...
0
votes
1
answer
170
views
Handling constraints with modulo operator
This is a follow-up question to this one. After consulting with my supervisor, we want to use the module operator for the days. Now there is a complication with the calculation of the LOS. This is ...
0
votes
1
answer
121
views
Adherence to end of planning horizon
I have the following question/problem. I have a scheduling problem where I minimize the length of stay. There are patients $i\in I$ and the planning period $t\in T$. Each patient has a predefined ...
1
vote
1
answer
134
views
How to incorporate fairness into scheduling model
I have the following problem. I have a scheduling problem with orders $i\in I$ that enter the system at different times $t\in T$. The objective is to minimize the total sum of days in the system over ...
1
vote
1
answer
147
views
Explaining propagation of the global cardinality constraint
I am using the generalized arc consistent algorithm from Regin, J. C. (1996) to propagate the global cardinality constraint. Values are removed from the domain of a variable if the variable node and ...
1
vote
0
answers
91
views
Efficient Algorithms for Resource Allocation with Asymmetric Constraints
Resource allocation problems frequently appear in operations research, where the goal is to allocate resources optimally under various constraints. While many classic formulations assume symmetric ...