コード例 #1
0
def build_simu(scenario):
    simu = Simu(scenario=scenario)
    simu.set_openfica_root_dir()
    simu.set_date()
    msg = simu.scenario.check_consistency()
    if msg:
        print 'inconsistent scenario'
    simu.set_param()
    x = simu.compute()
    for child in x.children:
        for child2 in child.children:
            print child2.code
            print child2._vals
    return True
コード例 #2
0
ファイル: test.py プロジェクト: TibbersBear/openfisca
#                            module='mahdi.no_models'
#                            )
#        
#        class TempForm(ModelForm):
#            class Meta:
#                model = self.model
#        
#        print self.create_fields_dict()
#        form = TempForm(data=self.create_fields_dict()) 
#        print 'is valid :' , form.is_valid() 
#        form.save()



scenario = Scenario()
simu = Simu(scenario=scenario)
simu.build()
cht = simu.waterfall_chart()
print cht

from mahdi.utils import MyNode
from mahdi.models import Node

#x = MyNode()
#x.init_from_OutNode(simu.data_courant)
#x.remove_null_children()
#print x.code, x.vals, x.is_null
#print x
#d =  x.create_fields_dict()

コード例 #3
0
#                            admin_opts=admin_opts,
#                            app_label='mahdi',
#                            module='mahdi.no_models'
#                            )
#
#        class TempForm(ModelForm):
#            class Meta:
#                model = self.model
#
#        print self.create_fields_dict()
#        form = TempForm(data=self.create_fields_dict())
#        print 'is valid :' , form.is_valid()
#        form.save()

scenario = Scenario()
simu = Simu(scenario=scenario)
simu.build()
cht = simu.waterfall_chart()
print cht

from mahdi.utils import MyNode
from mahdi.models import Node

#x = MyNode()
#x.init_from_OutNode(simu.data_courant)
#x.remove_null_children()
#print x.code, x.vals, x.is_null
#print x
#d =  x.create_fields_dict()

from chartit import DataPool, Chart