-
Notifications
You must be signed in to change notification settings - Fork 4
Different .osil directories for multithreading #1
Comments
Yeah, the default behavior is not at all suitable for solving multiple problems simultaneously, sorry about that. I should make a note about that on the readme (or if you want to suggest an edit in a PR, go right ahead). Can you try setting the I'm not sure what feasibility reformulations you might try without knowing much about the structure of your problem. It looked like you were doing a lot of database access and other things to populate the problem data. The .osil file should be a self-contained way of reproducing the formulation including all data though, might be good to share that with the Couenne mailing list (if you can) as a problem it was having trouble with vs Bonmin was able to solve it. Usually I'd expect it to be the other way around, Bonmin is a heuristic and only gives local optima when the continuous part of your MINLP is non-convex, vs Couenne does more sophisticated (and computationally expensive) relaxations to try to get a global solution. I'm also curious about what compilation troubles you had, if they're anything I could improve on. If you're on OSX, sorry I didn't finish packaging binaries of Couenne, CppAD, and OS via Homebrew yet. That would make things a little easier and I should get back to finishing that. |
About the problem: I try to calculate so called conservative nuclide vectors. A nuclide vector (NV) is a theoretical distributions of radioactive nuclides in a population of given samples. This distribution needn't to be representive. This distribution must fulfill the requirement, that the specific activity of the NV over the specific activity of a given sample must be greater equal 1 to be conservative. The boundaries for this requirement are calcaluted here:
C -> The sum of the so called Co60-equivalent (each nuclide have a different sensibility to be detected) The objective (maximize the sum of Co60 and Cs137) is choosen to get best measurability in practice. compilation problems: It was not clear which packages OS needed (i use the errors to get to know which packages i also need. At least the path to I also get the following error in some case:
The corresponding osol and osil files: I can't reproduce the :Infeasible status for a feasible problem in Bonmin again. Couenne works, but not as intended. I increase the upper bound with each iteration and :Infeasible status but with some low upper bound couenne produce the status :Error. The results file say it all, but shouldn't be it an :Infeasible instead of :Error? |
You shouldn't need to install OS system-wide here. Most likely what happened was it couldn't find the compiled libraries from Cbc. What platform are you on, are you using the latest version of Cbc, and have you done I have not seen I notice your osil file has quite a few occurrences of |
Your variables are all nonnegative, and the denominator of every nonlinear constraint looks to be the same expression
so you should be able to multiply both sides of |
I installed JuMP which came with Cbc, or not? I didn't install somethin systemwide before. All was JuMP und Ipopt through julia. I use aptosid (debian sid) x64 with apt and sid sources + additional aptosid sources (bug fixes + patches).
In your example idx=0 is Co60 (Co60 equivalent 1) and idx=1 is Cs137 (Co60 equivalent of 0.3414). This is also the reson to maximize the sum of both. |
Cbc does not get installed by default, but it is listed as a dependency of this package. So when you did The only place I set |
When I build CoinOptService I get the message, that Cbc is build. Is this such a big deal if tere are a few 0.0 coeff in a sum in the denominator(which would definitely not be zero)?
Is there an upper limit for constraints? |
It looks like the only problem was at
No, not really. Just a bit more I/O and processing for the solver to do, I don't know if or when it will be smart enough to remove those terms. You could avoid creating them in the first place by looping over only indices where the coefficients are nonzero in your problem formulation.
I highly doubt it... that's either a coincidence or a serious bug somewhere. Regardless, higher priority for you should be trying a MILP formulation. If you don't need to deal with experimental MINLP features, you shouldn't have to. You have an affine expression with all nonnegative coefficients and all nonnegative variables in the denominator, so it's a valid transformation to multiply that out. |
Thanks for the suggestion. Is MILP the same as MIP? (http://jump.readthedocs.org/en/latest/installation.html#getting-solvers) I modified the problem but get a few strange results from JuMP itself with a double sided constraint. But this is not for this issue, which is already miles away from the original problem. ;) Conclusion: CoinOptService.jl works nearly fine for problems in the real world :) P.S.: Cbc works VERY fast. |
Hm, with those versions you should have the latest builds of everything so I'm not sure why the print level patch wouldn't get applied, or the qcqpmodel test would have any problems...
Yeah, see also the table at http://www.juliaopt.org/ - I think the one from JuMP's docs hasn't been updated to account for MINLP capability, which was implemented only a few months ago for KNITRO.jl. JuMP has had mixed-integer-linear capabilities since the beginning (or well before I started using it anyway), the nonlinear stuff is newer. And the table hasn't been updated for this package since it's still kind of experimental and not formally a part of JuliaOpt, though it's designed to work together with JuliaOpt packages.
Oh right, you will need to split that up into 2 separate inequality constraints, since range constraints in JuMP need to have constants on either side I think.
I could probably add a note in the readme about solving multiple problems simultaneously to close this issue. I don't quite want to pick a random filename by default and delete it after solving the problem, since looking at the generated osil files is really useful (and I don't need access to your data sources to run the same optimization problem). Maybe I'll eventually do this as default behavior but add a debug flag for leaving the files around.
Your problem is pretty small, so I'm not surprised. |
Ah, I see this happening. I think this can happen if you don't have |
Hi and thanks for the help (https://groups.google.com/forum/#!topic/julia-opt/KzkWeVY2woI)
If I use multithreading to optimize more problems in less time I get sometimes an error that
results.osrl
is empty. It seems that every worker use the samePkg.dir("CoinOptService", ".osil")
and overwrite the used file for another worker.It would be nice if there is some way to use subdirectories for every worker.
The text was updated successfully, but these errors were encountered: