coin-or / pulp

A python Linear Programming API

Home Page:http://coin-or.github.io/pulp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FSCIP_CMD not recognized

woutkonings opened this issue · comments

Details for the issue

What did you do?

I installed SCIPOptSuite-8.0.3-win64-VS15.exe and pulp version 2.7.0.
SCIP_CMD is working fine for me when using solver = pulp.SCIP_CMD(path=solver_path=r"C:\Program Files\SCIPOptSuite 8.0.3\bin\scip.exe")
I tried to instantiate a 'FSCIP_CMD' solver. The parallelized version of SCIP_CMD, using:
solver = pulp.FSCIP_CMD(path=r"C:\Program Files\SCIPOptSuite 8.0.3\bin\fscip.exe")

What did you expect to see?

I expected the FSCIP to be autocompleted in VScode and the code to run normally, but it is not recognized as a class in the pulp library.

What did you see instead?

When trying to run the code using FSCIP_CMD, I got the following error:

Traceback (most recent call last):
  File "C:\Users\User\repos\Rolande_Logistic_Optimisation\python_solver\optimizer.py", line 170, in <module>
    m.run(solver_path=FSCIP_PATH)
  File "C:\Users\User\repos\Rolande_Logistic_Optimisation\python_solver\route_model.py", line 179, in run
    self.solve_problem(solver_path)
  File "C:\Users\User\repos\Rolande_Logistic_Optimisation\python_solver\route_model.py", line 160, in solve_problem
    status = self.problem.solve(solver=solver)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pulp\pulp.py", line 1913, in solve
    status = solver.actualSolve(self, **kwargs)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pulp\apis\scip_api.py", line 134, in actualSolve
    subprocess.check_call(proc, stdout=stdout, stderr=stderr)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\SCIPOptSuite 8.0.3\\bin\\fscip.exe', '-c', 'read "C:\\Users\\USER~1\\AppData\\Local\\Temp\\b8aad306ae3247fc871b96c2a67845fd-pulp.lp"', '-c', 'optimize', '-c', 'write solution "C:\\Users\\USER~1\\AppData\\Local\\Temp\\b8aad306ae3247fc871b96c2a67845fd-pulp.sol"', '-c', 'quit']' returned non-zero exit status 1.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( _version: Microsoft Windows 11 Business )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using python version:

  • 2.7
  • 3.4
  • 3.5
  • 3.6
  • Other: 3.10.11

I installed PuLP via:

Did you also

Uninstall pulp and then run python -m pip install git+https://github.com/coin-or/pulp.git. It installs same version for now (2.7.0) but when you pull from github it pull code associated to FSCIP. Works for me

I'm going to close the issue as the new version is now in pypi. Feel to open it again if the problem re-appears.