News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Running Monte Carlo Simulations in PHP
June 28, 2013 @ 12:19:53

On PHPMaster.com there's a new tutorial by J Armando Jeronymo that shows how you can run Monte Carlo simulations in PHP (more on that simulation type here).

One of the exciting things in the 1980′s was programming simulations to solve complex analytical problems, and one of the most useful techniques employed was running Monte Carlo simulations. The approach repeatedly runs a simulation many times over to calculate the most likely outcome. Although PHP isn't known as a scientific or research programming language, Monte Carlo simulations can easily be written in a PHP web app. In this article, I'll show you how.

He walks you through the whole problem he tries to solve with the simulation - a multi-step trip that involved different roads, situations and possible stops along the way. He breaks it out into the various stages (labeled with letters) and shows how you might render this as a "MyTrip" class with distances in "travel minutes". Following along with the Monte Carlo randomness, though, he shows how to inject a bit of randomness into the mix accounting for some of the trouble he had along the way.

0 comments voice your opinion now!
montecarlo randomness travel plan tutorial

Link: http://phpmaster.com/running-monte-carlo-simulations-in-php

blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Tutorial : Using Zend Framework Without PDO

Pim Elshoff's Blog: Setting up a kickass development environment on Windows

Rob Allen's Blog: A form in your layout

Mike Willbanks's Blog: Building and Maintaining a PEAR Server with Pirum

Sudheer Satyanarayana's Blog: A Bit Of XML, RSS And CURL In 7 Lines Of PHP And A Useful Program


Community Events





Don't see your event here?
Let us know!


symfony list release deployment api series interview package library framework podcast opinion introduction laravel zendserver tips install community update language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework