I am interested in developing an integer linear programming model within Fortran and solve it with CPLEX and Gurobi. Unfortunately, I could not find some examples of this connection. C++, Python, and Julia present specific libraries for this purpose. Could somebody help me? Kind regards, Bruno
Asked
Active
Viewed 139 times
0
-
2Welcome, please take the [tour] and read [ask]. Asking for examples is off-topic. Just asking "Could somebody help me?" is too broad and off-topic as well. Please ask a specific question about a specific problem you are facing. Did you try something? What problems did you face? – Vladimir F Героям слава Jul 23 '21 at 14:26
-
Fortran is not a supported language as far as i know in both cases (Gurobi and CPLEX). This means, that you need to decide if you are pursuing a more abstracted domain-specific serialization-based way (e.g. writing an MPS-file exporter) or go for the C-API interface which is usually the entry-point for all language-implementations. As a search for `cplex language:Fortran` (or gurobi) on github shows no repos, you probably would need to do it yourself. Imho Fortran sounds like a bad pick here, but you probably have your reasons. – sascha Jul 23 '21 at 17:23
-
Googling both with Fortran gives quite a lot of hits, especially for cplex, but most seem quite old. I would use the standard Fortran iso_c_binding to call the C interface, which should be fairly straightforward - I use it to call GSL for instance. Without an example we can't say more. – Ian Bush Jul 24 '21 at 08:01
-
Thank you very much for your comments. I have not found solid documentation in this branch. Perhaps I could run a lp_file in the terminal. Regards, Bruno. – Bruno Prata Jul 25 '21 at 10:53