198 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
182
views
CP-SAT: normalization for multi-objective optimization
I'm working on a multi-objective optimization problem using CP-SAT, where I combine several objectives into a single objective using a weighted sum approach. All my objective terms are positive-valued,...
1
vote
1
answer
115
views
Pyomo not respecting constraint
I'm having a problem and I'm hoping you could help me.
I have a constraint such as follows:
def grid_power_calculation_with_balance(model, t):
if t == 0:
return model.P_grid[t] == 0
...
0
votes
0
answers
63
views
2-DVRP using optaplanner: problem of efficiently routing two different vehicle entities, one is dependent on the other
I have a problem statement, where we need to optimize the two agents of vehicles. One is a service vehicle and the others are service engineers. The service vehicles are supposed to reach multiple ...
0
votes
1
answer
90
views
Is there a bug in the "TransitiveClosure" function of Z3-Solver?
Here's the code of a simple example using TransitiveClosure.
from z3 import *
def compute_transitive_closure(graph):
num_nodes = len(graph)
# Create a Z3 context
ctx = Context()
# ...
0
votes
0
answers
69
views
How to set constraint for optimisation problem to keep to continuity of allocation problem?
I want to allocate 20 districts on a map to 4 institutions. Below are the data I have.
district = {'d1', 'd2', ..., 'd20'}
institution = {'i1', 'i2', 'i3', 'i4'}
distance_in_km = {
'd1': [['i1', ...
0
votes
0
answers
65
views
SCIP-SDP for solving mixed integer semidefinite programs
I have been looking at SCIP, specifically SCIP-SDP for solving a mixed semidefinite program - however I can't seem to find any examples on how I implement it in Python with PySCIPOpt.
Does anyone know ...
0
votes
0
answers
121
views
Pyomo Mixed Integer Programming : how to turn a binary variable equal to 1 if values of a variable exceed a certain threshold for the first time?
I want a binary variable, $inv_year,ドル to indicate the investment year, i.e., the year where the investment variable, $I,ドル turns greater than zero for the first time. Both variables ($inv_year$ and $I$)...
0
votes
0
answers
123
views
GAMS: How to write x(i,j) is not equal to x(i,j) as a constraint to a integer linear programming model?
I thought of the equation to be
x(i,j)+x(j,i)-1 =l= 0
however, gams does not allow you to change the location of the indices. Does anyone have an idea on how to approach this?
I tried to write this
x(...
0
votes
1
answer
141
views
Confusion about Google OR-Tools' CVRP solver
I am using the Google OR-Tools' CVRP solver to solve CVRP instances (using different (meta)heuristics). I am, however, having some confusion and questions about the entirety of the code. Namely:
It ...
1
vote
0
answers
45
views
Is this possible within optimization framework?
I am new to operations research, so would really appreciate your help. I don't know if this is possible to do within the OR framework, but here's the problem. Suppose I have a set of SKUs, their ...
2
votes
1
answer
209
views
Idiomatic way to simulate a multi-node servicing queue without a loop with Polars?
I am simulating a first-in, first-out servicing queue with a parameterized number of servicing nodes. I'd like to create a user-defined function or Polars expression (in Python or as a Rust plugin is ...
0
votes
1
answer
341
views
Dynamically increasing lower bound in CP-SAT from Google's OR tools
I was wondering if there was a way to dynamically increasing the lower-bound of a variable in the on_solution_callback(self) method?
This was just one approach I'd thought of.
I have an array of ...
0
votes
1
answer
146
views
Keeping count of variable occurence in google OR Tools
I'm playing around with OR Tools, just wondering if there is any way to hold the number of times a certain constraint is satisfied?
In this case, I'd like to keep track of the number of times my 'diff'...
0
votes
1
answer
196
views
Determining if a linear program is self-dual?
I want to show that if $A$ is a skew-symmetric $n\times n$ matrix
($A^{T}=-A$ ) and $c\in \mathbb{R}^{n},$ then
$$\begin{array}{cc} \max & c^{T}x \\ s.t. & Ax\geq c \\ & x\geq 0 \end{...
0
votes
1
answer
535
views
Creating custom constraints in google's OR-Tools CP-SAT in python
I have just started learning about constraint programming, so excuse me if my question might be something very trivial.
The main motivation was to optimize a problem I've already solved via brute ...