Using occbin to solve a model with one inequality constraint

rbc_testing.mod (3 KB)rbc_testing_1.mod (3.29 KB)rbc_version_implement.m (2.32 KB)Dear All,

I am trying to use occbin to solve a model with one inequality constraint. So I create two mod files and then try to run it by using an implementing m file. However, despite declaring the variables to be global, I get the error as:

**Error using eval
Undefined function or variable ‘k’.

Error in solve_one_constraint (line 159)
newviolvecbool_ = eval(constraint_difference_);

Error in rbc_version_implement (line 37)
[zdatalinear, zdatapiecewise, zdatass, oobase_, Mbase_ ] = …**

The other issue that I notice is that it is only generating one M_ struct file in the workspace where there should be two, one for the constraint binding and the other non binding. Does it mean the model is never going to the other regime? But that looks a bit weird because I tried with a very high standard deviation shock as well but with no success.

I am attaching my mod files and the m file. I am new to occbin and so any help in trying to solve the problem is highly appreciated.


Hi there,
I also have a question regarding Occbin. Is it possible for this routine to handle more than 2 inequality constraints?

Thanks in advance,

Sorry, but at the current stage, occbin is an external package. I have not worked with it and have no experience using it. Thus, I am unable to provide support. Maybe other users can help you. Otherwise, you might need to contact its authors.