diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc
index 8a4025a6a5ae3f405b3e5c6c9c46bf1a32d0a269..c6d35e7edfa4df1127c811925cfc7edb45ed12b9 100644
--- a/src/DynamicModel.cc
+++ b/src/DynamicModel.cc
@@ -3163,14 +3163,30 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
   equation_tags.writeOccbinOutput(output, modstruct, julia);
 
   // Write mapping for variables and equations they are present in
-  for (const auto &variable : variableMapping)
+  if (!julia)
+    for (const auto &variable : variableMapping)
+      {
+	output << modstruct << "mapping." << symbol_table.getName(variable.first) << ".eqidx = [";
+	for (auto equation : variable.second)
+	  output << equation + 1 << " ";
+	output << "];" << endl;
+      }
+  else
     {
-      output << modstruct << "mapping." << symbol_table.getName(variable.first) << ".eqidx = [";
-      for (auto equation : variable.second)
-        output << equation + 1 << " ";
-      output << "];" << endl;
+      output << modstruct << "mapping.eqidx = Dict(\n";
+      for (const auto &variable : variableMapping)
+	{
+	  output << "        \""
+		 << symbol_table.getName(variable.first)
+		 << "\" => [";
+	  for (auto equation : variable.second)
+	    output << equation + 1 << ", ";
+	  output << "]," << endl;
+	}
+      output << ")" << endl;
     }
 
+
   /* Say if static and dynamic models differ (because of [static] and [dynamic]
      equation tags) */
   output << modstruct << "static_and_dynamic_models_differ = "