Topic
• 4 replies
• Latest Post - ‏2013-07-30T22:47:46Z by W7AJ_Lingli_Wang
W7AJ_Lingli_Wang
11 Posts

# Pinned topic what is the error message of"c0000005 EXCEPTION_ACCESS_VIOLATION" meaning?

‏2013-07-29T05:00:27Z | ; access; cplex; error; opl violation

The error message says"c0000005 EXCEPTION_ACCESS_VIOLATION", and  the error location is unknown. The following is my model. Looking forward to any advice.

int ntrips=82;
range trips=1..ntrips;
float transtime[trips]=...;
float limitofblock=240;

dvar boolean chain[trips][trips];
dvar boolean contain[trips][trips][trips];

minimize
sum(i in trips,j in trips:j>=i)
chain[i][j];

subject to {
forall(j in trips)
ct1:
sum(i in trips:i<=j)
chain[i][j]<=1;

forall (i in trips)
ct2:
sum(j in trips:j>=i)
chain[i][j]<=1;

forall(j in trips)
ct3:
sum(i in trips:i<=j)
chain[i][j]*(j-i+1)==82;

forall(i in trips)
forall(j in trips:j>=i)
forall(k in trips:k>=i&&k<=j)
{ ct4:
sum(i in trips,j in trips:j>=i)
chain[i][j]*contain[i][j][k]==1;}

forall(i in trips,j in trips:j>=i)
ct5:
sum(k in trips:k>=i&&k<=j)
contain[i][j][k]*transtime[i]<=limitofblock;
• AlexFleischer
3147 Posts

#### Re: what is the error message of"c0000005 EXCEPTION_ACCESS_VIOLATION" meaning?

‏2013-07-29T22:15:29Z

Hi

can you try to replace ct4 by

forall(i in trips)
forall(j in trips:j>=i)
forall(k in trips:k>=i&&k<=j)
{ ct4:
1==sum(i in trips,j in trips:j>=i)
((chain[i][j]==1) && (contain[i][j][k]==1)) ;
}

or even

forall(i in trips)
forall(j in trips:j>=i)
forall(k in trips:k>=i&&k<=j)
{ ct4:
1==sum(i in trips,j in trips:j>=i)
((chain[i][j]+contain[i][j][k]==2)) ;
}

?

regards

• W7AJ_Lingli_Wang
11 Posts

#### Re: what is the error message of"c0000005 EXCEPTION_ACCESS_VIOLATION" meaning?

‏2013-07-30T05:15:42Z

Hi

can you try to replace ct4 by

forall(i in trips)
forall(j in trips:j>=i)
forall(k in trips:k>=i&&k<=j)
{ ct4:
1==sum(i in trips,j in trips:j>=i)
((chain[i][j]==1) && (contain[i][j][k]==1)) ;
}

or even

forall(i in trips)
forall(j in trips:j>=i)
forall(k in trips:k>=i&&k<=j)
{ ct4:
1==sum(i in trips,j in trips:j>=i)
((chain[i][j]+contain[i][j][k]==2)) ;
}

?

regards

Thanks to AlexFleischer. The expression as your suggestion is beyond me. But I have modified my model  according to your suggestion and tried to run it.It seems  to need very long time to obtain the result, since it have been running for more than 40 minute. I will tell you the result when I get it.

I am grateful to see your reply.  You have helped me so much.

Updated on 2013-07-30T05:16:27Z at 2013-07-30T05:16:27Z by W7AJ_Lingli_Wang
• W7AJ_Lingli_Wang
11 Posts

#### Re: what is the error message of"c0000005 EXCEPTION_ACCESS_VIOLATION" meaning?

‏2013-07-30T22:25:13Z

After  more than 2-hour running, the programming turns out  a error again with the error message says "not enough memory" . And the error comes from the expression of ct4. I have attached the screenshots for the error message and the ct4. Hope for help!

#### Attachments

• W7AJ_Lingli_Wang
11 Posts

#### Re: what is the error message of"c0000005 EXCEPTION_ACCESS_VIOLATION" meaning?

‏2013-07-30T22:47:46Z

Thanks to AlexFleischer. The expression as your suggestion is beyond me. But I have modified my model  according to your suggestion and tried to run it.It seems  to need very long time to obtain the result, since it have been running for more than 40 minute. I will tell you the result when I get it.

I am grateful to see your reply.  You have helped me so much.

After  more than 2-hour running, the programming turns out  a error again with the error message says "not enough memory" . And the error comes from the expression of ct4. I have attached the screenshots for the error message and the ct4. I will keep on looking for the right way to accomplish it .