Originally posted by: SystemAdmin
[susana_sze said:]
Hi,
I plan to use .net to do some heuristic then pass the result to OPL [decision variable (dvar) in mod file].
It might be different as warm start/initial solution(but maybe I'm wrong) , due to certain reasons:
(1) the heuristic will provide only certain value of dvar for mod file
(2) those certain value (from .net) of dvar in mod file have to be fix throughout the OPL.
The problem now are:
(1) How to assign value to the XAssign[Jobnode][Jobnode] from .net?
(2) How to fix those assigned value to be fix in OPL?
Please advise me. If there is example, I will appreciate the code in C#.
[u]here is the mod file:[/u]
tuple aircraftnode
{
int id;
int release;
int deadline;
int processing;
int task;
}
{aircraftnode} Aircraft=...;
//define kitchen tuple
tuple kitchen
{
int id;
int release;
int deadline;
int processing;
int task;
}
//define the set for kitchen
{kitchen} Kitchen = {<e,0,Horizon,TravellingTime,1>|e in n+1..n+2};
{kitchen} Lunch = {<n+3,0,Horizon,LunchProcessing,1>};
//define job node
{kitchen} Jobnode = Aircraft union Kitchen union Lunch;
//define decision variable
dvar boolean XAssign [Jobnode][Jobnode];
Thanks in advance.
Regards,
Susana
#DecisionOptimization#OPLusingCPLEXOptimizer