Skip to content

neighbours

Neighbourhood Functions for Local-Search Algorithms

v0.1-5 · Dec 17, 2025 · GPL-3

Description

Neighbourhood functions are key components of local-search algorithms such as Simulated Annealing or Threshold Accepting. These functions take a solution and return a slightly-modified copy of it, i.e. a neighbour. The package provides a function neighbourfun() that constructs such neighbourhood functions, based on parameters such as admissible ranges for elements in a solution. Supported are numeric and logical solutions. The algorithms were originally created for portfolio-optimisation applications, but can be used for other models as well. Several recipes for neighbour computations are taken from "Numerical Methods and Optimization in Finance" by M. Gilli, D. Maringer and E. Schumann (2019, ISBN:978-0128150658).

Downloads

272

Last 30 days

11393rd

272

Last 90 days

272

Last year

CRAN Check Status

2 WARNING
12 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 WARNING
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 WARNING
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
WARNING r-oldrel-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘neighbours.Rnw’ using Sweave
Loading required namespace: NMOF
Loading required namespace: quadprog
Error: processing vignette 'neighbours.Rnw' failed with diagnostics:
Running 'texi2dvi' on 'neighbours.tex' failed.
LaTeX errors:
! LaTeX Error: File `sfmath.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 
         
l.11 \usepackage
                {hyperref}^^M
!  ==> Fatal error occurred, no output PDF file produced!
--- failed re-building ‘neighbours.Rnw’

SUMMARY: processing the following file failed:
  ‘neighbours.Rnw’

Error: Vignette re-building failed.
Execution halted
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
WARNING r-release-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘neighbours.Rnw’ using Sweave
Loading required namespace: NMOF
Loading required namespace: quadprog
Error: processing vignette 'neighbours.Rnw' failed with diagnostics:
Running 'texi2dvi' on 'neighbours.tex' failed.
LaTeX errors:
! LaTeX Error: File `sfmath.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 
         
l.11 \usepackage
                {hyperref}^^M
!  ==> Fatal error occurred, no output PDF file produced!
--- failed re-building ‘neighbours.Rnw’

SUMMARY: processing the following file failed:
  ‘neighbours.Rnw’

Error: Vignette re-building failed.
Execution halted
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

WARNING 12 OK · 0 NOTE · 2 WARNING · 0 ERROR · 0 FAILURE Mar 9, 2026
WARNING r-release-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘neighbours.Rnw’ using Sweave
Loading required namespace: NMOF
Loading required namespace: quadprog
Error: processing vignette 'neighbours.Rnw' failed with diagnostics:
Running 'texi2dvi' on 'neighbours.tex' failed.
LaTeX errors:
! LaTeX Error: File `sfmath.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 
         
l.11 \usepackage
                {hyperref}^^M
!  ==
WARNING r-oldrel-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘neighbours.Rnw’ using Sweave
Loading required namespace: NMOF
Loading required namespace: quadprog
Error: processing vignette 'neighbours.Rnw' failed with diagnostics:
Running 'texi2dvi' on 'neighbours.tex' failed.
LaTeX errors:
! LaTeX Error: File `sfmath.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 
         
l.11 \usepackage
                {hyperref}^^M
!  ==

Version History

new 0.1-5 Mar 10, 2026