All Questions
24 questions
0
votes
0
answers
53
views
How can i turn a set of points and a seperating line into a linear program solvable in python? (Marriage before conquest algorithm)
I'm currently working on a project where i'm implementing the marriage before conquest algorithm for finding the convex hull of a set of points.
One step involves separating my set of points by a line,...
1
vote
3
answers
923
views
Find min max range of multiple variables the results in maximum PnL
Given a table of N columns, all columns except last are variables and the last column is PnL (Profit and Loss). Each variable value is a whole number (no fractions, decimals) greater than or equals 0 ...
0
votes
1
answer
129
views
Algorithm-finding-dedicated-sum-from-the-population-of-variables
I need a way of finding an exact value made of the sum of variables chosen from the population. The algorithm can find just the first solution or all. So we can have 10, 20, or 30 different numbers ...
3
votes
1
answer
148
views
Integer Programming for NNC
I'm trying to implement Integer Programming for Nearest Neighbor Classifier in python using cvxpy.
Short intro
Given a dataset of n points with a color (red or blue) we would like to choose the ...
0
votes
1
answer
622
views
Adding decision variables in gurobi
I am new to gurobipy and I am trying to model this linear program the objective value and constraints are seen in this picture:
This is the code I have written for the objective function and ...
-4
votes
1
answer
79
views
Looking for an algorithm
I have a very long "list" of numbers ( maybe thousands ) which may be grouped, by sum into "n" groups. The number of groups and values are given. For example:
List of numbers: [1, ...
1
vote
1
answer
164
views
Variation on linear programming?
I'm trying to find an existing algorithm for the following problem:
i.e, let's say we have 3 variables, x, y, z (all must be integers).
I want to find values for all variables that MUST match some ...
1
vote
1
answer
481
views
How do I find an optimal combination when an exhaustive search would take way too long?
Disclaimer: I'm a complete amateur with no formal training who's just taught himself a bit of C# and Python
There 47 slots. Each one must be filled by one item.
These slots are split into 8 groups.
...
1
vote
0
answers
102
views
Algorithm to find best combination of departments
Assume I have a set of departments in say a hospital, each department has it's own running cost. Additionally, some departments can be combined which will result in a running cost lower then the ...
-2
votes
1
answer
101
views
Minimize number of shoppers used while buying all items
We have N shoppers with 100$ each and a list of M items that each cost [0-50$] (integer only) .
We need to buy all the items with the following requirements -
Minimize the number of shoppers used
If ...
0
votes
1
answer
312
views
Minimize number of shops while reaching all customers
In this particular issue, I have an imaginary city divided into squares - basically a MxN grid of squares covering the city. M and N can be relatively big, so I have cases with more than 40,000 square ...
1
vote
1
answer
342
views
Python Value Optimization - LP, Genetic algorithm?
Hope everyone is ok and safe at home!
I have the following problem:
A number of "N" machines, and each machine can have a number of "M" states. Each state have different power level. My goal is to ...
1
vote
2
answers
6k
views
L1-Norm minimization
I am trying to minimize the following function using Linear programming. I am unable to include the image of my objective function. Click this Objective Function to view what I am trying to optimize. ...
1
vote
4
answers
2k
views
Finding the sum of minimum distance from the points in one list to points in other list?
I have two lists containing x and y number of n-dimensional points respectively. I had to calculate the sum of minimum distances of each point in list one (containing x points) from each point in ...
10
votes
2
answers
844
views
Maximize consumption Energy
There are three types of foods were provided i.e. meat, cake and pizza
and N different stores selling it where, i can only pick one type of food from
each store. Also I can only buy items in A, B and ...