Talk:Simulated annealing

From Rosetta Code
Revision as of 20:45, 23 March 2016 by Rdm (talk | contribs)

Task should be more specific

This looks like it could be a fun task. But currently it asks for 100 cities, without specifying the travel costs between these cities. (It also leaves out the definitions of the names in the pseudocode - something which currently requires a visit to the wikipedia page.)

We're going to need a specific task before we can have valid implementations. --Rdm (talk) 15:23, 23 March 2016 (UTC)

The travel cost between two cities is the distance between these cities (added in the task description). The definitions should be in the notations paragraph. Could you tell what is missing ? Thx. --G.Brougnard (talk) 17:13, 23 March 2016 (UTC)

Those costs are missing. There are up to 10000 costs to be considered for this case - they could be specified by posting them to a page or algorithmically, but currently I do not know what those costs should be. --Rdm (talk) 17:23, 23 March 2016 (UTC)
The cost is the euclidian distance, and the distance is the cost. 4 exemples are given. To compute the cost between two cities a and b at (xa,ya) (xb,yb), use sqrt (xa-xb)^2 + (ya - yb)^2 .--G.Brougnard (talk) 17:28, 23 March 2016 (UTC)
Oh, I see it now. I'll try that. Thanks. --Rdm (talk) 17:42, 23 March 2016 (UTC)
Added precisons about the cities location- Were needed - Thx - --G.Brougnard (talk) 18:03, 23 March 2016 (UTC)
Another issue is this: Pick a random neighbour city v > 0 of u , among u's 8 (max) neighbours on the grid. vs The cities are all connected. I'm having a problem figuring out how this pair of constraints makes sense. (More specifically - what does this pair of constraints mean for my data structures?) --Rdm (talk) 20:45, 23 March 2016 (UTC)