Coder Social home page Coder Social logo

Comments (5)

kiesoman avatar kiesoman commented on September 27, 2024 1

Hi,
It is workable to install the newest version of OR-Tools in environment.
However, you should change the the content around 63 line in baseline.py as below:
cp_model.LinearExpr.Sum(
[fsi[s, i] * zsl[s, l] for s in range(n_superitems) for l in range(max_layers)]
)
the argument should be a list, and then it will fit len() requirement.

you also need to change 77 line and 114 line.
enjoy.

from 3d-bpp.

Wadaboa avatar Wadaboa commented on September 27, 2024

Hi,

Thanks for opening the issue.

Could you please dump some information about your Python environment? Also, what is the actual exception raised by the code? I cannot see it in the stacktrace you pasted above.

Thanks,
Alessio.

from 3d-bpp.

rlacjfjin avatar rlacjfjin commented on September 27, 2024

You can rewrite the wrong part, which may be caused by the inconsistent version of ortools. (my ortools version is 9.3.10497)
I have found problems involving the cp_model.LinearExpr.Sum() function, which you can simply write as sum().

I hope to owner (@Wadaboa) provide an environment in which the project can run normally, such as requirements.txt or environment.yml of conda.

And I have a question:
You implemented it in the form of constraint programming, but is also can using MIP form, I think two ways are same.
Is there any reason for you to choose constraint programming? (For example, constraint programming solver is faster?)

Looking forward to your reply,
Thanks.

Zhe

from 3d-bpp.

Wadaboa avatar Wadaboa commented on September 27, 2024

Hi @rlacjfjin,

In the init/ folder you can find 2 files: requirements.txt and environment.yml. The former is for pip environments, while the latter for Conda environments. The README also has a brief Installation section about this. As you can see in the mentioned files, the version of OR-Tools we relied on is 8.2.8710, so I expect the exception above to disappear when the environment is correctly set up. Please let me know if this isn't the case.

As for your question, we implemented the sub-problem as both CP and MIP for education purposes and also because of the additional utilities available in the CP solver, such as decision strategies and search branching methods. In our final tests, we went for MIP in the "no-placement" sub-problem and CP in the "placement" sub-problem: we experimented with different combinations and this one seemed to be the fastest, but this might vary depending on the data you use.

Let me know if you have any other question. Thanks,
Alessio.

from 3d-bpp.

rlacjfjin avatar rlacjfjin commented on September 27, 2024

@Wadaboa ,
Thank you, I have no more questions.

from 3d-bpp.

Related Issues (11)

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.