I want to solve binpacking problem using Ipopt with JuMP which is a linear programming. Can someone help me with the code
I already replied to your previous question:
Constraints of type MathOptInterface.VariableIndex-in-MathOptInterface.ZeroOne are not supported by the solver. When using Ipopt solver in Julia
The JuMP community forum is a more appropriate place for general discussion. SO is more for specific questions.
https://discourse.julialang.org/c/domain/opt/13
Related
I am using the packages lpSolve and lpSolveAPI in R for linear programmation.
I end up with infeasible models. So, I would like to know if there exists a function that finds the constraints that are not met and that tests with differents set of constraints to get a feasible model.
I have looked at the lpSolveAPI documentation (https://cran.r-project.org/web/packages/lpSolveAPI/lpSolveAPI.pdf) and I wonder if the lp.control.options could help me, but I do not understand the provided explainations.
Plus, I can't do it manually because I have too many constraints.
Thanks if someone understood my problem and could help me.
This is quite a general question, but I have not been able to find a solution so far.
I am trying to solve a problem of combinatorial optimization in which I have several objective functions to optimize, as well as several constraints to impose. I am thus trying to find some software (an R package preferably) that can solve this problem.
I have explored several options, but none of them seems to be useful for my purpose: lpSolveAPI is aimed for linear programming only, which is not the case; mco can minimize a multidimensional objective function, but does not seem to be able to manage binary (i.e. decision) variables, needed for combinatorial problems; adagio and CEGO can deal with combinatorial optimization problems, but as far as I can see they can only optimize a single unidimensional function.
Is there any other package I am not aware of that can handle this type of problem? Or any of the aforementioned may be useful, though I may be missing the way to the functionality I need?
Thank you so much in advance with this. It is being really a nightmare trying to find this out.
Does someone have an implementation of Iterative Closest Point (ICP) algorithm for two dimensions (2D) in R?
Here is an attempt in c#
Iterative Closest Point Implementation
Here is a more general question
iterative closest point library
This is to match two sets of points through translation and scaling.
Spacedman's comment is probably best. You might also take a look at http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=12627&objectType=file for a matlab implementation. Assuming it works ok, translating Matlab to R code is relatively easy.
This is somewhat of an answer in the form of a non-answer.
There are many variants of ICP. The design choices are at least partially organized by the late 90's Ph.D. work of Pulli and by Rusinkiewicz & Levoy. If you're going to be using ICP for anything remotely important (translation: "more than just a class assignment"), you should understand the tradeoffs.
Thus, it's probably best to take one of the existing implementations and port it to R.
3 Years too late, but there is the function icpmat in the package Morpho by the same guy who wrote Rvcg. I don't know which variant is implemented though.
Link:
https://github.com/zarquon42b/Morpho
There is a self-contained (as far as I can tell) C++ implementation of ICP here. Maybe you can create your own R wrapper around this C++ code.
I'm currently looking for a lua alternative to the R programming languages; optim() function, if anyone knows how to deal with this?
http://numlua.luaforge.net/ looks interesting but doesn't seem to have minimization. The most promising lead seems to be a Lua wrapper for GSL, which has a variety of multidimensional minimization algorithms included.
With derivatives
- BFGS (method="BFGS" in optim) and two conjugate gradient methods (Fletcher-Reeves and Polak-Ribiere) which are two of the three options available for method="CG" in optim.
Without derivatives
- the Nelder-Mead simplex (method="Nelder-Mead", the default in optim).
More specifically, see here for the Lua shell documentation covering minimization.
I agree with #Zack that you should try to use existing implementations if at all possible, and that you might need a little bit more background knowledge to know which algorithms will be useful for your particular problems ...
R's implementation of optim isn't actually written in R. If you type "optim" with no parentheses at the prompt, it'll dump out the definition of the function, and you can see that after some error checking and argument shuffling it invokes an .Internal routine (coded in C and/or Fortran) to do all the real work.
So your best bet is to find a C library for mathematical optimization -- sorry, I have no recommendations -- and wrap that into Lua. I doubt anyone has written native-Lua code for this, and I would not recommend trying to code it yourself; doing mathematical optimization efficiently is still an active domain of basic research, and the best-so-far algorithms are decidedly nontrivial to implement.
I am doing matrix operations on large matrices in my C++ program. I need to verify the results that I get, I used to use WolframAlpha for the task up until now. But my inputs are very large now, and the web interface does NOT accept such large values (textfield is limited).
I am looking for a better solution to quickly cross-check/do math problems.
I know there is Matlab but I have never used it and I don't know if thats what will suffice my needs and how steep the learning curve would be?
Is this the time to make the jump? or there are other solutions?
If you don't mind using python, numpy might be an option.
Apart from the license costs, MATLAB is the state of the art numerical math tool. There is octave as free open source alternative, with a similar syntax. The learning curve is for both tools absolutely smooth!
WolframAlpha is web interface to Wolfram Mathematica. The command syntax is exactly the same. If you have access to Mathematica at your university, it would be most smooth choice for you since you already have experience with WolframAlpha.
You may also try some packages to convert Mathematica commands to MATLAB:
ToMatlab
Mathematica Symbolic Toolbox for MATLAB 2.0
Let us know in more details what is your validation process. How your data look like and what commands have you used in WolframALpha? Then we can help you with MATLAB alternative.