Xpress Optimization

Model wizard examples

This directory contains the LP and MIP modeling examples that are shown in the IVE examples wizard. The model files are named by optimization problem type. All models produce a graphical representation of results in SVG format.



Assignment: simple LP problem, graphical representation of results
 
Bin packing: simple MIP problem, random generation of data, use of model parameters, setting Optimizer controls
 
Blending ores: simple LP problem, formulation of blending constraints
 
Capital budgeting: simple MIP problem
 
Contract allocation: simple MIP problem, semi-continuous variables, graphical representation of results
 
Cutting stock: MIP problem solved by column generation, working with multiple problems, using 'sethidden', setting Optimizer and Mosel control parameters
 
Lot sizing: MIP problem, implementation of Branch-and-Cut and Cut-and-Branch algorithms, definition of Optimizer callbacks, Optimizer and Mosel parameter settings, 'case', 'procedure', 'function', time measurement
 
Facility location: MIP problem, graphical solution representation, re-solving with modified bounds, data input from file, dynamic arrays for data and decision variables, use of 'exists', model cuts
 
Portfolio optimization: small QP problem, solved repeatedly with modified constraints, graphical representation of the results, use of 'min' and 'max'
 
Knapsack: simple IP problem, formulation of knapsack constraints, model parameters, function 'random'
 
Multi-period, multi-site production planning: LP or MIP problem, formulation of resource constraints and material balance constraints, formatted solution printing, if-then-else, if-then-elif statements
 
Project planning with resource constraints: MIP problem, alternative formulation with SOS-1, tricky formulation of resource use profiles and calculation of benefits, graphical solution representation
 
Purchasing with price breaks: MIP problem, modeling a piecewise linear function with SOS-2, graphical representation of data
 
Transport: simple LP problem, using dynamic arrays for data and decision variables, formatted output printing, inline 'if', format of data files
 
TSP: MIP problem, loop over problem solving, TSP subtour elimination algorithm; procedure for generating additional constraints, recursive subroutine calls, working with sets, 'forall-do', 'repeat-until', 'getsize', 'not', graphical representation of solutions
 
Set covering: MIP problem, modeling an equivalence; sparse data format, graphical output representation, 'if-then-else'
 
Single period product mix: Simple LP problem, single period production planning
 
Personnel requirement planning: simple MIP problem, formulation of balance constraints using inline 'if'
 
Matching flight crews: 2 MIP problems with different objectives, data preprocessing, incremental definition of data array, encoding of arcs, logical 'or' (cumulative version) and 'and', 'procedure' for printing solution, 'forall-do', 'max', 'finalize', graphical representation of results, 'sin', 'cos'
 
Maximum flow in a telecom network: MIP problem, encoding of arcs, 'range', 'exists', 'create', algorithm for printing paths, 'forall-do', 'while-do', 'round', graphical representation of results
 
Multi-commodity network flow: MIP problem, encoding of paths, 'finalize', 'getsize'
 
Vehicle routing: MIP problem, formulation of constraints to eliminate inadmissible subtours, definition of model cuts, selection with '|', algorithm for printing the tours, graphical solution representation
 
Minimum cost flow: MIP problem, formulation with extra nodes for modes of transport; encoding of arcs, 'finalize', union of sets, nodes labeled with strings, graphical solution representation
 
Line balancing: MIP problem, encoding of arcs, 'range', formulation of sequencing constraints
 
Minimum weight spanning tree: MIP problem, formulation of constraints to exclude subcycles, graphical representation of results
 
Flow-shop scheduling: MIP problem, alternative formulation using SOS1, graphical solution representation
 
Job shop scheduling: MIP problem, formulating disjunctions (BigM); 'dynamic array', 'range', 'exists', 'forall-do', graphical solution representation
 
Transshipment formulation of multi-period production planning: MIP problem, representation of multi-period production as flow; encoding of arcs, 'exists', 'create', 'isodd', 'getlast', inline 'if'
 
Set partitioning: MIP problem, algorithm for data preprocessing; file inclusion, 3 nested/recursive procedures, working with sets, 'if-then', 'forall-do', 'exists', 'finalize'
 
Open shop scheduling: MIP problem, data preprocessing, algorithm for preemptive scheduling that involves looping over optimization, ''Gantt chart'' printing and drawing
 
Sequencing jobs on a single machine: MIP problem with 3 different objectives; 'procedure' for solution printing, 'if-then'
 
Timetable for courses and teachers: MIP problem, many specific constraints, tricky (pseudo-) objective function, 'finalize'
 

 

  Comments or suggestions about the examples? Please e-mail support@fico.com