@capealoesa/camsmodels
v0.4.0
Published
Cape Aloe Management System API
Downloads
11
Readme
CAMS models
Publish procedure
- Updated version in
package.json
- Delete
dist
folder before building (sometimes building does not overwrite properly!) - Build:
npm run build
- Publish:
npm publish --access public
- Tag: `git tag v0.3.33
- Commit, tag and push with option
git push --tags
Tuesday, 11 December 2018
- Remove everything except the schema interface definitions for the Sage API and the CAMS API
- Publish V0.4.0
Sunday, 9 December 2018
- Add Item Adjustment Schemas
- Add Item Movement Schemas
- Publish v0.3.33
- Create git branch v0.4
Friday, 27 July 2018
- o Calculate closed form requirements solution. Implemented
bom.calc.linearQty()
andbom.calc.linearQtyAvail()
- o Built and published models v0.3.31
- o Fixed bug in
maxMapToJson()
- o Built and published models v0.3.31
- Rename
calculateQtyPossible()
andmaxMapToJson()
onbom.calc
function BomItem.qtyPerUnit
may not be 0 or less- Replace all
console.logs
withexpect
statements in tests - Draw out graph for TEST items (use as ground truth)
- Write test that gives warning when default values during sageItem deserialization occurs
- Write JSON for updated maps and trees
Thursday, 26 July 2018
- o Added intermediate item to
test.mps.json
- o Remove initial stock negative check
- o Built and published models v0.3.27
- o Implement
removeZeros()
for MrpTable - o Built and published models v0.3.28
- o Modify
MrpCalc.pullItemGrossRequirements()
to return parentIds with qtyPerUnit value as well - o Remove
CamsItemCollection
class. - o Built and published models v0.3.29
- Cleanup
- x Swap all instances of
pTree
withcTree
and vice versa (from an MRP viewpoint, this naming convention is correct) - x MRP: Assign depth level to each item so that they may be arranged as such.
- o MRP: Flag between
end-item
,intermediat item
,raw material
- o MRP: Add item Code and sageId
- o MRP: Period number and starting date
- o MRP: Track origins of gross requirement
- x
calculateTotalRequirement
to return JSON as well - o Design and document new BOM/MRP calc structures and discuss with dad
- x Swap all instances of
- o Implemented
calculateQtyPossible()
andmaxMapToJson()
onbom.calc
- o Built and published models v0.3.30
Wednesday, 25 July 2018
- o BUGFIX:
MPS.periodLength
always set toW
. - o Added
id
tomps.json
test data - o Built and published models v0.3.26
- o Added child item to
test.mps.sjon
and confirmed correct MRP visually
Tuesday, 24 July 2018
- o Split
mergeGrossRequirements
intopullItemGrossRequirements
andmergePeriodQtyMaps
- o Improved unit tests for above
- o Update
mrp.calc._mrpCalc
to usepullItemGrossRequirements
andmergePeriodQtyMaps
- o BUG: For loop in MRP calculation implicitly assumes that end-items may not also be sub-items
- x FIX: remove function
buildDependencyNetwork
and add a dummyRoot node. No. Does not model the logic correctly - o FIX: Refactor
mrp.calc._calMrp()
conditions to get grossReq from BOTHmps
andmrpTableMap
- o Remove
getMrpTableBoundaries
- o Add
id
field toIMps
andMPS
for persistence. - o Built and published models v0.3.25
Monday, 23 July 2018
- o Implemented
asVirtualCamsItem()
onMPS
with test - o Built and published models v0.3.24
- o Removed
asVirtualCamsItem()
onMPS
with test - o Refactor
stockPointsToPeriodQtyMap
to be independent oftMin
andtMax
- o Remove useless function
mrp.calc.getShedReceiptsMap()
- x Refactor
MrpTable
to getgrossReq
asMap
and deducet0
from there. NO! - o Refactor MRP calc with fixed boundaries. All negative items get accumulated into a
PastDue
column. - o Refactor MPS to use
tMin
andtMax
in stead ofduration
- o Refactor
MrpCalc
totMin
andtMax
ofMps
Friday, 13 July 2018
- o Implemented
mpsToRootNode
Monday, 25 June 2018
- o BUG: Replaced all
NumericField
withNumericUserField
- o Built and published models v0.3.23
Friday, 22 June 2018
- o Updated all
throw "string"
tothrow new Error("string")
- o Built and published models v0.3.22
Thursday, 21 June 2018
- o Added unit test for
sageItem.fromJson
- o Updated
generateAbstractSageItemsJson
to fill in UserFields with variable values - o Built and published models v0.3.17
- o Found and fixed BUG1 and BUG2!
- o Built and published models v0.3.19
- o Set IRF
leadtime
safetyStock
andlotsize
as variables in MRP calculation - o Implemented lotsize in
MRPTable
- o Built and published models v0.3.20
- o Fix reading of Qd, Leadtime and Safetystock
- o MRP: Implement variable lead-time, safety-stock and lot-size
- o
MrpTable
: set defaultQd
to"LFL"
; - o Built and published models v0.3.21
BUG1: Compiler does not always replace dist
BUG! tsc
does not always update content of dist/
so always delete it! Found that dist/IRF.js
did not match src/IRF.ts
. So there is a compiler bug.
BUG2: IRF is added AFTER sage item is updated
In the CAMSModel.fromJson method the IRF value is added AFTER the sage item is updated. This means that the IRF will aways have old info. This is from a poor design not clearly separating Cams and Sage models. Temprary fix by re-updating the sageItem just before returning the deseriealised cams item.
Wednesday, 20 June 2018
- o Added purcahse order test items
- o Built and published models v0.3.13
- o Updated
test/resources/mock/purchaseOrders.json
- o Built and published models v0.3.16
Tuesday, 19 June 2018
- o Design a dependency graphic explorer
- o MRP: Implemented
mrpTableToJson
inmrp.calc.ts
. - o Set lead time to constant 1 period for testing
- o Built and published models v0.3.12
Tuesday, 12 June 2018
- o Implement standalone function to convert period selection to milliseconds
- o Built and published models v0.3.11
Monday, 11 June 2018
- o Updated
mrp.calc.mrpTableToCsv()
to use real date as header
Saturday, 09 June 2018
- o Refine API for
bom.calc
andmrp.calc
. Change to classes with static methods - o
bom.calc
andmrp.calc
added to index exports - o Integrate REF_DATE properly
- o Built and published models v0.3.9
- o Implemented
getMrpTableBoundaries
andmrpTableToCsv
inmrp.calc
- o Built and published models v0.3.10
- o Build model for Mps and IMps, and refactor ad hoc version
- o Updated
mrp.calc
to use MPS - o Added
mps.json
toTEST
data
Friday, 08 June 2018
- o Created files
bom.calc
andmrp.calc
and moved functions frommrp.proto
there. - o Moved
calculateTotalRequirement
andexplodeDependencies
fromcamsserver-ts
and deleted original proto implementations frommrp.proto
- o Updated unit tests for above changes
Saturday, 02 June 2018
- o Update
CAMSItem.addBom()
to overwrite BOM if a BOM in the list with thatid
already exists. - o Update
CAMSItem.removeBom()
to resetmrpBomId
to 0 if removed BOM is the MRP bom. - o Implement BOM tests in
camsItem.test.ts
- o Built and published models 0.3.8
- In
mrp.test.ts
, replace console.logs with expect statements.
Thursday, 31 May 2018
- Built and published models v0.3.7
Wednesday, 30 May 2018
- o Added function
setSchedReceipts
toMrpTable
. Scheduled receipts are no longer set in theinit
function. - o Implement
getShedReceiptsMap
that converts the scheduled receipts of an item to an abstract Map for theMrpTable
. - o shedReceipts must be set after init since we need tMin and tMax to convert
Tuesday, 29 May 2018
- o Added some inititial stock to TEST raw materials. MRP calculation correct.
- Deploy new bom schemas
Friday, 25 May 2018
- o Implement
calculateMrp
- o Implement
mergeGrossRequirements
as subroutine ofcalculateMrp
Parent-child naming convention
- Realised that my naming convention of parent and child components are wrong. Parents should be raw materials and children, end-items.
Wednesday, 23 May 2018
- x Implement
CAMSItemCollection
dont try to link it withcamsItem.repo
. They are very different things.CAMSItemCollection
is just aMap<number, CamsItem>
- o Refactor
mrp.proto
to look like the production version. - o Implemented
buildDependencyNetwork
performesbuildDependencyTree
on a list of sageIds to build one dependency tree; - o Implemented
treeToString
function to visualise tree using item descriptions
Inter item dependencies
The MRP calculation cannot be just performed per end-item since multiple end-items may use the same common ingredients. The whole is not the sum of the parts. The master planning schedule must contain all the items that are to be planned.
Tuesday, 22 May 2018
- o Finalised single table MRP calculation
- o Implemented dependencyTree inversion
- Implement full MRP calculation
- Deploy new models with new MRP bom parameters (
mrpBomId
andid:number
) - Ask dad to re-upload TEST boms
- Replace mock/camsItems with new data (changed BOMID and Code is not correct)
Monday, 21 May 2018
- o Implemented
MrpTable.toCsv()
method - o Improved
MrpTable
API
Friday, 18 May 2018
- o Change MRP parameters to
Map
objects so that they can natively handle negative time - o Decide on MRP table structure. Specifically how should the case of PORs before today be handled. Map
Wednesday, 16 May 2018
- o Started implementation of mrp calculation in
MrpTable
Tuesday, 15 May 2018
- o Add Dads TEST camsItems to test/resources
- o Export TEST data in
index.ts
- o Added function
populate
torepo.proto.ts
to insert usingCamsItemJson
objects - o Modified
mrp.test
to use TEST data instead ofabstract
- x Draw dependency tree of TEST items (
explodeDependencies
works great!) - o Created
mrpTable
model - o Found spreadsheet template to calculate MRP. On Google Drive.
TEST Items
/items?$company=CapeAloeSA&$codelist=TEST001,TEST002,TEST101,TEST102,TEST011,TEST012,TEST013,TEST014,TEST021,TEST022,TEST031,TEST032,TEST033,TEST201,TEST202
Thursday, 10 May 2018
- o Uninstall UUID package
- o
PlanningBOM
id number that is initialied to timestamp - o Changed
Camsitem.mrpBomNumber
to mrpBomId - o mrpBom in
PlanningBOM
must be indicated usingmrpBomId
not array index
Wednesday, 18 April 2018
- o Updated
stats.calc.mapSchedReceipts()
and addedstats.calc.mapToArray()
- o Moved
mapFromSagePurchaseOrder
from server toScheduledReceipt
- o Added
unit
toScheduledReceipt
- o Published version 0.3.6
Tuesday, 17 April 2018
- o Changed
PlanningBom.name
toPlanningBom.code
- o Changed
PlanningBom.BOMID
toPlanningBom.id
- o Added
PlanningBom.fomulationCode
- o Updated
abstract.boms
test data accordingly - o Updated
unit tests accordingly
- o Published v0.2.5
- o Changed
PlanningBom.desc
toPlanningBom.description
- o Add
orderId
andstatus
toScheduledReceipts
- o Published v0.3.0
- o Added
ID
andDate
toSagePurchaseOrder
- o Add
id
toScheduledReceipts
- o Published v0.3.2
- o Added
stats.calc.mapSchedReceipts()
- o Published v0.3.4
Friday, 13 April 2018
- o Added
calc/stats.calc
for performing item calculations - o Published v0.2.4
Thursday, 12 April 2018
- o Added method
IRF.addScheduledReceipt
- o Installed
moment
to validate date strings - o Published version 0.2.2
- o In
models/CAMSItem
: populate IRF using free text fields from Sage item - o Added
NumerciField
1 and 2 tomodels/SageItem
- o Published version 0.2.3
Tuesday, 10 April 2018
- o Modify
serialise.util
to run functions to get default values - o Implement
assignDfltPrimatives
andcheckAndAssignPrimatives
pattern in all models - o Added some basic unit tests for
PlanningBOM
- o Added expected results to
testData
for MRP calculations and incorporated in unit tests - o Added
idOffset
parm togen.helpers
and updated tests - o Published version 0.2.1
Monday, 9 April 2018
- o Installed
uuid
for generating valid UUIDs - o Refactor to BOM array:
- o
bomId
is now UUID string - o Updated
ProtoRepo
and tests accordingly. All pass.
- o
- o Extracted embedded model
SageItemCategory
fromSageItem
to maintain convention - o Added
util
which implements dynamic type-checking of json documents using thedefaults
primitives of each model. - o Added corrupted test data for CAMSItem and SageItem
- o Wrote unit tests for CAMSItem and SageItem to test both positive and negative cases
- (Still need to implement the pattern for the rest of the models)
Friday, 6 April 2018
- o Added
/test/helpers
folder for helper test script. Added to Jest ignore - o Added functions in
gen.helpers
to generate mock Sage and Cams items - o Exported helpers
- o Published version 0.1.20
- o Moved helpers to src dir so they can be compiled properly
- o Published version 0.1.21
Wednesday, 4 April 2018
- o Added all models to index export (forgot some previously)
- o Added basic Sage interfaces for Purchase orders
Tuesday, 3 April 2018
- o Fixed spelling typo in IRF.ts
- o Restructured:
- Created
prototype
folder - abstract and mock data
- o Export test data a JSON structure that defines well structured sets
- Created
- o Refactored prototypes to be more orthogonal with test data
- o Created class
CamsItemCollection
for bulk operations on camsItems
Saturday, 30 March 2018
- o Added IRF to CamsItem
- o Started adding
BomTree
andInventoryPolicy
andmrp.calc
Monday, 26 March 2018
v0.1.15
- Bug fixes
v0.1.12
- Refactored some default values to have single declaration
v0.1.11
- Implemented prototype recursive functions that explodes a BOM and calculates total requirements
Friday, 16 March 2018
MRP
Material Requirements Planning-MRP-Part-1 | Dr. Harper's Classroom
MRP input:
- MPS
- BOM
- IRF (Inventory records file)
- SR: Scheduled receipts
- BI: Beginning Inventory
- LT: Lead Time
- SS: Safety stock
- Qd: Lot size discipline
- LFL: Lot-for-lot (exactly)
- Fixed: (Discrete amounts)
- Minimum: Anything under Discrete amount is LFL
MRP output:
- Inventory policy: What you need, how many and by when.
MRP MPS RCCP DRP
- MPS: Master production schedule (plans items that have “direct” demand, called independent demand.)
- MRP: Material requirements planning (plans items that have “dependent” demand)
- RCCP: Rough Cut Capacity Planning
- CRP: Capacity Requirements Planning
- DRP: Distribution Resources Planning (Managing the flow of materials between firms, warehouses distribution centers.)
How are these related to Kaizen and Kanban?
The Difference Between MRP and MPS "So, if I make a pen, it has a cap, a barrel, a spring. and a refill. Based on the definition above, the pen is an MPS item. The cap, barrel, spring and refill are MRP items."
v0.1.10
- Added default OR values to
fromJSON
factory methods. This will prevent trying to storeundefined
values which the datastore does not allow. Refactoring of this must be done in future since this is not internally DRY
v0.1.8
- Moved source to folder
src
- Added
BOMItem
model
v0.1.3
- Added jest unit testing
npm install jest --save-dev
npm install typescript --save-dev
npm install ts-jest --save-dev
- Added types for node: (to use
require
in tests)npm install @types/node --save-dev
- Disbled
"strict": true
intsconfig.json