Giter Club home page Giter Club logo

Comments (4)

geoffreyp avatar geoffreyp commented on September 28, 2024 1

Thank you for the PR !

from framework.

chkoar avatar chkoar commented on September 28, 2024

I agree.

from framework.

geoffreyp avatar geoffreyp commented on September 28, 2024

I understand the confusion but all the code is based on one function that creates an object OneDimensionSolution with the decision vector and the objective vector and it is not easy to refactor this part.

I propose other changes :

  • rename def generate_solution(self, array, evaluate=True) by def create_solution_object(self, decision_vector, evaluate=True)
  • rename the attribute solution by decision_vector as I said in the issue #44
  • Specify in the documentation that we consider the Solution object as an object with a decision vector and an objective vector

The word "generate" is used for me in this context to designate the creation of the object and not the generation of the decision vector, so I understand that the documentation must be more precise

from framework.

sjvrijn avatar sjvrijn commented on September 28, 2024

The name create_solution_object(array) suggests that the main function of that method is to perform the action

solution = OneDimensionalSolution(array)

Wrapping that in a separate function just makes it needlessly complicated.

In PR #58, I've implemented my proposed change of removing generate_solution() and introducing evaluate(), leaving out the change to generate_random_solution. This turned out to be easier than I too had expected. You can see in the usage in the algorithm and tests that end result of the refactor outside of the Problem classes is just a rename from generate_solution to evaluate🙂

I approve of your remaining suggestions, i.e., renaming Solution.solution and further clarifying the documentation.

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.