From 72882dde3210d822563c989cd5743b4cda9d8a4a Mon Sep 17 00:00:00 2001
From: Derval Guillaume <gderval@uliege.be>
Date: Wed, 21 Dec 2022 16:19:13 +0100
Subject: [PATCH] Example for imports

---
 examples/imports/first.gboml  |  8 +++++++
 examples/imports/main.gboml   | 41 +++++++++++++++++++++++++++++++++++
 examples/imports/second.gboml |  8 +++++++
 examples/imports/third.gboml  |  8 +++++++
 4 files changed, 65 insertions(+)
 create mode 100644 examples/imports/first.gboml
 create mode 100644 examples/imports/main.gboml
 create mode 100644 examples/imports/second.gboml
 create mode 100644 examples/imports/third.gboml

diff --git a/examples/imports/first.gboml b/examples/imports/first.gboml
new file mode 100644
index 0000000..c3689e0
--- /dev/null
+++ b/examples/imports/first.gboml
@@ -0,0 +1,8 @@
+#TIMEHORIZON T = 8760;
+#GLOBAL
+    pass;
+#NODE FIRST
+    #PARAMETERS
+        f = 2;
+    #VARIABLES
+        pass;
\ No newline at end of file
diff --git a/examples/imports/main.gboml b/examples/imports/main.gboml
new file mode 100644
index 0000000..cd24fd5
--- /dev/null
+++ b/examples/imports/main.gboml
@@ -0,0 +1,41 @@
+#TIMEHORIZON T = 8760;
+#GLOBAL
+    nb_nodes = 10;
+
+#NODE PA
+    #PARAMETERS
+        nb = nb_nodes+1;
+        idx = 2;
+    #NODE A[i] extends FIRST from "first.gboml" for i in [0:nb-1]
+        #PARAMETERS
+            max_v = (i+1)*2+f;
+        #VARIABLES
+            internal: x;
+        #CONSTRAINTS
+            x >= i+1;
+            x <= max_v;
+        #OBJECTIVES
+            min: x;
+    #NODE B extends SECOND[idx] from "second.gboml"
+        #PARAMETERS
+            max_v = (i+1)*2+f;
+        #VARIABLES
+            internal: x;
+        #CONSTRAINTS
+            x >= i+1;
+            x <= max_v;
+        #OBJECTIVES
+            min: x;
+    #VARIABLES
+        pass;
+
+#NODE C extends THIRD from "third.gboml"
+    #PARAMETERS
+        max_v = (2+1)*2+f;
+    #VARIABLES
+        internal: x;
+    #CONSTRAINTS
+        x >= 2+1;
+        x <= max_v;
+    #OBJECTIVES
+        min: x;
\ No newline at end of file
diff --git a/examples/imports/second.gboml b/examples/imports/second.gboml
new file mode 100644
index 0000000..adbf062
--- /dev/null
+++ b/examples/imports/second.gboml
@@ -0,0 +1,8 @@
+#TIMEHORIZON T = 8760;
+#GLOBAL
+    pass;
+#NODE SECOND[j] for j in [0:3]
+    #PARAMETERS
+        f = j*3;
+    #VARIABLES
+        pass;
\ No newline at end of file
diff --git a/examples/imports/third.gboml b/examples/imports/third.gboml
new file mode 100644
index 0000000..d3de405
--- /dev/null
+++ b/examples/imports/third.gboml
@@ -0,0 +1,8 @@
+#TIMEHORIZON T = 8760;
+#GLOBAL
+    pass;
+#NODE THIRD
+    #PARAMETERS
+        f = 3;
+    #VARIABLES
+        pass;
\ No newline at end of file
-- 
GitLab