<commit_before>from scheduler.scheduler import schedule
from scheduler import prep_data


if __name__ == '__main__':

    # 4D: stands, rxs, time periods, variables
    # stand_data, axis_map, valid_mgmts = prep_data.prep_shp_db(
    #     shp="data/test_stands2", 
    #     db="e:/git/growth-yield-batch/projects/__scheduler_test/final/data.db")

    stand_data, axis_map, valid_mgmts = prep_data.from_random(450, 56, 20, 6)

    # Pick a strategy for each stand rx time period variable
    #  cumulative_maximize : target the absolute highest cumulative value
    #  evenflow_target     : minimize variance around a target
    #  evenflow            : minimize stddev over time
    #  cumulative_minimize : treated as cost; target the lowest cumulative value
    variable_names = ['harvest', 'harvest flow', 'carbon', 'owl habitat', 'fire hazard', 'cost proxy']
    strategies = ['cumulative_maximize', 'evenflow', 'cumulative_maximize', 'cumulative_maximize', 'cumulative_minimize', 'cumulative_minimize']
    weights = [5.0, 5.0, 1.0, 1.0, 1.0, 1.0]

    #flow = [250] * 2 + [140] * 6 + [500] + [100] * 11
    #flow = [320, 40] * 10<commit_msg>comment<commit_after>from scheduler.scheduler import schedule
from scheduler import prep_data


if __name__ == '__main__':

    # 4D: stands, rxs, time periods, variables
    # stand_data, axis_map, valid_mgmts = prep_data.prep_shp_db(
    #     shp="data/test_stands2", 
    #     db="e:/git/growth-yield-batch/projects/__scheduler_test/final/data.db")

    stand_data, axis_map, valid_mgmts = prep_data.from_random(450, 56, 20, 6)

    # Pick a strategy for each stand rx time period variable
    #  cumulative_maximize : target the absolute highest cumulative value
    #  evenflow_target     : minimize variance around a target
    #  evenflow            : minimize stddev over time
    #  cumulative_minimize : treated as cost; target the lowest cumulative value

    # These list have to match the number and order of the variables
    # represented in the the 4thDim of the array
    # TODO should prep_data return this with viable defaults? what about refactoring into a dict
    variable_names = ['harvest', 'harvest flow', 'carbon', 'owl habitat', 'fire hazard', 'cost proxy']
    strategies = ['cumulative_maximize', 'evenflow', 'cumulative_maximize', 'cumulative_maximize', 'cumulative_minimize', 'cumulative_minimize']
    weights = [5.0, 5.0, 1.0, 1.0, 1.0, 1.0]

    #flow = [320, 40] * 10
{'fraction_non_alphanumeric': 0.1059926620464737, 'fraction_numerical': 0.030574806359559722, 'mean_word_length': 3.7192307692307693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6371885', 'n_tokens_mistral': 875, 'n_tokens_neox': 780, 'n_words': 233}