Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Optimization and Simulation > Optimization base > optimbase_configure

optimbase_configure

Configures the current object.

Syntax

opt = optimbase_configure(opt, key, value)

Argument

opt

The current object of TOPTIM type (tlist).

key

A string.

value

The value is assigned in function of key.

Description

The optimbase_configure function allows to set the value contained in the key.

The following keys are available :

-verbose

A 1-by-1 matrix of doubles, positive, integer value, set to 1 to enable verbose logging (default -verbose = 0).

-verbosetermination

A 1-by-1 matrix of doubles, positive, integer value, set to 1 to enable verbose termination logging (default -verbosetermination = 0).

-x0

The initial guess. A n-by-1 matrix of doubles, where n is the number of variables. There is no default value, i.e. the user must provide -x0.

-maxfunevals

The maximum number of function evaluations is a 1-by-1 matrix of doubles, positive, integer value (default -maxfunevals = 100). If this criteria is triggered, the status of the optimization is set to -maxfunevals.

-maxiter

The maximum number of iterations is a 1-by-1 matrix of doubles, positive, integer value (default -maxiter = 100). If this criteria is triggered, the status of the optimization is set to -maxiter.

-tolfunabsolute

The absolute tolerance for the function value is a 1-by-1 matrix of doubles, positive (default -tolfunabsolute = 0).

-tolfunrelative

The relative tolerance for the function value is a 1-by-1 matrix of doubles, positive (default -tolfunrealtive = %eps).

-tolfunmethod

A 1-by-1 matrix of booleans. Set to %t to enable termination with tolerance on function value (default -tolfunmethod = %f). If this criteria is triggered, the status of the optimization is set to "tolf".

-tolxabsolute

The absolute tolerance on x is a 1-by-1 matrix of doubles, positive (default -tolxabsolute = 0).

-tolxrelative

The relative tolerance on x is a 1-by-1 matrix of doubles, positive (default -tolxrealtive = sqrt(%eps)).

-tolxmethod

A 1-by-1 matrix of booleans. Set to %t to enable the tolerance on x in the termination criteria (default -tolxmethod = %t). If this criteria is triggered, the status of the optimization is set to "tolx".

-function

A function or a list, the objective function. This function computes the value of the cost and the non linear constraints, if any. There is no default value, i.e. the user must provide f.

-outputcommand

A function or a list. The function is called back for output.

-numberofvariables

The number of variables to optimize is a 1-by-1 matrix of doubles, positive, integer value (default -numberofvariables = 0).

-storehistory

A 1-by-1 matrix of doubles, positive, integer value. Set to %t to enable the history storing (default -storehistory = %f).

-boundsmin

The minimum bounds for the parameters. A n-by-1 matrix of doubles where n is the number of variables (default -boundsmin = [], i.e. there are no minimum bounds).

-boundsmax

The maximum bounds for the parameters. A n-by-1 matrix of doubles where n is the number of variables (default -boundsmax = [], i.e. there are no maximum bounds).

-nbineqconst

The number of inequality constraints is a 1-by-1 matrix of doubles, positive, integer value (default -nbineqconst = 0).

-logfile

The name of the log file.

-withderivatives

A 1-by-1 matrix of booleans. Set to %t if the algorithm uses derivatives (default -withderivatives = 0).

Example

opt = optimbase_new();

// Set number of variables
opt = optimbase_configure ( opt , "-numberofvariables" , 10)

// Set initial guess
opt = optimbase_configure(opt, "-x0", [-1.2 1.0]')

// Set maximum number of iteration
opt = optimbase_configure(opt,"-maxiter",200)

opt = optimbase_destroy(opt);

See also

Report an issue
<< optimbase_checkx0 Optimization base optimbase_destroy >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:49:20 CET 2020