Пример #1
0
def get_env_config():
    """get rins env config."""
    config = ConfigDict()

    # required fields.
    config.class_path = "liaison.env.rins"  # should be rel to the parent directory.
    config.class_name = "Env"

    # makes observations suitable for the MLP model.
    config.make_obs_for_mlp = True
    # adds all the constraints to MLP state space.
    # adds #variables * #constraints dimensions to the state space.
    config.mlp_embed_constraints = False

    config.make_obs_for_self_attention = False
    """if graph_seed < 0, then use the environment seed"""
    config.graph_seed = 42

    config.dataset = 'milp-facilities-10'
    config.dataset_type = 'train'
    config.graph_start_idx = args.graph_start_idx
    config.n_graphs = 1

    config.k = args.k
    config.steps_per_episode = 2000

    return config
Пример #2
0
def get_config():
    config = ConfigDict()

    # required fields.
    config.class_path = "liaison.env.xor_env"  # should be rel to the parent directory.
    config.class_name = "Env"

    # makes observations suitable for the MLP model.
    config.make_obs_for_mlp = False

    # makes observations for graphnet agent with node labels in node features and
    # shortest path embedded as edge features.
    config.make_obs_for_graphnet_semi_supervised = False
    """if graph_seed < 0, then use the environment seed"""
    config.graph_seed = 42

    return config
Пример #3
0
def get_config():
    config = ConfigDict()

    # required fields.
    config.class_path = "liaison.env.tsp"  # should be rel to the parent directory.
    config.class_name = "Env"

    # makes observations suitable for the MLP model.
    config.make_obs_for_mlp = False
    """if graph_seed < 0, then use the environment seed"""
    config.graph_seed = 42

    config.dataset = 'tsp-20'
    config.dataset_type = 'train'
    config.graph_idx = 0

    return config