Learn R Programming

gMOIP (version 1.3.0)

plotPolytope2D: Plot the polytope (bounded convex set) of a linear mathematical program

Description

Plot the polytope (bounded convex set) of a linear mathematical program

Usage

plotPolytope2D(A, b, obj = NULL, type = rep("c", ncol(A)),
  nonneg = rep(TRUE, ncol(A)), crit = "max", faces = rep("c",
  ncol(A)), plotFaces = TRUE, plotFeasible = TRUE,
  plotOptimum = FALSE, latex = FALSE, labels = NULL, ...)

Arguments

A

The constraint matrix.

b

Right hand side.

obj

A vector with objective coefficients.

type

A character vector of same length as number of variables. If entry k is 'i' variable \(k\) must be integer and if 'c' continuous.

nonneg

A boolean vector of same length as number of variables. If entry k is TRUE then variable k must be non-negative.

crit

Either max or min (only used if add the iso profit line)

faces

A character vector of same length as number of variables. If entry k is 'i' variable \(k\) must be integer and if 'c' continuous. Useful if e.g. want to show the linear relaxation of an IP.

plotFaces

If True then plot the faces.

plotFeasible

If True then plot the feasible points/segments (relevant for ILP/MILP).

plotOptimum

Show the optimum corner solution point (if alternative solutions only one is shown) and add the iso profit line.

latex

If True make latex math labels for TikZ.

labels

If NULL don't add any labels. If 'n' no labels but show the points. If 'coord' add coordinates to the points. Otherwise number all points from one.

...

If 2D arguments passed to the aes_string function in geom_point or geom_line.

Value

A ggplot2 object.