Skip to main content
Filter by
Sorted by
Tagged with
2 votes
3 answers
124 views

i have a list of Hitters in python with their name,projection and Positions juan-soto 30.3773 ['OF'] kyle-tucker 44.0626 ['OF'] ... yordan-alvarez 32.510200000000005 ['CI', 'OF'] william-contreras 26....
markus's user avatar
  • 21
0 votes
1 answer
141 views

I've created a small program using the java clp implementation https://github.com/quantego/clp-java. Sometimes the solution returns decimals, which I don't want as the variables that I'm using are ...
Wouter's user avatar
  • 185
-1 votes
2 answers
67 views

I have a LP/IP problem that I'm trying to solve using PuLP. It is the division of work amongst employees. The thing that I can't figure out is how to limit the engine to only plan 1 employee on an ...
Paul's user avatar
  • 1,897
0 votes
1 answer
110 views

I have a binary/integer program that I am trying to solve using milp in Python. Below the image and below is the code I have so far. When I run it, I get `bounds.lb` and `bounds.ub` must contain ...
gunsnfloyd's user avatar
1 vote
1 answer
92 views

I'm trying to assign attributes into a 3 x 3 matrix based on an adjacency constraint, but I'm stuck formulating the adjacency constraint. I keep thinking I've got the answer, then when I try it the ...
Ryan's user avatar
  • 3,729
2 votes
1 answer
119 views

I am currently solving an integer programming problem using Pulp. I am aware that the order of statements in Pulp modeling can affect the outcome of the computations. However, I am curious to know if ...
たかひろ's user avatar
0 votes
1 answer
139 views

The background is I am trying to implement a bilevel optimization program using Python-based package for Adversarial Optimization (PAO), which is based on Pyomo. I am new to Pyomo, though I have used ...
Francis's user avatar
  • 199
0 votes
1 answer
135 views

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'...
thehumbling's user avatar
0 votes
1 answer
201 views

if x ≥ 100, then x -100 + p(x) ≤ 0; else p(x) ≤ 0 p(x) is a linear function. We can add x ≥ 0 if it could make it easy. I tried to make a binary variable z, if x ≥ 100, then z=1; else z=0. Then we got ...
Yinuo SHI's user avatar
2 votes
1 answer
86 views

I am trying to set up something similar to the facility location problem using gekko in python. I'm trying to minimize the distance between a set of facilities and corresponding counties while ...
finman69's user avatar
  • 311
0 votes
1 answer
105 views

I'm working on a binary integer programming problem using pulp. I have a vector X = [x_1, x_2, x_3, . . . , x_n]. I have enforced a number of simple constraints. I have a bunch of groups in the data ...
user16668649's user avatar
2 votes
2 answers
109 views

I have a vector of 100 integers, x1, where each element of the vector is in [1, 7]. I want to find, using R, another vector of 100 elements, x2, also containing integers ranging from 1 to 7, that ...
Edward's user avatar
  • 22.2k
0 votes
2 answers
727 views

I want to use Gurobi with python-mip. I run the following: from mip import Model, GUROBI Model("test_problem", solver_name=GUROBI) I receive the following error: InterfacingError('Gurobi ...
Sean Kelley's user avatar
0 votes
1 answer
99 views

I am using R to find the set of values that maximise a certain function (the function is given here by obj_fun). The problem is that for a large number of the parameter pD, I get an integer overflow ...
HeyCool08's user avatar
0 votes
1 answer
156 views

I have a decision variable vector n, and a is a constant vector. What confuses me is why lpDot(a,n) is not equivalent to lpSum([a[i] * n[i] for i in range(N)]) in a constraint? Here is the code: ...
Yfiua's user avatar
  • 418
0 votes
1 answer
277 views

I have the below dataframe: import itertools import pandas as pd import numpy as np p1_values = np.arange(19, 29.1, 0.1) p2_values = np.arange(23, 33.1, 0.1) p3_values = np.arange(36, 46.1, 0.1) ...
Manny's user avatar
  • 63
0 votes
0 answers
33 views

In a Milp, given an integer variable x, I would like to define a variable y which will be the absolute value of x. y = |x| x is bounded between [M, -M]. Is it even possible? Thank you!
BladesV's user avatar
  • 103
1 vote
2 answers
1k views

I am new to integer optimization. I am trying to solve the following large (although not that large) binary linear optimization problem: max_{x} x_1+x_2+...+x_n subject to: A*x <= b ; x_i is binary ...
Francisco Espinosa's user avatar
1 vote
1 answer
435 views

I found a solution for just one term here. How can we formulate constraints of the form |x1- a1| +|x2-a2| + .... + |xn - an| >= K in Mixed Integer Linear Programming ?
Vinay's user avatar
  • 1,281
0 votes
1 answer
140 views

I have a finite number of staff N, and I need to find an optimal schedule (using the least number of staff) meeting the demand Hour of Day Demand 0 d0 1 d1 ... ... 23 d23 where the d0, d1, ..., d23 ...
Elis's user avatar
  • 54
0 votes
1 answer
75 views

The goal of the docplex model below is to choose the trucks with total minimum cost to fulfill all orders. I treat the truck type as 1 truck in the following code, but in fact, a truck type can have ...
william007's user avatar
  • 18.8k
0 votes
0 answers
282 views

Let A be a list of n lists of m non-negative integers, such that for all j there is i with A[i][j] nonzero. Let V be a list of m positive integers. Question: What is the fastest way to find all the ...
Sebastien Palcoux's user avatar
2 votes
1 answer
862 views

These are the conditions: if(x > 0) { y >= a; z <= b; } It is quite easy to convert the conditions into Linear Programming constraints if x were binary variable. But I am not finding ...
whitehatjrbhups's user avatar
0 votes
0 answers
315 views

I am creating an integer program in Python using pyomo for Major League Baseball (MLB) daily fantasy. Given a lineup of 10 players (1 of each position plus 2 pitchers) and a salary cap, the program ...
JRP's user avatar
  • 135
0 votes
1 answer
212 views

I am trying to formulate an MIP model in which a transportation can be performed by available trains or new ship investments. My current code includes three tables: Monthly costs for trains, monthly ...
user avatar

1
2 3 4 5
7