6 Replies Latest reply on Jul 20, 2016 10:31 PM by user19752

Hi,

I am having trouble wrapping my brain around how to get filemaker to add up the following.

We manufacture panels for the construction industry however sometimes the required panels are parts of a whole panel. At present we simply specify either a half panel or a whole panel which makes things easy to add up:

0.5 + 1 + 0.5 = 2

I would like to increase our efficiency by allowing us to use a wider variety of decimals to add up the total however this is where I am getting stuck. I need:

0.25 + 0.5 + 0.75 = 2 (r=0.5)

and not

0.25 + 0.5 + 0.75 = 1.5

How do I stop filemaker from adding up values that result in a number higher than 1?

Look at the Round() function.

Round( 0.25+0.5+0.75 ; 0 ) = 2

Ceiling(.25+.5+.75)=2

Ceiling Rounds to the next integer.

Do you want answer for knapsack?

0.75 + 0.75 + 0.75 + 0.75 = 4 (this can't be calculated with Round() nor Ceiling() )

1 of 1 people found this helpful

Knapsack! I knew there would be a name for this. This is exactly what I am trying to solve.

Do you have any suggestions? I looked at the wikipedia page for knapsack but it seems to be above my level of mathematical understanding.

I have no idea what the original problem is. Is it the cutting stock problem?

Do you have part-width panels that you want to combine to fulfil orders, with minimum waste?

If so, do you have an intenventory of the part-width panels? Are they accurately measured? How many are you willing to keep around, and for how long? How much waste is acceptable? How long can the job wait for more cut stock of the right size to appear? Note that the lower the acceptable amount of waste, the harder the problem becomes and you'll need to keep more cut stock around.

These optimisation problems are "hard" computationally. The knapsac problem has been worked on for over 100 years. See also the travelling salesman problem.

Generic answer may be really hard as you saw.

If your problem have some limitations, it could be easier.

For example, there is max number to add, using only 4 numbers 0.25,0.5,0.75,1 etc.