opl_languser.pdf

# What to do and where to find the files introduces you

• 168

This preview shows page 81 - 83 out of 168 pages.

What to do and where to find the files Introduces you to the example. You will enhance the initial model using search phases to ease the sequencing process and the pack constraint for better propagation. The car sequencing project (the carseq example) includes the following files: v carseq.mod , the initial model v carseq.dat , the data file. They can be found in <Install_dir>\opl\examples\opl\models\Car where <Install_dir> is your installation directory. The car sequencing problem Describes the problem. Consider the following problem. A car assembly line is set up to build cars on a production line divided into cells. Five cells that install options on cars require more than one task time to perform the operation. Their limitation is defined by the number of cars they can process in a period of time. There are seven different car configurations (or types), and the number of cars to build is derived from the demand for each configuration. The objective of the model is to compute a sequence of cars that the cells can process while minimizing the number of empty cars to insert to respect the load of the cells. The initial model includes the following elements: v The demand v The production capacity v The decision variables v The constraints v The data The demand In the following code extract: Chapter 2. The application areas 69

Subscribe to view the full document.

int nbCars = sum (c in Confs) demand[c]; int nbSlots = ftoi(floor(nbCars * 1.1 + 5)); // 10% slack + 5 slots int nbBlanks = nbSlots - nbCars; range Slots = 1..nbSlots; int option[Options,Confs] = ...; The demand element represents the number of cars to build for each type. The nbSlots element is the total number of cars to sequence. This number is multiplied by ten percent to make sure that it is possible to insert enough null cars to make the problem feasible. The option array of Boolean values defines the options required for each car type. See Instance data for the car sequencing problem ( carseq.dat ) The production capacity In the following code extract, the array defines the number of cars that can be processed for an option in a period of time: tuple CapacitatedWindow { int l; int u; }; CapacitatedWindow capacity[Options] = ...; The decision variables The first decision variable defines the sequence of cars. The second decision variable defines the length of the sequence; that is, the last non-null car. dvar int slot[Slots] in AllConfs; dvar int lastSlot in nbCars..nbSlots; The objective The objective function of the car sequencing model is to compute a sequence of cars that the cells can process while minimizing the number of empty cars to insert to respect the load of the cells. minimize lastSlot - nbCars; The constraints The mode defines four constraints written as forall statements: v to satisfy the demand: v to define the options that are used for each car in the sequence.
• Winter '18

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern