汽车配置器示例 - 如何表示不兼容 [英] Car configurator sample - How to represent incompatible
问题描述
我正在尝试自定义汽车配置器示例。 如果我想确保兼容性 汽车发动机 - V8 ,汽车模型 - 启动器和汽车套件 - 舒适我可以添加约束
I am trying to customize the car configurator sample. If I want to ensure compatibility of the car Engine - V8 , Car Model - starter and Car Package - Comfort I can add a constraint like
(CarEngine ==" V8"& CarModel = =" starter" & CarPackage ==" comfort" )
(CarEngine =="V8" & CarModel == "starter" & CarPackage == "comfort" )
如果我想确保组合怎么办? (V8,首发,舒适)不应该存在。
What if I want to make sure that the combination (V8,starter, comfort) should not exisit.
我应该给出什么约束? 有什么想法吗?
What constraint should I give ? Any idea ?
推荐答案
否定约束。
Negate the constraint.
< span style ="color:#333333; font-family:'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif; font-size:13px; line-height:16px; text-align:left "> !(CarEngine ==" V8"& CarModel ==" starter" & CarPackage ==" comfort"
)
Not( CarEngine
==" V8" &安培;&NBSP; CarModel ==" starter" &安培; CarPackage =="舒适" )
这篇关于汽车配置器示例 - 如何表示不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!