Skip to content

Commit a7617c7

Browse files
authored
Fix stepwise controller documentation (#93)
1 parent 0946533 commit a7617c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cobald/controller/stepwise.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ def control(pool: Pool, interval):
113113
@control.add(supply=10)
114114
def quantized(pool: Pool, interval):
115115
if pool.utilisation < 0.5:
116-
return pool.supply - 1
116+
return pool.demand - 1
117117
elif pool.allocation > 0.5:
118-
return pool.supply + 1
118+
return pool.demand + 1
119119
120120
@control.add(supply=100)
121121
def continuous(pool: Pool, interval):
122122
if pool.utilisation < 0.5:
123-
return pool.supply * 1.1
123+
return pool.demand * 1.1
124124
elif pool.allocation > 0.5:
125-
return pool.supply * 0.9
125+
return pool.demand * 0.9
126126
127127
# create controller from skeleton
128128
pipeline = control(pool, interval=10)

0 commit comments

Comments
 (0)