I want to call a .mod CPLEX file from Python. In the next link, there are instructions on how to call CPLEX within Python:
How to run a .mod file (CPLEX) using python?
But, in my case, the .mod file uses data read from Excel. In this case, do I need to use:
import pandas
Is it a correct or good approach to do something like this (calling a CPLEX (.mod) file which is linked with Excel)?
In the links, buses are defined as a bus structure that has nbSeats and cost features.
But what if there is no such structure in the problem, and there are only separate variables and parameters, then what should we use instead of opl.set_input()
?
For example, if there are only variables or parameters like nbKids defined in the codes, how we can pass it from Python to a CPLEX .mod file?