Skip to content
Snippets Groups Projects
Commit eed3cd3f authored by Aleksandra Dimitrova's avatar Aleksandra Dimitrova
Browse files

last changes

parent fb97f8fa
Branches
No related tags found
No related merge requests found
Showing
with 9 additions and 5 deletions
Frontend/export/net.png

46.2 KiB

No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -21,7 +21,7 @@ def train(space, activities):
os.makedirs(logdir)
# model = PPO('MultiInputPolicy', env, verbose=1, tensorboard_log=logdir)
model = DQN('MultiInputPolicy', env, buffer_size = 50000000 ,verbose=1, exploration_fraction = 0.8, gamma=0.1, learning_starts = 10000, tensorboard_log=logdir)
model = DQN('MultiInputPolicy', env, verbose=1, exploration_fraction = 0.8, gamma=0.1, learning_starts = 10000, tensorboard_log=logdir)
TIMESTEPS = 1250000
iters = 0
......@@ -32,7 +32,7 @@ def train(space, activities):
def deploy(state):
model = DQN.load(r"models\other\1000000.zip")
model = DQN.load(r"models\1687531146\1250000.zip")
action, _ = model.predict(state, deterministic=True)
return action
......
......@@ -311,7 +311,8 @@ def show_active_cases(name):
def main():
# generate_event_log(10000)
# print(get_state(5, "eventlog.xes"))
print(format_check("eventlog.xes"))
# print(format_check("eventlog.xes"))
print(show_active_cases("eventlog.csv"))
if __name__ == "__main__":
......
......@@ -68,9 +68,10 @@ def decorate_petri_net(case, rec, name):
pm4py.view_petri_net(net, initial_marking, final_marking, decorations = decoration)
pm4py.save_vis_petri_net(net, initial_marking, final_marking, r"Frontend\export\net.png")
decorate_petri_net(5, 15, "optis")
decorate_petri_net(646, 7, "eventlog.csv")
......@@ -13,4 +13,6 @@ def test_agent():
state['process'] = np.asarray(process)
print(state)
print(dqn.deploy(state))
\ No newline at end of file
print(dqn.deploy(state))
test_agent()
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment