bugGNU Octave - Bugs: bug #54316, [octave forge] (ga) Unit test in...

 
 

bug #54316: [octave forge] (ga) Unit test in ga.m fails randomly

Submitter:  Rafael Laboissière <rlaboiss>
Submitted:  Mon 16 Jul 2018 12:13:46 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 Jan 2019 09:50:25 PM UTC, comment #2: 

Duplicate of #55348, which contains patch



Thanks for the bug report. This particular bug has already been
reported into our bug tracking system, but please feel free to
report any further bugs you find.

John Donoghue <lostbard>
Group Member
Wed 25 Jul 2018 12:08:44 PM UTC, comment #1: 

Looks like it occurs when the input nParents in the  _ga_selectionfcn_ function call is 0.


Ay that point


parents(1, 1:nParents) = ...
      options.SelectionFcn (expectation(1, :), nParents, options);


fails

John Donoghue <lostbard>
Group Member
Mon 16 Jul 2018 12:13:46 PM UTC, original submission:  

One of the unit tests in file ga.m fails randomly.  This is a way of triggering the bug:


$ octave-cli -q
octave:1> pkg load ga
octave:2> f = @rastriginsfcn;
octave:3> nvars =  2;
octave:4> default_options = gaoptimset ();
octave:5> ps = getfield (default_options, "PopulationSize");
octave:6> function [C, Ceq] = nonlcon (x)
    C = [];
    Ceq = [];
endfunction
octave:7> while 1
    options = gaoptimset ("EliteCount", randi ([0, ps]));
    x = ga (f, nvars, [], [], [], [], [], [], @nonlcon, options);
endwhile
error: value on right hand side of assignment is undefined
error: called from
    __ga_selectionfcn__ at line 20 column 26
    __ga_problem__ at line 55 column 42
    ga at line 113 column 47


There are other unit tests that also use the randi() function.  they may be affected, but I did not do extensive investigation on the issue.

Rafael Laboissière <rlaboiss>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rlaboiss (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-03 lostbard StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code