bugGNU Octave - Bugs: bug #52177, [octave forge] (ga) possible bug...

 
 

bug #52177: [octave forge] (ga) possible bug in mutationgaussian

Submitter:  sajish <sajish>
Submitted:  Fri 06 Oct 2017 01:58:38 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  sajish Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 May 2019 03:32:36 PM UTC, comment #5: 

I updated the gaoptimset documantation to show the defaults used for each function, to make it clearer on setting it.

Closing as fixed

John Donoghue <lostbard>
Group Member
Tue 28 May 2019 03:18:59 PM UTC, comment #4: 

In addition, the mutation function expects a scale and shrink parameter to be provided, so should be:


'MutationFcn', {@mutationgaussian, 1, 1},

Alternativly, since mutationgaussian is the default function anyway, you could not specify the function at all.

John Donoghue <lostbard>
Group Member
Mon 16 Oct 2017 01:33:25 PM UTC, comment #3: 

@sajish

you should use only "..." (3 dots) as line continuation.

There are four in  ga_cantilever_octa.m (line 14).

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Mon 16 Oct 2017 08:21:05 AM UTC, comment #2: 

Please find attached the samples prog for GA and the fitness function. The programme is running in matlab with the following message. But giving the solution.

Warning: You are using 'mutationgaussian' mutation function for constrained minimization.
Solution may be infeasible; use '@mutationadaptfeasible' function for constrained minimization.


But the same when I am running in GA package of octave I am getting the following message after correcting many errors in the many function files including changing '/' to ....... as required in Octave.



error message in GA octave is given below


error: scalar cannot be indexed with .
error: called from
    mutationgaussian at line 23 column 8
    mutationgaussian at line 25 column 1
    _ga_mutationfcn_ at line 22 column 52
    _ga_problem_ at line 70 column 65
    ga at line 111 column 47
    ga_cantilever_octa at line 15 column 8

(file #42163, file #42164)

sajish <sajish>
Fri 06 Oct 2017 06:16:49 PM UTC, comment #1: 

Adding ga package maintainer in CC.

This probably has something to do with how you are calling the ga function, please show the contents of "ga_cantilever.m"

Mike Miller <mtmiller>
Group Member
Fri 06 Oct 2017 01:58:38 PM UTC, original submission:  

error: scalar cannot be indexed with .
error: called from
    mutationgaussian at line 23 column 8
    mutationgaussian at line 25 column 1
    _ga_mutationfcn_ at line 22 column 52
    _ga_problem_ at line 70 column 65
    ga at line 111 column 47
    ga_cantilever at line 18 column 8.



The corresponding function file is shown below for your  reference.


function mutationChildren = ....
      mutationgaussian (parents, options,nvars, FitnessFcn,
                        state, thisScore, thisPopulation);           
#[LB(1, 1:nvars) UB(1, 1:nvars)] =.....
#    _ga_popinitrange_ (options.PopInitRange, nvars);
[LB UB] = _ga_popinitrange_(options.PopInitRange, nvars);
## start mutationgaussian logic
options.MutationFcn(1, 2)
Scale = options.MutationFcn(1, 2);
#scale=1;
  #assert (size (Scale), [1 1]); ## DEBUG
Shrink = options.MutationFcn(1, 3);


I have checked that all the variables are passed to the function by list each variable separately. Still I am getting this error message.

sajish <sajish>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42163:  ga_cantilever_octa.m added by sajish (633B - text/plain - Please find attached the samples prog for GA and the fitness function. The programme is running in matlab with the following message. But giving the solution. Warning: You are using 'mutationgaussian' mutation function for constrained minimization. Solut)
file #42164:  cantlever_fitness1.m added by sajish (337B - text/plain - Please find attached the samples prog for GA and the fitness function. The programme is running in matlab with the following message. But giving the solution. Warning: You are using 'mutationgaussian' mutation function for constrained minimization. Solut)
file #42072:  mutationgaussian.m added by sajish (2KiB - text/plain)

 

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 dasergatskov (Posted a comment)
  • -email is unavailable- added by mtmiller (ga package maintainer)
  • -email is unavailable- added by sajish (Submitted the item)
  • -email is unavailable- added by sajish
  •  

    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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-28 lostbard StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2017-10-16 sajish Attached File- Added ga_cantilever_octa.m, #42163
        Attached File- Added cantlever_fitness1.m, #42164
    2017-10-06 mtmiller Carbon-CopyRemoved 80942 -
    2017-10-06 mtmiller Summarypossible bug is found in mutationgaussian function of GA package [octave forge] (ga) possible bug in mutationgaussian
        Carbon-Copy- Added -email is unavailable-
    2017-10-06 mtmiller CategoryOctave Function Octave Package
        Item GroupBuild Failure Unexpected Error or Warning
        StatusNone Need Info
    2017-10-06 sajish Attached File- Added mutationgaussian.m, #42072
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code