Open fgunyel opened 2 years ago
If you are using Windows, you might still need to add the installation path to your path variable. Please see the CBC installation instructions, or follow https://oemof-solph.readthedocs.io/en/latest/readme.html#installing-a-solver
Yes, that is exactly what I am looking for. The problem is that I am not able to specify the path for the "settings" since it does only take the solver name as input, but not where it is located. It must be something right:
settings = dict(solver='cbc', path=e.g. C:/Users/Somebody/my_program, .....)
The cbc is already succesfully installed in the PC.
You need to add the solver to your PATH variable in Windows before. This has nothing to do with DHNx and the attributes of the optimisation method. Please see https://www.computerhope.com/issues/ch000549.htm
Thank you Johannes. I am working on Google Colab. I will try to find a way to define path variables there if I can. If I succeed, I put an update here.
!apt-get install -y -qq coinor-cbc import os !export cbc='/usr/bin/cbc' os.environ['cbc'] ='/usr/bin/cbc
The above code in Google Colab solves the problem, prior to calling cbc. Great!
settings = dict(solver='cbc', solve_kw={ 'tee': False, # print solver output }, solver_cmdline_options={
'allowableGap': 1e-5, # (absolute gap) default: 1e-10
network.optimize_investment(invest_options=invest_opt, **settings)
gives an error:
ApplicationError: No executable found for solver 'cbc'
Altough cbc is installed. I want to be able to give its path. Is this possible?