Learn R Programming

highs (version 1.10.0-1)

example_model: Generate Example Optimization Models

Description

Creates example optimization models for different problem types: - Linear Programming (LP) - Mixed Integer Linear Programming (MILP) - Quadratic Programming (QP)

Usage

example_model(op_type = c("LP", "MILP", "QP"))

Value

A HiGHS model object configured according to the specified type: - LP: Maximization problem with 3 variables and 3 constraints - MILP: Maximization problem with mixed integer and continuous variables - QP: Problem with quadratic objective function

Arguments

op_type

Character string specifying the type of optimization model. Must be one of "LP", "MILP", or "QP".

Examples

Run this code
model <- example_model("LP")
model <- example_model("MILP")
model <- example_model("QP")

Run the code above in your browser using DataLab