Extending into Manufacturing & Shopfloor

All Case Experiences in Topic format. Easy reading mode for contextual understanding. Quickie snapshot and howtos Files are linked into http://compiere.red1.org/

Extending into Manufacturing & Shopfloor

Postby red1 » Sun Nov 14, 2004 5:27 am

For this extension, i am working heavily with Andre Legendre at http://sourceforge.net/projects/compiere-mfgscm
I have just uploaded some tutorials there on UsingEclipse.zip at the Files section.
The project is still under wraps as its at alpha stage. Beta is coming round the corner and the Tasks section will be open to public. So, if you like to contribute please just howler.
The beta stage next is basically Integration Testing. An actual case study for prototyping will be sought out.
I am looking forward to a sample case for this sector, as the challenge is humungous but pure excitement!. :P

red1
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Q-Floor System using Mecca Java

Postby red1 » Sun Apr 16, 2006 10:09 am

We got a challenging case here that manufactures assembled and fabricated products.

The initial task of creating a Materials Costing Engine is solved by the BOM model of Compiere. We are using our Velocity project (University.sf.net) to drill into Compiere's Oracle DB, and thus circumvent the webstart and AD.

This been successfull, the framework opens for us to do lots of creative stuff, ie.

1) an efficient BOM Modeller here
PLS SEE SAMPLE IN NEXT POSTS (that is easier for dummies to do in Velocity Java then using Compiere Java) and

2) a Queue Management System as protoscreened here http://www.red1.org/gan/q-floor_screen_ ... master.htm .
- Click on "BOM JOB>>" button and see how job is processed from Compiere BOM.
- Click on WorkCenter 01, 04, 05 (serial#1) and see different pop up job details screens.
- Click on WorkCenter01 (heading) and see a pop up departmental report screen.
- Click on Reject (bolded wording) and see a pop up reject case screen.


This project is at prototyping stage until year-end. When decently done, more tutorials will be forthcoming. Meanwhile your ideas are welcome.
Last edited by red1 on Mon Jun 05, 2006 8:51 pm, edited 1 time in total.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby red1 » Mon May 08, 2006 2:11 pm

Here is a POC that the Compiere Production can be extracted into the shopfloor. The following screenshot is from a test run of executing the job of making 3 units of Patio Set. http://compiere.red1.org/QFloor.html
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

BOM Modeller version 1.0

Postby red1 » Thu May 18, 2006 10:39 am

We have now evolved an efficient and matured BOM Modeller for Production use. Here is a sample in edit mode http://compiere.red1.org/BOMModel.html and consolidated view http://compiere.red1.org/BOMModelConsolidated.html .

This BOM Modeller allow cost modelling of a Production Master Product that has its ingredients broken down in multiple tiers right down to raw elements. It gives a quantum cost structure that tells users right away the total cost of a certain elementary product used in a particular Master-Product.

To do that in Compiere is only the basis and this Viewer gives a one-shot view. As it takes quite nearly a minute to pull everything out from the M_Product_BOM table, we created a cache table to store the derived formulations for fast recall (within a second!), and for further recalculation of the Model at also super speed!.

By changing the child formulas to its immediate parent BOM, the CALCULATE button refreshes the resulting model almost instantly. Then the BOMQtys can be committed back to the Compiere DB.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby red1 » Tue Jun 06, 2006 10:02 pm

On the Production Floor, Tags for Job Carts and Serial Nos for stamping on products. Here the Tags are first generated according to Sales Orders - http://compiere.red1.org/tagGenerator.htm (we can also bunch a job to another Order's job http://compiere.red1.org/tagEdit.htm ). Later we assign Serial Nos to Job Carts and push into the Queue System - http://compiere.red1.org/TagSerial.htm .

When Serial Nos are tagged to each Order, we can then view easily all progress according to job and workcentre queue.

There are more sophisticated events after this, such as reject jobs, re-work, and finally calculation of WIP and finalising to Accounts.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby red1 » Fri Jun 23, 2006 9:41 pm

Resuming the prototyping of the BOM Modeller, we can make it having a lookup formula http://compiere.red1.org/bom_formula.htm where a child item costing in a BOM refers to another cost such as risk, direct overheads which are not items themselves OR ELSE they will incur the stocks they refered to, thus resolved VIA this way of reference.

And to make the main window more visible with such a feature we can have http://compiere.red1.org/bom_formula_hilite.htm which shows which line has a formula behind it, and for what value.

The BOM Modeller can now refer to BOMs as Templates and dupe out Estimates for the Sales Orders. This will avoid the creation of endless finished products BOMs in the Product table.

The Product window only manage a single template BOM. The Estimate table holds variations of that template product as it is negotiated with customers and finally enters the production floor.

Sales Orders will hold that variation bom qtys and final pricings. For accounting consequence, we will need to further rework the Production window to conjunct with the Inventory Internal Use, where 2 warehouse locators may be good - Raw Materials Locator and Factory Floor Locator.

To conveniently manage BOM-lines we can allow the IsActive manipulation here http://compiere.red1.org/bom_del_undel.htm
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby red1 » Tue Sep 05, 2006 11:36 am

With some code crunching, we can see it structured as http://compiere.red1.org/BOMModelTree.htm . This is closest to Tree View we can get, the next step is to use Java Tree methods to create Explorer type Tree Handler. (This is hoped from other contributors, where i will be obliged to support or assist. Otherwise i have to look for paid or free time :D Meanwhile u can refer to the source in the Medan module of CVS in http://sf.net/projects/university). Version is 253a.

In the example shown, Car Body template can be used to reproduce model production runs. In this case we call one such run as Car_Body-X. It has 2 childs - Casting(Net) and Casting(Scrap). Each in turn has its own childs, shown by the level of '=', which indicates the first level; '==' is for the 2nd level and so forth. This gives a fair representation of TreeView. My apologies of not starting with JavaTree and Nodes methods in the first place, as this requirement was discovered when the POJOs began evolving mostly to trap the business rules rather than to perform well. This is Extreme Programming iterativeness. Thus this module is considered a Throwaway, as only need the expensive business rules to now know how to recreate a better presentation.

This view access Compiere's DB but with a materialised SQL View to speed up the field pulling. This and other tables needed are:
Code: Select all
DROP TABLE P_EST_BOM;
CREATE TABLE P_EST_BOM (
  M_PRODUCT_BOM_ID  NUMBER (10),
  AD_CLIENT_ID      NUMBER (10),
  AD_ORG_ID         NUMBER (10),
  ISACTIVE          CHAR (1)      DEFAULT 'Y',
  CREATED           DATE          DEFAULT SYSDATE,
  CREATEDBY         NUMBER (10),
  UPDATED           DATE          DEFAULT SYSDATE,
  UPDATEDBY         NUMBER (10),
  LINE              NUMBER (10),
  M_PRODUCT_ID      NUMBER (10),
  M_PRODUCTBOM_ID   NUMBER (10),
  BOMQTY            NUMBER        DEFAULT 0,
  DESCRIPTION       NVARCHAR2 (1020),
  BOMTYPE           CHAR (1),
  PRODCODE          VARCHAR2 (50) ) ;


CREATE OR REPLACE VIEW P_ESTBOMFLAT_V ( M_PRODUCT_BOM_ID,
M_PRODUCT_ID, M_PRODUCTBOM_ID, PARENTPRODUCTNAME, PRODUCTNAME,
BOMQTY, CURC, PRICELIST, UOM,
PRODCODE, ISBOM, ISACTIVE, TAB,
SEQ ) AS SELECT bom.M_Product_BOM_ID, bom.M_PRODUCT_ID, bom.M_PRODUCTBOM_ID, par.Name, ch.Name, bom.BOMQty,
c.ISO_CODE, CASE WHEN bom.PriceList>0 THEN bom.PriceList ELSE pri.PriceList END AS PriceList,
  u.Name, bom.ProdCode, ch.IsBOM,bom.IsActive, bom.TAB, bom.SEQ
FROM P_EST_BOM bom
  INNER JOIN M_Product ch ON (ch.M_Product_ID = bom.M_ProductBOM_ID)
  INNER JOIN M_Product par ON (par.M_Product_ID = bom.M_Product_ID)
  INNER JOIN M_Product_PO po ON (po.M_Product_ID = bom.M_ProductBOM_ID)
  INNER JOIN C_Currency c ON (po.C_Currency_ID = c.C_Currency_ID)
  INNER JOIN M_ProductPrice pri ON (pri.M_Product_ID = bom.M_ProductBOM_ID AND pri.M_PriceList_Version_ID = '104')
  INNER JOIN C_UOM u ON (u.C_UOM_ID = ch.C_UOM_ID)

DROP TABLE P_ESTIMATE;
CREATE TABLE P_ESTIMATE (
P_PRODCODE VARCHAR(30),
P_ESTIMATE_NAME VARCHAR(50),
P_PRODUCT_ID VARCHAR(30)
);

DROP TABLE P_BOMFORMULA;
CREATE TABLE P_BOMFORMULA (
   P_BP_ESTKEY VARCHAR(30),
   P_BFMAIN_ID VARCHAR(30),
   P_BFBQ_ID VARCHAR(30),
   P_BFPRICE_ID VARCHAR(30),
   P_BF_PARENT VARCHAR(50),
   P_BF_CHILD VARCHAR(50),
   P_BF_PRICE_PCT NUMBER,
   P_BF_BQ_PCT NUMBER
);
CREATE OR REPLACE VIEW P_BOMFLAT_V ( M_PRODUCT_BOM_ID,
M_PRODUCT_ID, M_PRODUCTBOM_ID, PARENTPRODUCTNAME, PRODUCTNAME,
BOMQTY, CURC, PRICELIST, UOM, ISBOM, ISACTIVE )
AS SELECT bom.M_Product_BOM_ID, bom.M_PRODUCT_ID, bom.M_PRODUCTBOM_ID, par.Name, ch.Name, bom.BOMQty,
c.ISO_CODE, pri.PriceList, u.Name, ch.IsBOM,bom.IsActive
FROM M_PRODUCT_BOM bom
  INNER JOIN M_Product ch ON (ch.M_Product_ID = bom.M_ProductBOM_ID)
  INNER JOIN M_Product par ON (par.M_Product_ID = bom.M_Product_ID)
  INNER JOIN M_Product_PO po ON (po.M_Product_ID = bom.M_ProductBOM_ID)
  INNER JOIN C_Currency c ON (po.C_Currency_ID = c.C_Currency_ID)
  INNER JOIN M_ProductPrice pri ON (pri.M_Product_ID = bom.M_ProductBOM_ID AND pri.M_PriceList_Version_ID = '104')
  INNER JOIN C_UOM u ON (u.C_UOM_ID = ch.C_UOM_ID)

Some alterations:
Code: Select all
ALTER TABLE P_EST_BOM
ADD TAB INTEGER DEFAULT 0;
ADD SEQ INTEGER DEFAULT 0;
ALTER TABLE P_BOMFlatView
ADD TAB INTEGER DEFAULT 0;
ADD SEQ INTEGER DEFAULT 0;
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby red1 » Tue Sep 05, 2006 12:22 pm

For those wishing to study the Tree Structure logic its housed in ModelBOM.java
Code: Select all
   public static void structuredView(Vector materials, String stepKey) {
      Vector r_tree= new Vector();
      int r = 0;
      int tabctr = 1;
      int seqctr = 1;
      boolean go = true;
      while (go){
         int moreTab = 0;
         int flag = 0;
         for (int i=0; i<materials.size(); i++){
            Hashtable h = (Hashtable)materials.elementAt(i);
            String prodID = (String)h.get("M_Product_ID");
            int tab = ((Integer)h.get("tab")).intValue();
            if (tab==0){
                moreTab = 1;
               if (stepKey.equals(prodID)){
                  flag = 1;
                  String bomID = (String)h.get("M_ProductBOM_ID");
                  r_tree.add(r,prodID);
                  r++;
                  h.put("tab",tabctr);
                  h.put("seq",seqctr);
                  stepKey = bomID;
                  tabctr++;
                  seqctr++;
                  break;
                  }
               }
            }
         if (flag==0) {
            tabctr--;
            r--;
            if (r<0) go = false;
               stepKey=(String)r_tree.elementAt(r);
            }
      if (moreTab==0) go = false;   
      }
   }
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to Compiere Case Workshop

Who is online

Users browsing this forum: No registered users and 1 guest