Originally posted by: BabyBone
I have a similar question.
In the model file, the main routine, I have got some scripting runtime error. Does anyone know what was wrong?
Thanks.
Description Resource Path Location Type
Scripting runtime error: cannot convert to an integer, "01/01/2010 00:00:00 000". TAVRN_Model_1.mod /TAVRN 118:0 /Users/vickymak/opl/TAVRN/TAVRN_Model_1.mod OPL Problem Marke
for (var k in opl.CourseSessions){
k.startDate = new Date(k.startYear,k.startMonth-1,k.startDay);
k.endDate = new Date(k.endYear,k.endMonth-1,k.endDay);
}
the tuple defined was
tuple courseSession {
string courseName;
int idCourse;
int idSession;
int startYear;
int startMonth;
int startDay;
int endYear;
int endMonth;
int endDay;
int startDate; //Sigma_ij, i = course, j = session
int endDate; //Epsilon_ij, i = course, j = session
int minSize;
int maxSize;
float passrate;
};
{courseSession} CourseSessions = ...;
and the data look like this...
CourseSessions = {
<SOURCE, 0 , 1 , 2010,01,01, 2010,01,01, 0, 0, 0 , 24 , 1.0>,
<NEOC, 1 , 1 , 2017,01,30, 2017,06,19, 0, 0, 1 , 12 , 0.9>,
<NEOC, 1 , 2 , 2017,07,31, 2017,12,18, 0, 0, 1 , 13 , 0.9>,
<NEOC, 1 , 3 , 2018,01,29, 2018,06,18, 0, 0, 1 , 8 , 0.9>,
#DecisionOptimization#OPLusingCPLEXOptimizer