def setUp(self):
    self.datamodel = COPASI.CCopasiRootContainer.addDatamodel()
    self.model = self.datamodel.getModel()
    self.model.createCompartment('comp1', 1.0)
    self.model.createCompartment('comp2', 2.0)
    m1 = self.model.createMetabolite('A', 'comp1')
    m2 = self.model.createMetabolite('B', 'comp1')
    m3 = self.model.createMetabolite('C', 'comp1')
    m4 = self.model.createMetabolite('D', 'comp1')
    m5 = self.model.createMetabolite('E', 'comp2')
    m6 = self.model.createMetabolite('F', 'comp2')
    m7 = self.model.createMetabolite('G', 'comp2')
    r = self.model.createReaction('react1')
    r.addSubstrate(m1.getKey())
    r.addProduct(m2.getKey())
    r = self.model.createReaction('react2')
    r.addSubstrate(m3.getKey())
    r.addProduct(m5.getKey())
    r = self.model.createReaction('react3')
    r.addSubstrate(m6.getKey())
    r.addProduct(m2.getKey())
    self.model.compileIfNecessary()
    self.moiety = self.model.getMoiety(0)
def setUp(self):
    self.datamodel = COPASI.CCopasiRootContainer.addDatamodel()
    self.model = self.datamodel.getModel()
    self.model.createCompartment('comp1', 1.0)
    self.model.createCompartment('comp2', 2.0)
    m1 = self.model.createMetabolite('A', 'comp1')
    m2 = self.model.createMetabolite('B', 'comp1')
    m3 = self.model.createMetabolite('C', 'comp1')
    m4 = self.model.createMetabolite('D', 'comp1')
    m5 = self.model.createMetabolite('E', 'comp2')
    m6 = self.model.createMetabolite('F', 'comp2')
    m7 = self.model.createMetabolite('G', 'comp2')
    r = self.model.createReaction('react1')
    r.addSubstrate(m1.getKey())
    r.addProduct(m2.getKey())
    r = self.model.createReaction('react2')
    r.addSubstrate(m3.getKey())
    r.addProduct(m5.getKey())
    r = self.model.createReaction('react3')
    r.addSubstrate(m6.getKey())
    r.addProduct(m2.getKey())
    self.model.compileIfNecessary()
    self.moiety = self.model.getMoiety(0)