ruspy.model_code.fix_point_alg.calc_fixp

ruspy.model_code.fix_point_alg.calc_fixp(trans_mat, obs_costs, disc_fac, threshold=1e-12, switch_tol=0.001, max_contr_steps=20, max_newt_kant_steps=20)[source]

Calculating the expected value of maintenance fixed point with the polyalgorithm proposed by Rust (1987) and Rust (2000).

Parameters
trans_matnumpy.ndarray

see Transition matrix

obs_costsnumpy.ndarray

see Observed costs

disc_facnumpy.float

see Discount factor

thresholdnumpy.float

see Algorithmic details

switch_tolnumpy.float

see Algorithmic details

max_contr_stepspython:int

see Algorithmic details

max_newt_kant_stepspython:int

see Algorithmic details

Returns
ev_newnumpy.ndarray

see Expected value of maintenance

contr_step_countpython:int

shows the amount of contraction iterations needed to find the fixed point.

newt_kant_step_countpython:int

shows the amount of Newton-Kantorovich iterations needed to find the fixed point.