Author Topic: (Challenge) To draw the shortest lwpolyline  (Read 108638 times)

0 Members and 1 Guest are viewing this topic.

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #210 on: January 22, 2023, 10:10:47 PM »
result from the original test
Retired

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #211 on: January 22, 2023, 10:44:17 PM »
added all the Strategies available in the library, some don't seem to work, most do



Retired

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #212 on: January 22, 2023, 10:50:41 PM »
Retired

kdub

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 1602
  • class keyThumper<T>:ILazy<T>
Re: (Challenge) To draw the shortest lwpolyline
« Reply #213 on: January 23, 2023, 01:46:33 AM »
Great link Dan !
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

some people complain about loading the dishwasher

Sometimes the question is more important than the answer.

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #214 on: January 23, 2023, 02:56:17 AM »
Great link Dan !

Right? The library is HUGE, some of the static .libs are 200 megabytes. I’ll put the lisp wrapper source in a convenient area as I’m sure there’s other useful goodies in OR-Tools

Retired

ribarm

  • Gator
  • Posts: 2876
  • Marko Ribar, architect
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2876
  • Marko Ribar, architect
Re: (Challenge) To draw the shortest lwpolyline
« Reply #216 on: January 23, 2023, 03:08:41 AM »
I suggest that you use this one (TSP-chlh-greedy-grid.lsp) : http://www.theswamp.org/index.php?topic=30434.msg612620#msg612620
, as it's very fast, but results are not always the best - there are no bigger permutation parameters like "depth" from TSP-A.lsp...
« Last Edit: January 25, 2023, 09:27:06 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Retired

ribarm

  • Gator
  • Posts: 2876
  • Marko Ribar, architect
Re: (Challenge) To draw the shortest lwpolyline
« Reply #218 on: January 23, 2023, 05:08:49 AM »
I suggest that you use this one (TSP-chlh-greedy.lsp) : http://www.theswamp.org/index.php?topic=30434.msg612620#msg612620
, as it's very fast, but results are not always the best - there are no bigger permutation parameters like "depth" from TSP-A.lsp...

I forgot to say that grid like situations are solved in both TSP-A.lsp and TSP-chlh-greedy-grid.lsp... You can download them to see solution, if you're stuck like I see...

[EDIT]
I've found some lacks with GRID disposition situations - newly fixed *.lsp attached here :
https://www.theswamp.org/index.php?topic=58049.msg612855#msg612855
[/EDIT]
« Last Edit: January 25, 2023, 09:27:32 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #219 on: January 23, 2023, 05:32:48 AM »
The docs even talk about optimal vs performance, here’s one that’s shorter, but there’s a time penalty.
There’s one setting where you specify “find the best solution in a given amount of time”
FirstSolutionStrategy can probably handle 10,000 to 100,000 points in under a second
LocalSearchMetaheuristic you have to set a time limit.

This library is available to other languages, if there’s a better set of instructions found, I can add them here

Here’s a shorter one, I had to let it run for a few seconds.

« Last Edit: January 23, 2023, 05:37:06 AM by beck's bolero »
Retired

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #220 on: January 23, 2023, 06:13:13 AM »
Help me with names  :uglystupid2:

(vlce_cheapestpathfss Stratagy Scale Points); calls solveFirstSolutionStrategyLispFunc
(vlce_cheapestpathlsm Stratagy TimeLimitInSeconds Scale Points); solveLocalSearchMetaheuristicStrategy

(make-lwpolyline (vlce_cheapestpathlsm 4 1 1000 lst-a));  SIMULATED_ANNEALING , 1 second, scale… length 3714.7559

Retired

beck's bolero

  • Retired
  • Needs a day job
  • Posts: 7675
  • AKA Daniel
Re: (Challenge) To draw the shortest lwpolyline
« Reply #221 on: January 23, 2023, 08:40:46 AM »
posted the source and binaries here.. https://www.theswamp.org/index.php?topic=58049


Retired

ribarm

  • Gator
  • Posts: 2876
  • Marko Ribar, architect
« Last Edit: January 29, 2023, 03:17:40 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2876
  • Marko Ribar, architect
Re: (Challenge) To draw the shortest lwpolyline
« Reply #223 on: February 04, 2023, 04:12:02 PM »
I strongly believe that we should avoid permutations, if it is possible... Key here is in function (fff), but it does nothing - preliminary sort through (generic) has already defined final shape of path, which is wrong... If we solve (fff) correctly, then that would be a solution...

M.R.
« Last Edit: February 05, 2023, 03:21:42 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube