Package 'givp'

Title: GRASP-ILS-VND with Path Relinking Optimizer
Description: Direction-agnostic metaheuristic optimizer for continuous and mixed-integer black-box optimization.
Authors: Arnaldo Mendes Pires Junior [aut, cre]
Maintainer: Arnaldo Mendes Pires Junior <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1
Built: 2026-11-13 11:23:32 UTC
Source: https://github.com/Arnime/givp

Help Index


Benchmark objective functions

Description

Standard benchmark functions used in optimization tests and examples.

Usage

sphere(x)

rosenbrock(x)

rastrigin(x)

Arguments

x

Numeric vector.

Value

Scalar objective value.


Optimize with GIVP

Description

Functional entry point for the R port, mirroring the Python API.

Usage

givp(
  func,
  bounds,
  num_vars = NULL,
  minimize = NULL,
  direction = NULL,
  config = NULL,
  initial_guess = NULL,
  initial_guesses = NULL,
  iteration_callback = NULL,
  seed = NULL,
  verbose = FALSE
)

Arguments

func

Objective function receiving a numeric vector and returning a scalar.

bounds

Variable bounds.

num_vars

Optional number of variables.

minimize

Optional boolean for optimization direction.

direction

Optional string ("minimize" or "maximize").

config

Optional GIVPConfig object.

initial_guess

Optional warm-start vector.

initial_guesses

Optional list of warm-start vectors.

iteration_callback

Optional callback per iteration.

seed

Optional RNG seed.

verbose

Enable verbose output.

Value

A givp_result object.


Create or represent a GIVP configuration

Description

givp_config() builds a validated configuration object used by the optimizer.

Usage

givp_config(...)

GIVPConfig

Arguments

...

Fields to override in GIVPConfig.

Details

Instantiate directly with GIVPConfig\$new(...) when needed.

Value

A GIVPConfig R6 object.


Object-oriented optimizer wrapper

Description

R6 interface for configuring once and running optimization via $optimize().

Usage

GIVPOptimizer

Details

Instantiate with GIVPOptimizer\$new(...) and then call $optimize().


Run and summarize multi-seed experiments

Description

Utilities for reproducible seeded runs and summary statistics.

Usage

seed_sweep(
  func,
  bounds,
  n_runs = 30L,
  config = NULL,
  num_vars = NULL,
  direction = NULL,
  verbose = FALSE
)

sweep_summary(sweep_results)

Arguments

func

Objective function.

bounds

Variable bounds.

n_runs

Number of seeds/runs.

config

Optional GIVPConfig.

num_vars

Optional number of variables.

direction

Optional optimization direction.

verbose

Verbose mode.

sweep_results

Result list returned by seed_sweep().

Value

seed_sweep() returns a named list of givp_result; sweep_summary() returns aggregate statistics.