question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formulate master pulp by columns

See original GitHub issue

As mentioned here, for the diving heuristic to work, for some speed up, it would be good to rework master_solve_pulp.py such that it doesn’t have to be reformulated in every iteration of the column generation procedure.

For a column generation friendly way of updating the constraints, one can formulate the problem by columns (seen an example).

The idea is to

  1. create empty constraints using pulp.LpConstraintVar, with only the sign (<=, >=) and RHS specified.
  2. Then place variables pulp.LpVariable in already existing constraints with the appropriate coefficient, using the e parameter. Here, one can use pulp operations like pulp.lpSum to add variables to multiple constraints at once (this can be seen in the example)

To update the constraints throughout the column generation procedure, the constraints has have to preserved. For example as a dictionary in an attribute.

Constraints Converted

  • Set Covering
  • Vehicle bound

Variables Converted

  • route selecting (y)
    • Simplest case
    • With vehicle bound
  • Drop
  • Artificial

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
torressacommented, Jun 25, 2020

@Kuifje02 @Halvaros Just ran the new version on the Solomon instance and comparing with the old (OLD) comp results from https://github.com/Kuifje02/vrpy/issues/8#issuecomment-612176272. We get some pretty amazing speed up! Average of over 10,000% faster and scales a lot better! speed_up Needs more testing but definitely faster

1reaction
Kuifje02commented, Jun 16, 2020

Excellent idea !

Another very simple example with explanations can be found here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Columnwise formulation · Discussion #335 · coin-or/pulp
I am working on a columnwise formulation with pulp and am encountering a problem. The difficulty comes from the fact that iteratively, new...
Read more >
Column Generation Techniques - Medium
The master problem is the original column-wise formulation of the problem with only a subset of variables being considered. The sub-problem is a ......
Read more >
PuLP slow adding constraints? - Google Groups
I am trying to use PuLP for a large set of problems. One of my test problems has about 4000 constraints and 67...
Read more >
Formulate Master 8ft Straight Fabric Backwall - Orbus
The Formulate Master 8ft Straight Fabric Backwall is a display that combines fabric coverings & aluminum structures. Browse 8ft exhibit booth walls.
Read more >
Solving Single Depot Capacitated Vehicle Routing Problem ...
We develop a column generation approach based on Dantzig-Wolfe decomposition. CVRPTW is decomposed into two problems, the master problem, and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found