T
Tolga Erdogus
Hi,
I have the following code:
for (int i=0;i<childOptimizations.Length;i++) //for each partition
{
row = childOptimizations;
if (i==0)
dataManager.UpdateAvailabilityWithLegsFromExistingTrips(System.Convert.ToInt
32(row["SCHOPT_ID"]));
else
dataManager.UpdateAvailabilityWithLegsFromExistingOptimization(System.Conver
t.ToInt32(previousRow["SCHOPT_ID"]),System.Convert.ToInt32(row["SCHOPT_ID"])
);
optimizationEngine.optimize(System.Convert.ToInt32(row["SCHOPT_ID"]));
catch
{
}
childOptimizations=dataManager.SCHEDULE_OPTIMIZATION.Select("PARENT_SCHOPT_I
D="+optimizationID);
previousRow=childOptimizations;
}
Even though the optimizationEngine.optimize might thorw an exception, I
still want to the loop and run the other optimizations.
I know I can turn optimizationEngine.optimize method to return an error code
instead of throwing an exception, but I am baffled as to why I can't
continue the execution with optimizationEngine.optimize throwing an
exception.
Thanks
I have the following code:
for (int i=0;i<childOptimizations.Length;i++) //for each partition
{
row = childOptimizations;
if (i==0)
dataManager.UpdateAvailabilityWithLegsFromExistingTrips(System.Convert.ToInt
32(row["SCHOPT_ID"]));
else
dataManager.UpdateAvailabilityWithLegsFromExistingOptimization(System.Conver
t.ToInt32(previousRow["SCHOPT_ID"]),System.Convert.ToInt32(row["SCHOPT_ID"])
);
optimizationEngine.optimize(System.Convert.ToInt32(row["SCHOPT_ID"]));
catch
{
}
childOptimizations=dataManager.SCHEDULE_OPTIMIZATION.Select("PARENT_SCHOPT_I
D="+optimizationID);
previousRow=childOptimizations;
}
Even though the optimizationEngine.optimize might thorw an exception, I
still want to the loop and run the other optimizations.
I know I can turn optimizationEngine.optimize method to return an error code
instead of throwing an exception, but I am baffled as to why I can't
continue the execution with optimizationEngine.optimize throwing an
exception.
Thanks