Skip to content

Commit

Permalink
Add get_context() to quickstart template
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Wouda committed Jun 14, 2023
1 parent a719796 commit bdcd64b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/source/setup/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The ``alns`` library provides the :class:`~alns.ALNS` algorithm and various
acceptance criteria in :mod:`alns.accept`, operator selection schemes in
:mod:`alns.select`, and stopping criteria in :mod:`alns.stop`.

You should provide the following:
You should minimally provide the following:

* A solution state for your problem that implements an ``objective()`` function.
* An initial solution.
Expand Down Expand Up @@ -48,6 +48,12 @@ The following is a quickstart template that can help you get started:
# TODO implement the objective function
pass
def get_context(self):
# TODO implement a method returning a context vector. This is only
# needed for some context-aware bandit selectors from MABWiser;
# if you do not use those, this default is already sufficient!
return None
def initial_state() -> ProblemState:
# TODO implement a function that returns an initial solution
Expand Down

0 comments on commit bdcd64b

Please sign in to comment.