Skip to content

Commit

Permalink
Merge pull request #572 from conjure-cp/onlinedocs
Browse files Browse the repository at this point in the history
Adding the notebook version Knapsack tutorial
  • Loading branch information
ozgurakgun committed Jun 13, 2023
2 parents a33bca3 + 5a3f573 commit 606333d
Show file tree
Hide file tree
Showing 8 changed files with 306 additions and 224 deletions.
2 changes: 2 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python3 -m pip install -r requirements.txt
python3 -m sphinx . _build
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
extensions = [
'sphinx.ext.todo',
'sphinxcontrib.bibtex',
'sphinxcontrib.jquery'
'sphinxcontrib.jquery',
'nbsphinx'
]
bibtex_bibfiles = ['refs.bib']

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Conjure: The Automated Constraint Modelling Tool
features
essence
tutorials
tutorials-notebook
zreferences
contact

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sphinxcontrib-bibtex==2.5.0
sphinxcontrib-inlinesyntaxhighlight==0.2
sphinx_rtd_theme==1.2.0
sphinx==6.1.3
nbsphinx==0.9.1
16 changes: 16 additions & 0 deletions docs/tutorials-notebook.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

.. _tutorials_notebook:

Tutorials using Conjure notebook
================================


We demonstrate the use of Conjure for some small problems.

See `conjure-notebook repository <https://github.com/conjure-cp/conjure-notebook>`_ for details.


.. toctree::
:maxdepth: 1

tutorials/notebooks/KnapsackProblem
22 changes: 12 additions & 10 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
Tutorials
==============


We demonstrate the use of Conjure for some small problems.

.. include:: tutorials/NumberPuzzle.rst
.. include:: tutorials/knapsack.rst
.. include:: tutorials/NurseRostering.rst
.. include:: tutorials/LabelledConnectedGraphs.rst
.. include:: tutorials/futoshiki/Futoshiki.rst
.. include:: tutorials/BIBD.rst
.. include:: tutorials/Groups.rst
.. include:: tutorials/knapsack_generator/KnapGen.rst
.. include:: tutorials/simple_perm/simple_perm.rst
.. toctree::
:maxdepth: 1

tutorials/NumberPuzzle
tutorials/knapsack
tutorials/NurseRostering
tutorials/LabelledConnectedGraphs
tutorials/futoshiki/Futoshiki
tutorials/BIBD
tutorials/Groups
tutorials/knapsack_generator/KnapGen
tutorials/simple_perm/simple_perm.rst
2 changes: 1 addition & 1 deletion docs/tutorials/futoshiki/Futoshiki.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Problem
``n x n`` board where each column and row is filled with the unique numbers from 1 to ``n``, similar to a sudoku.
In contrast to sudoku, there are less than and greater than symbols between cells indicating that one cell has to be filled with a number greater than (or less than) than the cell on the other side of the operator.

.. image:: tutorials/futoshiki/example.png
.. image:: example.png
:scale: 50%
:alt: Example futoshiki board.

Expand Down

0 comments on commit 606333d

Please sign in to comment.