From 5bfb54d0c8c0002f262b5a6ac0aa6edf26128aeb Mon Sep 17 00:00:00 2001 From: JavalVyas2000 <73403218+JavalVyas2000@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:23:51 -0400 Subject: [PATCH] Cbc documentation updated. (#342) * 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 Co-authored-by: Travis Arnold Co-authored-by: Travis Arnold --- docs/conf.py | 2 +- docs/faq.rst | 72 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d1cb372d..725e14be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 """ diff --git a/docs/faq.rst b/docs/faq.rst index 7848571c..4d5e481e 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -4,7 +4,7 @@ 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: @@ -12,15 +12,77 @@ How 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 `_ 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 `_. 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::