ModischFabrications / CutSolver

Webservice to determine ideal cut placement on stocks
https://cutsolver.modisch.me
GNU Lesser General Public License v3.0
31 stars 6 forks source link

Not optimized result #53

Closed erikhagemeijer closed 1 year ago

erikhagemeijer commented 1 year ago

Hello, I am testing CutSolver and when trying a job I don't get an optimal solution: Is there a way to select the solver type? Thanks for your efforts! { "job": { "max_length": 6500, "cut_width": 20, "target_sizes": { "1258": 2, "3958": 2 } }, "solver_type": "bruteforce", "time_us": 85, "lengths": [ [ 3958 ], [ 3958, 1258 ], [ 1258 ] ] }

ModischFabrications commented 1 year ago

Thanks for testing, that is definitely weird, thanks for the repro. Solver selection is planned, see #5 , but brute force should give guaranteed best solutions up to 12 entries. I haven't looked into the code for a while, do you have the means to debug yourself?

ModischFabrications commented 1 year ago

Just tested it out on a local installation, seems like it works on my end:

{
  "job": {
    "max_length": 6500,
    "cut_width": 20,
    "target_sizes": {
      "1258": 2,
      "3958": 2
    }
  },
  "solver_type": "bruteforce",
  "time_us": 137,
  "lengths": [
    [
      3958,
      1258
    ],
    [
      3958,
      1258
    ]
  ]
}

Can you pull the newest image, restart the application and try again with these values?

erikhagemeijer commented 1 year ago

Hello Robin,

I tested cutsolver until now through a php development environment and run the app from within.

I installed Docker on my Synology and am using this now. Luckily I see the same result now as you did!

I’m a Filemaker developer and am going to use your software in a Filemaker project. Sorry I can’t help you with this project.

Greatings,

Erik Hagemeijer.

Op 15 okt. 2022, om 18:12 heeft Robin Modisch @. @.>> het volgende geschreven:

Just tested it out on a local installation, seems like it works on my end:

{ "job": { "max_length": 6500, "cut_width": 20, "target_sizes": { "1258": 2, "3958": 2 } }, "solver_type": "bruteforce", "time_us": 137, "lengths": [ [ 3958, 1258 ], [ 3958, 1258 ] ] } Can you pull the newest image, restart the application and try again with these values?

— Reply to this email directly, view it on GitHub https://github.com/ModischFabrications/CutSolver/issues/53#issuecomment-1279775210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZ4T2FS2UPHBK5EP5DZBDLWDLJWXANCNFSM6AAAAAARC7ZBTI. You are receiving this because you authored the thread.

ModischFabrications commented 1 year ago

Huh, weird that the other environment gives wrong results, but good that it works now. Sounds interesting, feel free to send a reference if you intend to make it public.