BioSIMI-Python/modules/SimpleModel.py
def createNewEvent(self, id, trigger_persistent, trigger_initialValue, 
        trigger_formula, variable_id, assignment_formula, delay_formula = '', 
        priority_formula = '', useValuesFromTriggerTime = True, name = ''):
        '''
        Creates a new Event in the Model and returns a pointer to the object created
        '''
        model = self.getModel()
        check(model,'retreived model object')
        e = model.createEvent()
        check(e,'creating new event in the model')
        check(e.setId(id), 'setting ID of the event created')
        if name != '':
            check(e.setName(name),'setting name of the event created')

        eTrig = e.createTrigger()
        check(eTrig,'creating trigger inside the event')
        check(eTrig.setPersistent(trigger_persistent), 'setting persistent value to the trigger')
        check(eTrig.setInitialValue(trigger_initialValue), 'setting initial value to the trigger')
        trig_math = parseL3Formula(trigger_formula)
        check(eTrig.setMath(trig_math), 'setting math to the trigger')

        eA = e.createEventAssignment()
        check(eA, 'creating event assignment inside the event')
        check(eA.setVariable(variable_id), 'setting variable in the event assignment')
        asmt_math = parseL3Formula(assignment_formula)
        check(eA.setMath(asmt_math), 'setting math to the event assignment')

        if delay_formula != '':
            eDel = e.createDelay()
            check(eDel, 'creating a new delay inside the event')
            del_math = parseL3Formula(delay_formula)
            check(eDel.setMath(del_math), 'setting the math to the delay')
        if priority_formula != '':
            eP = e.createPriority()
            check(eP, 'creating a new priority inside the event')
            prio_math = parseL3Formula(priority_formula)
            check(eP.setMath(prio_math), 'setting the math to the priority')
        e.setUseValuesFromTriggerTime(useValuesFromTriggerTime)
        return e

        Creates a new Event in the Model and returns a pointer to the object created
        
Creates a new Event in the Model and returns a pointer to the object created
Creates a new Event in the Model and returns a pointer to the object created
def createNewEvent(self, id, trigger_persistent, trigger_initialValue, 
        trigger_formula, variable_id, assignment_formula, delay_formula = '', 
        priority_formula = '', useValuesFromTriggerTime = True, name = ''):
        model = self.getModel()
        check(model,'retreived model object')
        e = model.createEvent()
        check(e,'creating new event in the model')
        check(e.setId(id), 'setting ID of the event created')
        if name != '':
            check(e.setName(name),'setting name of the event created')
        eTrig = e.createTrigger()
        check(eTrig,'creating trigger inside the event')
        check(eTrig.setPersistent(trigger_persistent), 'setting persistent value to the trigger')
        check(eTrig.setInitialValue(trigger_initialValue), 'setting initial value to the trigger')
        trig_math = parseL3Formula(trigger_formula)
        check(eTrig.setMath(trig_math), 'setting math to the trigger')
        eA = e.createEventAssignment()
        check(eA, 'creating event assignment inside the event')
        check(eA.setVariable(variable_id), 'setting variable in the event assignment')
        asmt_math = parseL3Formula(assignment_formula)
        check(eA.setMath(asmt_math), 'setting math to the event assignment')
        if delay_formula != '':
            eDel = e.createDelay()
            check(eDel, 'creating a new delay inside the event')
            del_math = parseL3Formula(delay_formula)
            check(eDel.setMath(del_math), 'setting the math to the delay')
        if priority_formula != '':
            eP = e.createPriority()
            check(eP, 'creating a new priority inside the event')
            prio_math = parseL3Formula(priority_formula)
            check(eP.setMath(prio_math), 'setting the math to the priority')
        e.setUseValuesFromTriggerTime(useValuesFromTriggerTime)
        return e
def createNewEvent ( self , id , trigger_persistent , trigger_initialValue , trigger_formula , variable_id , assignment_formula , delay_formula = '' , priority_formula = '' , useValuesFromTriggerTime = True , name = '' ) : model = self . getModel ( ) check ( model , 'retreived model object' ) e = model . createEvent ( ) check ( e , 'creating new event in the model' ) check ( e . setId ( id ) , 'setting ID of the event created' ) if name != '' : check ( e . setName ( name ) , 'setting name of the event created' ) eTrig = e . createTrigger ( ) check ( eTrig , 'creating trigger inside the event' ) check ( eTrig . setPersistent ( trigger_persistent ) , 'setting persistent value to the trigger' ) check ( eTrig . setInitialValue ( trigger_initialValue ) , 'setting initial value to the trigger' ) trig_math = parseL3Formula ( trigger_formula ) check ( eTrig . setMath ( trig_math ) , 'setting math to the trigger' ) eA = e . createEventAssignment ( ) check ( eA , 'creating event assignment inside the event' ) check ( eA . setVariable ( variable_id ) , 'setting variable in the event assignment' ) asmt_math = parseL3Formula ( assignment_formula ) check ( eA . setMath ( asmt_math ) , 'setting math to the event assignment' ) if delay_formula != '' : eDel = e . createDelay ( ) check ( eDel , 'creating a new delay inside the event' ) del_math = parseL3Formula ( delay_formula ) check ( eDel . setMath ( del_math ) , 'setting the math to the delay' ) if priority_formula != '' : eP = e . createPriority ( ) check ( eP , 'creating a new priority inside the event' ) prio_math = parseL3Formula ( priority_formula ) check ( eP . setMath ( prio_math ) , 'setting the math to the priority' ) e . setUseValuesFromTriggerTime ( useValuesFromTriggerTime ) return e
Creates a new Event in the Model and returns a pointer to the object created
Creates a new Event in the Model and returns a pointer to the object created
'''
        Creates a new Event in the Model and returns a pointer to the object created
        '''
self
id
trigger_persistent
trigger_initialValue
trigger_formula
variable_id
assignment_formula
delay_formula
priority_formula
useValuesFromTriggerTime
name