Cancel
Showing results for
Did you mean:

# Optimise buffer allocation problem

Solution Partner Creator

Hi guys

I have 4 buffers in a manufacturing line between singleprocs. The capacity of the buffers can change but the sum (n) of them has to stay the same ex:

b1 = 5; b2 = 15; b3 = 5; b4 = 10; or    n = 35

b1 = 3; b2 = 20; b3 = 7; b4 = 5          n = 35

I want to maximise the ThroughputPerHour and minimise the WorkInProgess by changing the buffer capacities. I wrote a method to define the experiment values for the ExperimentManager :

is
do

local tab := ExperimentManager.ExpTable;
tab.delete;
for local x1 := 0 to n loop
for local x2 := 0 to n loop
for local x3 := 0 to n loop
for local x4 := 0 to n loop
if x1+x2+x3+x4 = n then      --constraint
tab.writeRow(1, tab.ydim+1,true, x1,x2,x3,x4);
end;
next;
next;
next;
next;
end;

It works fine except that it takes extremely long especially if n is a big number. If n =20 then there are 17770 experiments to be executed and then you have to scroll down and try and find with your eyes what combination you think is the best (so you are not 100% sure if it is the best combination).

Any help on how to acchieve this quicker and more accurate?

2 REPLIES 2

# Re: Optimise buffer allocation problem

Gears Esteemed Contributor

quicker: use GA

more accurate:

The results are stored in the table result in the ExperimentManager. You can access with SimTalk to it. With some lines SimTalk you find your best Experiment e.g.:

`is m:real; expe:string;do --find max result m:=ExperimentManager.results.max({5,1}..{5,*}); ExperimentManager.results.setCursor(5,1); --look for the experiment ExperimentManager.results.findCeil({5,1}..{5,*},m); expe:=ExperimentManager.results[0,ExperimentManager.results.cursorY]; --name of the experiment print expe; end;`
 Steffen Bangsowfreelance simulation specialist  web: www.bangsow.eumail: steffen@bangsow.net

# Re: Optimise buffer allocation problem

Phenom

hello cmcdonald,

referring to the enumeration of your (4 buffer) loops there are several ways of speeding up the

the computing of the experiments.

- setting the loop steps > 1

- using the distrIbuted simulation provided by the experiment manager to simulate the experiments on the number of available computer cores.

- using the neural net (NN) provided by PSi to compute the (buffer dependable) experiment behaviour. Once taught with a simulated subset of  (random) buffer sizes (e.g. 200), the NN  can compute the requested  target values at a far higher speed than the simulation system.

Check the experiment manager and the libraries for details.