Skip to content
Snippets Groups Projects
Commit 9ec36067 authored by ThibautDemare's avatar ThibautDemare
Browse files

Don't use anymore function provided by forwardingAgent to compute distance...

Don't use anymore function provided by forwardingAgent to compute distance between provider and LSP (use native one instead)
parent 20e0e5e5
Branches
Tags
No related merge requests found
......@@ -62,12 +62,7 @@ global {
j <- 0;
loop while: j < lw {
float dist;
ask forwardingAgent {
create Commodity number:1 returns:returnedAgent;
Commodity commodity <- returnedAgent[0];
commodity.volume <- 1;
dist <- Provider[i] distance_to LogisticsServiceProvider[j];
}
dist <- Provider[i] distance_to LogisticsServiceProvider[j];
p[i, j] <- ( (Provider[i] as Provider).attractiveness ) / (dist*dist) ;
sum[j, 0] <- sum[j, 0] + p[i, j];
j <- j + 1;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment