Coder Social home page Coder Social logo

merschformann / sardine-can Goto Github PK

View Code? Open in Web Editor NEW
73.0 3.0 16.0 7.33 MB

Humble 3D knapsack / bin packing solver

License: MIT License

C# 99.82% Dockerfile 0.08% Batchfile 0.02% Shell 0.08%
cplex gurobi gui mixed-integer-programming heuristics packing-algorithm bin-packing knapsack-problem 3d-packing 3d-bin-packing

sardine-can's Introduction

SardineCan

SardineCan is a humble 3D knapsack / bin packing solver with some special constraints. It is a collection of constructive heuristics, meta-heuristic attempts and linear models with CPLEX & Gurobi bindings.

sample screenshot

Outline

  • SC.Service
    • Jobmanager/runner as a RESTful service for integration with other applications
  • SC.GUI
    • GUI for experimenting with the algorithms and rendering instances
  • SC.CLI
    • Command-line interface with a JSON-in/JSON-out style

Quickstart

Spin it up (requires docker):

docker run -d --restart always -p 4550:80 --name sardinecan ghcr.io/merschformann/sardinecan:latest

Swagger UI description of the RESTful service can be found here (or at the port of your choice): http://localhost:4550/swagger

Remarks

The code mainly derives from my (Marius Merschformann) master thesis (2014) and was primarily uploaded to enable colleagues to use it for their projects. However, it would be great, if it is useful to even more people. :)

Gurobi & CPLEX support

Unfortunately, I cannot ship the Gurobi and CPLEX libraries with the code. I made an attempt of not relying on these during compile time by moving them to a Nuget package (Atto.LinearWrap). Even though this part works, I had some issues when supplying the dlls later on. Let me know, if you have ideas how to overcome this.

I hope I can provide a solution for all who have access to Gurobi and/or CPLEX in the future, so that the model formulations can also be tested.

Contributors

The code mainly originated from the master-thesis of Marius Merschformann (2014). Find a copy here.

The implementations around pre-processing were done by Daniel Erdmann and Simon Moss during a university project. Further work on ALNS & some further extensions were done in collaboration with Daniela Guericke.

sardine-can's People

Contributors

merschformann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sardine-can's Issues

FileNotFoundException, gurobi90.netstandard20

Hello.

I obtained gurobi dlls, but I cannot figure out where to put them, so the GUI app works in HybridStyle.
Can you please give more info on that?

System.IO.FileNotFoundException: 'Could not load file or assembly 'gurobi90.netstandard20, Version=9.0.0.0, Culture=neutral, PublicKeyToken=21e2c4b1860157bc'. The system cannot find the file specified.'

I have gurobi90.netstandard20.dll of exact same version 9.0.0.0

Gurobi NuGet package

Thanks for the nice library, I enjoyed reading your code! In the readme you mentioned having trouble shipping the Gurobi library. You may want to consider using the Gurobi NuGet package which could hopefully solve those issues.

Everything in offload

Unsure what's wrong, everything appears to be placed in "offload".

Keeping the default values in the "Try it!" section, I change containers and add two, and add two pieces to pack, where the pieces both fit into either container. (I've tried 1x1x1, 2x2x2).

  "instance": {
    "name": "string",
    "containers": [
      {
        "id": 0,
        "length": 3,
        "width": 3,
        "height": 3
      },
      {
        "id": 1,
        "length": 4,
        "width": 4,
        "height": 4
      }
    ],
    "pieces": [
      {
        "id": 0,
        "flags": [
          {
            "flagId": 0,
            "flagValue": 0
          }
        ],
        "cubes": [
          {
            "x": 0,
            "y": 0,
            "z": 0,
            "length": 2,
            "width": 2,
            "height": 2
          }
        ]
      },
      {
        "id": 1,
        "flags": [
          {
            "flagId": 0,
            "flagValue": 0
          }
        ],
        "cubes": [
{
            "x": 0,
            "y": 0,
            "z": 0,
            "length": 2,
            "width": 1,
            "height": 1
          }
        ]
      }
    ],

The result is always the same:

{
  "containers": [
    {
      "assignments": []
    },
    {
      "assignments": []
    }
  ],
  "offload": [
    0,
    1
  ]
}

What's up?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.