# Installation of dynareOBC

**URL:** <https://forum.dynare.org/t/installation-of-dynareobc/18845>\
**Category:** Installation and Setup\
**Created:** [6 September 2021 18:40 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845 "2021-09-06T18:40:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [6 September 2021 18:40 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/1 "2021-09-06T18:40:51Z")

</div>

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:

```auto
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| 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) 

```

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [7 September 2021 07:26 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/2 "2021-09-07T07:26:58Z")

</div>

For DynareOBC problems, you should tag @cfp

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [7 September 2021 11:52 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/3 "2021-09-07T11:52:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [8 September 2021 16:05 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/4 "2021-09-08T16:05:53Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [8 September 2021 16:29 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/5 "2021-09-08T16:29:46Z")

</div>

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…).

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [8 September 2021 16:36 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/6 "2021-09-08T16:36:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [8 September 2021 17:03 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/7 "2021-09-08T17:03:57Z")

</div>

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!).

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [8 September 2021 17:28 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/8 "2021-09-08T17:28:37Z")

</div>

@cfp  
You are talking about the addpath command right?

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [8 September 2021 17:36 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/9 "2021-09-08T17:36:51Z")

</div>

@cfp  
I set a breakpoint at line 185:

```auto
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| 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' )

```

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 11:54 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/10 "2021-09-09T11:54:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 11:55 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/11 "2021-09-09T11:55:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [9 September 2021 12:00 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/12 "2021-09-09T12:00:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 12:04 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/13 "2021-09-09T12:04:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [9 September 2021 12:09 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/14 "2021-09-09T12:09:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 12:45 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/15 "2021-09-09T12:45:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [9 September 2021 12:55 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/16 "2021-09-09T12:55:45Z")

</div>

@cfp  
Here are the default path and the path for the installation:  
[default Path.txt](https://forum.dynare.org/uploads/short-url/1ZHMl1SReY2qsPd7VnsrorBErC0.txt) (22.7 KB)  
[path for install.txt](https://forum.dynare.org/uploads/short-url/5q0nqaOMsMYkyOG6t0inK71R1Ld.txt) (22.8 KB)

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 13:28 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/17 "2021-09-09T13:28:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [9 September 2021 13:30 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/18 "2021-09-09T13:30:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [9 September 2021 13:32 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/19 "2021-09-09T13:32:09Z")

</div>

If you have to, you can comment out the call to opti\_Install\_Test.

---

<div class="post-metadata">

**Author:** ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)\
**Post date:** [9 September 2021 14:05 UTC](https://forum.dynare.org/t/installation-of-dynareobc/18845/20 "2021-09-09T14:05:34Z")

</div>

@cfp  
Now I get the following error message when I want to test a simple example:  
[Error message.txt](https://forum.dynare.org/uploads/short-url/1wfsaBlCEzMaj9X88Zjxdc1865B.txt) (2.3 KB)

[Next page](https://forum.dynare.org/t/installation-of-dynareobc/18845.md?page=2)
