ruspy.estimation.mpec.mpec_constraint

ruspy.estimation.mpec.mpec_constraint(maint_func, maint_func_dev, num_states, num_params, trans_mat, disc_fac, scale, gradient, result, mpec_params, grad)[source]

Calulate the constraint of MPEC.

Parameters
maint_func: func

see Maintenance cost function

maint_func_dev: func

see Maintenance cost function

num_statespython:int

The size of the state space.

num_paramspython:int

The number of parameters to be estimated.

trans_matnumpy.array

see Transition matrix

disc_facnumpy.float

see Discount factor

scalenumpy.float

see Scale

gradientpython:str

Indicates whether analytical or numerical gradient should be used.

resultnumpy.array

Contains the left hand side of the constraint minus the right hand side for the nlopt solver. This should be zero for the constraint to hold.

mpec_paramsnumpy.array

see MPEC

gradnumpy.array, optional

The gradient of the function. The default is np.array([]).

Returns
None.