Index: APPS/Verpakking/Optimizer.cls.xml =================================================================== diff -u -r68229 -r68329 --- APPS/Verpakking/Optimizer.cls.xml (.../Optimizer.cls.xml) (revision 68229) +++ APPS/Verpakking/Optimizer.cls.xml (.../Optimizer.cls.xml) (revision 68329) @@ -3,119 +3,257 @@ TECH.RegisteredObject - - + + +Machinekant = 2 x 25mm +50 + + + +%Decimal +1 + + + +%Decimal +1 + + + +APPS.Verpakking.Doos +1 + + + +BasisDoos:APPS.Verpakking.Doos,ProductGroep:%String + + + + +1 + BasisDoos.MinWidth) && (..InitieleBreedte > BasisDoos.MinDepth)) { + Set BasisDoos.Width = ..InitieleDiepte + Set BasisDoos.Depth = ..InitieleBreedte + } + + Set BasisDoos.Swap = 0 ]]> - -1 -Dikte,LogoPrint,PlanoBreedte + + +1 =:PlanoBreedte order by Breedte asc) + #dim BreedtePlanoVoorSwap As %Decimal = BasisDoos.Width + BasisDoos.Height + BasisDoos.Width + BasisDoos.Height + BasisDoos.K + #dim DieptePlaneVoorSwap As %Decimal = (2 * BasisDoos.Height) + BasisDoos.Depth + (2 * BasisDoos.Height) + + #dim BreedtePlanoNaSwap As %Decimal = BasisDoos.Depth + BasisDoos.Height + BasisDoos.Depth + BasisDoos.Height + BasisDoos.K + #dim DieptePlaneNaSwap As %Decimal = (2 * BasisDoos.Height) + BasisDoos.Width + (2 * BasisDoos.Height) + + #dim NodigeKartonBreedteVoorSwap = ..GetCardboardProductBreedte(BasisDoos.Thickness, BasisDoos.LogoPrint, BreedtePlanoVoorSwap) + #dim NodigeKartonBreedteNaSwap = ..GetCardboardProductBreedte(BasisDoos.Thickness, BasisDoos.LogoPrint, BreedtePlanoNaSwap) + + #dim OppervlakteKartonOmVerpakkingUitTeSnijdenVoorSwap As %Decimal = DieptePlaneVoorSwap * NodigeKartonBreedteVoorSwap + #dim OppervlakteKartonOmVerpakkingUitTeSnijdenNaSwap As %Decimal = DieptePlaneNaSwap * NodigeKartonBreedteNaSwap + + If ((OppervlakteKartonOmVerpakkingUitTeSnijdenNaSwap < OppervlakteKartonOmVerpakkingUitTeSnijdenVoorSwap) && (..InitieleDiepte > BasisDoos.MinWidth) && (..InitieleBreedte > BasisDoos.MinDepth)) { + Set BasisDoos.Width = ..InitieleDiepte + Set BasisDoos.Depth = ..InitieleBreedte + } + + Set BasisDoos.Swap = 0 +]]> + - &sql(OPEN GetProduct) - &sql(FETCH GetProduct) - &sql(CLOSE GetProduct) - Quit CardBoardID + + +1 + - - + + 1 + + + + + +1 + + + + + +1 219 + 2 + 209 + 2 + + + + } Else { + /* + 219 + 1 + 209 + 1 + + } - Set Param = ##class(APPS.Verpakking.Doos.Param).%New() - Set Param.Key = "Q" - Set Param.Value = 1 - Do BasisDoos.Params.Insert(Param) + #dim BreedtePlanoVoorSwap As %Decimal = BasisDoos.K1 + BasisDoos.Depth + BasisDoos.Width + BasisDoos.Depth + BasisDoos.K1 + #dim DieptePlaneVoorSwap As %Decimal = BasisDoos.K2 + BasisDoos.Depth - BasisDoos.T + BasisDoos.Height + BasisDoos.T + (2 * BasisDoos.Height) + BasisDoos.Depth + BasisDoos.Height - If (ProductGroep = "TBX") { - Set BasisDoos.Depth = Params("LODIEPTE") - Set BasisDoos.Height = Params("LOHOOGTE") - Set BasisDoos.Width = Params("LOBREEDTE") - - Set Param = ##class(APPS.Verpakking.Doos.Param).%New() - Set Param.Key = "T" - Set Param.Value = Params("LOCP") - } ElseIf (ProductGroep = "TAORBOX") { - Set BasisDoos.Depth = Params("DIEPTE") - Set BasisDoos.Height = Params("ZIJHOOGTE") - Set BasisDoos.Width = Params("BREEDTE") + #dim BreedtePlanoNaSwap As %Decimal = BasisDoos.K2 + BasisDoos.Width - BasisDoos.T + BasisDoos.Height + BasisDoos.T + (2 * BasisDoos.Height) + BasisDoos.Width + BasisDoos.Height + #dim DieptePlaneNaSwap As %Decimal = BasisDoos.K1 + BasisDoos.Width + BasisDoos.Depth + BasisDoos.Width + BasisDoos.K1 - Set Param = ##class(APPS.Verpakking.Doos.Param).%New() - Set Param.Key = "T" - Set Param.Value = Params("BREEDTECP") + #dim NodigeKartonBreedteVoorSwap = ..GetCardboardProductBreedte(BasisDoos.Thickness, BasisDoos.LogoPrint, BreedtePlanoVoorSwap) + #dim NodigeKartonBreedteNaSwap = ..GetCardboardProductBreedte(BasisDoos.Thickness, BasisDoos.LogoPrint, BreedtePlanoNaSwap) + + #dim OppervlakteKartonOmVerpakkingUitTeSnijdenVoorSwap As %Decimal = DieptePlaneVoorSwap * NodigeKartonBreedteVoorSwap + #dim OppervlakteKartonOmVerpakkingUitTeSnijdenNaSwap As %Decimal = DieptePlaneNaSwap * NodigeKartonBreedteNaSwap + + If ((OppervlakteKartonOmVerpakkingUitTeSnijdenNaSwap < OppervlakteKartonOmVerpakkingUitTeSnijdenVoorSwap)) { + Set BasisDoos.Width = ..InitieleDiepte + Set BasisDoos.Depth = ..InitieleBreedte } - Do BasisDoos.Params.Insert(Param) + Set BasisDoos.Swap = 0 + + */ ]]> - - + + 1 - - + +1 +Dikte:%Decimal,LogoPrint:%String,PlanoBreedte:%Decimal 1 +%String =:PlanoBreedte order by Breedte asc) + + &sql(OPEN GetProduct) + &sql(FETCH GetProduct) + &sql(CLOSE GetProduct) + + Quit CardBoardID ]]> + + +1 +Dikte:%Decimal,LogoPrint:%String,PlanoBreedte:%Decimal +1 +%Decimal +=:PlanoBreedte order by Breedte asc) + + &sql(OPEN GetProductWidth) + &sql(FETCH GetProductWidth) + &sql(CLOSE GetProductWidth) + + Quit Breedte +]]> +