Bio-Cellucidate

 view release on metacpan or  search on metacpan

examples/full_example.pl  view on Meta::CPAN

my $model_rule = Bio::Cellucidate::ModelRule->get($model_rules->[0]->{id});
print "\nModel Rule Detail:\n";
print Dumper $model_rule;


# There shouldn't be any simulation runs yet, but let's check
my $simulation_runs = Bio::Cellucidate::Model->simulation_runs($model->{id});
print "\nSimulation Runs for model:\n";
print Dumper $simulation_runs;

# Let's create a simulation run (2 iterations)!
my $simulation_run = Bio::Cellucidate::SimulationRun->create({ model_id => $model->{id}, num_iterations => 2 }); #, simulation_method => 'ODE' });
print "\nNewly created Simulation Run:\n";
print Dumper $simulation_run;

# Same pattern as import, poll and see when my run is complete...
while ($simulation_run->{state} ne 'succeeded') {
    # Wait a few seconds..
    sleep(2);
    
    # Requery simulation
    $simulation_run = Bio::Cellucidate::SimulationRun->get($simulation_run->{id});

lib/Bio/Cellucidate/SimulationRun.pm  view on Meta::CPAN

                                           #   occur before simulation 
                                           #   ends (only if mode = 'EVENT')
        bio_time_length    => 100,         # : simulation time length before 
                                           #   simulation ends (only if 
                                           #   mode = 'TIME')
        event_num_points   => 1000,        # : number of points to collect 
                                           #   (if mode = 'EVENT')
        bio_num_points     => 1000,        # : number of data points to 
                                           #   collect (if model = 'TIME')
        mode               => 'EVENT',     # : either 'EVENT' or 'MODE'
        num_iterations     => 1,           # : number of plots to create
        simulation_method  => 'STOCHASTIC' # : either 'STOCAHASTIC' or 'ODE'
    };

    $simulation_run = Bio::Cellucidate::SimulationRun->create($params);

    $id = $simulation_run->{id};

    while ($simulation_run->{state} ne 'success') {
        $simulation_run = Bio::Cellucidate::SimulationRun->get($simulation_run->{id});
        print "Simulation Running: " . Bio::Cellucidate::SimulationRun->progress($id) . "% complete";



( run in 1.366 second using v1.01-cache-2.11-cpan-96521ef73a4 )