0

Model parameters

I am trying to convert this mathematical model to CPLEX code. But it is not working.

tuple Sortie {
    int launch;                 
    int deliver;                    
    int rendez;   }

{Sortie} Sorties = {<i,j,k> | i in N0, j in CC, k in NP: k != i && k != j && TimeDrone[i][j]+TimeDrone[j][k] + ServiceDrone <= e };

Can anyone please suggest me what to do next?

President James K. Polk
  • 40,516
  • 21
  • 95
  • 125
Mon Mon
  • 25
  • 5
  • I suggest you give us a bit more information. You haven't given us the domain or range of values for N0 or NP, what are the values of TimeDrone[][] etc. Nor have you told us what is wrong. Do you get an error message, or is the generated set of tuples wrong? Have you tried with (near-trivial) values of N0, NP and TimeDrone? – TimChippingtonDerrick Mar 07 '22 at 17:28
  • range N0 = 0..12; range NP = 1..13; TimeDrone[][] is taking the Time values from any location N0 to any location NP while N0 != NP I am not understanding this tuples part. How they are working. If I run this code it is continuously running without giving any results – Mon Mon Mar 07 '22 at 17:39
  • Is this all the code? Are you just trying to create that tuple set? When you say it runs forever, is that still using a lot of CPU or is it sleeping/waiting? What is happening to memory consumption? What happens if you use much smaller ranges for N0, NP, CC? like 0..2, 1..3 etc? – TimChippingtonDerrick Mar 09 '22 at 08:18
  • @TimChippingtonDerrick, this is part of the code. I have added this based on the image information. For small data, I have limited time for compiling. It is giving feasible solution. I am wondering the way I have used tuple here, is it correct? – Mon Mon Mar 09 '22 at 18:42
  • Looks OK from the outside, not knowing your problem or data. When you look at the tupleset does it look right to you? – TimChippingtonDerrick Mar 10 '22 at 22:00

0 Answers0