Variant Configuration – SSC Type_of Statement

In my recent experiments with Eclipse and the SSC, I’ve discovered the Type_of statement.  Maybe this existed in the standard advanced modeling, but since it’s all new to me, I wanted to make sure that I capture what this means and how it can be used.

constraint RACK_MTLS {
name “Add Materials to the Rack”
objects:
?C is_a (300)CLASS_NAME
restrictions:
type_of(?C,(material)(300)(nr=material_name))
}

Now the thing with the type_of statement is that it allows you to instantiate a material.  So for example, I was playing with a configurable material, call it a rack.  Now the rack has some components that are required for part of the system, but they are contained at the rack level.  Well, the component could have multiple iterations.  So I add the type_of statement above, and now from the rack, I have the ability to instantiate material_name.  material_name can be configurable, or just a component you want to add to the system multiple times.  The next thing I plan to tackle is how to automatically add it to the configuration based on some rules.  In the meantime, type_of is another trick I’ll keep in my back pocket.

Thanks for learning with me,

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top