Search code examples
optimizationcplexamplcapacity

Shannon Capacity Formula in AMPL


I want to use Shannon Capacity forumula as one of my constraint in the minimization problem. I am not sure how can I use it as AMPL doesnot support log2.

In simple form its here as: C = B * log2(1+ S/N) Please guide.

Shannon Cappacity Formula


Solution

  • As we know log2(x)=ln(x)/log(2) We can apply in APML as AMPL supports natural logrithm.