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!
Related
I am trying to run a co-simulation model using OMSimulator. I managed to create a FMU from a TRNSYS model thanks to this tool: https://sourceforge.net/projects/trnsys-fmu/
When I import it, I get the following error:
[2] 12:23:32 Scripting Error
[fmiLogger] module FMI2XML: Start attribute is required for this causality, variability and initial combination
It seems that I need to initialize some variables (not sure about what) in the OMSimulator command line. I think that it is the Lua script I heard about, but I cannot really find it.
I would really appreciate it someone could help me on this, since the documentation (https://openmodelica.org/doc/OMSimulator/v2.0.1/html/OMSimulator.html) it is not enough for my level.
Thanks!!!
It seems to be a problem with the FMU and not OMSimulator. The start value is required in the modelDescription.xml file of the FMU according to the FMI specification.
Matlab16, Linux 16.04, Gurobi 6.5.2
I want to use Cobra toolobox on Matlab, so I installed it and Gurobi as asked too.
But when I try this code (as explain in an research article : What is FBA ? Orth, Palsson) I got an error
The code
model = readCbModel('ecoli_core_model.xml')
optimizeCbModel(model)
The error
`Error using solveCobraLP (line 107)
No solver found. call changeCobraSolver(solverName)
Error in optimizeCbModel (line 213)
solution = solveCobraLP(LPproblem);
`
In changeCobraSolver.m, it said that Gurobi is a right solver. Apparently, Matlab and Gurobi are not connected.
I added .../gurobi652/linux64/matlab to the path and I tried (as explain here http://www.gurobi.com/documentation/6.5/refman/matlab_setting_up_the_guro.html) a function. I worked.
I tried to install Gurobi Mex (here http://www.convexoptimization.com/wikimization/index.php/Gurobi_Mex:_A_MATLAB_interface_for_Gurobi) but I don't find Gurobi_mex.c
Yesterday optimizeCbModel worked but I don't know what I did and what changed.
I notice that, if I try testAll then optimizeCbModel succeed (no error at least). I think we need to do initCobraToolbox first.
Make sure you are in CobraToolbox folder in MATLAB directory first. Call initCobraToolbox
changeCobraSolver ('gurobi', 'all')
Both read and optimize functions should be able to be used now.
You may find it easier to use .mat files for input model. These can be found under cobratoolbox --> test --> models --> mat
Hope this helps
I followed all the instructions provided in the docs/msw/install.txt file for building wxWidgets 3.0.2 using cygwin with all the necessary tools installed.
And even after using the configure script with all the different possible options.
But still it doesn't build properly.The configure script executes correctly but when i use make it shows me this error.
Error:
cannot convert ‘wxString’ to ‘const void*’ for argument ‘2’ to ‘ssize_t cygwin_conv_path(cygwin_conv_path_t, const void*, void*, size_t)’
cygwin_conv_path(CCP_POSIX_TO_WIN_W, strDir, windowsPath, MAX_PATH);
If any one can help me on this i will highly appreciate it.
Thank you.
First of all, are you absolutely sure that you really want to use the Cygwin port of wxWidgets? This is almost never a good idea and it's strongly recommended to use Cygwin as the build environment for building the native MSW port using MinGW (cross-)compiler as explained in this post.
If you really do need Cygwin, it looks like you need to insert .c_str() call here, i.e. write cygwin_conv_path(CCP_POSIX_TO_WIN_W, strDir.c_str(), windowsPath, MAX_PATH), as you're probably using --enable-stl and the implicit conversion is not available.
Is there a FormAlchemy alternative for Python3.2? I'm specifically interested in using it in conjunction with Pyramid.
I'm getting syntax errors when setting up FormAlchemy1.3.3 so their latest release is not compatible.
At time of writing there is none
I'm trying to get the pymysql module working with python3 on a Macintosh. Note that I am a beginning python user who decided to switch from ruby and am trying to build a simple (sigh) database project to drive my learning python.
In a simple (I thought) test program, I am getting a syntax error in confiparser.py (which is used by the pymysql module)
def __init__(self, defaults=None, dict_type=_default_dict,
allow_no_value=False, *, delimiters=('=', ':'),
comment_prefixes=('#', ';'), inline_comment_prefixes=None,
strict=True, empty_lines_in_values=True,
default_section=DEFAULTSECT,
interpolation=_UNSET):
According to Komodo, the error is on the second line. I assume it is related to the asterix but regardless, I don't know why there would be a problem like this with a standard Python module.
Anyone seen this before?
You're most certainly running the code with a 2.x interpreter. I wonder why it even tries to import 3.x libraries, perhaps the answer lies in your installation process - but that's a different question. Anyway, this (before any other imports)
import sys
print(sys.version)
should show which Python version is actually run, as Komodo Edit may be choosing the wrong executable for whatever reason. Alternatively, leave out the parens and it simply fails if run with Python 3.
In Python 3.2 the configparser module does indeed look that way. Importing it works fine from Python 3.2, but not from Python 2.
Am I right in guessing you get the error when you try to run your module with Komodo? Then you just have configured the wrong Python executable.