pulp icon indicating copy to clipboard operation
pulp copied to clipboard

options setting in different solver apis can be unified

Open ben-xj opened this issue 2 years ago • 0 comments

Describe the new feature

When using pulp, I found that if i want to pass custom parameter settings to different solver api, the format differs. Let's compare cbc with gurobi as an example:

if self.solver == "cbc":
    self.prob.solve(
      pulp.PULP_CBC_CMD(
      options=["startalg", "barrier", "crossover", "0"]))
elif self.solver == "gurobi":
    self.prob.solve(
      pulp.GUROBI_CMD(
        options=[("Method", 2),  ("Crossover", 0)]))

From an ease-of-use point of view, this interface can be unified at the user level for all solver interfaces. (I prefer gurobi way btw since it's a clear (key, value) representation.)

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

No

Does this feature exist in another product or project? Please provide a link.

No

ben-xj avatar Mar 21 '23 02:03 ben-xj