2023,江端さんの技術メモ

まずGISのDBにアクセスしておきます(必要なのかどうかは不明です)。

C:\Users\ebata>psql -U postgres -h 192.168.0.23 -p 15432
Password for user postgres:
psql (13.4, server 12.5 (Debian 12.5-1.pgdg100+1))
Type "help" for help.
postgres=# \c kitaya_db
psql (13.4, server 12.5 (Debian 12.5-1.pgdg100+1))
You are now connected to database "kitaya_db" as user "postgres".
(1)領域の中に領域が含まれている場合です。

kitaya_db=# SELECT ST_Covers(st_geomfromtext('POLYGON((35.66776966314929 139.6895046225338,35.657947599160494 139.69091202947678,35.65865130959591 139.70318173103095,35.66885441403114 139.70307346895845,35.66776966314929 139.6895046225338))'), st_geomfromtext('POLYGON((35.66527761205352 139.6953146870933,35.66246296668681 139.69387119279278,35.66316663733071 139.70036691714503,35.66527761205352 139.6953146870933))'));
st_covers
-----------
t
(1 row)

(2)領域の中に領域が含まれていない場合です。

kitaya_db=# SELECT ST_Covers(st_geomfromtext('POLYGON((35.66776966314929 139.6895046225338,35.657947599160494 139.69091202947678,35.65865130959591 139.70318173103095,35.66885441403114 139.70307346895845,35.66776966314929 139.6895046225338))'), st_geomfromtext('POLYGON((35.66527761205352 139.6953146870933,35.66246296668681 139.69387119279278, 35.662818 139.7050018, 35.66527761205352 139.6953146870933))'));
st_covers
-----------
f
(1 row)

(3)領域の中に点が入っている場合です。

kitaya_db=# SELECT ST_Covers(st_geomfromtext('POLYGON((35.66776966314929 139.6895046225338,35.657947599160494 139.69091202947678,35.65865130959591 139.70318173103095,35.66885441403114 139.70307346895845,35.66776966314929 139.6895046225338))'), st_geomfromtext('POINT(35.66527761205352 139.6953146870933)'));
st_covers
-----------
t
(1 row)

(4)領域の中に点が入っていない場合です。

kitaya_db=# SELECT ST_Covers(st_geomfromtext('POLYGON((35.66776966314929 139.6895046225338,35.657947599160494 139.69091202947678,35.65865130959591 139.70318173103095,35.66885441403114 139.70307346895845,35.66776966314929 139.6895046225338))'), st_geomfromtext('POINT(35.662818 139.7050018)'));
st_covers
-----------
f
(1 row)

以上

 

2023,江端さんの技術メモ

宿題が出ました。

A Homework is coming .

交通量の少ない通り(200台/時程度)を信号のない場所から選ぶ。
1時間の間に車がある地点を通過する時刻を記録する。時刻は1秒か2秒の単位で 秒単位で記録する。
1. 時刻tまでに観測点を通過した車両の累積台数A(t)を描画する。図の横軸は時間 図の横軸は時間、縦軸はA(t)とする。
2. A(t)のうち、ほぼ線形(平均到着率が一定)の部分を選択する。この時間帯のカウント数から この時間帯のカウントから、1分間と5分間の連続したカウントのヒストグラムを作成する。そして、そのヒストグラムをポアソン分布と比較する。

Select a street with low traffic volume (about 200 cars/hour) from a location without a traffic light.
Record the time at which a car passes a certain point during a one-hour period. Record the time in seconds, in increments of 1 or 2 seconds.
Draw the cumulative number of vehicles A(t) that passed the observation point by time t. The horizontal axis of the figure is time, and the vertical axis is A(t). 2.
Select a portion of A(t) that is nearly linear (constant average arrival rate). From the counts during this time period. From the counts during this time period, create a histogram of consecutive counts for 1 minute and 5 minutes. The histogram is then compared to the Poisson distribution

Translated with www.DeepL.com/Translator (free version)

近日中に防寒着を着込んで、道路の近くで自動車の通過時刻をノートにメモすることになりそうです。
I will be putting on my winter clothes in the coming days and noting down in my notebook the time of passing cars near the road.

―― これをノートに記載するのは面倒くさいな
-- I can't be bothered to note this.

―― この手のアプリは絶対にあるはずだ
-- there should definitely be an app for this kind of thing.

と思ったのですが、iPad用のアプリが見つからず、しぶしぶ自分でJavaScriptを組み出しました。
But I could not find an app for the iPad, so I reluctantly put together my own JavaScript.

しかし、表示が上手くいかず、今度はiPadに限定せずに探し捲りました。
However, the display did not work, and this time I searched around without limiting myself to the iPad.

で、見つけたのがこれです。
This is what I found

時刻カウンター (タイムスタンプの記録ができるカウンター)
Time counters (counters that can record time stamps)

アイコン画像

Android端末専用でしたが、私の部屋にはSIMカードの入っていないスマホがゴロゴロしていますので、そのうちの一台にインストールしました。
It was for Android devices only, but I have a bunch of phones without SIM cards in my room, so I installed it on one of them.

2画面のイメージはこちらです(6画面までできるようです)
Here is an image of two screens (it seems to be possible to have up to 6 screens)

これで、左方向、右方向バラバラで台数計測できそうです。
This will allow me to measure the number of units in the left and right directions separately.

交通量を計測するので、計測時間は十分に短くないと困ります。
Since I am measuring traffic, the measurement time must be short enough.

ですので、[設定]→[再カウントまでの時間]を1000ms→10msに変更しました。
Therefore, I changed [Settings] -> [Time until recount] from 1000 ms to 10 ms.

[音をならす]、[振動させる]も解除しておきました。
I also deactivated [Make Sound] and [Vibrate].

で、計測結果をメールで自分のアドレスに送ってみました
And I emailed the measurement results to my address.

1,1,"カウンター1",2023-01-24 23:19:03,2023,1,24,23,19,3,0
2,2,"カウンター2",2023-01-24 23:19:06,2023,1,24,23,19,6,0
3,1,"カウンター1",2023-01-24 23:19:09,2023,1,24,23,19,9,0
4,1,"カウンター1",2023-01-24 23:19:12,2023,1,24,23,19,12,0
5,2,"カウンター2",2023-01-24 23:19:14,2023,1,24,23,19,14,0
6,1,"カウンター1",2023-01-24 23:19:19,2023,1,24,23,19,19,0
7,2,"カウンター2",2023-01-24 23:19:26,2023,1,24,23,19,26,0
8,2,"カウンター2",2023-01-24 23:19:28,2023,1,24,23,19,28,0
9,2,"カウンター2",2023-01-24 23:19:29,2023,1,24,23,19,29,0
10,1,"カウンター1",2023-01-24 23:19:31,2023,1,24,23,19,31,0

csv形式というのもいいです。加工しやすそうです。
I also like that it is in csv format. It seems to be easy to process.

これでフィールドワークはなんとかなりそうです。
So, I will able to do my homework.

 

2023,江端さんの技術メモ

出典を忘れてしまいましたが、どなたかが作られたコードを丸パクリさせて頂きました。→たぶん"これ"

ノード1 → "A", ノード2 → "B", ノード3 → "C", ノード4 → "D", ノード5 → "E" として取り扱います。

package main

import (
	"errors"
	"fmt"
)

// ノード
type Node struct {
	name  string  // ノード名
	edges []*Edge // 次に移動できるエッジ
	done  bool    // 処理済みかを表すフラグ
	cost  int     // このノードにたどり着くのに必要だったコスト
	prev  *Node   // このノードにたどりつくのに使われたノード
}

func NewNode(name string) *Node {
	node := &Node{name, []*Edge{}, false, -1, nil}
	return node
}

// ノードに次の接続先を示したエッジを追加する
func (self *Node) AddEdge(edge *Edge) {
	self.edges = append(self.edges, edge)
}

// エッジ
type Edge struct {
	next *Node // 次に移動できるノード
	cost int   // 移動にかかるコスト
}

func NewEdge(next *Node, cost int) *Edge {
	edge := &Edge{next, cost}
	return edge
}

// 有向グラフ
type DirectedGraph struct {
	nodes map[string]*Node
}

func NewDirectedGraph() *DirectedGraph {
	return &DirectedGraph{
		map[string]*Node{}}
}

// グラフの要素を追加する (接続元ノード名、接続先ノード名、移動にかかるコスト)
func (self *DirectedGraph) Add(src, dst string, cost int) {
	// ノードが既にある場合は追加しない
	srcNode, ok := self.nodes[src]
	if !ok {
		srcNode = NewNode(src)
		self.nodes[src] = srcNode
	}

	dstNode, ok := self.nodes[dst]
	if !ok {
		dstNode = NewNode(dst)
		self.nodes[dst] = dstNode
	}

	// ノードをエッジでつなぐ
	edge := NewEdge(dstNode, cost)
	srcNode.AddEdge(edge)
}

// スタートとゴールを指定して最短経路を求める
func (self *DirectedGraph) ShortestPath(start string, goal string) (ret []*Node, err error) {
	// 名前からスタート地点のノードを取得する
	startNode := self.nodes[start]

	// スタートのコストを 0 に設定することで処理対象にする
	startNode.cost = 0

	for {
		// 次の処理対象のノードを取得する
		node, err := self.nextNode()

		// 次に処理するノードが見つからなければ終了
		if err != nil {
			return nil, errors.New("Goal not found")
		}

		// ゴールまで到達した
		if node.name == goal {
			break
		}

		// 取得したノードを処理する
		self.calc(node)
	}

	// ゴールから逆順にスタートまでノードをたどっていく
	n := self.nodes[goal]
	for {
		ret = append(ret, n)
		if n.name == start {
			break
		}
		n = n.prev
	}

	return ret, nil
}

// つながっているノードのコストを計算する
func (self *DirectedGraph) calc(node *Node) {
	// ノードにつながっているエッジを取得する
	for _, edge := range node.edges {
		nextNode := edge.next

		// 既に処理済みのノードならスキップする
		if nextNode.done {
			continue
		}

		// このノードに到達するのに必要なコストを計算する
		cost := node.cost + edge.cost
		if nextNode.cost == -1 || cost < nextNode.cost {
			// 既に見つかっている経路よりもコストが小さければ処理中のノードを遷移元として記録する
			nextNode.cost = cost
			nextNode.prev = node
		}
	}

	// つながっているノードのコスト計算がおわったらこのノードは処理済みをマークする
	node.done = true
}

func (self *DirectedGraph) nextNode() (next *Node, err error) {
	// グラフに含まれるノードを線形探索する
	for _, node := range self.nodes {

		// 処理済みのノードは対象外
		if node.done {
			continue
		}

		// コストが初期値 (-1) になっているノードはまだそのノードまでの最短経路が判明していないので処理できない
		if node.cost == -1 {
			continue
		}

		// 最初に見つかったものは問答無用で次の処理対象の候補になる
		if next == nil {
			next = node
		}

		// 既に見つかったノードよりもコストの小さいものがあればそちらを先に処理しなければいけない
		if next.cost > node.cost {
			next = node
		}
	}

	// 次の処理対象となるノードが見つからなかったときはエラー
	if next == nil {
		return nil, errors.New("Untreated node not found")
	}

	return
}

func main() {
	// 有向グラフを作る
	g := NewDirectedGraph()

	// グラフを定義していく
	g.Add("A", "B", 2)
	g.Add("A", "C", 7)
	g.Add("A", "D", 5)

	g.Add("B", "D", 4)

	g.Add("C", "E", 2)

	g.Add("D", "C", 1)
	g.Add("D", "E", 4)

	g.Add("E", "C", 2)

	// "s" ノードから "z" ノードへの最短経路を得る
	path, err := g.ShortestPath("A", "E")

	// 経路が見つからなければ終了
	if err != nil {
		fmt.Println("Goal not found")
		return
	}

	// 見つかった経路からノードとコストを表示する
	for _, node := range path {
		fmt.Printf("ノード: %v, コスト: %v\n", node.name, node.cost)
	}
}

 

出力結果

C:\Users\ebata> go run .\dijkstra.go
ノード: E, コスト: 8
ノード: C, コスト: 6
ノード: D, コスト: 5
ノード: A, コスト: 0

ラベル修正法の練習(だけ)

2023,江端さんの技術メモ

「Golangでcsvファイルを読み出す」の記事は多いのですが、特定の行まで引っ張り出す情報があまりないので、メモを残しておきます。

/*
以下のcsvファイル(kai_20220522holyday18.csv)の中身を取り出す
id,age,type,departure_name,departure_number,departure_lat,departure_lng,arrival_name,arrival_number,arrival_lat,arrival_lng
0,43,resident,,,34.173408,131.470684,,,34.155862,131.501246
1,24,resident,,,34.179449,131.482543,,,34.164116,131.471791
2,42,resident,,,34.168739,131.470768,,,34.160989,131.491124
3,21,resident,,,34.169494,131.469934,,,34.173498,131.471351
4,58,resident,,,34.185295,131.47414,,,34.191481,131.49456
5,48,resident,,,34.150778,131.480747,,,34.16536,131.471872
6,56,resident,,,34.16536,131.471872,,,34.174066,131.479312
7,73,resident,,,34.155731,131.500845,,,34.16776,131.472831
8,47,resident,,,34.167237,131.471785,,,34.155775,131.476531
9,21,resident,,,34.154931,131.50468,,,34.156678,131.49581
10,37,resident,,,34.16727,131.472899,,,34.171253,131.471177
11,40,resident,,,34.147241,131.474921,,,34.150675,131.486268
12,67,resident,,,34.173683,131.476347,,,34.173643,131.471027
13,28,resident,,,34.183079,131.484303,,,34.174245,131.474592
14,46,resident,,,34.146154,131.472711,,,34.159611,131.491548
15,25,resident,,,34.162497,131.489283,,,34.147212,131.475984
*/

package main

import (
	"encoding/csv"
	"fmt"
	"log"
	"os"
	"strconv"
)

func main() {
	file, err := os.Open("kai_20220522holyday18.csv") // 先ほど入手した郵便番号データをos.Openで開く
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()

	r := csv.NewReader(file)
	rows, err := r.ReadAll() // csvを一度に全て読み込む
	if err != nil {
		log.Fatal(err)
	}

	// 行ごとに
	for i, row := range rows {
		if i == 0 {
			continue // CSVのヘッダー行を無視
		}

		age := row[1]

		departure_lat, err := strconv.ParseFloat(row[5], 64)
		if err != nil {
			log.Fatal(err)
		}
		departure_lng, err := strconv.ParseFloat(row[6], 64)
		if err != nil {
			log.Fatal(err)
		}

		arrival_lat, err := strconv.ParseFloat(row[9], 64)
		if err != nil {
			log.Fatal(err)
		}

		arrival_lng, err := strconv.ParseFloat(row[10], 64)
		if err != nil {
			log.Fatal(err)
		}

		fmt.Println(age, departure_lat, departure_lng, arrival_lat, arrival_lng)

	}
}

 

出力結果

C:\Users\ebata\yamaguchi\src_try1\others> go run main5.go
43 34.173408 131.470684 34.155862 131.501246
24 34.179449 131.482543 34.164116 131.471791
42 34.168739 131.470768 34.160989 131.491124
21 34.169494 131.469934 34.173498 131.471351
58 34.185295 131.47414 34.191481 131.49456
56 34.16536 131.471872 34.174066 131.479312
73 34.155731 131.500845 34.16776 131.472831
47 34.167237 131.471785 34.155775 131.476531
21 34.154931 131.50468 34.156678 131.49581
37 34.16727 131.472899 34.171253 131.471177
40 34.147241 131.474921 34.150675 131.486268
67 34.173683 131.476347 34.173643 131.471027
28 34.183079 131.484303 34.174245 131.474592
46 34.146154 131.472711 34.159611 131.491548
25 34.162497 131.489283 34.147212 131.475984

 

2023,江端さんの技術メモ

公共交通指向型開発(TOD: Transit Oriented Development) - 公共交通機関に基盤を置き、自動車に依存しない社会を目指した都市開発。
「交通隣接型開発」(TAD:‘transit-adjacent development’) 公共交通拠点と隣接して、高密度、大規模開発を行うが、機能上に、互い協調的な開発モードが不足である。

2023,江端さんの技術メモ

https://www.marble-lab.com/item_3412.html

を参考にさせていただき、自分用の手順書(マニュアル)を作成。

(Step 1) CSVファイルの作成
1行目に、各列の名前が入っていなければならない。
ファイルはこちら → test_user_list_14.csv

ファイルはこちら → test_user_list_14.csv

(Step 2) Google MAPの立ち上げ

(Step 3) Google MAPの立ち上げ

↓の赤丸をクリック

今は、こっちのインタフェースに、なっているようです。

(Step 4) 「マイプレイス」を選択

(Step 5) 「マイマップ」→「地図を作成」

(Step 6) 「インポート」を選択

(Step 7) ファイル(test_user_list_14.csv)をドラッグ

(Step 8) 緯度、経度を選択

(Step 9) マーカーのタイトルを選択

(Step 10) マーカーの色を変更する(→黒)

(Step 11) マーカーをクリックすると情報が表示される

以上

KeyWord: Google MAP、 マーカー、 アイコン、 csv, エクセル

2023,江端さんの技術メモ

PostgreSQLで、新規のデータならinsert, 書き換えならupdate をしようと思ったのですが、なんか面倒くさいので、初期テーブルを沢山作っておくことで対応することしました。

というか、そういうメソッドを準備しておいて欲しい→あるみたいですが、上手く動かせませんでした。

package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "github.com/lib/pq" // ←これを追記
)

func main() {
	// user_log, bike_logへのアクセス
	dbAgent, err := sql.Open("postgres", "user=postgres password=password host=192.168.0.23 port=15432 dbname=agent_db sslmode=disable")
	if err != nil {
		log.Fatal("dbAgent OpenError: ", err)
	}
	defer dbAgent.Close()
	err = dbAgent.Ping()
	if err != nil {
		log.Fatal(err, "\nHint: dbAgent Database may not have started")
	}
	// user_logテーブルの内容の全削除
	dbAgent.Query("delete from bike_log;")

	// insertのテスト
	for i := 0; i < 10; i++ {
		str := fmt.Sprintf("insert into bike_log (stationid, num_bikes) values(%d, -1)", i)
		fmt.Println(str)
		dbAgent.Query(str)
	}

	// updateのテスト
	for i := 0; i < 10; i = i + 2 {
		str := fmt.Sprintf("update bike_log set num_bikes = %d where stationid = %d", i*2, i)
		fmt.Println(str)
		dbAgent.Query(str)
	}
}

出力結果

C:\Users\ebata\yamaguchi\src_try1\others> go run main4.go
insert into bike_log (stationid, num_bikes) values(0, -1)
insert into bike_log (stationid, num_bikes) values(1, -1)
insert into bike_log (stationid, num_bikes) values(2, -1)
insert into bike_log (stationid, num_bikes) values(3, -1)
insert into bike_log (stationid, num_bikes) values(4, -1)
insert into bike_log (stationid, num_bikes) values(5, -1)
insert into bike_log (stationid, num_bikes) values(6, -1)
insert into bike_log (stationid, num_bikes) values(7, -1)
insert into bike_log (stationid, num_bikes) values(8, -1)
insert into bike_log (stationid, num_bikes) values(9, -1)
update bike_log set num_bikes = 0 where stationid = 0
update bike_log set num_bikes = 4 where stationid = 2
update bike_log set num_bikes = 8 where stationid = 4
update bike_log set num_bikes = 12 where stationid = 6
update bike_log set num_bikes = 16 where stationid = 8

データベースの中身

agent_db=# select * from bike_log;
stationid | num_bikes
-----------+-----------
1 | -1
3 | -1
5 | -1
7 | -1
9 | -1
0 | 0
2 | 4
4 | 8
6 | 12
8 | 16
(10 rows)

 

2023,江端さんの技術メモ

Select文を使って、選んだ要素だけをcsvファイルにエクスポートする方法 (これから頻用しそう)

agent_db=# \copy (select * from agent_track where agent_id = 100) to test.csv with CSV;
最初の'\"が重要

最初はエクスポートです。

Microsoft Windows [Version 10.0.19044.2486]
(c) Microsoft Corporation. All rights reserved.
C:\Users\ebata>psql -U postgres -h 192.168.0.23 -p 15432
Password for user postgres:
psql (13.4, server 12.5 (Debian 12.5-1.pgdg100+1))
Type "help" for help.
postgres=# \c agent_db
psql (13.4, server 12.5 (Debian 12.5-1.pgdg100+1))
You are now connected to database "agent_db" as user "postgres".
agent_db=# \copy user_list to 'testtest.csv' WITH CSV DELIMITER ',';
COPY 20
agent_db=#
C:\Users\ebata に、testtest.csv ができています。
カラム名が必要な場合は、こちら(大抵の場合必要)。
agent_db=# \copy user_list to 'testtest.csv' WITH CSV HEADER;
次にインポートです。
以下のcsvファイルをインポートします。ファイル名はkai_20220522holyday18.csvです。
id,age,type,departure_name,departure_number,departure_lat,departure_lng,arrival_name,arrival_number,arrival_lat,arrival_lng
0,43,resident,,,34.173408,131.470684,,,34.155862,131.501246
1,24,resident,,,34.179449,131.482543,,,34.164116,131.471791
2,42,resident,,,34.168739,131.470768,,,34.160989,131.491124
3,21,resident,,,34.169494,131.469934,,,34.173498,131.471351
4,58,resident,,,34.185295,131.47414,,,34.191481,131.49456
5,48,resident,,,34.150778,131.480747,,,34.16536,131.471872
6,56,resident,,,34.16536,131.471872,,,34.174066,131.479312
7,73,resident,,,34.155731,131.500845,,,34.16776,131.472831
8,47,resident,,,34.167237,131.471785,,,34.155775,131.476531
9,21,resident,,,34.154931,131.50468,,,34.156678,131.49581
10,37,resident,,,34.16727,131.472899,,,34.171253,131.471177
11,40,resident,,,34.147241,131.474921,,,34.150675,131.486268
12,67,resident,,,34.173683,131.476347,,,34.173643,131.471027
13,28,resident,,,34.183079,131.484303,,,34.174245,131.474592
14,46,resident,,,34.146154,131.472711,,,34.159611,131.491548
15,25,resident,,,34.162497,131.489283,,,34.147212,131.475984
次に、テーブルをクリアにします。
agent_db=# delete from user_list;
DELETE 36
agent_db=# select * from user_list;
id | age | type | departure_name | departure_number | departure_lat | departure_lng | arrival_name | arrival_number | arrival_lat | arrival_lng
----+-----+------+----------------+------------------+---------------+---------------+--------------+----------------+-------------+-------------
(0 rows)
として、
agent_db=# \copy user_list from 'kai_20220522holyday18.csv' delimiter ',' csv header;
でインポートが完了します。
一応、確認します。
agent_db=# select * from user_list;
id | age | type | departure_name | departure_number | departure_lat | departure_lng | arrival_name | arrival_number | arrival_lat | arrival_lng
----+-----+----------+----------------+------------------+---------------+---------------+--------------+----------------+-------------+-------------
0 | 43 | resident | | | 34.173408 | 131.470684 | | | 34.155862 | 131.501246
1 | 24 | resident | | | 34.179449 | 131.482543 | | | 34.164116 | 131.471791
2 | 42 | resident | | | 34.168739 | 131.470768 | | | 34.160989 | 131.491124
3 | 21 | resident | | | 34.169494 | 131.469934 | | | 34.173498 | 131.471351
4 | 58 | resident | | | 34.185295 | 131.47414 | | | 34.191481 | 131.49456
5 | 48 | resident | | | 34.150778 | 131.480747 | | | 34.16536 | 131.471872
6 | 56 | resident | | | 34.16536 | 131.471872 | | | 34.174066 | 131.479312
7 | 73 | resident | | | 34.155731 | 131.500845 | | | 34.16776 | 131.472831
8 | 47 | resident | | | 34.167237 | 131.471785 | | | 34.155775 | 131.476531
9 | 21 | resident | | | 34.154931 | 131.50468 | | | 34.156678 | 131.49581
10 | 37 | resident | | | 34.16727 | 131.472899 | | | 34.171253 | 131.471177
11 | 40 | resident | | | 34.147241 | 131.474921 | | | 34.150675 | 131.486268
12 | 67 | resident | | | 34.173683 | 131.476347 | | | 34.173643 | 131.471027
13 | 28 | resident | | | 34.183079 | 131.484303 | | | 34.174245 | 131.474592
14 | 46 | resident | | | 34.146154 | 131.472711 | | | 34.159611 | 131.491548
15 | 25 | resident | | | 34.162497 | 131.489283 | | | 34.147212 | 131.475984
(16 rows)

2023,江端さんの技術メモ

何度やっても、エージェントが湯田温泉駅の北口に出てこないので、QGISを立ち上げて、OpenStreetMap(OSM)のノードを調べみたら、原因が分かりました。

湯田温泉駅のサイクルステーションにもっとも近いノードが、駅の南口側にあるので、ここにキャッチされて、エージェントが南口側に集合してしまっていました。

# 湯田温泉駅周辺のノードが少なすぎる (山口駅は、比較的沢山のノードがあるのに)

OSMデータの改竄(https://booth.pm/ja/items/3943484)という手もあるが、ちょっと手間がかかりすぎるので、取り敢えず、目的地を上の図の206号線の終端に移動することで対応しようと思っています。