@@ -105,7 +105,7 @@ hyperbolic cost function
105105---------------
106106Cost parameters
107107---------------
108- The second in put are the cost parameters, which are stored as a one dimensional
108+ The second input are the cost parameters, which are stored as a one dimensional
109109*numpy.array *. At the first position always the replacement cost :math: `RC` is stored.
110110The next positions are subsequently filled with :math: `\theta _{11 }, \theta _{12 }, ...`.
111111The exact number depends on the functional form.
@@ -181,17 +181,18 @@ allow to specify, when the algorithm switches from contraction to Newton-Kantoro
181181iterations and general parameters, which let the algorithm stop. So far, there is no
182182switching back implemented.
183183
184- **max_cont_steps : ** *(int) * The maximum number of contraction iterations before
185- switching to Newton-Kantorovich iterations. Default is 20.
184+ - **max_cont_steps : ** *(int) * The maximum number of contraction iterations before
185+ switching to Newton-Kantorovich iterations. Default is 20.
186186
187- **switch_tol : ** *(float) * If this threshold is reached by contraction iterations, then
188- the algorithm switches to Newton-Kantorovich iterations. Default is :math: `10 ^{-3 }`.
187+ - **switch_tol : ** *(float) * If this threshold is reached by contraction iterations,
188+ then the algorithm switches to Newton-Kantorovich iterations. Default is
189+ :math: `10 ^{-3 }`.
189190
190- **max_newt_kant_steps : ** *(int) * The maximum number of Newton-Kantorovich iterations
191- before the algorithm stops. Default is 20.
191+ - **max_newt_kant_steps : ** *(int) * The maximum number of Newton-Kantorovich iterations
192+ before the algorithm stops. Default is 20.
192193
193- **threshold : ** *(float) * If this threshold is reached by Newton-Kantorovich iterations,
194- then the algorithm stops. Default is :math: `10 ^{-12 }`.
194+ - **threshold : ** *(float) * If this threshold is reached by Newton-Kantorovich
195+ iterations, then the algorithm stops. Default is :math: `10 ^{-12 }`.
195196
196197.. _ev :
197198
@@ -276,8 +277,9 @@ the following inputs:
276277Initialization Dictionairy
277278---------------------------
278279
279- This is the :ref: `init_dict ` needed for the ``estimate `` function. The ``get_demand ``
280- function draws the model specifications needed to calculate demand from this.
280+ This is the :ref: `init_dict ` needed for the function ``get_criterion_function ``.
281+ The ``get_demand `` function draws the model specifications needed to calculate
282+ demand from this.
281283
282284
283285.. _demand_dict :
@@ -291,23 +293,22 @@ This dictionairy provides all the necessary information about how the demand
291293function is supposed to look like and how precisely it is supposed to be calculated.
292294It has to hold the following keys:
293295
294- **RC_lower_bound : ** *(float) * The lowest replacement cost for which the demand
295- is supposed to be calculated.
296+ - **RC_lower_bound : ** *(float) * The lowest replacement cost for which the demand is
297+ supposed to be calculated.
296298
297- **RC_upper_bound : ** *(float) * The highest replacement cost for which the demand
298- is supposed to be calculated.
299+ - **RC_upper_bound : ** *(float) * The highest replacement cost for which the demand is
300+ supposed to be calculated.
299301
300- **demand_evaluations : ** *(int) * The grid size of the replacement cost between
301- RC_lower_bound and RC_upper_bound for which the demand level shall be calculated.
302+ - **demand_evaluations : ** *(int) * The grid size of the replacement cost between
303+ RC_lower_bound and RC_upper_bound for which the demand level shall be calculated.
302304
303- **tolerance : ** *(float) * The stopping tolerance for the fixed point calculation
304- needed to obtain each demand level.
305+ - **tolerance : ** *(float) * The stopping tolerance for the fixed point calculation
306+ needed to obtain each demand level.
305307
306- **num_periods : ** *(int) * Number of months :math: `T` for which the expected demand
307- is derived. Consequently, set it to 12 if you want to get the annual expected demand.
308+ - **num_periods : ** *(int) * Number of months :math: `T` for which the expected demand
309+ is derived. Consequently, set it to 12 if you want to get the annual expected demand.
308310
309- **num_buses : ** *(int) * Number of buses :math: `M` for which the demand is
310- calculated.
311+ - **num_buses : ** *(int) * Number of buses :math: `M` for which the demand is calculated.
311312
312313
313314.. _demand_params :
@@ -339,6 +340,6 @@ and for the amount of buses in the fleet. It also contains a column *success*
339340which indicates whether the fixed point algorithm converged successfully.
340341
341342
343+
342344The use of the ``get_demand `` function is shown in the following `replication
343- <https://github.com/OpenSourceEconomics/ruspy/blob/kantevorich/promotion
344- /replication/replication.ipynb> `_ notebook.
345+ <tutorials/replication/replication.ipynb> `_ notebook.
0 commit comments