Created
September 22, 2021 14:20
-
-
Save hbshrestha/12b9dffb3445ef46ae4a9c8f6076fffc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LinearAlgebra | |
using JuMP | |
using GLPK | |
using Plots | |
pyplot() | |
model = Model() | |
set_optimizer(model, GLPK.Optimizer) | |
#Define variables | |
@variable(model, x>=0) | |
@variable(model, y>=0) | |
#Define Constraints | |
@constraint(model, 3x+2y<=66) | |
@constraint(model, 9x+4y<=180) | |
@constraint(model, 2x+10y<=200) | |
#Define Objective | |
@objective(model, Max, 90x+75y) | |
#Run the opimization | |
optimize!(model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment