Validate a solution of an optimization problem.
validate(op, sol, quiet=FALSE, tol=0.0001)
The constrained optimization problem defined with function cop.
The solution of the optimization problem obtained with function solvecop.
Logical variable indicating whether output to console should be switched off.
The tolerance. A constraint is considered fulfilled even if the value exceeds (falls below) the thresshold value by tol
.
A list of class copValidation
with components:
Data frame containing one row for each constraint with the value of the constraint in column Val
, the bound for the constraint in column Bound
, and column OK
states if the constraint is fulfilled. The value of the objective function is shown in the first row. Additional rows contain the values of disabled constraints.
Data frame with component valid
indicating if all constraints are fulfilled, component solver
containing the name of the solver used for optimization, and component status
describing the solution as reported by the solver.
Data frame with the values of the objective function and constraints at the optimum.
Named numeric value with value and name of the objective function at the optimum.
Validate a solution of an optimization problem by checking if the constraints are fulfilled.
Values and bounds of the constraints are printed.
The main function for solving constrained programming problems is solvecop.