Giter Club home page Giter Club logo

Comments (8)

geoffreyp avatar geoffreyp commented on September 26, 2024

Combinatorial problems implemented (ρMNK-Landscapes, Knapsack and MUBQP) are using instance files. These files are generated with generators (noted in the documentation) by using specific parameters for each instance. I think it will be complicated to implement these generators in our framework to generate exactly the same instance file with the same seed (to compare the results for the same instance between two algorithms with another framework).

Problem classes are strongly inspired by the example code of the generator's authors (for example: http://svn.code.sf.net/p/mocobench/code/trunk/rmnk/generator/java/)

from framework.

chkoar avatar chkoar commented on September 26, 2024

Since the implemented combinatorial problems are coupled with specific type of problems it should be instantiated using the specific file type and version.

file_mapping = {
    "rmnk_0_2_100_1_0": ...
}


class Rmnk:
    def __init__(file="rmnk_0_2_100_1_0"):
         if isinstance(file, str):
             ....

That way your avoiding the clutter and give the ability to the user to specify the verion of the problem or to pass the file itself is he/she wants to.

from framework.

geoffreyp avatar geoffreyp commented on September 26, 2024

Sorry but I am not sure to understand, you propose to replace the str attribute instance_file (for example "/home/mydir/instances/rmnk_0_2_100_1_0.txt") by the attribute file which can be a str (as before with instance_file) or directly a file file=open(instance_file, 'r')?

I don't understand the dict file_mapping but for example for the Rmnk problem, instance files can be named "instance1.txt" or "rmnk1.txt" because parameters are read in the content of the file and not in the file name, so we can't check the filename.

from framework.

sjvrijn avatar sjvrijn commented on September 26, 2024

Maybe something like Pooch can be of help? Although that's more aimed at larger files.

from framework.

chkoar avatar chkoar commented on September 26, 2024

My point is that requiring external files (even for known problems) makes the things difficult. Take a look here. My proposal is to use instance files directly as a last resort. 1) provide the data directly (I know cumbersome), 2) Using a factory and 3)instance files.

from framework.

chkoar avatar chkoar commented on September 26, 2024

makes the things difficult.

Even for the example in the readme a user is instructed to go somewhere and download a file.

from framework.

geoffreyp avatar geoffreyp commented on September 26, 2024

I added all the parameters in problems to allow the user to not use the instance file :
#74

from framework.

chkoar avatar chkoar commented on September 26, 2024

Let's keep this issue out of the review

from framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.