Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
b2b94e5
Add open integer variable sequences
zayenz Aug 22, 2026
14b39d0
Fix open sequence lifetime and materialization
zayenz Oct 4, 2026
88bd288
Fix open sequence commits and regular edge cases
zayenz Oct 4, 2026
8b61b80
Fix open sequence compilation on Windows
zayenz Oct 4, 2026
3ee2e54
Generalize open sequences and reuse standard branching selectors
zayenz Oct 5, 2026
274ef9c
Fix open sequence no-good extraction and clone cleanup
zayenz Oct 5, 2026
9878c8a
Keep delayed open-sequence constraints in their posting group
zayenz Oct 5, 2026
2669990
Rename open variable sequences to lists
zayenz Oct 6, 2026
c4624b8
Use the standard harness for closed open-list constraints
Oct 12, 2026
4c2953a
Harden open-list branching and clarify its public contract
zayenz Oct 12, 2026
63ac62b
Simplify open-list branching and add a route example
zayenz Oct 13, 2026
66dc7ec
Add constrained common-pattern mining example
zayenz Oct 13, 2026
8a05972
Add reproducible common-pattern comparisons
zayenz Oct 13, 2026
a6b9ab4
Model constrained frequent subsequences with open lists
zayenz Oct 13, 2026
a78e273
Reduce projection work in common-pattern mining
zayenz Oct 13, 2026
26252a0
Rename open-list prefix query to known_length
zayenz Oct 13, 2026
11d136d
Apply coding style guidance to pattern benchmark
zayenz Oct 13, 2026
dc134a0
Add BAB 15-puzzle example with open and fixed models
zayenz Oct 14, 2026
cb31e86
Defer open puzzle goal checks until board assignment
zayenz Oct 14, 2026
cce4d96
Prune open puzzle states using the remaining move budget
zayenz Oct 14, 2026
3e4717e
Use NoGPI for open-list factories and transitions
zayenz Oct 14, 2026
60eafbb
Document NoGPI scopes on open-list materialization methods
zayenz Oct 14, 2026
01d8513
Simplify goal constraints in the open 15-puzzle model
zayenz Oct 15, 2026
ac2d1b5
Use IntArgs for puzzle neighbors
zayenz Oct 15, 2026
e2bff5b
Split puzzle goal implications with a shared BoolVar
zayenz Oct 15, 2026
3b16330
Offer Manhattan move ordering in the puzzle example
zayenz Oct 15, 2026
47489ab
Fix open-list replay printing and test dependencies
zayenz Oct 18, 2026
3973150
Tighten open-list documentation
zayenz Oct 18, 2026
e926606
Keep open-list contributions focused and recheck closure during pruning
zayenz Oct 20, 2026
1a7b33c
Include the common-pattern helper in example headers
zayenz Oct 21, 2026
67f61f2
Clarify open-list invariants and simplify prefix filtering
zayenz Oct 21, 2026
49b7952
Restore prefix-projection algorithm attribution
zayenz Oct 21, 2026
fed4876
Move generated dependencies to a separate follow-up PR
zayenz Oct 21, 2026
3dc3d3e
Separate open-list changelog details from the summary
zayenz Oct 21, 2026
093f847
Trim duplicate open-list tests and explanations
zayenz Oct 21, 2026
1258d27
Prune open regular prefixes using the maximum list length
Oct 21, 2026
a1bcec1
Clarify open-list documentation and example explanations
zayenz Oct 21, 2026
4ac4ada
Remove redundant transition callback assertion
zayenz Oct 22, 2026
e11429a
Simplify open-list validation and pattern projection
zayenz Oct 22, 2026
de4c400
Clarify open-list examples and use scoped enum types
zayenz Oct 23, 2026
d1693fd
Propagate open-list constraints incrementally
zayenz Oct 26, 2026
6657bf6
Index open-list variable identities for alias checks
zayenz Oct 26, 2026
293a614
Filter overlapping open-list windows in linear sweeps
zayenz Oct 26, 2026
89dd21b
Use an explicit allocation count for open distinct on Windows
zayenz Oct 26, 2026
bc66fd5
Use open view lists in propagators and branchers
zayenz Oct 26, 2026
dfb8855
Propagate open-list relations with native specialized actors
zayenz Oct 26, 2026
ed4fab4
Use compact growable range storage for open distinct
zayenz Oct 26, 2026
ca7f230
Use space-owned view storage in open distinct
zayenz Oct 26, 2026
6ac85d4
Organize open-list actors by constraint family
zayenz Oct 26, 2026
c586970
Record native search branch split and preserve research
zayenz Oct 13, 2026
b7aedf1
Add tasks to open-search
zayenz Oct 13, 2026
ad62af3
Extract standalone heuristic search onto open-cp
zayenz Oct 13, 2026
d718ed9
Add tasks to open-search
zayenz Oct 13, 2026
afdea38
Gate heuristic search as experimental and separate preview changelog …
zayenz Oct 13, 2026
e2be2d8
Record validated open-search rebase onto current open-cp
zayenz Oct 13, 2026
0a7b5ea
Add tasks to open-search
zayenz Oct 13, 2026
507fc9a
Repair search completion and keep the preview compatible with Gecode 6.5
zayenz Oct 13, 2026
a96e11a
Use concrete wording in source comments and search documentation
zayenz Oct 13, 2026
ba7be44
Simplify heuristic search examples around the public interfaces
zayenz Oct 13, 2026
c11c042
Keep brancher preparation policy in the search layer
zayenz Oct 13, 2026
4daf4f2
Invalidate completion witnesses at constraint posting
zayenz Oct 13, 2026
0f100e8
Check every validated tour against benchmark optimality claims
zayenz Oct 13, 2026
abcadb5
Plan fifteen-puzzle heuristic search integration
zayenz Oct 14, 2026
bc949cd
Add tasks to open-search
zayenz Oct 14, 2026
2c270f2
Add A* and CABS to the fifteen-puzzle example
zayenz Oct 14, 2026
94951cc
Add tasks to open-search
zayenz Oct 14, 2026
ff71eff
Carry deferred puzzle goal checks into the heuristic branch
zayenz Oct 14, 2026
f44a08a
Add tasks to open-search
zayenz Oct 14, 2026
50e6936
Restore puzzle pruning without eager board construction
zayenz Oct 14, 2026
95a21a9
Add tasks to open-search
zayenz Oct 14, 2026
728e379
Record NoGPI stack integration and verification
zayenz Oct 14, 2026
389274d
Add tasks to open-search
zayenz Oct 14, 2026
8fe8e15
Record NoGPI method documentation review
zayenz Oct 14, 2026
cc89d7c
Refresh open-search base after NoGPI rebase
zayenz Oct 15, 2026
9a20f29
Refresh open-search base after NoGPI pointer updates
zayenz Oct 15, 2026
3c49711
Add tasks to open-search
zayenz Oct 15, 2026
85a4773
Align puzzle simplification task with the fixed formulation
zayenz Oct 15, 2026
686781a
Record verified fixed-style puzzle simplification
zayenz Oct 15, 2026
7683c9d
Add tasks to open-search
zayenz Oct 15, 2026
ce43c8d
Use the requested IntArgs neighbor representation
zayenz Oct 15, 2026
79e0535
Record verified IntArgs puzzle neighbors
zayenz Oct 15, 2026
f38764c
Add tasks to open-search
zayenz Oct 15, 2026
5081c8d
Record verified shared puzzle goal implications
zayenz Oct 15, 2026
cc52c63
Add tasks to open-search
zayenz Oct 15, 2026
4939b64
Record verified Manhattan puzzle value selection
zayenz Oct 15, 2026
fe06db8
Allow pending parallel stops in completion test
zayenz Oct 18, 2026
bc995be
Tighten heuristic search documentation
zayenz Oct 18, 2026
785a7af
Remove saved heuristic-search results and work records
zayenz Oct 18, 2026
e15c6d8
Simplify experimental heuristic search
zayenz Oct 18, 2026
ec3f171
Simplify heuristic search API and examples
zayenz Oct 18, 2026
169b78d
Fix heuristic search integration and trim evaluation tools
zayenz Oct 18, 2026
200ae99
Add optional candidate dominance to CABS
zayenz Oct 18, 2026
c5c889f
Add native parallel A* and CABS search
zayenz Oct 18, 2026
0b42fa7
Index live CABS candidates for dominance
zayenz Oct 18, 2026
f27a42e
Retain heuristic-search parents on parallel workers
zayenz Oct 18, 2026
ee82005
Dispose of rejected heuristic-search spaces on workers
zayenz Oct 18, 2026
ba43029
Repair CABS heaps after single-candidate dominance replacement
zayenz Oct 18, 2026
95c1c33
Consolidate heuristic search usage and avoid chunk-cache contention
zayenz Oct 19, 2026
c9c46d1
Keep heuristic search examples focused and refresh build dependencies
zayenz Oct 20, 2026
b22abea
Model idle puzzle steps after reaching the goal
zayenz Oct 21, 2026
89afe9a
Describe heuristic search using ordinary optimization terminology
zayenz Oct 21, 2026
1cacc78
Remove changelog entry for reverted chunk cache change
zayenz Oct 21, 2026
8c6fb84
Document worker control for heuristic search engines
zayenz Oct 21, 2026
9669c16
Index CABS beam entries for direct dominance replacement
zayenz Oct 21, 2026
6a48b1a
Batch sibling admission in parallel CABS
zayenz Oct 21, 2026
ca5fcdc
Simplify the TSPTW example and its validation
zayenz Oct 21, 2026
44174d5
Explain heuristic search contracts and example invariants
zayenz Oct 21, 2026
93b262b
Trim dependency churn and remove TSPTW validation tooling
zayenz Oct 21, 2026
9c54c26
Keep search documentation in the changelog and API reference
zayenz Oct 21, 2026
dc682b5
Remove ancillary search tooling and redundant explanations
zayenz Oct 21, 2026
4d092e1
Restore experimental changelog grouping and validation
zayenz Oct 21, 2026
1ec9352
Clarify heuristic search documentation
zayenz Oct 21, 2026
3307003
Clarify search worker flow and remove redundant checks
zayenz Oct 22, 2026
da11e83
Clarify heuristic search state and control flow
zayenz Oct 23, 2026
11e7c25
Centralize beam admission and parallel worker state
zayenz Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Configure
shell: bash
run: ./configure
run: ./configure --enable-experimental

- name: Build
shell: bash
Expand Down Expand Up @@ -233,6 +233,7 @@ jobs:
shell: bash
run: >
cmake -S "$GITHUB_WORKSPACE" -B "$GITHUB_WORKSPACE/build-ninja"
-DGECODE_ENABLE_EXPERIMENTAL=ON
-G Ninja
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DGECODE_ENABLE_QT=OFF
Expand Down Expand Up @@ -496,6 +497,7 @@ jobs:
-DGECODE_ENABLE_MPFR=OFF
-DGECODE_BUILD_SHARED=${{ matrix.build_shared }}
-DGECODE_BUILD_STATIC=${{ matrix.build_static }}
-DGECODE_ENABLE_EXPERIMENTAL=${{ matrix.build_shared }}

- name: Build
shell: pwsh
Expand Down Expand Up @@ -607,6 +609,7 @@ jobs:
-DGECODE_ENABLE_MPFR=OFF \
-DGECODE_BUILD_SHARED=OFF \
-DGECODE_BUILD_STATIC=ON \
-DGECODE_ENABLE_EXPERIMENTAL=ON \
-DGECODE_ENABLE_EXAMPLES=OFF \
-DGECODE_ENABLE_FLATZINC=OFF

Expand Down Expand Up @@ -675,7 +678,7 @@ jobs:
shell: msys2 {0}
run: |
export PATH="$UV_DIR:$PATH"
CC=gcc CXX=g++ ./configure --with-host-os=Windows --disable-qt --disable-gist --disable-mpfr
CC=gcc CXX=g++ ./configure --with-host-os=Windows --disable-qt --disable-gist --disable-mpfr --enable-experimental

- name: Build
shell: msys2 {0}
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ endif()
set(GECODE_ENABLE_GIST "${GECODE_ENABLE_GIST_DEFAULT}" CACHE STRING "Enable Gist (AUTO, ON, or OFF)")
set_property(CACHE GECODE_ENABLE_GIST PROPERTY STRINGS AUTO ON OFF)
option(GECODE_ENABLE_CPPROFILER "Enable CPProfiler support" ON)
option(GECODE_ENABLE_EXPERIMENTAL "Enable experimental preview APIs" OFF)
option(GECODE_ENABLE_CBS "Enable counting-based search support" OFF)
set(GECODE_ENABLE_EXAMPLES_DEFAULT ${PROJECT_IS_TOP_LEVEL})
option(GECODE_ENABLE_EXAMPLES "Build examples" ${GECODE_ENABLE_EXAMPLES_DEFAULT})
Expand Down Expand Up @@ -692,6 +693,9 @@ endif()
if(GECODE_ENABLE_CPPROFILER)
set(GECODE_HAS_CPPROFILER "/**/")
endif()
if(GECODE_ENABLE_EXPERIMENTAL)
set(GECODE_HAS_EXPERIMENTAL "/**/")
endif()
if(GECODE_ENABLE_CBS)
set(GECODE_HAS_CBS "/**/")
endif()
Expand Down Expand Up @@ -1815,6 +1819,7 @@ include(FeatureSummary)
foreach(gecode_option IN ITEMS
GECODE_BUILD_SHARED GECODE_BUILD_STATIC
GECODE_ENABLE_THREAD GECODE_ENABLE_CPPROFILER GECODE_ENABLE_CBS
GECODE_ENABLE_EXPERIMENTAL
GECODE_ENABLE_EXAMPLES GECODE_INSTALL
GECODE_ENABLE_SEARCH GECODE_ENABLE_INT_VARS GECODE_ENABLE_SET_VARS
GECODE_ENABLE_FLOAT_VARS GECODE_ENABLE_MINIMODEL GECODE_ENABLE_DRIVER
Expand Down
33 changes: 25 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,24 @@ SEARCHSRC0 = \
cpprofiler/tracer worker-control
SEARCHHDR0 = \
statistics.hpp stop.hpp options.hpp cutoff.hpp \
support.hh worker.hh worker-control.hh exception.hpp engine.hpp base.hpp \
support.hh beam-heap.hh choice-expansion.hh \
worker.hh worker-control.hh exception.hpp engine.hpp base.hpp \
nogoods.hh nogoods.hpp build.hpp traits.hpp sebs.hpp \
seq/path.hh seq/path.hpp seq/dfs.hh seq/dfs.hpp \
seq/bab.hh seq/bab.hpp seq/lds.hh seq/lds.hpp \
seq/bab.hh seq/bab.hpp seq/astar.hh seq/cabs.hh seq/lds.hh seq/lds.hpp \
seq/rbs.hh seq/rbs.hpp seq/dead.hh \
seq/pbs.hh seq/pbs.hpp \
par/path.hh par/path.hpp par/engine.hh par/engine.hpp \
par/dfs.hh par/dfs.hpp par/bab.hh par/bab.hpp \
par/pbs.hh par/pbs.hpp \
dfs.hpp bab.hpp lds.hpp rbs.hpp pbs.hpp \
par/pbs.hh par/pbs.hpp par/frontier.hh \
dfs.hpp bab.hpp astar.hpp cabs.hpp lds.hpp rbs.hpp pbs.hpp \
relax.hh tracer.hpp trace-recorder.hpp \
cpprofiler/message.hpp cpprofiler/connector.hpp

ifeq "@enable_experimental@" "yes"
SEARCHSRC0 += astar cabs par/frontier
endif

SEARCHSRC = $(SEARCHSRC0:%=gecode/search/%.cpp)
SEARCHHDR = gecode/search.hh $(SEARCHHDR0:%=gecode/search/%)
SEARCHOBJ = $(SEARCHSRC:%.cpp=%$(OBJSUFFIX))
Expand Down Expand Up @@ -323,7 +328,9 @@ INTSRC0 = \
int-set.cpp var-imp/int.cpp var-imp/bool.cpp var/int.cpp \
var/bool.cpp array.cpp bool.cpp bool/eqv.cpp \
extensional/dfa.cpp extensional/tuple-set.cpp \
extensional-regular.cpp extensional-tuple-set.cpp \
extensional-regular.cpp \
extensional-tuple-set.cpp \
open-var-list.cpp \
dom.cpp rel.cpp precede.cpp element.cpp count.cpp \
arithmetic.cpp exec.cpp \
exec/when.cpp element/pair.cpp \
Expand All @@ -348,6 +355,10 @@ INTSRC0 = \
exception.cpp

INTHDR0 = \
open-var-list.hpp open-propagator.hpp \
distinct/open.hpp rel/open.hpp sequence/open.hpp \
arithmetic/open.hpp precede/open.hpp extensional/open.hpp branch/open.hpp \
growable-int-set.hh growable-int-set.hpp \
limits.hpp support-values.hh support-values.hpp \
idx-view.hh idx-view.hpp div.hh div.hpp \
exec.hh exec/when.hpp \
Expand Down Expand Up @@ -906,10 +917,16 @@ INTEXAMPLESRC0 = \
word-square crossword open-shop car-sequencing sat \
bin-packing knights tsp perfect-square schurs-lemma \
dominating-queens colored-matrix multi-bin-packing \
qcp job-shop
qcp job-shop open-route common-pattern fifteen-puzzle


INTEXAMPLEHDR = $(INTEXAMPLEHDR0:%=examples/%.hpp)
ifeq "@enable_experimental@" "yes"
INTEXAMPLESRC0 += tsptw
endif

INTEXAMPLEHDR = $(INTEXAMPLEHDR0:%=examples/%.hpp) \
examples/common-pattern.hh \
examples/tsptw-data.hh examples/tsptw-transition.hh
INTEXAMPLESRC = $(INTEXAMPLESRC0:%=examples/%.cpp)
ifeq "@enable_examples@" "yes"
INSTALLEXAMPLEHDR = $(INTEXAMPLEHDR)
Expand Down Expand Up @@ -1119,7 +1136,7 @@ EXETARGETS = $(FLATZINCEXE) $(FLATZINCLAUNCHER)

INTTESTSRC00 = \
channel arithmetic basic bool count dom distinct element extensional \
rel linear gcc sorted unshare exec sequence \
rel linear gcc sorted unshare exec sequence open-var-list \
mm-arithmetic mm-bool mm-lin mm-count mm-rel \
bin-packing order unary cumulative cumulatives circuit \
no-overlap precede inter-distance nvalues member min-distance
Expand Down
39 changes: 39 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
# driver|iter|support|example|test|gist|flatzinc|other
# What: bug|documentation|performance|new|removed|change
# Rank: minor|major
# Experimental: true|false <optional, defaults to false>
# True entries appear under Experimental changes within each release.
# Bug: <optional, for number from bugzilla>
# Issue: <optional, for number from github>
# Thanks: <optional, who reported etc>
Expand Down Expand Up @@ -116,6 +118,43 @@ Rank: minor
Honor propagation annotations in cumulative and unary scheduling bindings,
including the unary specializations of cumulative constraints.

[ENTRY]
Module: search
What: new
Rank: major
Experimental: true
[DESCRIPTION]
Add experimental A* (AStar) and complete anytime beam search (CABS).
[MORE]
Both engines use objective bounds for pruning and optional ranks to guide
exploration. They support parallel search, dynamic worker control, and
portfolios with BAB. CABS also supports model-defined dominance.
Enable with --enable-experimental or GECODE_ENABLE_EXPERIMENTAL=ON;
the preview is disabled by default. APIs may change or be removed in future
feature releases. The fifteen-puzzle and TSPTW examples demonstrate both
engines. TSPTW compares a closed CP model with a transition model that
constructs the route one city at a time.

[ENTRY]
Module: int
What: new
Rank: major
[DESCRIPTION]
Add OpenIntVarList and OpenBoolVarList for lists whose length is decided
during propagation and search.
[MORE]
OpenVarList supports other variable types through a factory.
Regular-language and other constraints follow list growth.
Regular-language filtering excludes prefixes whose shortest accepting
continuation exceeds the maximum list length.
Branching uses standard variable and value selectors, with either incremental
list construction or a length decision before assigning values.
Factories and transitions run inside Space::NoGPI scopes by default;
callbacks can opt into global information with Space::UseGPI.
The open-route example introduces list construction and branching.
Common-pattern demonstrates constrained frequent subsequence mining,
and fifteen-puzzle compares open lists with fixed arrays.

[ENTRY]
Module: kernel
What: new
Expand Down
10 changes: 10 additions & 0 deletions cmake/GecodeSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ set(GECODE_SEARCH_SOURCES
gecode/search/worker-control.cpp
)

if(GECODE_ENABLE_EXPERIMENTAL)
list(APPEND GECODE_SEARCH_SOURCES
gecode/search/astar.cpp
gecode/search/cabs.cpp
gecode/search/par/frontier.cpp
)
endif()

set(GECODE_INT_SOURCES
gecode/int/arithmetic.cpp
gecode/int/arithmetic/mult.cpp
Expand Down Expand Up @@ -84,6 +92,7 @@ set(GECODE_INT_SOURCES
gecode/int/exec/when.cpp
gecode/int/extensional-regular.cpp
gecode/int/extensional-tuple-set.cpp
gecode/int/open-var-list.cpp
gecode/int/extensional/dfa.cpp
gecode/int/extensional/tuple-set.cpp
gecode/int/gcc.cpp
Expand Down Expand Up @@ -429,6 +438,7 @@ set(GECODE_TEST_SOURCES
test/int/no-overlap.cpp
test/int/nvalues.cpp
test/int/order.cpp
test/int/open-var-list.cpp
test/int/precede.cpp
test/int/rel.cpp
test/int/sequence.cpp
Expand Down
31 changes: 31 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ HAVEFLEX
enable_cpprofiler
LINKCPPROFILER
enable_cbs
enable_experimental
enable_gist
enable_qt
QTLIBS
Expand Down Expand Up @@ -859,6 +860,7 @@ with_mpfr_include
with_mpfr_lib
enable_qt
enable_gist
enable_experimental
enable_cbs
enable_cpprofiler
enable_driver
Expand Down Expand Up @@ -1531,6 +1533,7 @@ Optional Features:
--enable-qt build with Qt support, requires Qt 5.15 or newer
[default=yes]
--enable-gist build Gecode Interactive Search Tool [default=yes]
--enable-experimental build experimental preview APIs [default=no]
--enable-cbs build with support for counting-based search
[default=no]
--enable-cpprofiler build with support for CPProfiler [default=yes]
Expand Down Expand Up @@ -3409,6 +3412,8 @@ GECODE_SOVERSION=${ac_gecode_soversion}








Expand Down Expand Up @@ -13593,6 +13598,32 @@ printf "%s\n" "no" >&6; }
fi


# Check whether --enable-experimental was given.
if test ${enable_experimental+y}
then :
enableval=$enable_experimental;
else case e in #(
e) enable_experimental=no ;;
esac
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build experimental preview APIs" >&5
printf %s "checking whether to build experimental preview APIs... " >&6; }
case $enable_experimental in #(
yes) :

printf "%s\n" "#define GECODE_HAS_EXPERIMENTAL /**/" >>confdefs.h
;; #(
no) :
;; #(
*) :
as_fn_error $? "--enable-experimental accepts only yes or no" "$LINENO" 5 ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_experimental" >&5
printf "%s\n" "$enable_experimental" >&6; }



# Check whether --enable-cbs was given.
if test ${enable_cbs+y}
then :
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ dnl ------------------------------------------------------------------
AC_GECODE_MPFR
AC_GECODE_QT
AC_GECODE_GIST
AC_GECODE_EXPERIMENTAL
AC_GECODE_CBS
AC_GECODE_CPPROFILER
AC_GECODE_FLEXBISON
Expand Down
12 changes: 7 additions & 5 deletions docs/worker-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Purpose

`Search::WorkerControl` lets an external scheduler change how many workers a
running DFS or BAB engine may use. A portfolio with a fixed thread budget can
running DFS or BAB engine may use. Experimental AStar and CABS engines also
support worker control. A portfolio with a fixed thread budget can
move workers among its engines at runtime.

The engine still starts with a fixed maximum:
Expand All @@ -26,8 +27,8 @@ control.request(1); // Resume
Gecode resolves the `threads` option when it constructs the engine. The result
is the fixed worker capacity. A request must be between zero and that capacity,
inclusive. Zero pauses the engine without discarding its search state.
This also applies when the resolved capacity is one: sequential DFS and BAB
wait at search boundaries until the control resumes them.
This also applies when the resolved capacity is one: sequential DFS, BAB,
AStar, and CABS wait at search boundaries until the control resumes them.
Pausing requires a build with thread support. Without thread support, attaching
an initially paused control or calling `request(0)` raises
`Search::InvalidWorkerRequest`; controls must be used from one thread.
Expand Down Expand Up @@ -80,8 +81,9 @@ An empty default-constructed handle means that worker adjustment is disabled.
Calling `request` on an empty handle raises
`Search::UninitializedWorkerControl`.

A shared identity can be bound to only one leaf engine at a time. It cannot be
shared by two DFS/BAB engines or attached directly to an enclosing meta-engine.
A shared identity can be bound to only one leaf engine at a time (DFS, BAB,
AStar, or CABS). It cannot be shared by two engines or attached directly to an
enclosing meta-engine.
Ordinary reuse for a replacement engine after destruction is also rejected.
These uses raise `Search::WorkerControlInUse`.

Expand Down
1 change: 1 addition & 0 deletions doxygen/doxygen.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ PREDEFINED = "GECODE_SET_EXPORT=" \
"GECODE_HAS_FLOAT_VARS=1" \
"GECODE_HAS_GIST=1" \
"GECODE_HAS_CPPROFILER=1" \
"GECODE_HAS_EXPERIMENTAL=1" \
"GECODE_THREADS_PTHREADS=1" \
"GECODE_HAS_THREADS=1" \
"GECODE_HAS_MPFR=1" \
Expand Down
9 changes: 9 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(GECODE_EXAMPLE_SOURCES
car-sequencing.cpp
cartesian-heart.cpp
colored-matrix.cpp
common-pattern.cpp
crew.cpp
crossword.cpp
crowded-chess.cpp
Expand All @@ -22,6 +23,7 @@ set(GECODE_EXAMPLE_SOURCES
donald.cpp
efpa.cpp
eq20.cpp
fifteen-puzzle.cpp
golden-spiral.cpp
golf.cpp
golomb-ruler.cpp
Expand All @@ -40,6 +42,7 @@ set(GECODE_EXAMPLE_SOURCES
money.cpp
multi-bin-packing.cpp
nonogram.cpp
open-route.cpp
open-shop.cpp
ortho-latin.cpp
partition.cpp
Expand Down Expand Up @@ -112,3 +115,9 @@ endfunction()
foreach(example_source IN LISTS GECODE_EXAMPLE_SOURCES)
gecode_add_example("${example_source}")
endforeach()

if(GECODE_ENABLE_EXPERIMENTAL)
add_executable(tsptw tsptw.cpp)
target_link_libraries(tsptw PRIVATE gecodesearch gecodeint)
set_property(TARGET tsptw PROPERTY FOLDER "Examples")
endif()
Loading
Loading