Create the Python Project
In this section we shall create a Python file based on the standard template that solves the example business problem.
We shall edit the python file named
application.py to contain the optimization problem. To begin the process, complete the following steps:
If you attempt to publish to
Xpress Insight at this point, it will fail, because the compiler will recognize there is a missing file. We must add in the data file that is required by the Python script.
- Create a new file. In Xpress Workbench, click , or use the keyboard shortcut Ctrl-N. Name the new file shares.csv. Save the file to the model_resources folder.
- Double click shares.csv to open it in Xpress Workbench. Copy and paste the following text into the file, then save and close it.
ShareIds,Return,HighRisk,NorthAmerica Bank,6.0,False,False Brewery,8.0,False,False Cars,7.0,False,False Electronics,21.0,True,False Hardware,17.0,True,True Highways,9.0,False,False Software,31.0,True,False Telecom,12.0,True,True Theater,26.0,True,True Treasury,5.0,False,True
- Now you can publish the application to Xpress Insight.