get_constraints_strings: Get constraints strings to be used in the optimisation.

View source: R/funcs_constraints.R

get_constraints_stringsR Documentation

Get constraints strings to be used in the optimisation.

Description

The function was written in order to return objects that will be used by the 'nloptr' package.

Usage

get_constraints_strings(scenario, optim_type, constant)

Arguments

scenario

A named list representing a scenario list-object.

optim_type

A string specifying the type of optimisation to be ran

constant

Numeric.

Value

A list with 4 elements:

'num_constraints_eq' Numeric. Number of equality constraints.

'budget_function' Character string. Used to set equality constraint.

'budget_jacobian' Character string. Used to set equality constraint.

'num_constraints_ineq' Numeric. Number of inequality constraints.

'constraint_function' Character string. Used to set inequality constraints.

'constraint_jacobian' Character string. Used to set inequality constraints.

Examples

## Not run: 
scenario <- create_scenario("data/scenario_0")
const_strings <- get_constraints_strings(scenario, 1e-6)

## End(Not run)

cath-parkinson/mm.reoptimise documentation built on May 12, 2022, 3:34 p.m.