Model.correctoverflowsubmodelentityids#

Model.correctoverflowsubmodelentityids(submodel_type, id, entity_type, option, renum_option, pool_id)#

Corrects an entity ID range overflow for a submodel.

Parameters:
  • submodel_type (hwString) – Submodel type to correct the ID range overflow for a submodel. Valid values are “includes” and “includefiles”

  • id (unsigned int) – The ID of the submodel.

  • entity_type (hwString) –

    The type of entity to correct the overflow for.

    0 - All entity types in the submodel are considered.

  • option (hwString) –

    0 - Overflow IDs

    1 - Underflow IDs

    2 - Both overflow IDs (default)

  • renum_option (hwString) –

    1 - Compact and fit (default)

    2 - Move after max

    3 - Move before min

    4 - Insert in gaps

    5 - Offset and fit (not yet supported)

  • pool_id (unsigned int) – The optional ID of the solver pool.

Examples#

Correct components in include file 1 with “both” overflow option and using “move after max” renumber option#
import hm
import hm.entities as ent

model = hm.Model()

model.correctoverflowsubmodelentityids(
    submodel_type="includes",
    id=1,
    entity_type="comps",
    option=2,
    renum_option=2,
    pool_id=0,
)
Correct all entities in include file 1 with “both” overflow option and using “move after max” renumber option#
import hm
import hm.entities as ent

model = hm.Model()

model.correctoverflowsubmodelentityids(
    submodel_type="includes",
    id=1,
    entity_type="0",
    option="2",
    renum_option="2",
    pool_id="0",
)