From 51b4f09bca802c4941700c78c5733ce968ddc7c6 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 27 Feb 2019 22:44:22 +0000
Subject: [PATCH] An attempt of adding hard constraints plugin to the simulator. It seems it does not work yet

---
 src/plugins.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/plugins.c b/src/plugins.c
index 8947499..9464a6b 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -110,8 +110,10 @@
 	plugin->function->at_start = dlsym(plugin->libhandle, "at_start");
 	plugin->function->after_vesicle_init = dlsym(plugin->libhandle, "after_vesicle_init");
 	plugin->function->vm_hard_constraint = dlsym(plugin->libhandle, "vm_hard_constraint");
-	plugin->function->vm_energy_before = dlsym(plugin->libhandle, "vm_energy_before");
-	plugin->function->vm_energy_after = dlsym(plugin->libhandle, "vm_energy_after");
+	plugin->function->vm_energy_before_prepare = dlsym(plugin->libhandle, "vm_energy_before_prepare");
+	plugin->function->vm_energy_before_execute = dlsym(plugin->libhandle, "vm_energy_before_execute");
+	plugin->function->vm_energy_after_prepare = dlsym(plugin->libhandle, "vm_energy_after_prepare");
+	plugin->function->vm_energy_after_execute = dlsym(plugin->libhandle, "vm_energy_after_execute");
 	plugin->function->vm_new_state_rejected = dlsym(plugin->libhandle, "vm_new_state_rejected");
 	plugin->function->vm_new_state_accepted = dlsym(plugin->libhandle, "vm_new_state_accepted");
 
@@ -125,6 +127,7 @@
 	for(int i=0;i<number_of_plugins;i++){
 		plist->plugin[i]=init_plugin(plugin_filenames[i]);
 	}
+	plist->n=number_of_plugins;
 	return plist;
 }	
 

--
Gitblit v1.9.3