Login   Register  
PHP Classes
elePHPant
Icontem

File: example_set_variables.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Afshin Safarpour  >  Binary GA  >  example_set_variables.php  >  Download  
File: example_set_variables.php
Role: Configuration script
Content type: text/plain
Description: set variables
Class: Binary GA
Implement genetic algorithm that use 16 genes
Author: By
Last change:
Date: 2008-07-06 14:01
Size: 521 bytes
 

Contents

Class file image Download
<?php
require_once('ga.class.php');

$fitness_function         $_POST['fitness_function'];
$generation                $_POST['generation'];
$population             $_POST['population'];
$lower_bound             $_POST['lower_bound'];
$upper_bound             $_POST['upper_bound'];

$ga = new GA();

$ga->fitnessFunction    $fitness_function;
$ga->totalGeneration     $generation;
$ga->population            $population;
$ga->lowerBound            $lower_bound;
$ga->upperBound            $upper_bound ;
$ga->file_name            'ga_results.txt';

$ga->debug();

?>