Skip to content

Commit

Permalink
Cbc documentation updated. (project-pareto#342)
Browse files Browse the repository at this point in the history
* surrogate training notebook

* apply black

* updating example

* updating tutorial

* Run black

* adding dataset

* applying black

* fixing black error

* applying black

* added scip and glpk functionality

* resolving test failure

* applying black

* updating scip

* adding highs using appsi

* adding cbc instructions of how to download solver

* making it more readable

* updating for code blocks

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* making it more readable

* resolving solver errors

* resolving tests errors for gurobi

* resolving test errors

* trying to resolve test errors

* Reformat

* removing step 2

* Update pareto/examples/desalination_jupyter_notebooks/desalination_surrogate_training.ipynb

* Update documentation

---------

Co-authored-by: JavalVyas2000 <javalvyas@gmail.com>
Co-authored-by: Travis Arnold <Travis.Arnold@netl.doe.gov>
Co-authored-by: Travis Arnold <travis.arnold17@gmail.com>
  • Loading branch information
4 people authored Sep 2, 2024
1 parent c4c82fc commit 5bfb54d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@

rst_epilog = """
.. |support-email| replace:: the `support email list`_
.. _support email list: mailto:pareto-support@lbl.gov
.. _support email list: mailto:PARETO@netl.doe.gov
"""
72 changes: 67 additions & 5 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,85 @@ Frequently Asked Questions
How to ...
-----------

... Run examples?
**... Run examples?**
PARETO project provides examples to run the operational produced water management model
and the strategic produced water management model (see pareto/case_studies/).
To run the examples, go to:

* pareto/operatinal_water_management/run_operational_model.py
* pareto/strategic_water_management/run_strategic_model.py

... Get more help?
Use the website to `register <https://pareto.org/register/>`_ for the PARETO support mailing list.
Then you can send questions to |support-email|. For more specific technical questions, we recommend

**... Get more help?**
You can reach out by email to |support-email|. For more specific technical questions, we recommend
our new `PARETO discussions board on Github <https://github.com/project-pareto/discussions>`_.

Troubleshooting
---------------

Missing win32api DLL
**No available solver found among choices: (('cbc',),)**

If you encounter the error message "No available solver found among choices: (('cbc',),),"
it typically means that the solver CBC is not installed or not correctly configured in
your environment. Here are steps to resolve this issue:

1. **Solver Installation**

Ensure that the CBC solver is installed on your system. You can install it using the following methods:

* **For Windows Users:**
The easiest way to get CBC on Windows is to download an archive from https://github.com/coin-or/Cbc/releases.

* **For Mac OS users:**

.. code-block:: bash
$ brew tap coin-or-tools/coinor
$ brew install coin-or-tools/coinor/cbc
* **For Ubuntu users:**

.. code-block:: bash
$ sudo apt-get install coinor-cbc
2. **Verify Installation and Configure Solver in Your Code**

Ensure your code correctly specifies the solver. For example, in Pyomo::

from pyomo.environ import SolverFactory
solver = SolverFactory("cbc")
if not solver.available():
raise Exception("Solver 'cbc' is not available.")

3. **Update Path Environment Variable**

If the solver is installed but not found, you might need to add it to your system's PATH environment variable.

* **For Windows:**

1. Open the Start Search, type in "env", and select "Edit the system environment variables".
2. Click the "Environment Variables" button.
3. Under "System variables", find the "Path" variable, select it, and click "Edit".
4. Add the path to the `bin` directory containing the cbc.exe executable.

* **For Mac/Ubuntu:**

1. Open your terminal.
2. Edit your shell profile file (e.g., ~/.bashrc, ~/.zshrc):

.. code-block:: bash
export PATH=$PATH:/path/to/cbc
3. Reload the profile:

.. code-block:: bash
source ~/.zshrc # or ~/.bashrc for Ubuntu
**Missing win32api DLL**

For Python 3.8 and maybe others, you can get an error when running Jupyter on Windows 10 about
missing the win32api DLL. There is a relatively easy fix::

Expand Down

0 comments on commit 5bfb54d

Please sign in to comment.