Once I have parsed the graph structure from the input file, I need to validate
that the graph is valid (i.e, that it is provably constructable). There are two
types of validation that need to be performed:
Spec validation. This only happens at the start of simulation, in order to
verify that the parsed structure is actually constructible.
Construction validation. This happens each block placement (or maybe each
timestep?) to verify that none of the invariants/properies have been violated.
This are different checks of potentially different computational complexity,
though it it hard to know at this point HOW different, and whether or not this
will need to be one class or two.
Some properties to check:
No holes in structure (topology might come in handy here in specifying when
holes are allowable).
Structure has an even # of columns (each pair forms at out and back path L to
R that are the construction lanes for parallel construction).
For cells containing cubes, the degree must be at least 5. If it is 5, then at
least 1 neighbor must be a ramp.
For cells containing ramps, the degree must be 5.
Structure has 3 smooth faces; only the back side opposite the construction
lanes entry/exit points can have irregularity in order for path algorithms to
work.
Once I have parsed the graph structure from the input file, I need to validate that the graph is valid (i.e, that it is provably constructable). There are two types of validation that need to be performed:
Spec validation. This only happens at the start of simulation, in order to verify that the parsed structure is actually constructible.
Construction validation. This happens each block placement (or maybe each timestep?) to verify that none of the invariants/properies have been violated.
This are different checks of potentially different computational complexity, though it it hard to know at this point HOW different, and whether or not this will need to be one class or two.
Some properties to check:
No holes in structure (topology might come in handy here in specifying when holes are allowable).
Structure has an even # of columns (each pair forms at out and back path L to R that are the construction lanes for parallel construction).
For cells containing cubes, the degree must be at least 5. If it is 5, then at least 1 neighbor must be a ramp.
For cells containing ramps, the degree must be 5.
Structure has 3 smooth faces; only the back side opposite the construction lanes entry/exit points can have irregularity in order for path algorithms to work.