To reduce the waste materials. For example: There have materials list to buy materials from the market with different size in where they need to cut them according to their size in house.
Such as:
Material name is: 75 x 25 x 5 EA
Materials standard size is available in the market is: 7 Meter, 9 meter, 12 meter, 16 meter.
You need the following size of material 75 x 25 x 5 EA.
8000 mm, 2000 mm, 950 mm, 5000 mm, 5000 mm, 1500 mm ……..
Now, You need to calculate how many standard size they need to buy from the market?
Because if they buy 7 meter it can be possible to cut 5000 mm and 2000 mm to not waste materials after cut from 7 meter. But, if they choose 9 meter to cut for 5000 mm and 2000 mm in where 2 meter will waste. You want to calculate that bit by program.
So, from the above example, we will need: ( OUTPUT)
Material Name: 75 x 25 x 5 EA
STD Size Total quantity Portions Cut
7 meter 2 5000 mm, 2000 mm
5000 mm, 1500 mm
9 meter 1 8000 mm, 950 mm
Please help me out with any idea to resolve the problem, Many thanks in advance...
3 2808
Are you only allowed to make one cut per board? eg you can't cut 9m into 5000mm, 2000mm, and 2000mm? OR 5000mm, 2000mm, and 950 mm with 1050mm waste?
Is nothing lost when you cut?
===
When doing this algorithm, are the standard sizes set, or do they change from problem to problem?
Do you need to find the optimal solution, or is close-to-optimal ok?
=====
Possible Optimal-Solution Algorithm: -
Add lengths of all boards needed (in this case, adds up to 22.45 m)
-
Round up to the nearest meter. (assumes boards are all cut to exact meter. if not algorithm needs to change slightly.)
-
loop {
-
Try to find board lengths that exactly match that length.
-
Attempt to fit the cuts in those length.
-
Return if found.
-
-
otherwise loop(rearrange board types (retaining same length){
-
Attempt fit, return if found.
-
}
-
Increase length by 1.
-
}
-
@jkmyoung
It would be multiple cut or one cut which is depend on what material size you required.
======
STD set is always fixed.
========
Increase length by 1. Sorry cant understand that
Increase total length (sum of all used boards) by 1 meter. It's for the next iteration in the loop.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Stephen C. Waterbury |
last post by:
This seems like it ought to work, according to the
description of reduce(), but it doesn't. Is this
a bug, or am I missing something?
Python 2.3.2 (#1, Oct 20 2003, 01:04:35)
on linux2
Type...
|
by: Tom Anderson |
last post by:
Comrades,
During our current discussion of the fate of functional constructs in
python, someone brought up Guido's bull on the matter:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
...
|
by: SSG |
last post by:
Hi All!
I know how to calculate the running time of a particular routine, but i
want to know how to reduce the running time in a program...........
can anyone knows help me........
also...
|
by: Michiel Alsters |
last post by:
Hello everybody,
I hope anybody can help me. I'll try to give a brief overview of my
problem. I have running a program that performs a heavy calculation.
To give the user feedback what the...
|
by: rogerzar |
last post by:
Hi all
In my application I am displaying bipmap image
I am using the log10() function, but it takes very
long time to display the image, the pixel array size is
1272x1003 pixels.
I am...
|
by: falcon |
last post by:
Is there a way I can do time series calculation, such as a moving
average in list comprehension syntax? I'm new to python but it looks
like list comprehension's 'head' can only work at a value at...
|
by: 60325 |
last post by:
This is the page where I collect the data in drop-down boxes with
values of 1-10 and send it to a submitted page to do calculations.
Example:
Employee1 TeamScore(1-10)
Employee2 ...
|
by: The alMIGHTY N |
last post by:
Hi all,
Let's say I have a simple math formula:
sum (x * y / 1000) / (sum z / 1000)
I have to do this across 50 items, each with an x, y and z value, when
the page first loads AND when a...
|
by: Doker |
last post by:
Simple vb code:
<STAThread_
Public Shared Sub Main()
Dim g As Integer = 3
Console.WriteLine(g)
End Sub
avaluates to:
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |