Originally posted by: kcapt
Hello,
I cannot import/read excel data from excel in this example: "sched_jobshopflex". I tried a lot of different ways as you can see in the image below, but none worked!
I want to be able to read the variable Ops{<x,x,x>,...) and the variable Modes{<x,x,x>,...).
I have tried:
id from SheetRead(sheet, "'Folha1'!N2:N25");
jobId from SheetRead(sheet, "'Folha1'!O2:O25");
pos from SheetRead(sheet, "'Folha1'!P2:P25");
and
Ops = {
<id from SheetRead(sheet, "'Folha1'!N2:N25")>,
<jobId from SheetRead(sheet, "'Folha1'!O2:O25")>,
<pos from SheetRead(sheet, "'Folha1'!P2:P25")>};
}
And many more ways...
What do you think it's the best way or how would you adapt the .mod and .dat to make it work?
Thanks!
---------------------------------------------------------------------------------------------------------------------------
Sched_jobshopflex:
.mod
tuple paramsT{
int nbJobs;
int nbMchs;
};
paramsT Params = ...;
int nbJobs = Params.nbJobs;
int nbMchs = Params.nbMchs;
range Jobs = 1..nbJobs;
range Mchs = 1..nbMchs;
tuple Operation {
int id; // Operation id
int jobId; // Job id
int pos; // Position in job
};
tuple Mode {
int opId; // Operation id
int mch; // Machine
int pt; // Processing time
};
{Operation} Ops = ...;
{Mode} Modes = ...;
.dat
Params = <5, 10>;
Ops = {
<1,1,0>,
<2,1,1>,
<3,1,2>};
Modes = {
<1,3,13>,
<1,7,12>,
<2,8,9>,
<2,9,17>,
<3,7,16>,
<3,5,5>};
#DecisionOptimization#OPLusingCPLEXOptimizer