BioSIMI-Python/modules/SimpleModel.py
def createNewConstraint(self, formulaString, msg = 'Constraint not satisfied for the model', name = ''):
        '''
        Creates a new Constraint in the Model and returns a pointer to the object created
        '''
        model = self.getModel()
        check(model,'retreived model object')
        constr = model.createConstraint()
        check(constr, 'creating a new constraint inside the model')
        astMath = parseL3Formula(formulaString)
        check(constr.setMath(astMath), 'setting math to the constraint')
        check(constr.setMessage(msg, True), 'setting the message to the constraint')
        if name != '':
            check(constr.setName(name),'setting name of the constraint')
        
        return constr

        Creates a new Constraint in the Model and returns a pointer to the object created
        
Creates a new Constraint in the Model and returns a pointer to the object created
Creates a new Constraint in the Model and returns a pointer to the object created
def createNewConstraint(self, formulaString, msg = 'Constraint not satisfied for the model', name = ''):
        model = self.getModel()
        check(model,'retreived model object')
        constr = model.createConstraint()
        check(constr, 'creating a new constraint inside the model')
        astMath = parseL3Formula(formulaString)
        check(constr.setMath(astMath), 'setting math to the constraint')
        check(constr.setMessage(msg, True), 'setting the message to the constraint')
        if name != '':
            check(constr.setName(name),'setting name of the constraint')
        return constr
def createNewConstraint ( self , formulaString , msg = 'Constraint not satisfied for the model' , name = '' ) : model = self . getModel ( ) check ( model , 'retreived model object' ) constr = model . createConstraint ( ) check ( constr , 'creating a new constraint inside the model' ) astMath = parseL3Formula ( formulaString ) check ( constr . setMath ( astMath ) , 'setting math to the constraint' ) check ( constr . setMessage ( msg , True ) , 'setting the message to the constraint' ) if name != '' : check ( constr . setName ( name ) , 'setting name of the constraint' ) return constr
Creates a new Constraint in the Model and returns a pointer to the object created
Creates a new Constraint in the Model and returns a pointer to the object created
'''
        Creates a new Constraint in the Model and returns a pointer to the object created
        '''
self
formulaString
msg
name