Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Solving the Problem at hand

Percy Mamedy edited this page Jun 7, 2016 · 2 revisions

Using the Engine

After having at our disposal a proper ProblemObject. We can now decide to pass this problem to our Analytics Engine class for resolution.

First resolve the Engine out of the IOC either by

$engine = App::make('FindBrok\TradeoffAnalytics\Contracts\TradeoffAnalyticsInterface');

or

namespace App\Http\Controllers;
 
...
use FindBrok\TradeoffAnalytics\Contracts\TradeoffAnalyticsInterface as Engine;

class IndexController extends Controller 
{
    ...
    
    public function index(Engine $engine) 
    {
        ...
    }
}

Now we can get the Dilemma object for the problem.

$dilemma = $engine->getDilemma($problem, true);

The second parameter spcifies whether we want to generate a Map Object for visualization of the solutions.

Clone this wiki locally