Skip to content

Inconsistencies when using random_instance() to generate a random instance of a problem class #103

Open
@Q-lds

Description

@Q-lds

Problem

When trying to create a random instance of a number partitioning problem, I get the following error

image

The core issue is that random_instance() is a static method and should be used as such:
image

The inconsistency is made worst by the fact that I can do the following, where the numbers I pass to the constructor are right away changed by the random_instance() method

image

#Solution

I am unsure what's the best way to go about this, but we should review the way that random instances are created across the pre-defined problem settings.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions