简体   繁体   English

SCIP标志的作用是什么?

[英]SCIP what is the function for sign?

I am new to SCIP and have read through some of the example problems and documentation, but am still unsure how to formulate the following problem for the SCIP solver: 我是SCIP的新手,已经阅读了一些示例问题和文档,但是仍然不确定如何为SCIP求解器提出以下问题:

argmax(w) sum(sign(Aw) == sign(b))

where A is a nxm matrix, w is a mx1 vector, and b is a nx1 vector. 其中A是nxm矩阵, w是mx1向量, b是nx1向量。 The data type is floats/real numbers, and it is a constraint-free problem. 数据类型为浮点数/实数,这是一个无约束的问题。

Values for A and b are also contained row-wise in a .txt file. Ab值也按行包含在.txt文件中。 How can I import that? 如何导入?

Overall - I am new to SCIP and have no idea how to start creating variables (especially the objective function value parameter), importing data, formulate the objective function... It's a bit of a stretch for me to ask this question, but your help is appreciated! 总体而言 -我是SCIP的新手,不知道如何开始创建变量(尤其是目标函数值参数),导入数据,制定目标函数...我想问这个问题有点麻烦,但是帮助表示赞赏!

This should work: 这应该工作:

在此处输入图片说明

where beta(i) = sign(b(i)) . 其中beta(i) = sign(b(i)) The implication can be implemented using indicator constraints. 可以使用指标约束来实现含义。 This way we don't need big-M's. 这样我们就不需要大M了。

Most likely the >= 0 constraint should be >= 0.0001 (otherwise we can set all w(j)=0 ). >= 0约束最有可能应该是>= 0.0001 (否则我们可以将所有w(j)=0 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM