getModelInfo {prioriactions}R Documentation

Extract general information about mathematical model

Description

Provides general information about the mathematical model.

Usage

getModelInfo(x)

Arguments

x

optimizationProblem, solution or portfolio object.

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).

Value

data.frame.

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)

# get model information
getModelInfo(problem_model)


[Package prioriactions version 0.5.0 Index]