import asd as asd import numpy as np helper = helper.Helper() costCov = costcov.Costcov() dataSpreadsheetName = 'InputForCode_Bangladesh.xlsx' timestep = 1. / 12. numsteps = 180 ages = [ "<1 month", "1-5 months", "6-11 months", "12-23 months", "24-59 months" ] birthOutcomes = ["Pre-term SGA", "Pre-term AGA", "Term SGA", "Term AGA"] wastingList = ["normal", "mild", "moderate", "high"] stuntingList = ["normal", "mild", "moderate", "high"] breastfeedingList = ["exclusive", "predominant", "partial", "none"] keyList = [ages, birthOutcomes, wastingList, stuntingList, breastfeedingList] spreadsheetData = dataCode.getDataFromSpreadsheet(dataSpreadsheetName, keyList) mothers = helper.makePregnantWomen(spreadsheetData) mothers['annualPercentPopGrowth'] = -0.01 ageGroupSpans = [1., 5., 6., 12., 36.] # number of months in each age group agingRateList = [ 1. / 1., 1. / 5., 1. / 6., 1. / 12., 1. / 36. ] # fraction of people aging out per MONTH (WARNING use ageSpans to define this) numAgeGroups = len(ages) agePopSizes = helper.makeAgePopSizes(numAgeGroups, ageGroupSpans, spreadsheetData) targetPopSize = {} costCoverageInfo = {} for intervention in spreadsheetData.interventionList: targetPopSize[intervention] = 0. costCoverageInfo[intervention] = {} for iAge in range(numAgeGroups):
import pickle as pickle import os, sys moduleDir = os.path.join(os.path.dirname(__file__), '..') sys.path.append(moduleDir) import data import helper import output country = 'Bangladesh' helper = helper.Helper() dataFilename = '../input_spreadsheets/%s/InputForCode_%s.xlsx'%(country, country) inputData = data.getDataFromSpreadsheet(dataFilename, helper.keyList) plotData = [] run=0 pickleFilename = '%s_Default.pkl'%(country) nametag = "Baseline" plotcolor = 'grey' file = open(pickleFilename, 'rb') modelList = [] while 1: try: modelList.append(pickle.load(file)) except (EOFError): break file.close()
""" import output as output import pickle as pickle import data as dataCode country = 'Kenya' ages = ["<1 month", "1-5 months", "6-11 months", "12-23 months", "24-59 months"] birthOutcomes = ["Pre-term SGA", "Pre-term AGA", "Term SGA", "Term AGA"] wastingList = ["normal", "mild", "moderate", "high"] stuntingList = ["normal", "mild", "moderate", "high"] breastfeedingList = ["exclusive", "predominant", "partial", "none"] keyList = [ages, birthOutcomes, wastingList, stuntingList, breastfeedingList] dataFilename = 'InputForCode_%s.xlsx'%(country) spreadsheetData = dataCode.getDataFromSpreadsheet(dataFilename, keyList) plotData = [] run=0 pickleFilename = '%s_Default.pkl'%(country) nametag = "Baseline" plotcolor = 'grey' file = open(pickleFilename, 'rb') modelList = [] while 1: try: modelList.append(pickle.load(file)) except (EOFError): break file.close()
import os, sys moduleDir = os.path.join(os.path.dirname(__file__), '..') sys.path.append(moduleDir) import data import helper import output country = 'Bangladesh' helper = helper.Helper() dataFilename = '../input_spreadsheets/%s/InputForCode_%s.xlsx' % (country, country) inputData = data.getDataFromSpreadsheet(dataFilename, helper.keyList) plotData = [] run = 0 pickleFilename = '%s_Default.pkl' % (country) nametag = "Baseline" plotcolor = 'grey' file = open(pickleFilename, 'rb') modelList = [] while 1: try: modelList.append(pickle.load(file)) except (EOFError): break file.close()