Hello everyone,
I have an OR model where I am trying to minimize the cost. I solved this model without any problem using Excel solver. I also solved the same model in SAS EG using the optmodel procedure with different algorithms. But the results I get on both platforms are different and those in Optmodel are unacceptably higher.
I'm sure my model's constraints, variables, and target function are correct. Therefore, how should I proceed so that I can reach the result I obtained in Excel?
Thanks in advance.
When I run your code with SAS/OR 15.2, I get the following:
NOTE: Optimal.
NOTE: Objective = 1152546.48.
Your objective is nonconvex minimization, so I recommend using the MULTISTART option to avoid getting stuck in a local minimum:
solve with nlp / multistart;
The resulting objective value matches the previous value, but you can see that multiple local optima were found:
NOTE: The Multistart algorithm generated 4800 sample points.
NOTE: 2 distinct local optima were found.
NOTE: The best objective value found by local solver = 1152546.4807.
NOTE: The solution found by local solver with objective = 1152546.4807 was returned.
Also, the large upper bounds of 999999999 are not recommended.
I am sharing it in the attachment of the message.
For example, when I solve the above problem using Excel GRG, I get the result 1152758, while in the optmodel this value is 1167858. There is a difference of approximately 15100 units and this is far outside my tolerance.
When I run your code with SAS/OR 15.2, I get the following:
NOTE: Optimal.
NOTE: Objective = 1152546.48.
Your objective is nonconvex minimization, so I recommend using the MULTISTART option to avoid getting stuck in a local minimum:
solve with nlp / multistart;
The resulting objective value matches the previous value, but you can see that multiple local optima were found:
NOTE: The Multistart algorithm generated 4800 sample points.
NOTE: 2 distinct local optima were found.
NOTE: The best objective value found by local solver = 1152546.4807.
NOTE: The solution found by local solver with objective = 1152546.4807 was returned.
Also, the large upper bounds of 999999999 are not recommended.
Firstly, thank you. I am currently using SAS/OR version 15.1. However, I have reached the result 1152546.4807, which you also found, by increasing the 'opttol' value from the Solver options.
solve with nlp / opttol = 0.000000000001;
Thanks again.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.