Learn R Programming

sybil (version 2.2.0)

optObj: General Constructor Function For Objects of Class optObj

Description

This function serves as a user constructor function for objects of class '>optObj.

Usage

optObj(solver = SYBIL_SETTINGS("SOLVER"),
         method = SYBIL_SETTINGS("METHOD"),
         pType = "lp", prefix = "optObj", sep = "_")

Arguments

solver

A single character string giving the name of the solver package to use. See SYBIL_SETTINGS for possible values. Default: SYBIL_SETTINGS("SOLVER").

method

A single character string containing the name of the method used by solver. See SYBIL_SETTINGS for possible values. If missing or not available, the default method for solver is used (see also checkDefaultMethod). Default: SYBIL_SETTINGS("METHOD").

pType

A single character string containing the type of optimization problem. Can be "lp": linear programming, "mip": mixed integer programming or "qp": quadratic programming. Default: "lp".

prefix

A single character string containing a prefix for the new class name. Default: "optObj".

sep

A single character string containing a separator for prefix and solver. Default: "_".

Value

An instance of a subclass of class '>optObj.

Details

If argument solver is set to "foo" and prefix is set to "optObj" (default), optObj will try to build an instance of class optObj_foo. If solver does not contain a valid name of a solver package (this is checked by checkDefaultMethod), the default solver package will be used (see SYBIL_SETTINGS). For the name of the class, the arguments prefix and solver are stick together separated by sep (default: a single underscore "_"): prefix_solver.

See Also

Class '>optObj, SYBIL_SETTINGS and checkDefaultMethod.