Browse Source

Port some more parts of pn_interface to the new interface

Yentl Van Tendeloo 9 years ago
parent
commit
e97f694dfd
2 changed files with 2 additions and 5 deletions
  1. 1 4
      integration/code/pn_interface.alc
  2. 1 1
      make_parallel.sh

+ 1 - 4
integration/code/pn_interface.alc

@@ -76,7 +76,6 @@ Element function petrinet_fire(model : Element):
 				new_value = integer_subtraction(readAttribute(model, working_place, "tokens"), readAttribute(model, working_arc, "weight"))
 				unset_attribute(model, getName(model, working_place), "tokens")
 				instantiate_attribute(model, getName(model, working_place), "tokens", new_value)
-				//setAttribute(model, working_place, "tokens", integer_subtraction(readAttribute(model, working_place, "tokens"), readAttribute(model, working_arc, "weight")))
 				output((("  " + getName(model, working_place)) + ": ") + cast_i2s(readAttribute(model, working_place, "tokens")))
 
 			// Add tokens
@@ -87,7 +86,6 @@ Element function petrinet_fire(model : Element):
 				new_value = integer_addition(readAttribute(model, working_place, "tokens"), readAttribute(model, working_arc, "weight"))
 				unset_attribute(model, getName(model, working_place), "tokens")
 				instantiate_attribute(model, getName(model, working_place), "tokens", new_value)
-				//setAttribute(model, working_place, "tokens", integer_addition(readAttribute(model, working_place, "tokens"), readAttribute(model, working_arc, "weight")))
 				output((("  " + getName(model, working_place)) + ": ") + cast_i2s(readAttribute(model, working_place, "tokens")))
 			output("Transition fired!")
 		else:
@@ -370,8 +368,7 @@ Element function initial_prompt():
 				if (dict_in(root, name)):
 					output("Model exists; aborting")
 				else:
-					//my_model = instantiate_new_model(root[mm_name], create_node())
-					//dict_add(root, name, my_model)
+					my_model = instantiate_model(root[mm_name])
 					petrinet_loaded(my_model)
 			else:
 				output("Unknown metamodel; aborting")

+ 1 - 1
make_parallel.sh

@@ -14,4 +14,4 @@ do
     wait $job || let "FAIL+=1"
 done
 
-./link_and_load.sh $username "$@"
+./link_and_load.sh $username "$@" --fast