'CPLEX time limit

I am using the IBM ILOG CPLEX Optimization Studio (version 12.6.3) to solve a large optimization problem. Since the problem is so big, CPLEX takes a very long time, so I want to limit the runtime. What is the correct syntax to limit this?

Thanks!

Note: I am not using another language to run the CPLEX model, I am running directly from IBM ILOG CPLEX Otimization Studio



Solution 1:[1]

execute timeTermination {
    cplex.tilim = 40*60;   // set time model stop (second)
    }

Solution 2:[2]

The time can also be reduced if you want to get at least one feasible solution by: in setting --> General --> Mathematical programming --> FeasOpt. You will find the default value of 1.0E-6 that you can reduce as appropriate.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Khái Duy
Solution 2 Bencharif Bilal