Solved

# Rake building through wagon building

• 41 views

+2
• Enthusiast

Dear Team,

I have a problem. I need some helps. I have several coils with weight. I have to load coils on wagons. There are two types of wagons. The capacity of two types of wagons are 64 and 67 respectively. I have to make rakes by joining wagons. There are three types of rakes. In one rake type, 1st type of wagon can be used. It takes 4 wagons to make a rake. In rake type 2, 2nd type of wagon can be used and 5 wagons are required to make a rake. If we club two different types of wagons, then also we can make rake. It takes 3 wagons to make a rake. My objective is to make full rakes and utilize all the coils with minimum cost.

I have designed a variable v_(i_Rake_Type,i_Wagon_Type,i_Wagon,i_Coil).

The constraint is

sum[(i_Wagon_Type,i_Wagon), v_WagonType(i_Rake_Type,'Wagon_1',i_Wagon)] = 4*sum[i_Wagon_Type, v_RakeTypeUsed(i_Rake_Type,'Wagon_1')];

I am finding it sometimes problematic. In the last types of rakes, we need to use two different types of wagons.

Am I doing in right way. Kindly help.

icon

Best answer by Toine 18 April 2024, 12:03

View original

Hi @RwitamJ,

I don't understand your question. What are you trying to achieve with the constraint you describe?

Some remarks:

Would it benefit you if you use 4 types of rakes, instead of 3?
If I understand your problem correctly, there are 4 ways of making full rakes:
There are only two ways of making a full rake of 3 wagons consisting of two types. Thus, you would get the following rakes:
* 4 wagons of type 1
* 5 wagons of type 2
* 2 wagons of type 1 and 1 wagon of type 2
* 2 wagons of type 2 and 1 wagon of type 1

In the constraint, in both summations you use the index i_Wagon_Type. However, you don't use that in the summation; there you use the fixed index 'Wagon1'.
Are you using the correct index in your summation?

Kind regards,

Toine