PHP Classes

File: test.php

Recommend this page to a friend!
  Packages of donni ansyari   PHP Simplex Solver   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: test
Class: PHP Simplex Solver
Solve equations in linear programming with Simplex
Author: By
Last change:
Date: 10 years ago
Size: 449 bytes
 

 

Contents

Class file image Download
<?php
include "setting.php";
include "data.php";
include "TSimplex.class.php";

$r = new TSimplex($leftdata,$rightdata,$zdata,$maxiterasi,$iscetak);

// IF $iscetak= false, initial in setting.php
$jlhvariabel=$r->jumlahstatement();
$varcelltarget=$r->varvalue();
$result=$r->result();

echo "Z=".$result."<br>";
for  ($i = 0; $i<=($jlhvariabel-1); $i++) {
    echo $varcelltarget[$i][0]."=".$varcelltarget[$i][1]; echo "<br>"; 
}


?>