Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DALSim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thibaut DEMARE
DALSim
Commits
1f518ada
Commit
1f518ada
authored
5 years ago
by
ThibautDemare
Browse files
Options
Downloads
Patches
Plain Diff
date('now') is the real current date. Not the current date inside the simulation
parent
9c27ed03
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/Building.gaml
+3
-2
3 additions, 2 deletions
models/Building.gaml
models/SupplyChain.gaml
+1
-1
1 addition, 1 deletion
models/SupplyChain.gaml
with
4 additions
and
3 deletions
models/Building.gaml
+
3
−
2
View file @
1f518ada
...
@@ -172,8 +172,9 @@ species Building {
...
@@ -172,8 +172,9 @@ species Building {
stockBuilding.quantity <- stockBuilding.quantity + entering_stock.stock.quantity;
stockBuilding.quantity <- stockBuilding.quantity + entering_stock.stock.quantity;
if(entering_stock.stepOrderMade >= starting_date){
if(entering_stock.stepOrderMade >= starting_date){
// Update lists containing the time to deliver some goods in order to measure the efficiency of the actors
// 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);
float t <- ((current_date - entering_stock.stepOrderMade))/3600.0;
localTimeToBeDeliveredLastDeliveries <- localTimeToBeDeliveredLastDeliveries + ((date("now") - entering_stock.stepOrderMade))/3600.0;//((int(time/3600)) - entering_stock.stepOrderMade);
(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;
j <- j + 1;
...
...
This diff is collapsed.
Click to expand it.
models/SupplyChain.gaml
+
1
−
1
View file @
1f518ada
...
@@ -71,7 +71,7 @@ species SupplyChainElement schedules: [] {
...
@@ -71,7 +71,7 @@ species SupplyChainElement schedules: [] {
self.position <- myself.position;
self.position <- myself.position;
self.reference <- stock;
self.reference <- stock;
self.logisticsServiceProvider <- myself.supplyChain.logisticsServiceProvider;
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;
self.strategy <- myself.supplyChain.logisticsServiceProvider.costsPathStrategy;
}
}
return o[0];
return o[0];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment