Skip to content
Go to file
Cannot retrieve contributors at this time
27 lines (21 sloc) 842 Bytes
package GetOptimization;
use strict;
use warnings FATAL => 'all';
use Route4MeSDK::DataTypes::OptimizationState;
sub GetOptimization {
my ($self, $optimizationProblemID) = @_;
my $route4Me = Route4MeManager->new( ExamplesInfrastructure->ApiKey );
my $optimizationParameters = OptimizationParameters->new(
optimization_problem_id => $optimizationProblemID
my $errorString;
my $dataObject = $route4Me->getOptimization($optimizationParameters, \$errorString);
if ($dataObject) {
print "GetOptimization executed successfully\n";
printf "Optimization Problem ID: %s\n", $dataObject->optimization_problem_id;
printf "State: %s\n", OptimizationState->get_optimization_state($dataObject->state);
} else {
printf "GetOptimization error: %s\n", $errorString;
You can’t perform that action at this time.