12.07.2015 Views

Programaç˜ao Linear - Notas de aula - CEUNES

Programaç˜ao Linear - Notas de aula - CEUNES

Programaç˜ao Linear - Notas de aula - CEUNES

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CAPÍTULO 7. O MÉTODO SIMPLEX 707.9.1 Preâmbulo do códigoEsta é a parte inicial do código. Contém <strong>de</strong>finições das variáveis e pré-<strong>de</strong>finições das funções./∗SIMPLEX para problemas na forma :min cxsa Ax = 0com b >= 0Formato do arquivo <strong>de</strong> entrada :m nc1 c2 . . . cnb1 b2 . . . bma11 a12 . . . a1n. . .. . .. . .am1 am2 . . . amnon<strong>de</strong>m = número <strong>de</strong> r e s t r i ç õ e sn = número <strong>de</strong> v a r i á v e i s l e g í t i m a sObs . : O problema é v i á v e l p o i s 0 é solução . Portanto , asúnicas p o s s i b i l i d a d e s são a <strong>de</strong> um problema i l i m i t a d oou <strong>de</strong> um problema com solução ótima .∗∗∗∗∗∗∗∗ EXERCÍCIO ∗∗∗∗∗∗∗∗Sendo o problema na forma d e s c r i t a acima , quantas VNB’ s e x i s t i r ã oapós a i n s e r ç ão <strong>de</strong> v a r i á v e i s <strong>de</strong> f o l g a ?∗/#inclu<strong>de</strong> #inclu<strong>de</strong> #<strong>de</strong>fine ERRO 1e−8 // a c e i t a ç ã o <strong>de</strong> erro numérico#<strong>de</strong>fine INF 1e+12 // representação <strong>de</strong> i n f i n i t o/∗Quadro simplexQS[ 0 ] = l i n h a <strong>de</strong> z∗/double ∗∗QS = NULL;unsigned int m, n ; //m r e s t r i ç õ e s , n var (com f o l g a ) (n > m)unsigned int ∗VNB = NULL; // í n d i c e s das VNB’ sunsigned int ∗VB = NULL; // í n d i c e s das VB’ s

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!