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
6805603c
Commit
6805603c
authored
6 years ago
by
ThibautDemare
Browse files
Options
Downloads
Patches
Plain Diff
Use new available function to create a color with alpha value
parent
8c2677b2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/CellsStockShortage.gaml
+6
-6
6 additions, 6 deletions
models/CellsStockShortage.gaml
with
6 additions
and
6 deletions
models/CellsStockShortage.gaml
+
6
−
6
View file @
6805603c
...
...
@@ -3,7 +3,7 @@ model CellsStockShortage
import "Stock.gaml"
grid cell_stock_shortage width:50 height:50 {
rgb color <-
rgb(
rgb(255,255,255
)
,0.0);
rgb color <- rgb(255,255,255,0.0);
float nb_stock_shortage;
float nb_stock;
list<float> ratios <- [];
...
...
@@ -44,19 +44,19 @@ grid cell_stock_shortage width:50 height:50 {
ratio <- sum / length(ratios);
if(ratio = 0){
color <-
rgb(
rgb(255,255,255
)
,0.1);
color <- rgb(255,255,255,0.1);
}
else if(ratio < 0.025){
color <-
rgb(
rgb(102,194,164
)
,0.5);
color <- rgb(102,194,164,0.5);
}
else if(ratio < 0.07){
color <-
rgb(
rgb(65,174,118
)
,0.8);
color <- rgb(65,174,118,0.8);
}
else if(ratio < 0.15){
color <-
rgb(
rgb(35,139,69
)
,0.8);
color <- rgb(35,139,69,0.8);
}
else{
color <-
rgb(
rgb(0,88,36
)
,0.8);
color <- rgb(0,88,36,0.8);
}
}
}
\ No newline at end of file
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