Skip to content

Commit

Permalink
Docs: Add links to mo-book
Browse files Browse the repository at this point in the history
  • Loading branch information
fdabrandao committed Nov 14, 2023
1 parent 5f9cecf commit 285f52b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
13 changes: 7 additions & 6 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,25 @@ at the beginning of your notebook:
.. code-block:: bash
# Install dependencies
!pip install -q amplpy
%pip install -q amplpy
.. code-block:: python
# Google Colab & Kaggle integration
from amplpy import AMPL, tools
ampl = tools.ampl_notebook(
modules=["coin", "highs", "gokestrel"], # modules to install
from amplpy import AMPL, ampl_notebook
ampl = ampl_notebook(
modules=["coin", "highs", "gokestrel", "gurobi"], # modules to install
license_uuid="default", # license to use
g=globals()) # instantiate AMPL object and register magics
) # instantiate AMPL object and register magics
.. note::

In these notebooks there are ``%%ampl_eval`` cells that allow you to run AMPL code directly from the notebook.
They are equivalent to ``ampl.eval("""cell content""")``.

Several notebooks with examples are available on the `AMPL Model Colaboratory <https://colab.ampl.com/>`_.
Many notebooks with examples are available on the `AMPL Model Colaboratory <https://colab.ampl.com/>`_
and the new book `Hands-On Optimization with AMPL in Python 🐍 <https://ampl.com/mo-book/>`_.

Initial test
------------
Expand Down
7 changes: 6 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ With ``amplpy`` you can model and solve large scale optimization problems in Pyt
without losing model readability. The same model can be deployed on applications
built on different languages by just switching the API used.

.. image:: https://portal.ampl.com/dl/ads/mo_book_big.png
:alt: Hands-On Optimization with AMPL in Python
:target: https://ampl.com/mo-book/

.. grid:: 1 1 2 2
:gutter: 0
:margin: 0
Expand Down Expand Up @@ -74,7 +78,8 @@ built on different languages by just switching the API used.
:target: https://studiolab.sagemaker.aws/import/github/ampl/amplcolab/blob/master/authors/fdabrandao/quick-start/nativediet.ipynb
:alt: Open In SageMaker Studio Lab

More notebooks with examples available on the `AMPL Model Colaboratory <https://colab.ampl.com/>`_.
Many more notebooks with examples are available on the `AMPL Model Colaboratory <https://colab.ampl.com/>`_
and the new book `Hands-On Optimization with AMPL in Python 🐍 <https://ampl.com/mo-book/>`_.

Installation & minimal example
------------------------------
Expand Down
3 changes: 2 additions & 1 deletion docs/source/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Full class reference is given in :ref:`secReferencePython`.
:target: https://studiolab.sagemaker.aws/import/github/ampl/amplcolab/blob/master/authors/fdabrandao/quick-start/nativediet.ipynb
:alt: Open In SageMaker Studio Lab

There are many more notebooks with examples available on the `AMPL Model Colaboratory <https://colab.ampl.com/>`_.
There are many more notebooks with examples are available on the new book `AMPL Model Colaboratory <https://colab.ampl.com/>`_
and the new book `Hands-On Optimization with AMPL in Python 🐍 <https://ampl.com/mo-book/>`_.

Complete listing
----------------
Expand Down

0 comments on commit 285f52b

Please sign in to comment.