Consulting

Results 1 to 5 of 5

Thread: VBA code for distributing items having different weight and time to different slots

  1. #1
    VBAX Newbie
    Joined
    Feb 2016
    Posts
    3
    Location

    VBA code for distributing items having different weight and time to different slots

    Can anyone help me with this problem?
    I have 4 factories, F1, F2, F3, F4 with maximum load 100, 100, 80, 60 tons at a time respectively. F1 and F2 can produce 6 different products namely a, b, c, d, e, f while F3 can produce a, b, c, d, e and F4 can produce only a, b, c, d The products a, b, c, d, e & f are having different production times and weights say
    a 2days, 1ton
    b 3days, 2ton
    c 5days, 4ton
    d 7days, 6ton
    e 7days, 7ton
    f 10days, 9ton
    Now I got an order to produce 300 products.
    a x 80, b x 30, c x 15, d x 4, e x 7, f x 3.
    I need a vba code to distribute these products to different factories so that the total production is completed in almost the same time in 4 factories. More close enough.The code should also work if I get an order for 3 different products only like (a x 10, e x 10, f x 10).
    If any one can help me in solving the above problem, its greatly appreciated.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    1. Is this a class assignment?
    2. We will need to know the Distribution Algorithm.
    3. Can the Factories Parallel process? IOW, can F1 turn out 100 Tons of product a in 2 days?
    4. Can they Multi-Process? IOW, Can F1 Turn out 3 batches of Product a and 2 batches of Product b in the same 6 days?
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Newbie
    Joined
    Feb 2016
    Posts
    3
    Location
    Nope, this is not a class assignment. This is my personal project.
    Parallel production is not possible. One factory can produce one product at a time. F1 needs 2days to produce 1ton a and 4daya to produce 2 ton a and so on..
    Multiprocessing also is not possible. F1 needs 12 days to produce 3batches of a and 2batches of b.
    But F1,F2,F3,F4 togather can produce 4 batches of a in 2days.
    One factory one product at a time.
    Hope its clear.

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Four Systems and Multiple Processes.

    Each System can utilize Multiple Processes
    Each System has a Production Capacities

    Each Process has a Production Unit
    Each Process has at Time Duration.

    OR: (To turn it sideways)

    Each Process Can utilize Multiple Systems
    Each Process has a Size
    Each Process has a Duration.

    Each System has a Maximum Size

    The Goal: Given multiple units of multiple Processes, complete each totality of Processes at the same time.
    Constraints: Each System can only be assigned one Process.

    Visualizations: (as provided by OP)


    System
    Maximum Size ProA ProB ProC ProD ProE ProF
    Sys1 100 X X X X X X
    Sys2 100 X X X X X X
    Sys3 80 X X X X X
    Sys4 60 X X X

    Process
    Duration Size
    ProA
    2 1
    ProB 3 2
    ProC 5 4
    ProD 7 6
    ProE 7 7
    ProF 10 9

    OR: (To turn it sideways)

    Process
    Duration Size Sys1 Sys2 Sys3 Sys4
    ProA
    2 1 X X X
    ProB 3 2 X X X X
    ProC 5 4 X X X X
    ProD 7 6 X X X X
    ProE 7 7 X X X
    ProF 10 9 X X
    Max Sizes 100 100 80 60



    Please see: Cross Posting , then feel free to share this on other forums.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    VBAX Newbie
    Joined
    Feb 2016
    Posts
    3
    Location
    Hi Sam,
    Thanks for your time and reply. But I didnt get what you actually meant with your reply.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •