When I use the CBC command line, there is no problem,the command line like that :
import os
os.system( "cbc example.lp solve solu /mnt/d/sol.txt")
I do it all in WSL (ubuntu20. LTS), there is the model of LP file:
example.txt
(please change name example.txt to example.lp, because github can't upload lp file.
you can try this code to read example.lp file and solve it :
m = mip.Model(name='example', sense=mip.MINIMIZE, solver_name='CBC')
m = mip.model()
m.read(lp_file)
m.seconds=30
m.mipgap=0.05
m.solve()
hi, Sometimes the mip model can be solved normally, sometimes there are errors,like that:
When I use the CBC command line, there is no problem,the command line like that :
I do it all in WSL (ubuntu20. LTS), there is the model of LP file: example.txt (please change name example.txt to example.lp, because github can't upload lp file.
you can try this code to read example.lp file and solve it :
thanks.