Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
LpSolver Example with Constraints
#A company wants to maximize the profit for two products A and B which are sold at $ 25 and $ 20 respectively. There are 1800 resource units available #every day and product A requires 20 units while B requires 12 units. Both of these products require a production time of 4 minutes and total #available working hours are 8 in a day. What should be the production quantity for each of the products to maximize profits? # max(Sales) = max(25 y1 + 20 y2) library(lpSolve) objective.in = c(25,20) objective.in const = matrix (c(20,12,4,4), nrow = 2, byrow = TRUE) const time_constraints = 480 resource_contraints = 1800 rhs = c(resource_contraints,time_constraints) direction = c("<=","<=") optimum = lp(direction = "max", objective.in, const, direction, rhs) optimum$solution optimum$objval
run
|
edit
|
history
|
help
0
Simple Linear Regression
Análise de variância ANOVA para experimento em DIC - Exemplo 01
Peso hora
Data Transformation
31-08-2020-Exemplo Ajuste
PUP LDA
Mathematical operations
16-09-2020IntPoli
Zama Mohammed Fahad
Análise de experimento em DIC e teste de Tukey