Provides general information about the mathematical model.

getModelInfo(x)

Arguments

x

optimizationProblem, solution or portfolio object.

Value

data.frame.

Details

getModelInfo() function returns five specific fields:

  1. solution_name: indicates the name of the solution, by default is sol.

  2. model_sense: returns the optimization sense (i.e., it indicates whether the objective function is minimized or maximize).

  3. n_constraints: returns the number of constraints in the corresponding mathematical optimization model.

  4. n_variables: returns the number of variables in the corresponding mathematical optimization model.

  5. size: returns the size of the constraints' coefficients matrix A number of constraints and number of variables).

Examples

# set seed for reproducibility
set.seed(14)

## Load data
data(sim_pu_data, sim_features_data, sim_dist_features_data,
sim_threats_data, sim_dist_threats_data, sim_sensitivity_data,
sim_boundary_data)

## Create data instance
problem_data <- inputData(
  pu = sim_pu_data, features = sim_features_data, dist_features = sim_dist_features_data,
  threats = sim_threats_data, dist_threats = sim_dist_threats_data,
  sensitivity = sim_sensitivity_data, boundary = sim_boundary_data
)

## Create optimization model
problem_model <- problem(x = problem_data, blm = 1)
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases

# get model information
getModelInfo(problem_model)
#>    model_sense n_constraints n_variables       size
#> 1 minimization         29984       10296 883.856 kB