ilog

ILOG CPLEX / OPL dynamic Excel sheet referencing

半腔热情 提交于 2021-01-29 20:39:12
问题 I'm trying to dynamically reference Excel sheets or tables within the .dat for a Mixed Integer Problem in Vehicle Routing that I'm trying to solve in CPLEX (OPL). The setup is a: .mod = model, .dat = data and a MS Excel spreadsheet I have a 2 dimensional array with customer demand data = Excel range (for coding convenience I did not format the excel data as a table yet) The decision variable in .mod looks like this: dvar boolean x[vertices][vertices][scenarios] in .dat: vertices from

How to pass a collection from a rule to a java method

独自空忆成欢 提交于 2019-12-25 05:12:29
问题 I have a collection of Type Cars which I need to pass from the ILOG Jrules to my Java evaluation method. My Java evaluation method can accept an Object, so a collection can be accepted. I need to process the collection of cars in my Java XOM and then return some output to ILOG. But how do I create a collection of cars from my ILOG JRules? And for DVS testing, how do I pass the collection of cars from my DVS Scenario Excel sheet? 回答1: To clarify Tito's comment on the first answer: Well, it

Cplex(number of decimal)

青春壹個敷衍的年華 提交于 2019-12-11 07:54:15
问题 enter image description herehi, how can I increase the number of digits after the comma (number of decimal) in CPLEX for objectif fonction? thank you cordially? 回答1: You could read this CPLEX technote: http://www-01.ibm.com/support/docview.wss?uid=swg21615825 I gave the example float f = sqrt(2); execute { function formatFloat_prec8 (f) { f = Math.round(f*100000000); var fs = f.toString(); fs = fs.substring(0,fs.length-8)+','+fs.substring(fs.length-8,fs.length); return fs; } writeln

Remove whitespaces, from input string type parameter value, using BAL in ILog Jrule

末鹿安然 提交于 2019-12-11 04:34:09
问题 I have a rule which take a String type input parameter. Can I remove the whitespaces from the value this parameter holds using BAL. If not what is the other option to do this. In this JRule there is a decision table where condition column is this parameter and then output is action column. Say you define Rulset Paramter "Name" of type String for Rule IsDepartmentManager where output ruleset parameter is boolean. Now in the decision table the values in Name column is say "John" and out for

Terminate and retrieve solution in ILOG after a certain time limit

守給你的承諾、 提交于 2019-12-11 03:12:02
问题 I am using ILOG CPLEX from JAVA and I am running an Integer optimisation problem that takes about 3 days to complete the 0.0%. I need to terminate the program after a certain time limit and obtain a solution for whatever the limit left. Can anyone let me know how to do that? Thanks in advance. 回答1: You should run CPLEX with TiLim param: cplex.setParam(IloCplex.DoubleParam.TiLim, your_time_in_seconds) 来源: https://stackoverflow.com/questions/24449622/terminate-and-retrieve-solution-in-ilog