Closed tpaviot closed 3 years ago
The CumulativeWorker
still has to be ported to the new API.
Regarding cost function optimization, see issue https://github.com/Z3Prover/z3/issues/5254
According to me, the penalty
that has to be considered in the TODO list is actually a cost. But it's not a cost that is measured in euro or dollars per time period. The same base could be used for the penalty
, and we could even imagine negative costs (or negative penalties). Negative penalties could be used to promote tasks or resources
Merging #38 (afafa23) into master (c1a1e73) will decrease coverage by
0.40%
. The diff coverage is92.43%
.
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
- Coverage 97.88% 97.47% -0.41%
==========================================
Files 24 26 +2
Lines 2692 2891 +199
==========================================
+ Hits 2635 2818 +183
- Misses 57 73 +16
Impacted Files | Coverage Δ | |
---|---|---|
test/test_indicator.py | 98.87% <ø> (-0.14%) |
:arrow_down: |
processscheduler/cost.py | 83.33% <83.33%> (ø) |
|
test/test_cost.py | 93.75% <93.75%> (ø) |
|
processscheduler/resource.py | 97.53% <96.00%> (-0.89%) |
:arrow_down: |
processscheduler/__init__.py | 87.50% <100.00%> (+0.83%) |
:arrow_up: |
processscheduler/problem.py | 96.36% <100.00%> (+2.07%) |
:arrow_up: |
test/test_cumulative.py | 98.96% <100.00%> (-0.14%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c1a1e73...afafa23. Read the comment docs.
This PR extends the concept of Cost for a resource. A new
_Cost
base class is created, and two derivatesConstantCostPerPeriod
andPolynomialCostFunction
.PolynomialCostFunction
takes any python function expressed as a polynomial.