Define program code
This is a type-written code to translate your mathematical model to a format readable by XpressMP.
Define the word ‘Compile’
This is when XpressMP converts the program code to a binary code.
What is an array?
This is how you would express and store a list of items in a program code
In general, how would you write a model in Xpress?
In the declarations, how would you delcare what the decisions variable is? And for..
VariableArray
IntegerVariable
BinaryVariable
For a facility location problem, how would you start declaring?
Say how many supply and demand nodes
In other words, what is the ‘i’ and what is the ‘j’
What is the second step in the declarations? How would je write it
Say which parameters are there.
Letter for parameter: array(i,j) of integer
What is the third step in the declarations? How would je write it
Write down the decision variable
Then, end declarations!
What do you do after the declarations?
Initialisation; give input for parameters?
How do you write the Initialisation?
Letter : [data, data] Is the same number as declared
Do you declare total cost?
No!
How do you write this:
First do the for all
The the summation
then the variable or parameter
then ‘= variable or parameter’
How do you express this in Xpress
You say ‘i in demand’, the use the same letters with c(i,j)
How do you write it if you want to minimize total cost?
Write this below the constraints
How to display the objective value?
How do you show all decision variables?
What do you do if a constraint is a non-negative real number?
And an integer?
And binary?
How do you code this?
For the knapsack problem, where do you write the max capacity?
Last changed2 years ago