I'm on Ubuntu, when I want to add Clpex functions to octave so I can use Cplex functions, using addpath() to pass the folder path as below :
>> addpath('/opt/ibm/ILOG/CPLEX_Studio1210/cplex/matlab/x86-64_linux')
The command is valid with no errors, then I enter the Cplex command to check that Cplex has been added, I get the following error :
>> Cplex
error: class not found: dynamicprops
Is there a way to fix this ?
Both comments to the question are correct:
CPLEX does not have octave support
dynamicprops is not implemented in octave.
Given that the CPLEX matlab API depends on dynamicprops, it will not work in octave as is.
However, you can try a workaround: first install https://github.com/farhi/octave-dynamicprops. It is not a drop-in replacement for matlab's dynamicprops, but may be sufficient. CPLEX uses dynamicprops for handling parameters, so if you do not modify any parameters then octave-dynamicprops may give you just enough to get cplex working. Of course, even if this works now it may break down in the future...
Good luck!
I have an OR problem and using an academic version of cplex library in the jupyter notebook by python 3.6.
When I am calling the following command I get an error:
command:
solution=mdl.solve(log_output=True)
error:
TypeError: can't pickle dict_keys objects
when I removed (log_output=True) everything works just fine, but I need the detailed output.
Since this is a crossed reference question, I would rather not repeat myself and confuse other people. The reason to ask here is that different scholars are attending these two reference webpages.
https://github.com/IBMDecisionOptimization/docplex-examples/issues/14
If I find my answer in stackoverflow I will share the solution procedure here and on github.
From the solution found in the external link: the problem is fixed in docplex ersion 2.10.150. Upgrading to that version fixes the problem.
As Daniel Junglas mentioned there were some inconsistencies between the two version of docplex toolbox and cplex 12.9 academic version I was using. A member of IBM team noticed the problem and updated the docplex version. And the lastest version up to date 07/08/2019 is here https://pypi.org/project/docplex/2.10.150/.
Many thanks to IBM Team.
I'm new for programming languages. I have build Ctrax programe from source, everything work except tracking part. The issue is a picture below:
I used UBUNTU 16.04 , python 2.7.12 and others for the program requirement. According to publisher, he said it could possibly be fixed by adding .ascontiguousarray() after the .astype() call in that final line from the error message. Since you have the code compiling, you could simply try it and see if it works. (https://docs.scipy.org/doc/numpy/reference/generated/numpy.ascontiguousarray.html)
I tried it but still confuse.
Please suggest, many thanks
This is Ctrax link and requirement: http://ctrax.sourceforge.net/install.html#distutils
Hi I'm trying to build opengm with python3, which is allegedly supported. Crosspost to opengm forum here. The reason I ask is that I get an error on "PyInt_FromLong" which is according to this article something that shouldn't come up when porting a c library like opengm to python3. When I changed this to PyLong_FromLong, I ran into another compilation problem down the line from numpy.core.multiarray. Also note that it builds (with the appropriate ccmake options) with Python2 just fine.
My questions are:
1. Has anyone actually successfully build this?
2. Can anyone shed some light as to whether this is something on my end or theirs?
Thanks,
Chris
I'm trying to use the new OpenCV 2.0 API in MS Visual C++ 2008 and wrote this simple program:
cv::Mat img1 = cv::imread("image.jpg",1);
cv::namedWindow("My Window", CV_WINDOW_AUTOSIZE);
cv::imshow("My Window", img1);
Visual Studio returnes an unhandled exception and the Console returns:
OpenCV Error: bad flag (parameter or structure field)
(Unrecognized or unsupported array type) in unknown function,
file ..\..\..\..\ocv\opencv\src\cxcore\cxarray.cpp, line 2376
The image is not displayed. Furthermore the window "My Window" has a strange caption: "ÌÌÌÌMy Window", which is not dependent on the name.
The "old" C API using commands like cvLoadImage, cvNamedWindow or cvShowImage works without any problem for the same image file. I tried a lot of different stuff without success.
I appreciate any help here.
Konrad
As I just commented, imread isn't working for me either. A little googling shows other people having the same problem; I guess it's a bug in the library code. For now, here's a hacky workaround:
IplImage* img = cvLoadImage("lena.jpg");
cv::Mat lena(img);
cvReleaseImage(&img);
This way, you can at least use the C++ API for the rest of your stuff.
There's help for this issue.
The solution is, that the usual proposed opencv library files in the linker are not working properly. Instead try to use the debug library files by this:
In Visual C++:
go to Project->Properties (or Alt-F7)
Configuration Properties->Linker->Input->Additional Dependencies
replace the usual
" cv210.lib cxcore210.lib highgui210.lib" by
" cv210d.lib cxcore210d.lib highgui210d.lib" - which are the debugging libraries.
The OpenCv 2.0 API commands should work now.
I had the same problem described above which turns out to be caused by the settings of the linker.
I found the answer in another thread,
OpenCV 2.3 and Visual Studio 2010.
To repeat it here:
Properties of your project (right click on it)
C/C++
General
include directory add the < your directory >\OpenCV2.3\include\opencv2, < your directory >\OpenCV2.3\include\opencv and < your directory >\OpenCV2.3\include
Linker
General
List item
Input
Add all the libs like opencv_core230d.lib opencv_highgui230d.lib and so on...
Once I've done the above, I can run imshow and imread + all other cpp functions seamlessly! OP's problem has probably already been resolved, but hopefully this will be useful to other people who are led here looking for the same solution.
Are you sure you added the whole path starting from /home/.... I had the same problem as you but when I added the whole path, things work out pretty well. The whole path had to be added despite the fact the path exists in the include files.
imread in openCV unlike Matlab does not return an error when file/folder is not found - instead it returns a null matrix, which in turn is reflected as an error during imshow.
Also, imread does not look for image files in the included folders or the workspace. So, specify the entire path whenever possible.
Please take a note of this for future references.
Firstly, you'd better compile your own version OpenCV.
I had the same error with the build (I got from Sourceforge), and solved by compiling my own version in debug and release versions.
And make sure you change the original system env variable PATH to the new build folder build/bin, then you could build and run the imshow() in Debug mode.
I believe this might be related to unicode.
Try the macro _TEXT()
For example:
cv::Mat img1 = cv::imread(_TEXT("image.jpg"),1);
Unicode in Visual C++ 2