大字符串数据的minizinc约束求解 [英] minizinc constraint solving with large string data

查看:89
本文介绍了大字符串数据的minizinc约束求解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Minizinc一起进行Highschool计划项目.我有一个所有类型为string的教师,班级,房间,时间和事件的列表,以及一个整数类型的持续时间的列表.我在stackoverflow上发现需要用数字表示这些数据,但是我的数据很大.我该如何处理而无需手动转换它们中的每一个? 谢谢

I'm working on a Highschool scheduling project with Minizinc. I have a list of teachers, classes, rooms, times, and events all of type string and a list of duration of type integer. I found on stackoverflow that I need to represent these data with numbers but my data is large. How do I go about this without manually converting each one of them? Thank you

推荐答案

不幸的是,MiniZinc没有任何工具可以将字符串转换为适当格式的数据,因此恐怕您必须使用某些工具将其转换在MiniZinc之外.

Unfortunately, MiniZinc don't have any tools to convert strings to data in the appropriate format, so I'm afraid that you have to convert it with some tool outside MiniZinc.

如果您了解Perl,Python或Ruby之类的高级编程语言,它应该不会太难.

If you know any high level programming languages such as Perl, Python, or Ruby it shouldn't be too hard.

这篇关于大字符串数据的minizinc约束求解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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