/******************************************************* Mosel Example Problems ====================== file runfoliocbio.java `````````````````````` Running a Mosel model from a Java application with data exchange between model and host application during the optimization run. (Passing data via callback) *** The model started by this program cannot be run with a Community Licence for the provided data instance *** (c) 2011 Fair Isaac Corporation author: S. Heipcke, July 2011 ********************************************************/ import java.io.*; import com.dashoptimization.*; public class runfoliocbio { // Class to receive solution values of decision variables public static class MySolArray { public String ind; // index name public double val; // solution value } static MySolArray[] solfrac; static MySolArray[] solbuy; static boolean ifprint; /*************************************************/ /* A class to initialize model data via callback */ /*************************************************/ public static class modelInit implements XPRMInitializationTo { /**** Retrieving data from Mosel ****/ public boolean initializeTo(String label, XPRMValue value) { double retsol; int numshares, solcount; XPRMArray solarr; XPRMSet[] sets; int[] indices; int asize, ct; if(label.equals("FRAC")) { solarr=(XPRMArray)value; asize=solarr.getSize(); solfrac = new MySolArray[asize]; for(int i=0;i