Forum Discussion
FICO
7 years agoCommunity Manager
Issue with launching mosel from Excel using VBA
Whenever I try to launch Mosel in Excel via VBA I get an runtime error 48, not finding xprm_rt. This happens for own codes as well as for the files from the example repository. Debugging confirms tha...
FICO
6 years agoCommunity Manager
Unfortunately there is no straightforward answer to this.
One possibility how to resolve the bitness mismatch is to work with 2 different versions of Mosel (one full 64bit installation of Xpress with a suitable license for solving the problem type you are interested in + one 32bit version of Xpress - you really just need the Mosel portion of it, eg from Rel8.6 which is the last to provide a 32bit version):
From your Excel spreadsheet you invoke the 32bit version of Mosel to retrieve the spreadsheet data - just as before - from a new (master) model file that only contains data handling. Once data have been read, your master model copies them to some intermediate location, eg into shared memory (using the shmem: driver of mmjobs). It then needs to open a connection to a 64bit instance of Mosel and run the actual optimization model on this instance with the data provided through the master model. If results are to be written back to the spreadsheet, you transfer them in the inverse direction, from the optimization submodel to the master and from there to the spreadsheet.
How to work with submodels and data transfer between models is explained in the whitepaper 'Multiple models and parallel solving with Mosel' . You will find the correpsonding example files at https://examples.xpress.fico.com/example.pl?id=runrtpar