Questions tagged [pulp]

Questions relevant to the PuLP modelling framework in Python

Filter by
Sorted by
Tagged with
2 votes
1 answer
306 views

Representing Date Variables in Pulp

I am working on an optimisation problem that involves minimising shipping demurrage. I am struggling to model how to represent the difference, (x-y) between dates where the ship is ready to be loaded ...
cmp's user avatar
  • 327
2 votes
1 answer
515 views

Pulp Python: How to formulate a time-based variable for shipping demurrage

I am working on a shipping optimisation problem that aims to minimise demurrage charges as a result of low/insufficient inventory. I have daily vessel requirement (sales) data in the format ...
cmp's user avatar
  • 327
1 vote
2 answers
1k views

Pulp: slack variable to identify & measure extent infeasible in supply problem

I am currently modelling a supply problem that attempts to optimise a rail schedule which moves products from a production plant, to a warehouse to satisfy sales. The model is working fine (thanks in ...
cmp's user avatar
  • 327
3 votes
0 answers
97 views

Constraint equivalence in PuLP

I'm working on an optimization problem in PuLP and I have to enforce a daily minimum of shifts and a daily maximum of assigned shifts. I have the following constraints to ensure each day has a minimum ...
Joep's user avatar
  • 101
3 votes
1 answer
765 views

How to set these constraints in a linear optimization problem (PuLP)?

I am trying to implement an employee (nurse) scheduling problem and seek some advice on how to implement a specific constraint.The problem is as follows: There is a set of employees and days (both ...
Joep's user avatar
  • 101
2 votes
1 answer
615 views

How to enforce this specific constraint in PuLP?

I am trying to implement an employee (nurse) scheduling problem and seek some advice on how to implement a specific constraint.The problem is as follows: There is a set of employees and days (both ...
Joep's user avatar
  • 101
13 votes
2 answers
603 views

"Out of the box" Mixed Integer Programming Heuristics

I currently have a complex Mixed Integer Program (a sort of vehicle routing problem variant, with multiple vehicle types and without assigned pickup -> delivery routes, among other complications) ...
blahblah4252's user avatar
4 votes
1 answer
780 views

PuLP Transport Problem - How to add outcomes of decision variables together

I am working on a rail scheduling problem that moves product from a production plant to a storage facility to satisfy demand. I am new to PuLP so finding this difficult to understand why this isn't ...
cmp's user avatar
  • 327
6 votes
1 answer
569 views

Advanced Heuristics for MIP vehicle routing problem in PuLP

I am currently trying to speed up an MIP. An approach I was considering was to implement a cut callback heuristic with PuLP (one which rounds relaxed integer variables greater than .9 to 1). ...
ctyler9's user avatar
  • 63
7 votes
0 answers
147 views

Why does PuLP call copy for addition and how can I avoid it?

Using a for loop to append terms to an expression seems to be much faster than summing a group of terms all at once. Constructing the expression using a for loop uses __iadd__, which does not include ...
Charles Fox's user avatar
11 votes
1 answer
1k views

Change coefficient in PuLP

Once a model is implemented in PuLP, how do you change a coefficient (e.g., $a_{ij}$, $b_i$ or $c_j$) of a program of the from $\min\{c^{\top}x: Ax=b, x\geq0\}$? Specifically: How to update ...
Daniel Duque's user avatar
  • 1,345
8 votes
1 answer
1k views

Read an LP/MPS file in the PuLP

I was trying to read a MPS file by using the PuLP package in the Python, but I can't find any related documents on it. Does ...
A.Omidi's user avatar
  • 8,382
10 votes
1 answer
13k views

How do I access the value of a variable in PuLP?

In Python's PuLP package, how can I get the value of a decision variable? For example, if I declare a variable— ...
LarrySnyder610's user avatar

1
2