Create a mip object from
This is a utility class that translates a validor object into a mixed integer problem that
can be solved.
Most users should use
locate_errors() which will handle all translation and execution
automatically. This class is provided so users can implement or derive an alternative solution.
MipRules class contains the following methods:
$execute() calls the mip solver to execute the rules.
$to_lp(): transforms the object into a lp_solve object
$is_infeasible Checks if the current system of mixed integer rules is feasible.
$set_values: set values and weights for variables (determines the objective function).
Other Mixed Integer Problem:
rules <- validator(x > 1) mr <- miprules(rules) mr$to_lp() mr$set_values(c(x=0), weights=c(x=1)) mr$execute()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.