New to R, currently on a college project on optimization using hillclimbing and completely dead in the water...
Any willing to lend a hand will be much obliged...
problem in hand: minimum distance and or maximum profit for a combination of 5 cities...
got a matrix of possible combinations of routes, starting on a sixth city, got a function to get the distance between cities but am struggling to write the functions to have the truck stop at a given city when load gets to 0...
I would really encourage you to review the following guide, FAQ: Tips for writing R-related questions.
For example, the guide emphasizes asking coding questions with formatted code-chunks and a reprex.
You may have noticed folks here requesting minimal reprexes, that's because asking questions this way saves answerers a lot of time.
Reproducible Examples:
help make your question clear and replicable
increases the probability folks will reach out and try to help,
reduces the number of back-and-forths required to understand the question,
and makes your question and suggested solutions more useful to folks in the future researching similar problems.
But also please bear in mind the forum homework policy.
It seems that you recently asked a question that originated from a class or workshop, and I wanted to make sure you were seeking help here in a way that maximizes the chances of getting good help (without violating our homework policies).