Model.sethistorymemorylimit#

Model.sethistorymemorylimit(memory)#

Sets the maximum amount of memory that history states are allowed to use.

Parameters:

memory (int) –

The maximum amount of memory (in MB) that history states are allowed to use.

-1 - Indicates unlimited.

0 - Disables all history recording, including potential legacy use cases.

> 0 - Memory to allow.

Example#

Set the maximum memory 1000 MB#
import hm
import hm.entities as ent

model = hm.Model()

model.sethistorymemorylimit(memory=1000)