Skip to content
Snippets Groups Projects
Commit 8140f34a authored by ThibautDemare's avatar ThibautDemare
Browse files

Refactor a part of the function

parent de964ddc
Branches
Tags
No related merge requests found
...@@ -73,18 +73,9 @@ species Provider parent: RestockingBuilding { ...@@ -73,18 +73,9 @@ species Provider parent: RestockingBuilding {
self.fdm <- order.fdm; self.fdm <- order.fdm;
self.lp <- order.logisticsServiceProvider; self.lp <- order.logisticsServiceProvider;
} }
create Commodity number:1 returns:returnedAgent; do sendStock(sendedStock[0], order);
Commodity commodity <- returnedAgent[0];
commodity.stock <- sendedStock[0];
commodity.volume <- sendedStock[0].quantity;
commodity.finalDestination <- order.building;
commodity.stepOrderMade <- order.stepOrderMade;
ask forwardingAgent {
commodity.paths <- compute_shortest_path(myself, order.building, order.strategy, commodity);//'financial_costs'//travel_time
}
leavingCommodities <- leavingCommodities + commodity;
i <- i + 1; i <- i + 1;
outflow <- outflow + sendedStock[0].quantity; outflow <- outflow + sendedStock[0].quantity;
......
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