bugGNU Octave - Bugs: bug #54115, [octave forge] (optim) de_min:...

 
 

bug #54115: [octave forge] (optim) de_min: Missing error message for function insensitive to optimization

Submitter:  None
Submitted:  Thu 14 Jun 2018 04:33:14 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Stefan Schloegl Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 27 Jun 2018 06:44:43 PM UTC, comment #1: 

Thanks for working this out. I decided to check after the loop if it was executed. Fixed in the repository.

Olaf Till <i7tiol>
Group Member
Thu 14 Jun 2018 04:33:14 PM UTC, original submission:  

Dear Package maintainer,

the function de_min from the optim package causes a cryptic error for certain objective functions, which are insensitive to changes of input values.

Example:

function testdemin()

ctl.XVmin = -1;
ctl.XVmax = 1;
ctl.constr= 1;
ctl.const = [];
ctl.maxiter = 1000;
[x, obj_value, nfeval, convergence] = de_min (@phi, ctl)

endfunction

function obj = phi(x)
    obj =  sqrt(eps) .* x.^2;
endfunction

shows the following cryptic error message:

error: 'ui' undefined near line 409 column 7
error: called from
    de_min at line 409 column 3



The reason is, that the conditions, which are required to entering the optimization while loop, are not fulfilled. All objective function values of the entire population are equal.
The variable ui remains undeclared, if the while loop is never entered.


In other words: the objective function is too flat to show any changes in output value for the given population values (bestval equals all values). Removing the sqrt(eps) in the given example increases sensitivity and gives the desired results.

Proposed solution (see also the attached patch file):
checking the problematic condition in advance:

if (max (val) == bestval)
     error("All objective function values for entire NP are equal.")
 endif


Best,
Stefan

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #44368:  de_min.patch added by None (138B - application/octet-stream - Patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-27 i7tiol StatusNone Fixed
        Open/ClosedOpen Closed
    2018-06-18 jwe Summary[octave-forge] optim function de_min: Missing error message for function insensitive to optimization [octave forge] (optim) de_min: Missing error message for function insensitive to optimization
    2018-06-14 None Attached File- Added de_min.patch, #44368

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code