question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Initial Solutions

See original GitHub issue

Hi, First of all, thank you for a great tool. I have one question about the status of the generation of initial solutions; I’m using your tool to solve a Multi-Depot VRP. I’m currently using a simple “cheapest-arc”-ish initial solution. I saw that in https://jmetal.readthedocs.io/en/latest/autoconfiguration.html there is a parameter called createInitialSolutions in the NSGA-II. It seems like this is only the case for the java version. What is the status of initial solutions for python?

Best Regards

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
CryoARIUMcommented, Dec 12, 2021

@AndreasH96 Thank you for your reply ! I would like to use my own initial solutions. Your code help me to extend problem class. I will try my own problem with my initial solutions.

0reactions
AndreasH96commented, Dec 10, 2021

Could you please show any examples that how to extend the problem class or create_solution function in order to use your own initial solution ? @AndreasH96

Hi @CryoARIUM , I was extending the PermutationProblem class, here is a minimalistic example of how I did it. It was a while since I did this but I hope this solves your problem? I stored parameters in a dictionary called problemData and passed it to the customized class.

class VRP(PermutationProblem):
    
    def __init__(self,problemData):
        super(VRP,self).__init__()
        

        self.object_directions=[self.MINIMIZE,self.MINIMIZE]
        self.number_of_objectives = problemData['objective_amount']
        self.objective_labels = problemData['objective_labels']
        self.number_of_constraints = problemData['constraint_amount']
        self.number_of_variables = problemData['number_of_cities']
     
    
        
    
    def create_solution(self) -> PermutationSolution:
        new_solution = PermutationSolution(number_of_variables=self.number_of_variables,
                                           number_of_objectives=self.number_of_objectives,
                                           number_of_constraints=self.number_of_constraints)        
        
        new_solution.variables = customInitialSolution(<input>)
     
        return new_solution
        
Read more comments on GitHub >

github_iconTop Results From Across the Web

Initial Value Problem Questions and Answers - Study.com
Initial Value Problem Questions and Answers. Test your understanding with practice problems and step-by-step solutions. Browse through all study tools.
Read more >
Differential Equations Practice: 1st Order - Questions Solutions
Example (2.2.24) Solve the initial value problem y = (2 - ex)/(3 + 2y),y(0) = 0 and determine where the solution attains its...
Read more >
Solved Find an initial solution to the following | Chegg.com
Question : Find an initial solution to the following transportation problem. Based on the given demand and supply, the given transportation problem is....
Read more >
Initial Value Problem - YouTube
This calculus video tutorial explains how to solve the initial value problem as it relates to separable differential equations.
Read more >
Find all the solutions of the initial value problem for a first ...
Thus (1) will not have an unique solution in general. One solution is trivial and it is: y(x)=0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found