Hi, I'd like to know if it's possible to add a parameter who's value depends on a decision value.
I.E. The TSP model but it should also take in account traffic from one point to the other. Please note: Traffic depends on the time when the sales man travels on that route.
Here is the model
I have a matrix of all possible combinations between the cities.
The Decision variable is the "Order" of the sales man's route. 0 is the first, 1 second,...
I have a property "timeToTravel" which is bound to a property that calculates the time when the route will take place from the "Order" value and it returns the travel time including traffic for that time of the day.
It seems to me that the parameter values is read once and cached when the Solve function is called, Am i correct? If yes does anybody have any recommendations to solve this problem?
Parameters are for input and decisions are for output. If you want a parameter to depend on the value of the decision from a previous run, solve the first model, retrieve the result, and set the value of the parameter.
If the value of the parameter depends on the value on the decision from the same model, then you should actually use another decision, and use an equality constraint to express the dependency.
Proposed as answer byNate BrixiusSunday, July 22, 2012 8:02 PM