Thanks. The strange thing is that the word "Begin" (see red arrow) is highlighted as the place of the error. See my code.
On top of this: the code has worked, however, since I run it with other data and changed the data types of variables, it gives the error message.
By the way, do you know where I can get a simple overview on debugging?
[size=8pt]Procedure NearestClustering;
(* Add to each destination, the distances to the nearest services s
The NearestMixddsum clusters are added to the nearest distance from the
origin, so we can identify the optimum of the shortest distance to the
most compact clusters *)
Var i, j, temp : integer;
NearestCluster : array[1..origins] of int64;
DistmixWeighted : array[1..origins, 1..destinations] of int64;
Begin [color=red]<==[/color]
//Weight Distmix with NearestMixddsum
WriteLn('Weigted distmix');
WriteLn(Flog,'Weigted distmix');
For i:=1 to imax do
Begin
For j:=1 to jmax do
Begin
DistmixWeighted[i,j] := Distmix[i,j] + NearestMixddsum[j];
//Write(Flog, DistmixWeighted[i,j]:10);
End;
//Writeln(Flog);
End;
Writeln(Flog);
//Look for the nearest weighted cluster
Begin
Writeln(Flog, 'Nearest clusters per origin');
//Initialisation NearestMix i.e. fill with mostdistant
For i:=1 to imax do
Begin
NearestCluster[i] := 0;
{identify highest value of all j's}
For j:=1 to jmax do
if DistmixWeighted[i,j] > NearestCluster[i] then NearestCluster[i] := DistmixWeighted[i,j];
End;
//Find each nearest cluster for each i
For i:=1 to imax do
For j:=1 to jmax do
if DistmixWeighted[i,j] <= NearestCluster[i] then
NearestCluster[i] := DistmixWeighted[i,j];
temp:=0;
For i:=1 to imax do
begin
ResultArray[i].nearestcluster:=NearestCluster[i];
temp:=temp + NearestCluster[i];
Writeln(Flog, temp/j:10:2); //gemiddelde ter controle
end;
End;
End;[/size]