Questions tagged [optimization]

For questions involving mathematical problems that aim to minimize or maximize some objective function, possibly subject to one or more constraints.

Filter by
Sorted by
Tagged with
2 votes
0 answers
23 views

Simplification of nonlinear constraint for optimization

I solve a nonlinear optimization problem with constraint $$ \sum_{j=1}^S \ln \Bigg( \Big(1 -x_j c_k + y_j d_k\Big)^2 + \Big( x_j d_k + y_j c_k \Big)^2 \Bigg) \leq 0, \: k = 1, \dots , K $$ where the ...
user avatar
  • 261
-2 votes
0 answers
29 views

How can I insert condition into constraint index in python?

def Co1_rule(m1,i,k): A=A1[i] return sum(m1.xikjl[i,k,j,l] for j in A for l in L if i!=j) == m1.yik[i,k] model.Co1= Constraint(I,K, rule=Co1_rule) ...
user avatar
  • 1
2 votes
0 answers
36 views

Determining the number of nodes within a cycle for an MILP problem

I have a MILP problem that requires knowing the number of nodes within a cycle (there will be multiple depending on inputs). I believe this will involve tracing nodes/values within cycles using the ...
user avatar
7 votes
1 answer
263 views

Nonlinear optimization with constraint involving long product of optimization variables

I solve a nonlinear optimization problem of the form \begin{align} &\max x_0 \text{ such that } \\ &\left[ \sum_{j=0}^N \left(\alpha_j x_0^{j} \prod_{k=3}^j x_k \right)\right]^2 + \left[ \...
user avatar
  • 261
-3 votes
0 answers
39 views

Stochastic gradient descent on the sphere

Fix initial data $x_0^i$ for $i=1,\dots n$, which are i.i.d. distributed by a probability measure $\mu_0$ on the unit sphere ($\|x_0\|_2=1$). Define $H=\sum_{i,j=1}^n J_{ij}x_t^ix_t^j$ with $J_{ij}\...
user avatar
  • 95
4 votes
1 answer
107 views

Geometric Programming with Simple Affine Equality Constraint

Consider a Geometric Program (GP), $$ \begin{array}{cl} \operatorname{minimize} & f_{0}(x) \\ \text { subject to } & f_{i}(x) \leq 1, \quad i=1, \ldots, m, \\ & g_{i}(x)=1, \quad i=1, \...
user avatar
2 votes
1 answer
75 views

Np-hard sequencing or packing problems with total ordering between elements

I would like to know if anyone is aware of any Np-hard problems in scheduling or packing where there is total ordering between tasks or items to be packed together. The objective can be anything. For ...
user avatar
2 votes
1 answer
143 views

Linearize function

I have a facility location problem with a non-linear objective; There are fixed costs $S_j$ to opening facility $j$ $Y_j$ is a binary, $1$ if facility $j$ is opened, $0$ otherwise $D_j$ is the number ...
user avatar
3 votes
1 answer
86 views

Optimization software for real-valued functions/constraints of complex arguments

I am interested in an optimization problem of the form $$\min_{\boldsymbol z} \max_j \vert f_j(\boldsymbol z) \vert = \min_{\boldsymbol z} \Vert f_j(\boldsymbol z) \Vert_\infty. $$ Here, the ...
user avatar
  • 261
0 votes
1 answer
54 views

Can Expected value of perfect information be zero?

I tried to find the Expected Value of Perfect Information (EVPI) and the Value of the Stochastic Solution (VSS) of the following problem. Consider a farmer who specializes in raising wheat, corn, and ...
user avatar
  • 149
2 votes
0 answers
53 views

Type of combinatorial problem

I'm looking at a problem that looks as follows: $$ C = \sum_{i =1}^N\sum_{j<i} ( A_{ij} - B_{{P(i)P(j)}} )^2 $$ where $A$ and $B$ are square matrices and $P$ is a permutation matrix mapping all $i \...
user avatar
  • 29
6 votes
1 answer
90 views

When was the exploration and exploitation tradeoff first mentioned in literature?

I've recently been exploring Reinforcement Learning (RL) methods in my work and the exploration-exploitation dilemma is always mentioned. It almost feels like the exploration-exploitation dilemma ...
user avatar
  • 335
3 votes
1 answer
236 views

Correct way to add slack variables to model

I want to add slack variables to the following feasibility problem. Optimally I want the sum of the slack variables to be zero. Given the problem $$\min 0$$ s.t. $$e(x) = 0$$ $$l(x) \leq 0$$ $$g(x) \...
user avatar
0 votes
1 answer
58 views

calculations after the docplex solution

After solving the problem with docplex and having the decision variables' values, can I do some calculations in the code with decision variables? ...
user avatar
  • 307
1 vote
2 answers
62 views

Adding cuts doesn't change the solution of master problem in Benders decomposition

From the problem Unbounded master problem in Benders decomposition, it can happen that after adding cuts the master problem is still unbounded. The answers in the post suggest adding bound for the ...
user avatar
3 votes
3 answers
561 views

Unbounded master problem in Benders decomposition

After a few iterations, my master problem with optimality cuts is still unbounded. I wonder if it's possible in theory? If it's possible, how to deal with the unbounded master problem?
user avatar
4 votes
1 answer
149 views

large scale optimization with Python

I am dealing with the following optimization problem: $$ \underset{x}{\min} q(x) $$ subject to $$ l_{x} \leq x \leq u_{x} \,\,\,\, \text{ and } \,\,\,\, l_{a} \leq Ax \leq u_{a}. $$ where $q(x)$ is a ...
user avatar
  • 43
1 vote
0 answers
52 views

How to solve this user packing problem?

This optimization problem is very similar to How to model this user packing problem? I have a system with $N$ resources. There are $K$ users in the system demanding these resources. The demand of ...
user avatar
-1 votes
0 answers
72 views

KKT model of Mixed Integer Model with global optimality

As the Gurobi solver claims, it can provide optimal global solutions to nonconvex quadratic optimization problems. With this in mind, it is possible to write the "KKT" model for "Mixed ...
user avatar
6 votes
2 answers
518 views

How to solve Rogo Puzzle with an extra constraint?

Given a n×m grid with numbered cells and forbidden cells, the objective of the Rogo puzzle is to find a loop of fixed length through the grid such that the sum of the numbers in the cells on the loop ...
user avatar
2 votes
0 answers
102 views

Trying to add lazy constraints to traveling salesman problem

For a simple traveling salesman problem, I am trying to add the "miller-tucker-zemlin subtour elimination constraints" by using ILOLAZYCONSTRAINTCALLBACK. ...
user avatar
2 votes
1 answer
94 views

Restriction on gurobipy problem

The main problem is the optimization of the filling of a tank, filling it in cheap periods and extracting in expensive periods to sell. I am using Python and gurobipy. I am not able to model this ...
user avatar
  • 49
7 votes
3 answers
233 views

Training ML models to be used as objectives in optimization problems

Suppose that we have data (in my case, from a chemical process) which includes input data $X$ (characteristic of the material to be processed) and decision data $Y$ (decisions taken by operators to ...
user avatar
  • 803
1 vote
2 answers
125 views

How to solve assignment problem with additional constraints?

The assignment problem is defined as: Let there be n agents and m tasks. Any agent can be assigned to perform any task, incurring some costs that may vary depending on the agent-task assignment. We ...
user avatar
  • 21
3 votes
2 answers
126 views

How to input this LP model of a buffer allocation problem in Gurobi?

I am doing research on optimizing a simple buffer allocation and need to run my model. I am new to this but someone told me about using Gurobi and I do not for the life of me know how to create the ...
user avatar
  • 39
5 votes
2 answers
389 views

Quadratically constrained convex optimization

I have tried to convert the following constraint into SOCP form but can't figure it out. My issue is that whenever I create the norm, the other side has to be square rooted which invalidates the SOCP ...
user avatar
2 votes
0 answers
46 views

Coordinate descent for constrained least squares

I have a least squares problem of the form \begin{align}\min_{\vec{a}}&\quad\|\vec{y} - X\vec{a}\|^2 \\\text{s.t.}&\quad\|\vec{a}_{I}\|^2 \leq 1,\\&\quad I \in A\end{align} where $\vec{a}_{...
user avatar
5 votes
2 answers
491 views

Julia JuMP successive optimization

I am using Julia's JuMP package to solve a cutting-plane method. Namely, I solve a sub-problem, find the most-violated constraint in the master problem, add that to ...
user avatar
2 votes
1 answer
169 views

How to formulate cumulative sum of LpVariable in Pulp Python

I have a Multiple product LP optimization problem in which the product(B1,B2,D) will be received in variable quantity with respect to date column. The Optimizer should LP variable Output as Assy Out ...
user avatar
2 votes
1 answer
57 views

Interchange upper- and lower-level decision variables in bi-level programming

Consider a general bi-level programming as follows: \begin{align*} \min_{x\in X,y\in Y}&~F(x,y) \\ s.t.&~ G(x,y) \leq 0, \\ &~ y\in \arg\min_{z\in Y}\{f(x,z): ...
user avatar
  • 37
6 votes
2 answers
368 views

Fleet Management: How to allocate vehicles between departments

Assume that I have data about a regular big company (not a salesman problem). data contains of every department's (marketing, finance, production, etc.) vehicle size, GPS track values, duration of ...
user avatar
5 votes
2 answers
143 views

Lin-Kernighan TSP edge choice

Step 4a of the original paper describing the Lin-Kernighan TSP algorithm states that the choice of edge $x_i = (t_{2i}, t_{2i+1})$ to be deleted is uniquely determined by the choice of edge $y_{i-1} =...
user avatar
1 vote
0 answers
63 views

How to solve this problem with Gurobi add-in Opensolver excel

My main problem is that, when I try to solve an optimization using Gurobi with the OpenSolver add-in, I get the error that there is no feasible solution. To summarize, my variable $X_i$ has a maximum ...
user avatar
  • 49
5 votes
3 answers
784 views

how to "calm down" optimizer

I want to optimize a charging schedule for Battery Electric Vehicles (BEV) along a grid line, taking into account customer wishes (when to be done with charging with what State of Charge (SOC)) and ...
user avatar
  • 231
2 votes
1 answer
99 views

Passing exact number of allocations as constraint to pyomo in a sourcing problem

I am solving a sourcing allocation optimization problem. Here I have let's say two brands. Each brand has a raw material demand across the 3 plants (Demand in kg) Brand 1 Brand2 Plant 1 3000 2000 ...
user avatar
5 votes
0 answers
97 views

What kind of packing problem is this?

I have the following problem which seems related to the packing problem. I have a grid of same size rectangles and a polygon on which this grid of rectangles needs to be placed such that the number of ...
user avatar
  • 51
8 votes
4 answers
243 views

Common problems/puzzles that can creatively be solved with linear programming?

I am interested in common problems/puzzles that have a clear set of rules/constraints and objective that lends itself to modeled and solved with a linear program. Especially for people new to LPs, I ...
user avatar
  • 433
0 votes
2 answers
104 views

What kind of problem is this : LP , Multi-objective , other?

I started studying Operations Research (OR) recently and I faced a problem in which I struggled to model it using the traditional LP models. After some attempts, I'm not sure if such a problem is a ...
user avatar
  • 109
0 votes
0 answers
63 views

Decision whether to serve the current table now or skip it

Can the following problem be formulated as a LP/IP problem, where an agent (waiter) that has just arrived at a certain table has to decide whether to visit that table now, or skip the current table ...
user avatar
1 vote
0 answers
33 views

Blended or hierarchical objectives if solving speed is more important

When optimizing a two objective task assignment problem, is it generally better to use blended objectives or hierarchical objectives if the speed to obtaining a near-optimal solution is more ...
user avatar
  • 179
5 votes
2 answers
749 views

Knapsack - How to optimize bonuses for each pair of items

I am trying to solve a variation of the knapsack problem where every pair of items in my knapsack has a bonus or penalty associated with it. My knapsack can hold a dozen items There are thousands of ...
user avatar
  • 197
2 votes
1 answer
63 views

How to optimize multiple linear regressions based on cost?

I have an optimization problem where I'd like to maximize revenue and I have separate variables for cost and revenue. Building a single unit of a product takes 100 hours of labor I have a list of ...
user avatar
  • 197
1 vote
0 answers
66 views

How to use ampl.lic in Pyomo

I have the licence of some solvers and I want to use these solvers in Pyomo. The licence file is ampl.lic and my machine is Macbook. I have an executable file for Baron solver which is only for demo ...
user avatar
  • 77
3 votes
3 answers
399 views

Converting if conditions to linear constraints

I have an optimization problem and I want to convert the following if conditions to linear constraints: If $(y_1 > U_1)$ and $(m_1)$ and $(E_1)$ then $x_1=1$ If $(y_2 > U_2)$ and $(m_2)$ and $(...
user avatar
  • 77
1 vote
1 answer
26 views

dual cycle data generation

I want to generate 2x6 dataframe which represents a rack to optimizing a dual cycle in optimizing warehouse.Half of this dataframe are filled with storage items and the other half is with retrieval ...
user avatar
  • 307
4 votes
2 answers
84 views

How to bundle pairs of trips?

I have a database of real-time optional trip demands. Each with a load that needs to be delivered from a departure point to a destination: ...
user avatar
  • 41
5 votes
1 answer
436 views

How to model a max-min-max problem?

Everyone knows how to model max-min or min-max problems. I have a problem with objective to maximize min-max. So it can be called as a max-min-max problem. Any ideas how to model it efficiently? The ...
user avatar
  • 61
6 votes
1 answer
108 views

Compute Scaling factor(s) for linear constraint ($A@x<b$)

We optimize large-scale optimization problems with tens of thousands of variables and constraints with Cvxpy + Commercial solvers (e.g. Gurobi, Mosek). The coefficient range easily exceeds the ...
user avatar
  • 430
4 votes
1 answer
136 views

Mathematically formulating formal problem of a cloud service scheduler

So, I have been tasked to create a formal mathematical description of problem statement on a cloud service scheduler for my team's university project, which is, honestly, a little weird of a thing to ...
user avatar
  • 79
2 votes
0 answers
43 views

How to generate hard instances for number partitioning?

I am trying to compare the performance of some algorithms for multiway number partitioning. I run them on randm instances that I generate with Python's numpy: ...
user avatar

1
2 3 4 5
15