Installation of dynareOBC

I need your help please.
I’ve been trying to get dynareobc to work for a while now, but even after reinstalling Matlab and dynare I get the following error message when running the command: dynareOBC TestSolvers:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                   Test|   Solution|                     Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   Core functionalities|        N/A|       Successfully solved (YALMIP)|
|                     LP|    Correct|   Successfully solved (INTLINPROG)|
|                     LP|    Correct|   Successfully solved (INTLINPROG)|
|                     QP|    Correct|     Successfully solved (QUADPROG)|
|                     QP|    Correct|     Successfully solved (QUADPROG)|
|                   SOCP|    Correct|      Successfully solved (FMINCON)|
|                   SOCP|    Correct|      Successfully solved (FMINCON)|
|                   SOCP|    Correct|      Successfully solved (FMINCON)|
|                    SDP|        N/A|                 No suitable solver|
|                    SDP|        N/A|                 No suitable solver|
|                    SDP|        N/A|                 No suitable solver|
|                    SDP|        N/A|                 No suitable solver|
|                 MAXDET|        N/A|                 No suitable solver|
|                 MAXDET|        N/A|                 No suitable solver|
|          Infeasible LP|        N/A|    Infeasible problem (INTLINPROG)|
|          Infeasible QP|        N/A|      Infeasible problem (QUADPROG)|
|         Infeasible SDP|        N/A|                 No suitable solver|
|      Moment relaxation|        N/A|                 No suitable solver|
|         Sum-of-squares|        N/A|                 No suitable solver|
|           Bilinear SDP|        N/A|                 No suitable solver|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Warning: Unrecognized function or variable 'opti_Install_Test'. 
> In dynareOBCSetup (line 189)
In dynareOBC (line 711) 

For DynareOBC problems, you should tag @cfp

opti_Install_Test.m should be in the Extern\OPTI\Utilities\Install directory of DynareOBC.

If you do not have that directory, there is something wrong with your DynareOBC install.

I suggest deleting what you have, redownloading the latest release, extracting to a folder with a short simple path (e.g. c:\dynareOBC) not some network folder, and making sure your copy of MATLAB can access the internet.

@cfp
Thanks for the answers!
I find opti_Install_Test.m in my path and have internet connection. It still gives me the same error message again.

Are you using a Mac or something?

I suggest you install Gurobi or similar if your Opti toolbox install is not working for some strange reason (e.g. because you’re using a Mac…).

@cfp
Im not using a Mac…
Is it still worth a try to install Gurobi?

It’s always worthwhile installing Gurobi, as documented in the ReadMe and Getting Started guide.

I do not understand the error you are getting. Debugging it would be helpful to me. (E.g. place a break point at line 185 of dynareOBCSetup.m and step through.)

I expect it is a path issue. It would be sensible to reset your MATLAB path, then add back Dynare’s Matlab directory (do not click add with sub-folders!) and DynareOBC’s main directory (again, do not click add with sub-folders!).

@cfp
You are talking about the addpath command right?

@cfp
I set a breakpoint at line 185:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                   Test|   Solution|                                   Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   Core functionalities|        N/A|                     Successfully solved (YALMIP)|
|                     LP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                     LP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                     QP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                     QP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                   SOCP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                   SOCP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                   SOCP|    Correct|              Successfully solved (GUROBI-GUROBI)|
|                    SDP|        N/A|                               No suitable solver|
|                    SDP|        N/A|                               No suitable solver|
|                    SDP|        N/A|                               No suitable solver|
|                    SDP|        N/A|                               No suitable solver|
|                 MAXDET|        N/A|                               No suitable solver|
|                 MAXDET|        N/A|                               No suitable solver|
|          Infeasible LP|        N/A|   Either infeasible or unbounded (GUROBI-GUROBI)|
|          Infeasible QP|        N/A|   Either infeasible or unbounded (GUROBI-GUROBI)|
|         Infeasible SDP|        N/A|                               No suitable solver|
|      Moment relaxation|        N/A|                               No suitable solver|
|         Sum-of-squares|        N/A|                               No suitable solver|
|           Bilinear SDP|        N/A|                               No suitable solver|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
185         if ( length( Architecture ) >= 5 ) && strcmp( Architecture(1:5), 'PCWIN' )

I was talking about the “Set path” option on the MATLAB GUI Toolbar.

Good you installed Gurobi! So what happens when you step through the code from there? Is the relevant Opti directory in the path at that point in time?

Thanks again for your help!
I have added the matlab subfolder of the gurobi folder at the path. However, it still does not find the desired function.

I was saying you need to remove things from your path. Reset your MATLAB path and start again.

I already reset my path with restoredefaultpath a few times but it didnt help.

Could you restart MATLAB, and then paste your complete path here. (I.e. the output of the “path” command.)

@cfp
Here are the default path and the path for the installation:
default Path.txt (22.7 KB)
path for install.txt (22.8 KB)

No obvious red flags here! Other than your use of Dynare 4.6. I recommend sticking with Dynare 4.5 for DynareOBC at present. Though I really doubt that explains this issue.
In any case, given your path looks fine, I expect DynareOBC will work fine. Just ignore the Opti toolbox issue. It’s irrelevant now you have installed Gurobi in any case.

@cfp
But how do I proceed if I choose to ignore the Opti toolbox issue?

If you have to, you can comment out the call to opti_Install_Test.

@cfp
Now I get the following error message when I want to test a simple example:
Error message.txt (2.3 KB)