コード例 #1
0
ファイル: Pert.class.php プロジェクト: marrokin/Phpert
 /**
  * Fin Lejano
  * Genera un entero con el fin lejano
  */
 public function latestFinish()
 {
     for ($i = $this->La - 1; $i >= 1; $i--) {
         echo '<h5>ACTIVIDAD ' . $i . '</h5>';
         echo 'Ant: ' . listarAct($this->aA[$i]) . ' ';
         echo '....... Sig: ' . listarAct($this->aS[$i]) . '<br>';
         $antI = $this->aA[$i];
         $sigI = $this->aS[$i];
         // Arreglo con tiempos anteriores
         $actAnt = [];
         // Arreglo con tiempos Siguientes
         $actSig = [];
         // Calcula el inicio pronto de cada actividad
         for ($j = 0; $j < count($sigI); $j++) {
             array_push($actSig, $this->iniLejano[$sigI[$j]]);
             echo 'el inicio lejano es ' . $this->iniLejano[$sigI[$j]] . '<br>';
         }
         echo 'El arreglo de actSig es : ';
         print_r($actSig);
         $min = min($actSig);
         echo ' el fin minimo es : ' . $min;
         echo '<br>';
         for ($j = 0; $j < count($antI); $j++) {
             if ($this->finLejano[$antI[$j]] == 0) {
                 if ($this->finLejano[$antI[$j]] <= $min) {
                     $this->finLejano[$antI[$j]] = $min;
                     echo 'el valor ' . $min . ' lo voy a poner en la actividad : ' . $antI[$j] . '<br>';
                 } else {
                     // $this->finLejano[$antI[$j]] = $min;
                 }
                 $this->iniLejano[$antI[$j]] = $this->finLejano[$antI[$j]] - $this->du[$antI[$j]];
             }
         }
         echo '<hr>';
     }
     return $this->finLejano;
 }
コード例 #2
0
ファイル: index.php プロジェクト: marrokin/Phpert
    ?>
</td>
						<td><?php 
    echo $act[$i];
    ?>
</td>
						<td><?php 
    echo $dur[$i];
    ?>
</td>
						<td><?php 
    echo listarAct($actDespues[$i]);
    ?>
</td>
						<td><?php 
    echo listarAct($actAntes[$i]);
    ?>
</td>
						<td><?php 
    echo isset($pert->iniPronto[$i]) ? $pert->iniPronto[$i] : "-";
    ?>
</td>
						<td><?php 
    echo isset($pert->finPronto[$i]) ? $pert->finPronto[$i] : "-";
    ?>
</td>
						<td><?php 
    echo isset($pert->iniLejano[$i]) ? $pert->iniLejano[$i] : "-";
    ?>
</td>
						<td><?php