Sol_graf7.mws PES = Pesquisa Operacional
Prof. Milton Procópio de Borba
Um exercício com 7 restrições
|
> |
restart: |
|
> |
with(plots): |
|
> |
Objetivo:=x+2*y; |
![]()
|
> |
Restricoes:=[ 3*y-x <=9, x-2*y
<=10, 2*x+y <=10, 2*x+y
>=5, x-y<=3, x>=0,y>=1]; |
![]()
|
> |
Regiao_factivel:=inequal(Restricoes, x=0..5,y=0..5, optionsfeasible=(color=gray),optionsexcluded=(color=white)): |
|
> |
reta_otima:=contourplot(Objetivo,x=0..5,y=0..5,contours=[5,6,10],linestyle=4,color=red): |
|
> |
display([Regiao_factivel,reta_otima]); |
![Descrição: Descrição: [Maple Plot]](Sol_graf-7/Sol_graf73.gif)
|
> |
with(simplex): |
|
> |
solve(convert({Restricoes[1],Restricoes[3]},equality)); |
|
> |
assign(%); |
|
> |
Z:=Objetivo; |
![]()
![]()
|
|
|