Internals

Objective function

CDCP.ObjectiveType
Objective{F,V <: AbstractVector}

A wrapped objective function for solving a CDCProblem. This facilitates maintaining an internal interface for dealing with objective functions that is independent from user interface.

Users are not required to construct Objective unless there is a need for fine-grained control.

Fields

  • f::F: objective function
  • ℒ::V: the decision vector at which to evaluate the objective function
  • fcall::Int = 0: the number of times the objective has been called, used to track whether the maximum number of objective calls has been reached (see also CDCProblem)
source
CDCP.marginFunction
margin(obj::Objective, ℓ::Int, z)

Evaluate the change in obj with optional parameter z when the th item is included or not. This corresponds to the D_j function in earlier implementation.

source

Solution methods

CDCP.SqueezingType
Squeezing{V <: AbstractVector,Z} <: CDCPSolver

A type for solving a CDCProblem with single-agent squeezing.

See also solve.

Fields

  • scdca::Bool: does the problem obey single crossing differences in choices from above? (if false, then from below is assumed)
  • branching::Vector{V}: container holding branching outcomes
  • z: the parameter (e.g. productivity) of the problem
  • branch::Bool = true: whether or not to branch
source
CDCP.SqueezingPolicyType
SqueezingPolicy{Z,V<:AbstractVector{ItemState},F1,F2,S,O} <: CDCPSolver

A type for solving a CDCProblem with policy function squeezing.

See also solve.

Fields

  • scdca::Bool
  • intervalchoices::Vector{IntervalChoice{Z,V}}
  • squeezing_indices::Vector{Int}
  • branching_indices::Vector{Int}
  • zero_margin::F1
  • equal_obj::F2
  • singlecdcp::S
  • obj2::O
  • skiprefinement::Bool
  • maxfcall::Int
source