Questions tagged [discrete-optimization]

Discrete optimization deals with maximizing or minimizing an objective function by choosing values from within an allowed feasible set of possible values. The set of possible values for each variable is discrete, and often finite. Use this tag for questions about discrete optimization problems, or about algorithms for solving them.

32 questions
3
votes
1 answer

How to use sos1 with GEKKO Array in python?

I'm trying to solve an optimization problem using GEKKO where I have to set specific constraints regarding the values of the solution. I'm using sos1 to do that. However, I'm having a hard time trying to use sos1 with an GEKKO.Array(). If I use the…
2
votes
1 answer

OpenMDAO: discrete optimization problems; how to define the set of discrete variables?

I am trying to learn how to use OpenMDAO in order to solve discrete optimization problems. I saw that it was possible to define discrete variables…
2
votes
1 answer

facility location with OR-tools

i'm trying to write facility location MIP solution with OR tools. i translated a Scip solution, from here: https://scipbook.readthedocs.io/en/latest/flp.html but im getting a table with only zeros means a no solution.. is the framing of the problem…
2
votes
0 answers

Generate smallest tree for set of sets

Is there any known algorithm for building a tree from set of sets, using a minimum number of nodes? For example I have the following sets: 1. {A, B, C} 2. {B, C} 3. {D, B, A} 4. {C, A} Every set is represented by a path from root to a leaf. They…
1
vote
1 answer

Find the minimum vertex cover for a Bipartite Graph, if we are given the maximum Bipartite Matching

From Konig's Theorem, the size of Maximum Matching (|M|) and minimum vertex cover is the same. Now we can include both ends of the matching in the vertex cover to find a vertex cover, but its size will be 2|M|. So I considered choosing a matching…
1
vote
1 answer

ABC Puzzle- Constraint Satisfaction Problem

ABC is a logic puzzle on a board 5x5. In each row and column, there has to be exactly 3 letters(A,B,C) and 2 empty cells. Additionally for each row and column there is information about which is the first letter in that row/column. That does not…
1
vote
1 answer

Solving minimization problem over discrete matrices with constraints

I'm trying to solve an order minimization problem with python. Therefore I distribute M orders over N workers. Every worker has a basic energy-level X_i which is gathered in the vector X. Also, every order has a specific energy consumption E_j which…
1
vote
1 answer

Find function minimum for discrete variables w/ bounds and constraints

I'm trying to find a (relatively) fast way to minimise a function on the set of natural numbers given constraints and bounds. I know the mathematical form of the function and its constraints, so a brute force approach seems slow and not very…
1
vote
1 answer

Discrete optimization - selecting exactly N items from each row and column of a score matrix

Given a matrix of scores, I'd like to select exactly n elements from each column and each row such that the total score of the selected elements across the entire matrix will be as high as possible. Example: given the cost matrix…
0
votes
0 answers

Does the BayesOptSearch algorithm support discrete hyperparameter spaces in Ray Tune?

I am writing an example using Ray Tune with BayesOptSearch algorithm. However, I got an error at line "results = tuner.fit()" presents BayesOpt does not support parameters of type Categorical I am running Ray 2.5.1 on Ubuntu. The problem may be…
0
votes
0 answers

Python: How to fit data to a model (lmfit) that includes multiple breakpoints (discrete values)?

I would like to fit parameters p1-p6 into the function f(x1, x2) with multiple discrete conditions - the math would look like that: if (x1 > p4) & (x2 < p6): y = p1*x1 elif x1 > p5: y = p2*x2 else: y = p3 * np.maximum(x1, x2) I know how to…
0
votes
1 answer

How do I enforce mutual exclusivity for an LP problem using PuLP?

I made the following LP problem formulation in PuLP. We have an objective function with 5 decision variables, each with bounds. We also have 5 binary variables for each decision variable, in order to enforce mutual exclusivity between the first 3,…
0
votes
1 answer

Branch and bound method for rcpsp

How do I construct a tree in branch and bound method to solve rcpsp? Suppose, I have: 4 tasks that have durations d=[2,3,1,4] These tasks need resource_amount = [3,2,5,4] of resource that has capacity 6. And task 3 should be completed before start…
0
votes
0 answers

How to perform dynamic optimization for a nonlinear discrete optimization problem with nonlinear constraints, using non-linear solvers like SNOPT?

I am new to the field of optimization and I need help in the following optimization problem. I have tried to solve it using normal coding to make sure that I got he correct results. However, the results I got are different and I am not sure my way…
0
votes
0 answers

Obtaining Suboptimal Solutions with Benders in GAMS

I have the following Benders code for a maximization problem on GAMS. It happens that sometimes GAMS give an suboptimal solution even though it should find the exact solution, since no heuristics exist and Benders tolerance (BdTol= Upper Bound -…
1
2 3