Threshold Interventions

EasyModelAnalysis.optimal_threshold_interventionFunction
optimal_threshold_intervention(prob, [p1 = prob.p], p2, obs, threshold, duration; maxtime)

Arguments

  • p1: parameters for the pre-intervention scenario. Defaults to prob.p.
  • p2: parameters for the pose-intervention scenario.
  • obs: The observation symbolic expression.
  • threshold: The threshold for the observation.
  • duration: Duration for the evaluation of intervention.

Keyword Arguments

  • maxtime: Maximum optimization time. Defaults to 60.

Returns

  • opt_tspan: Optimal intervention time span.
  • (s1, s2, s3): Pre-intervention, intervention, post-intervention solutions.
  • ret: Return code from the optimization.
source
EasyModelAnalysis.optimal_parameter_intervention_for_thresholdFunction
optimal_parameter_intervention_for_threshold(prob, obs, threshold, cost, ps,
    lb, ub, intervention_tspan, duration; ineq_cons = nothing, maxtime=60)

Arguments

  • prob: An ODEProblem.
  • obs: The observation symbolic expression.
  • threshold: The threshold for the observation.
  • cost: the cost function for minimization, e.g. α + 20 * β.
  • ps: the parameters that appear in the cost, e.g. [α, β].
  • lb: the lower bounds of the parameters e.g. [-10, -5].
  • ub: the upper bounds of the parameters e.g. [5, 10].
  • intervention_tspan: intervention time span, e.g. (20.0, 30.0). Defaults to prob.tspan.
  • duration: Duration for the evaluation of intervention. Defaults to prob.tspan[2] - prob.tspan[1].

Keyword Arguments

  • maxtime: Maximum optimization time. Defaults to 60.
  • ineq_cons: a vector of symbolic expressions in terms of symbolic parameters. The optimizer will enforce ineq_cons .< 0.

Returns

  • opt_p: Optimal intervention parameters.
  • (s1, s2, s3): Pre-intervention, intervention, post-intervention solutions.
  • ret: Return code from the optimization.
source