Commit 1f518ada authored by ThibautDemare's avatar ThibautDemare

date('now') is the real current date. Not the current date inside the simulation

parent 9c27ed03
......@@ -172,8 +172,9 @@ species Building {
stockBuilding.quantity <- stockBuilding.quantity + entering_stock.stock.quantity;
if(entering_stock.stepOrderMade >= starting_date){
// Update lists containing the time to deliver some goods in order to measure the efficiency of the actors
(entering_stock.stock.lp as LogisticsServiceProvider).timeToDeliver <- (entering_stock.stock.lp as LogisticsServiceProvider).timeToDeliver + (date("now") - entering_stock.stepOrderMade);//((int(time/3600)) - entering_stock.stepOrderMade);
localTimeToBeDeliveredLastDeliveries <- localTimeToBeDeliveredLastDeliveries + ((date("now") - entering_stock.stepOrderMade))/3600.0;//((int(time/3600)) - entering_stock.stepOrderMade);
float t <- ((current_date - entering_stock.stepOrderMade))/3600.0;
(entering_stock.stock.lp as LogisticsServiceProvider).timeToDeliver <- (entering_stock.stock.lp as LogisticsServiceProvider).timeToDeliver + t;//((int(time/3600)) - entering_stock.stepOrderMade);
localTimeToBeDeliveredLastDeliveries <- localTimeToBeDeliveredLastDeliveries + t;//((int(time/3600)) - entering_stock.stepOrderMade);
}
}
j <- j + 1;
......
......@@ -71,7 +71,7 @@ species SupplyChainElement schedules: [] {
self.position <- myself.position;
self.reference <- stock;
self.logisticsServiceProvider <- myself.supplyChain.logisticsServiceProvider;
self.stepOrderMade <- date("now");//int(time/3600);
self.stepOrderMade <- current_date;//int(time/3600);
self.strategy <- myself.supplyChain.logisticsServiceProvider.costsPathStrategy;
}
return o[0];
......
Markdown is supported
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