-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could you please introduce how to build the problem file? #14
Comments
Hi,
|
Hi, |
You can export the .lp file from gurobi as:
Ref: https://www.gurobi.com/documentation/9.5/refman/py_model_write.html |
When I run the command "bdd_solver_cl -i test.lp -s mma_cuda", it throws the error "bdd_solver_cl: /opt/BDD/src/bdd_cuda_base.cu:475: void LPMP::bdd_cuda_base::update_costs(COST_ITERATOR, COST_ITERATOR, COST_ITERATOR, COST_ITERATOR) [with COST_ITERATOR = __gnu_cxx::__normal_iterator<double*, std::vector >; REAL = float]: Assertion `std::distance(cost_hi_begin, cost_hi_end) <= this->nr_variables()' failed. Gurobi can solve the problem within 5s, Running time: 4.653985500335693 seconds, total cost: 988000. Details:
The output is: |
This is the .lp file. https://drive.google.com/file/d/1xmwVg0MQOzbLHZhKTwmVfMmqXdx_SR6k/view?usp=share_link |
Thanks for providing the .lp file. The issue is we assume that each variable is present atleast once in a some constraint. For the provided file there are some which are not in any constraint. A simple way to fix this is by presolving first (which will remove such variables) and then do:
(edit: there is still an error, I am looking into it) |
Maybe " each variable is present at least once in a constraint" is not a general case... But, you still do a good job! If it can be extended to a general LP or NLP, it will be more useful! I wish the algorithm can work in my job and I will also cite it. |
In addition, the work will be more popular if it has a python interface. I am thinking about how to call the BDD in my python source code. |
|
The setup.py cannot be installed in my machine. The output log is as following:
|
Please try again with the latest code. |
Great! It can be installed for python. Thanks for your work! The command `Traceback (most recent call last):File "/home/jackokie/Program/anaconda/lib/python3.9/runpy.py", line 197, in _run_module_as_main Invoked with: <bdd_cuda_learned_mma>: nr_variables: 1303, nr_bdds: 100, nr_layers: 27485, 1.1, 1.1, 200, True I just wish the work was more perfect. There is no hostility. Thanks! |
You are right. I will work on getting these things in order in coming days. |
OK. Keep in touch. Looking forward to the improvement of the job. |
Another test question: min s.t. c_u_x4_: c_u_x5_: c_e_ONE_VAR_CONSTANT: bounds |
I see many possible issues in the LP file.
|
I have added python interface. Please check py-interface |
Hi. The solver output a lower bound with many times iterations. But the lower bound is different with the Gurobi objective value. |
|
I try to solve 0-1 linear programming problem. The problem is attached in the following link.
|
|
If I have a million variables, can the solver work? Could you please explain how to build a problem file for the BDD?
In addition, the compile will break for the reason "/home/XXX/Downloads/BDD/include/run_solver_util.h(68): error: namespace "std" has no member "cout". If I add "# include " in the header file, the compile will work.
The text was updated successfully, but these errors were encountered: