Get variable values from a solution

get_solution(solution, expr, type = "primal")

get_solution_(solution, expr, type)

## Arguments

solution the solution object a variable expression. You can partially bind indexes. optional, either "primal" or "dual". The default value is "primal". If "primal" it returns the primal solution, otherwise the column duals. Especially the dual values depend on the solver. If no duals are calculated, the function stops with an error message.

## Value

a data.frame. One row for each variable instance and a column for each index. Unless it is a single variable, then it returns a single number.

## Examples

# NOT RUN {
library(magrittr)
result <- MIPModel() %>%