Skip to content

NSGA-II parallel Error in { : task 2 failed - "only 0's may be mixed with negative subscripts" #16

Description

@HaobinZhou

Description:
I am using the rmoo package (version 0.3.0) to run the NSGA-II optimization with parallelization (using function rmoo). The error occurs during the execution when the iteration reaches 503:

Error in { :
task 2 failed - "only 0's may be mixed with negative subscripts"

I have checked my fitness function, and it does not seem to cause the issue. I suspect that the problem might be related to illegal indexing during the selection of offspring, such as when negative indices are mixed with positive ones. For example, I get the same error when running the following in R:

c(1, 2, 3)[c(-1, 2)]
This results in the error:

Error in c(1, 2, 3)[c(-1, 2)] :
only 0's may be mixed with negative subscripts

It appears that somewhere in the process, an illegal index like c(5, -1, -2) is being generated, which could be causing the issue.

Additional Information:
rmoo version: 0.3.0
OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions