I want a decreasing function in AnyLogic software that starts from 100 and decreases with a slope of -0.2 in time plot. When it reaches 80, it should completely reach zero. After a few days, it should start again from 85 and then start decreasing with the slope.
i created a variable usestock_boundary3 which initial values is 100 and then i have function
usestock_boundary3 -= 0.2;
if (usestock_boundary3 <= 80) {
usestock_boundary3 = 0;
} else if (usestock_boundary3 <= 0) {
usestock_boundary3 = 90;
}
and event which call this function