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


optimbase_set

Set the value for the given key.

Syntax

opt = optimbase_set(opt, key, value)

Argument

opt

The object of TOPTIM type (tlist).

key

A string corresponding to name of the key to set.

value

the value in function of the given key.

Description

The optimbase_set function set the value for the given key. If the key is unknown, this function generates an error.

The following keys are available:

-funevals

The number of function evaluations is a 1-by-1 matrix of doubles, positive, integer value.

-iterations

The number of iterations is a 1-by-1 matrix of doubles, positive, integer value.

-xopt

The x optimum.

-fopt

The optimum cost function value.

-historyxopt

An array, with nbiter values, containing the history of x during the iterations.

This array is available after optimization if the history storing was enabled with the -storehistory option.

-historyfopt

An array, with nbiter values, containing the history of the function value during the iterations.

This array is available after optimization if the history storing was enabled with the -storehistory option.

-fx0

The function value for the initial guess.

-status

A string containing the status of the optimization.

Example

opt = optimbase_new();

// Set optimum
opt = optimbase_set(opt,"-xopt",[1.0 1.0]) ;
val = optimbase_get(opt, "-xopt")
// Set function value at optimum

opt = optimbase_set(opt,"-fopt",1.0);
val = optimbase_get(opt, "-fopt")

// Set status
opt = optimbase_set(opt,"-status","maxiter");;
val = optimbase_get(opt, "-status")

opt = optimbase_destroy(opt);

See also

Report an issue
<< optimbase_proj2bnds Optimization base optimbase_stoplog >>

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:
Mon Jun 17 17:49:16 CEST 2024