Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5287 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Complex nesting help needed badly

scenario

I have 4 sizes in inches in 4 fields named len1,len2,len3,len4

I need to get the material yeild from this, the board sizes is in 2 feet increments up to 12 feet max

for ease I convert all the inches to 1/16th inches so 48 inches = 768 and ofcourse my max board size is 2304

I need to know out of 4 pieces which can feet out of a 12 foot board and which needs additional material without providing waste

so the field I have are

"field name" "sample Value in that field"

len1 48

len2 36

len3 37

len4 48

I convert them and combine them in all 15 differnt ways in fields named

"field name" "sample Value in that field"

a1 786

a2 576

a3 592

a4 768

a12 1344

a13 1360

a14 1536

a23 1168

a24 1344

a34 1360

a123 1936

a1234 2704

a234 1936

a124 2112

a134 2128

this is all possible combinations of combining the fields.

Now I check each one and convert to feet

and example is field m12"shown below" formula is

If(a12 > maxboard;"0";Round(((((a12-subtract)/divisor)-.5)+1);0)*2+Round(((((a3-subtract)/divisor)-.5)+1);0)*2+Round(((((a4-subtract)/divisor)-.5)+1);0)*2)

also note subtract =9 and the divsor is 384 and maxboard is 2304

9 lets me give them 1/2 and inch over with out going into and extra board and the divisor keeps it at 2 feet increments

the feet fields I need are

"field name" "sample Value in that field"

m12 16

m13 16

m14 16

m23 16

m24 16

m34 16

m123 16

m234 16

m124 16

m134 16

m1234 16

in this example they all happen to come out to 16 feet which is the amount of material i need to make this job happen

So my final field is FEET and it take the MIN value of all the M??? fields

and this works perfectly every time, my problem is I need

to be able to enter up to 20 sizes, not just 4.

going up to 20 sizes may require hundreds and hundreds of fields and complex programming.

is their a way to do it on the fly with an array or something??

please help, I have been on this for MONTHS

a sample working file is available for your review.

Posted

Hello

I'm sure what you're trying to achieve can be done somehow, but if you've been grappling with it for months I think it's time to go back to first principles and establish what you're trying to achieve and why, then work out a fresh solution from there. My guess is that you're too deep in to the problem and maybe need an outsider's perspective.

As a rule I'm always happy to give up to 5 minutes' free advice to any one question posed on these forums, but any more than that and paid work calls louder. This problem sounds like it will take more than a few minutes to solve... so I'm more than happy to talk it over on a paid-for basis. My hunch is that a good solution could probably be worked out in an hour or two.

Others on here may be able to give more time to your problem without charging you... but if you get no joy, then give me a call.

Best wishes

James

Posted

Hi James,

We do not solicit work from the members needing assistance.

My guess is that you're too deep in to the problem and maybe need an outsider's perspective.

Isn't that why they posted their question here?

If they decide at some point that they need professional help, then they can post that request in our Services Wanted Topic.

Lee

Posted

going up to 20 sizes may require hundreds and hundreds of fields

The problem here is not the number of required fields - because you can (and should) use records for the combinations. However, with 20 sizes you are faced with 1,048,575 possible arrangements, and it might take a while to create and process all of them. So the trick (or one of the tricks) is to reduce the number of combinations to consider.

For example, taking your data of sizes 576, 592, 768, 768 and a goal of (no less than) 2,304:

The minimum size is 576 and 2,304/576 = 4. So we already know that no more than 4 boards will be required.

The maximum size is 768 and 2,304/768 = 3. Here we learn that it will take at least 3 boards to reach the required length - and since you don't have 3 boards of maximum size, it will clearly require more than that, i.e. at least 4.

So in the end, you need no less than 4 boards, and no more than 4 boards - and since you only have 4 boards, there is only one solution to the problem (ignoring the question of which board/s should be cut).

There are other (and probably better) approaches to the problem - see for example:

http://en.wikipedia.org/wiki/Cutting_stock_problem

but I am not sure how easy or efficient it would be to implement them using Filemaker's calculation engine.

Posted

Hi James,

We do not solicit work from the members needing assistance.

Lee

There is no such rule.

You're speaking of your personal policy.

I though James put it quite reasonably.

Posted

I doubt this is a problem you're going to solve in FileMaker. This type of question has been asked here before. Google "panel optimization".

This topic is 5287 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.