<form name="form1" method="post" action="">
 
  <table border="0" align="center" cellpadding="2" cellspacing="2">
 
    <tr>
 
      <td><div align="right">λ</div></td>
 
      <td><input name="lam" type="text" id="lam" size="3" value="<?=$_POST['lam']?>"></td>
 
    </tr>
 
    <tr>
 
      <td><div align="right">μ</div></td>
 
      <td><input name="mu" type="text" id="mu" size="3" value="<?=$_POST['mu']?>"></td>
 
    </tr>
 
    <tr>
 
      <td><div align="right">c</div></td>
 
      <td><input name="c" type="text" id="c" size="3" value="<?=$_POST['c']?>"></td>
 
    </tr>
 
    <tr>
 
      <td><div align="right">n</div></td>
 
      <td><input name="n" type="text" id="n" size="3" value="<?=$_POST['n']?>"></td>
 
    </tr>
 
    <tr>
 
      <td colspan="2"><input type="submit" name="Submit" value="Calcular"></td>
 
    </tr>
 
  </table>
 
</form>
 
<table border="0" align="center" cellpadding="2" cellspacing="2">
 
  <tr>
 
    <td><p>
 
  <?
 
    include('Colas.class.php');
 
    if(isset($_POST['lam']) && isset($_POST['lam']) && $_POST['lam'] != '' && $_POST['mu'] != '' )
 
    {
 
        if (!$_POST['c']) $_POST['c'] = 1;
 
        echo '<h2>(M/M/1):(FIFO/∞/∞)</h2>';
 
        
 
        // Instance of the class using MM1
 
        $colita = new ColaMM1($_POST['lam'],$_POST['mu']);
 
        echo('λ -> ' . $colita->Lambda() . '<br>');
 
        echo('μ -> ' . $colita->_Mu . '<br>');
 
        echo('ρ -> ' . $colita->Rho(). '<br>');
 
        echo('P0 -> ' . $colita->P0() . '<br>');
 
        echo('P'. $_POST['n'] .' -> ' . $colita->Pn($_POST['n']) . '<br>');
 
        echo('Ls -> ' . $colita->Ls() . '<br>');
 
        echo('Lq -> ' . $colita->Lq() . '<br>');
 
        echo('Ws -> ' . $colita->Ws() . '<br>');
 
        echo('Wq -> ' . $colita->Wq() . '<br>');
 
    
 
        echo '<h2>(M/M/2):(FIFO/∞/∞)</h2>';
 
        
 
        // Instance of the class using MM2
 
        $colita = new ColaMM2($_POST['lam'],$_POST['mu']);
 
        echo('λ -> ' . $colita->Lambda() . '<br>');
 
        echo('μ -> ' . $colita->_Mu . '<br>');
 
        echo('ρ -> ' . $colita->Rho(). '<br>');
 
        echo('P0 -> ' . $colita->P0() . '<br>');
 
        echo('P'. $_POST['n'] .' -> ' . $colita->Pn($_POST['n']) . '<br>');
 
        echo('Ls -> ' . $colita->Ls() . '<br>');
 
        echo('Lq -> ' . $colita->Lq() . '<br>');
 
        echo('Ws -> ' . $colita->Ws() . '<br>');
 
        echo('Wq -> ' . $colita->Wq() . '<br>');
 
    
 
        echo '<h2>(M/M/C):(FIFO/∞/∞)</h2>';
 
        
 
        // Instance of the class using MM1
 
        $colita = new ColaMMC($_POST['lam'],$_POST['mu'], $_POST['c']);
 
        echo('λ -> ' . $colita->Lambda() . '<br>');
 
        echo('μ -> ' . $colita->_Mu . '<br>');
 
        echo('c -> ' . $colita->_c . '<br>');
 
        echo('ρ -> ' . $colita->Rho(). '<br>');
 
        echo('P0 -> ' . $colita->P0() . '<br>');
 
        echo('P'. $_POST['n'] .' -> ' . $colita->Pn($_POST['n']) . '<br>');
 
        echo('Ls -> ' . $colita->Ls() . '<br>');
 
        echo('Lq -> ' . $colita->Lq() . '<br>');
 
        echo('Ws -> ' . $colita->Ws() . '<br>');
 
        echo('Wq -> ' . $colita->Wq() . '<br>');
 
    }
 
?>
 
</p>
 
</td>
 
  </tr>
 
</table>
 
 
 |