1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| Quintiq file version 2.0
| #parent: #root
| Function CalcLotSizeViolationContinuous
| {
| TextBody:
| [*
| value := 0.0;
| if ( this.Operation().HasLotSize() )
| {
| load := this.Load();
| diff1 := load - this.Quantity(); // load is smallest multiple of lot size larger than qty. We compute smallest difference between load and load-lotsize (i.e. nearest lot size)
| diff2 := abs( (load - this.Operation().LotSize()) - this.Quantity() );
| value := minvalue( diff1, diff2 ) ;
| }
| this.LotSizeViolationContinuous( value );
| *]
| }
|
|