取决于决策的参数 [英] Parameter that depends on a Decision

查看:72
本文介绍了取决于决策的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以添加参数 谁的价值取决于决策值。


I.E。 TSP模型,但它也应该考虑从一个点到另一个点的流量。请注意:交通取决于销售人员在该路线上行驶的时间。


这是模型


我有一个所有可能的矩阵城市之间的组合。


决策变量是"订单"。销售人员的路线。 0是第一个,1秒,......


我有一个属性"timeToTravel"它被绑定到一个属性,该属性计算路由将从"订单"发生的时间。价值,它返回旅行时间,包括当天该时间的流量。



在我看来,参数值被读取一次,在调用Solve函数时缓存,我是否正确?如果有,是否有人提出任何建议来解决这个问题?



提前致谢。

解决方案

参数用于输入,决策用于输出。如果您希望参数取决于先前运行决策的值,请求解第一个模型,检索结果并设置参数的值。


如果参数的值取决于来自同一模型的决策的值,那么您应该实际使用另一个决策,并使用相等的约束来表达依赖关系。


Nate


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?

Thanks in advance.

解决方案

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.

Nate


这篇关于取决于决策的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆