From ef800d4ffafdbde7d7a172ad73bd984b1695c138 Mon Sep 17 00:00:00 2001
From: Pasha <pasha@member.fsf.org>
Date: Fri, 27 Jan 2023 00:54:07 +0000
Subject: simplex-glpk with modified glpk for fpga

---
 glpk-5.0/examples/sql/transp.sql | 45 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 glpk-5.0/examples/sql/transp.sql

(limited to 'glpk-5.0/examples/sql/transp.sql')

diff --git a/glpk-5.0/examples/sql/transp.sql b/glpk-5.0/examples/sql/transp.sql
new file mode 100644
index 0000000..8737333
--- /dev/null
+++ b/glpk-5.0/examples/sql/transp.sql
@@ -0,0 +1,45 @@
+CREATE DATABASE glpk;
+CREATE USER glpk@localhost IDENTIFIED BY 'gnu';
+GRANT ALL PRIVILEGES ON glpk.* TO glpk@localhost;
+USE glpk;
+# production capacity
+DROP TABLE transp_capa;
+CREATE TABLE transp_capa (
+  PLANT TEXT(127),
+  CAPA  REAL,
+  PRIMARY KEY ( PLANT(127) )
+  );
+INSERT INTO transp_capa ( PLANT, CAPA ) VALUES ( 'Seattle',   350 );
+INSERT INTO transp_capa ( PLANT, CAPA ) VALUES ( 'San Diego', 600 );
+# demand
+DROP TABLE transp_demand;
+CREATE TABLE transp_demand (
+  MARKET TEXT(127),
+  DEMAND REAL,
+  PRIMARY KEY ( MARKET(127) )
+  );
+INSERT INTO transp_demand ( MARKET, DEMAND ) VALUES ( 'New York', 325 );
+INSERT INTO transp_demand ( MARKET, DEMAND ) VALUES ( 'Chicago', 300 );
+INSERT INTO transp_demand ( MARKET, DEMAND ) VALUES ( 'Topeka', 275 );
+# distance
+DROP TABLE transp_dist;
+CREATE TABLE transp_dist (
+  LOC1 TEXT(127),
+  LOC2 TEXT(127),
+  DIST REAL,
+  PRIMARY KEY ( LOC1(127), LOC2(127) )
+  );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'Seattle',   'New York', 2.5 );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'Seattle',   'Chicago', 1.7 );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'Seattle',   'Topeka', 1.8 );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'San Diego', 'New York', 2.5 );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'San Diego', 'Chicago', 1.8 );
+INSERT INTO transp_dist ( LOC1, LOC2, DIST ) VALUES ( 'San Diego', 'Topeka', 1.4 );
+# result
+DROP TABLE transp_result;
+CREATE TABLE transp_result (
+  LOC1     TEXT(127),
+  LOC2     TEXT(127),
+  QUANTITY REAL,
+  PRIMARY KEY ( LOC1(127), LOC2(127) )
+  );
-- 
cgit v1.2.1

