2025,江端さんの忘備録

私、自分のホームページのアクセスログは毎日確認しています(但し、グラフ表示のみ)。
I check the access logs of my homepage every day (though only in graph form).

で、最近、アクセスエラーが酷くなりました。以前は、一日に、0回、多くても2~3回くらいだったのが、先週3900回になっておりました。
Recently, however, access errors have become severe. In the past, it was 0 times a day, or at most 2–3 times, but last week it reached 3,900 times.

『ちょっと看過できなくなってきたなぁ』と思い、今日、ログ解析をしていたのですが、主に、3つのホスト(海外)からDDOS攻撃もどきを受けていたようです。
Thinking, “This is getting hard to ignore,” I analyzed the logs today, and it seems I was being hit mainly by three overseas hosts with something like a pseudo-DDOS attack.

まあ、悪意の攻撃か、あるいは自動プログラムのリトライかは分かりませんが、迷惑な話です。
Well, whether it was a malicious attack or simply a retry by an automated program, it’s a nuisance.

攻撃対象は、WordPressに移行する前の古いコンテンツのようでしたので、多分、セキュリティホールを探しているのではないかと推定されます。
The attack target seemed to be old content from before I migrated to WordPress, so I presume they are probably probing for security holes.

で、先程、手元でできる対策(上記のIPアドレスを名指しでアクセス拒否する等)などを行ってみました。
So, I just tried some local countermeasures, such as explicitly blocking those IP addresses.

全部ではなく、対策は半分くらいとしておきました。今後、アクセスログを解析すれば、「悪意の攻撃」か否かを特定できると思います。
I didn’t cover everything—only about half the directories. In the future, by analyzing the logs, I think I can determine whether it was truly a malicious attack or not.


それにしても『私のような個人サイトを攻撃してどうするんだ? やるなら、官庁や大企業を狙えよ』と思うのですが、サイバー攻撃というのは、基本的に「頭の悪い攻撃」がほとんどです。
Still, I can’t help but think, “What’s the point of attacking a small personal site like mine? If you must, go after a government office or a big corporation.” But most cyberattacks are basically “dumb attacks.”

イメージとしては、『全方向に機関銃をぶっぱなして、悲鳴が上がったところに、対象がいる』という、"索敵"をやっているようなもので、その"索敵"が終わった後に「何をするか」というビジョンはありません。
The image is like “firing a machine gun in every direction and then assuming the target is wherever someone screams.” It’s just reconnaissance, and after that “recon” ends, there’s no vision of what to do next.

とりあえず、ログインの方法まで遡れれば、私のサイトを『攻撃の踏み台』にできるかもしれませんし、トップページを『外国語で日本国政府を批判する記事に書き換える』とかはできそうです。
At best, if they could trace back to a login method, they might use my site as a “stepping stone” for attacks, or they might rewrite the top page with some article in a foreign language criticizing the Japanese government.

今なら、中国語とかロシア語が有力ですが、このトレンドは5年くらいで替わります。実際に上記の3つのIPアドレスの一つは、米国の大学となっていました(もちろんURLの詐称をしているとは思いますし、詐称していなければ『バカ』と言うしかありません)。
Currently, Chinese or Russian would be the most likely options, but these trends shift every five years or so. In fact, one of the three IP addresses appeared to be a U.S. university (though I assume it was spoofed—and if it wasn’t spoofed, then they’re just plain fools).

私(または江端家)の個人情報を取ってくる、という可能性もありますが、費用対効果からは、あまりペイしないと思います。
They might also try to steal my (or the Ebata family’s) personal information, but from a cost-effectiveness standpoint, I doubt it would pay off.


以前ちょっとお話しましたが、私、以前、「報復システム」というネタで特許出願しようか、と考えたことがあります。
As I mentioned before, I once considered filing a patent application for an idea called a “Retaliation System.”

『私が個人で「報復システム」を起動させるのであれば、特に問題はないよなぁ』とか、考え出しています。
I began thinking, “If I personally activated a ‘Retaliation System,’ there wouldn’t be any problem, would there?”

そろそろ、「組織のしがらみ」からも解き放たれつつありますしね。
After all, I’m starting to be freed from the “constraints of organizations.”

まあ、攻撃者も私のサイトを狙うくらいなら、いっそ Amazonのレビュー欄で☆1を連打するとか、もっと建設的な暇つぶしをすればいいのに。
Well, if attackers are going to bother with my site, they might as well spend their time more constructively—like spamming one-star reviews on Amazon.

インターネットは広大だというのに、よりによって江端家を選ぶとは、趣味が悪い。
The Internet is vast, yet of all places, they chose the Ebata household—what lousy taste.


「報復システム」特許明細書(素案)

“Retaliation System” Patent Application(blueprint)

【発明の名称】
個人運営型サーバ向け自動報復システム
[Title of Invention]
Automated Retaliation System for Individually Managed Servers

【背景技術】
従来のサイバー攻撃対策は、防御に偏重し、個人運営者に爽快感をもたらすことが困難であった。
[Background Technology]
Conventional cyberattack countermeasures focus solely on defense and fail to provide a sense of satisfaction to individual operators.

【課題】
攻撃を受けた側に「なんかスカッとする」心理的効果を提供しつつ、費用対効果に優れた報復を実現する。
[Problem to be Solved]
To provide the attacked party with a refreshing psychological effect while delivering a cost-effective retaliation.

【解決手段】
本システムは、攻撃元IPを検知すると以下のいずれかの報復処理を実行する:

  1. 攻撃元画面に「江端智一のコラム最新号」を強制表示する。

  2. 攻撃元のCPUに負荷をかけずに延々と「読み込み中...」アニメーションを回し続ける。

  3. 攻撃元のシステム時計を5分ずつ遅らせる(社会的に地味に困らせる)。
    [Solution]
    When detecting the attacker’s IP, the system executes one of the following retaliation processes:

  4. Force displays the latest “Tomoichi Ebata Column” on the attacker’s screen.

  5. Loops a perpetual “Loading...” animation without burdening the attacker’s CPU.

  6. Delays the attacker’s system clock by five minutes at a time (a subtle but socially troublesome effect).

【効果】
本システムにより、個人運営者は被攻撃時に「ただの迷惑」ではなく「ちょっとしたエンタメ」として状況を受け止められる。さらに、攻撃者には「時間泥棒」という究極の逆襲を体感させることができる。
[Effect]
With this system, individual operators can perceive attacks not merely as nuisances but as minor entertainment. At the same time, attackers experience the ultimate counterstrike: theft of their time.

【産業上の利用可能性】
国内外の個人ブロガー、趣味サイト管理者、ならびに「暇をもて余したエンジニア」の精神衛生維持に広く応用可能である。
[Industrial Applicability]
This system can be widely applied for the mental health of personal bloggers, hobby site administrators, and “engineers with too much free time” both domestically and internationally.

未分類

現在の状況(11/30) 一通りの稼働を確認

(Step 1) 広袴のOSMファイルをダウンロード
G:\home\ebata\hirohakama\hiro_db\small-hirohakama.osm

(Step 2) OSM → network.xmlへの変更
G:\home\ebata\hirohakama\hiro_db
$ python osm_to_matsim_network.py
network.xmlが生成

(Step.3)
ebata@DESKTOP-1QS7OI7:~/matsim-example-project$ java -jar matsim-example-project-0.0.1-SNAPSHOT.jar

[config-test1.xml]

<?xml version="1.0" ?>
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>

	<module name="global">
		<param name="randomSeed" value="4711" />
		<param name="coordinateSystem" value="EPSG:6685" />
	</module>

	<module name="network">
		<param name="inputNetworkFile" value="network-test1.xml" />
	</module>

	<module name="plans">
		<param name="inputPlansFile" value="plans-test1.xml" />
	</module>

	<module name="controller">
		<param name="outputDirectory" value="./output" />
		<param name="lastIteration" value="0" />

		<!-- 追記:毎イテレーション events を出す -->
		<param name="writeEventsInterval" value="1" />

	</module>


	<module name="scoring">
		<parameterset type="activityParams" >
			<param name="activityType"            value="h" />
			<param name="typicalDuration" value="12:00:00" />
		</parameterset>
		<parameterset type="activityParams" >
			<param name="activityType"            value="w" />
			<param name="typicalDuration" value="08:00:00" />
		</parameterset>
	</module>

	<module name="routing">
	  <!-- 既に書いてある他の routing パラメータがあればそのまま残す -->
	  
	  <!-- ネットワーク整合性チェックを無効化 -->
	  <param name="networkRouteConsistencyCheck" value="disable" />
	</module>	
	
</config>

[network-test1.xml]

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE network SYSTEM "http://www.matsim.org/files/dtd/network_v1.dtd">

<network name="equil test network">
  <nodes>
    <node id="279332805" x="768875.871" y="1096994.329"/>
    <node id="279332812" x="768964.532" y="1097238.641"/>
    <node id="279332877" x="768972.629" y="1097302.450"/>
(中略)
    <node id="12893847140" x="768966.269" y="1097305.846"/>
    <node id="13206970768" x="768642.219" y="1096803.771"/>
    <node id="13206970769" x="768656.013" y="1096826.212"/>
  </nodes>

  <links capperiod="01:00:00">
    <link id="1239817547_0_bwd" from="12891801850" to="279332880" length="2.25" freespeed="13.89" capacity="900.00" permlanes="1" />
    <link id="1239817547_0_fwd" from="279332880" to="12891801850" length="2.25" freespeed="13.89" capacity="900.00" permlanes="1" />
    <link id="1239817547_1_bwd" from="1768138693" to="12891801850" length="62.84" freespeed="13.89" capacity="900.00" permlanes="1" />
(中略)
    <link id="761529596_5_bwd" from="12891801828" to="12891801827" length="1.72" freespeed="10.00" capacity="1000.00" permlanes="1" />
    <link id="761529596_5_fwd" from="12891801827" to="12891801828" length="1.72" freespeed="10.00" capacity="1000.00" permlanes="1" />
  </links>
</network>

[plans-test1.xml]

<?xml version="1.0" ?>
<!DOCTYPE plans SYSTEM "http://www.matsim.org/files/dtd/plans_v4.dtd">
<plans xml:lang="de-CH">
<person id="1">
  <plan>
    <act type="h" link="153188623_0_fwd" end_time="06:00" />
    <leg mode="car">
      <route> </route>
    </leg>

    <act type="w" link="165222823_3_fwd" dur="00:00:10" />
    <leg mode="car">
      <route> </route>
    </leg>
    <act type="w" link="165257680_2_fwd" dur="00:00:05" />

    <leg mode="car">
      <!-- ここは書かない(MATSim に任せる) -->
    </leg>

    <act type="h" link="257057591_26_fwd" />
  </plan>
</person>
</plans>

(Step.4)

ebata@DESKTOP-1QS7OI7:~/matsim-example-project/scenarios/equil2$ python matsim_events_to_geo_csv.py
CSV exported: output/agents_positions_geo.csv

(Step.5)

ここからは、QGISで動画表示をするところは、前回の方式とおなじ

======
現在の状況(11/24)

WSL(Ubuntu)起動→
ebata@DESKTOP-1QS7OI7:~/matsim-example-project$ java -jar matsim-example-project-0.0.1-SNAPSHOT.jar

 

これが通ると

ebata@DESKTOP-1QS7OI7:~/matsim-example-project/scenarios/equil2/output$ pwd
/home/ebata/matsim-example-project/scenarios/equil2/output が書換えられるので注意

必要なファイルは3つ

<?xml version="1.0" ?>
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>

	<module name="global">
		<param name="randomSeed" value="4711" />
		<param name="coordinateSystem" value="EPSG:6685" />
	</module>

	<module name="network">
		<param name="inputNetworkFile" value="network.xml" />
	</module>

	<module name="plans">
		<param name="inputPlansFile" value="plans100.xml" />
	</module>

	<module name="controller">
		<param name="outputDirectory" value="./output" />
		<param name="lastIteration" value="10" />

		<!-- 追記:毎イテレーション events を出す -->
		<param name="writeEventsInterval" value="1" />

	</module>

	<module name="scoring">
		<param name="lateArrival" value="-18" />
		<param name="performing" value="+6" />
		<parameterset type="activityParams" >
			<param name="activityType"            value="h" />
			<param name="typicalDuration" value="12:00:00" />
		</parameterset>
		<parameterset type="activityParams" >
			<param name="activityType"            value="w" />
			<param name="typicalDuration" value="08:00:00" />
			<param name="openingTime"     value="07:00:00" />
			<param name="closingTime"     value="18:00:00" />
		</parameterset>
	</module>
	
	<module name="replanning">
		<parameterset type="strategysettings" >
			<param name="strategyName" value="BestScore" />
			<param name="weight" value="0.9" />
		</parameterset>
		<parameterset type="strategysettings" >
			<param name="strategyName" value="ReRoute" />
			<param name="weight" value="0.1" />
		</parameterset>
	</module>
</config>

上記のconfig.xmlの概要は以下の通り。

config.xml の概要

本設定ファイルは、MATSim シミュレーションを実行するための基本パラメータを定義したものであり、全体として「ネットワーク」「プラン」「コントローラ」「スコアリング」「リプランニング(経路再探索)」の各モジュール設定から構成されている。

1. global モジュール

  • シミュレーションの乱数シード(4711)を指定して再現性を確保している。

  • 使用する座標系として EPSG:6685(日本の平面直角座標系 9系などに相当)を明示している。

2. network モジュール

  • 交通ネットワークとして network.xml を読み込む設定である。

  • 道路・リンク・ノード等の空間構造を定義する基礎データである。

3. plans モジュール

  • エージェントの活動計画ファイルとして plans100.xml を指定している。

  • 各エージェントの1日の行動(自宅→職場など)を読み込む役割を持つ。

4. controller モジュール

  • 出力ディレクトリを ./output とし、最終イテレーションは 10 としている。

  • 各イテレーションでイベントファイル(events.xml.gz)を出力するため、writeEventsInterval=1 を設定している。

5. scoring モジュール

  • スコア計算に関するパラメータを定義している。

    • 遅刻のペナルティ(lateArrival = −18)

    • 活動継続の効用(performing = +6)

  • 活動タイプ h(home) および w(work) の典型滞在時間・開閉時間などを定義し、日常行動モデルの評価基準を与えている。

6. replanning モジュール

  • プラン選択と経路再探索に関する戦略設定を行っている。

    • BestScore(重み 0.9)

    • ReRoute(重み 0.1)

  • これにより、シミュレーション内でエージェントがプランを修正し、より良い経路や活動を選択する過程を再現する。


総括

本 config.xml は、標準的な MATSim 実行構成を踏襲しながら、日本の座標系(EPSG:6685)を用いたネットワーク・プランデータを読み込み、10 イテレーションのシミュレーションを行う設定となっている。スコアリングおよび再計画戦略も基本設定が施されており、小規模テストから実用的な解析まで広く利用可能な構成である。

[network.xml]

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE network SYSTEM "http://www.matsim.org/files/dtd/network_v1.dtd">

<network name="equil test network">
  <nodes>
	<node id="1"  x="774558.033" y="1108851.844"/>
	<node id="2"  x="779558.033" y="1108851.844"/>
	<node id="3"  x="793693.033" y="1114776.844"/>
	<node id="4"  x="792060.033" y="1113182.844"/>
	<node id="5"  x="790729.033" y="1112066.844"/>
	<node id="6"  x="789860.033" y="1110562.844"/>
	<node id="7"  x="789558.033" y="1108851.844"/>
	<node id="8"  x="789860.033" y="1107140.844"/>
	<node id="9"  x="790729.033" y="1105636.844"/>
	<node id="10" x="792060.033" y="1104520.844"/>
	<node id="11" x="793693.033" y="1102926.844"/>
	<node id="12" x="794558.033" y="1108851.844"/>
	<node id="13" x="799558.033" y="1108851.844"/>
	<node id="14" x="799558.033" y="1098851.844"/>
	<node id="15" x="774558.033" y="1098851.844"/>
  </nodes>

   <links capperiod="01:00:00">
      <link id="1" from="1" to="2" length="10000.00" capacity="36000" freespeed="27.78" permlanes="1"  />
      <link id="2" from="2" to="3" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="3" from="2" to="4" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="4" from="2" to="5" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="5" from="2" to="6" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="6" from="2" to="7" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="7" from="2" to="8" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="8" from="2" to="9" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="9" from="2" to="10" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="10" from="2" to="11" length="10000.00" capacity="3600" freespeed="27.78" permlanes="1"  />
      <link id="11" from="3" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="12" from="4" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="13" from="5" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="14" from="6" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="15" from="7" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="16" from="8" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="17" from="9" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="18" from="10" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="19" from="11" to="12" length="5000.00" capacity="1000" freespeed="27.78" permlanes="1"  />
      <link id="20" from="12" to="13" length="10000.00" capacity="36000" freespeed="27.78" permlanes="1"  />
      <link id="21" from="13" to="14" length="10000.00" capacity="36000" freespeed="27.78" permlanes="1"  />
      <link id="22" from="14" to="15" length="35000.00" capacity="36000" freespeed="27.78" permlanes="1"  />
      <link id="23" from="15" to="1" length="10000.00" capacity="36000" freespeed="27.78" permlanes="1"  />
   </links>
</network>

network.xml の概要

本 network.xml は、MATSim の「equil(equilibrium)」テストで用いられる代表的な小規模ネットワークの構造を記述したものであり、ノード 15 点とリンク 23 本から構成される。全体として、中央ノード「2」を中心とした放射状構造と、外周を囲うリング構造をあわせ持つネットワークである。


1. ノード構成(nodes)

  • ノード数は 15

  • 座標はメートル単位の **平面直角座標(UTM ではない独自座標)**に近い配置。

  • ノード 1 → 2 → 3 → 12 → 13 → 14 → 15 → 1 と接続する大きな「外周ループ(リング)」が形成されている。

■ 中央に位置するノード

  • ノード 2
    → このノードから計 10 本のリンクが放射状に伸びており、ネットワークの「ハブ」として機能する。

■ 外周ノード

  • 1, 2, 3, 12, 13, 14, 15
    → 大きな四角形〜多角形を構成する外周ノード。

■ 放射状ノード

  • 3〜11(2 を中心とした扇状配置)

  • これらのノードはすべてノード 12 に接続され、中央から外周へ向かう“枝”のような構造を形成。


2. リンク構成(links)

総リンク数は 23 本。時間帯は capperiod="01:00:00"(1時間あたり容量)。

(1) ハブ(ノード 2)から放射状に伸びるリンク(リンクID 2〜10)

  • from="2" → to="3〜11"

  • 長さ:10,000 m

  • 容量:3,600 veh/h

  • 自由速度:27.78 m/s(= 約 100 km/h)

  • 構造:中央ノードから各方向へ伸びる 9 本の支線

(2) 放射状ノードからノード 12 への接続(リンクID 11〜19)

  • 各ノード 3〜11 → ノード 12 へ接続

  • 長さ:5,000 m

  • 容量:1,000 veh/h(細い道路)

  • 放射状ネットワークの外周に向かう“枝”の集約点がノード 12

(3) 外周ループ(リンクID 1, 20〜23)

  • 1 → 2

  • 12 → 13

  • 13 → 14

  • 14 → 15

  • 15 → 1

  • 長さ:10,000〜35,000 m

  • 容量:36,000 veh/h(高速道路レベル)

  • ネットワーク外周を広く囲むリング道路


3. ネットワーク構造の特徴

  • 中央ハブ(ノード2)
    → 多方向に交通が流れる主要結節点。
    → エージェントが多く集まるため、MATSim チュートリアルで典型的に渋滞が再現される部分。

  • 外周大容量リンク
    → 大容量(36,000 veh/h)で構成され、混雑しづらい。
    → “外環状道路”として機能。

  • 中間のノード 12 が集約点
    → 放射状ノード群の出口に相当。
    → ハブ(2)と外周(13)を結ぶ重要な中継ノード。

  • 典型的なテストネットワーク
    → シンプルであるが、渋滞・ルート選択・再探索の動きを明確に確認できる構造。
    → MATSim の初学者用・論文やサンプルコードで用いられる標準モデル。


総括

この network.xml は、MATSim の代表的な「equil」ネットワークをベースとしたもので、中心に交通が集中するハブ構造と、大容量リング道路、放射状道路からなるシンプルかつ典型的なテスト用ネットワークである。渋滞発生や再経路探索のような動態変化を観察するのに適した構成となっている。

[plans100.xml]

<?xml version="1.0" ?>
<!DOCTYPE plans SYSTEM "http://www.matsim.org/files/dtd/plans_v4.dtd">
<plans xml:lang="de-CH">
<person id="1">
	<plan>
		<act type="h" x="-25000" y="0" link="1" end_time="06:00" />
		<leg mode="car">
			<route>2 7 12</route>
		</leg>
		<act type="w" x="10000" y="0" link="20" dur="00:10" />
		<leg mode="car">
			<route> </route>
		</leg>
		<act type="w" x="10000" y="0" link="20" dur="03:30" />
		<leg mode="car">
			<route>13 14 15 1</route>
		</leg>
		<act type="h" x="-25000" y="0" link="1" />
	</plan>
</person>

</plans>

この概要は以下の通り。

plans100.xml の概要

この plans100.xml は、MATSim に投入する **エージェントの活動計画(1日の行動スケジュール)**を定義したファイルである。
現状では person は1名のみ(id="1")であり、その人物が 自宅(h)→職場(w)→職場(w)→自宅(h) と移動しながら活動する1日の行動列が記述されている。


1. person と plan の構成

  • <person id="1">
    → エージェント1名を定義。

  • <plan>
    → そのエージェントの1日の行動計画を時系列に並べる。
    act(活動)と leg(移動)の交互列が基本。


2. 行動列の中身(act / leg)

(1) 自宅活動 h

<act type="h" ... link="1" end_time="06:00" />
  • type="h" は home(自宅)。

  • link="1" 上に存在する活動地点。

  • end_time="06:00" なので、06:00 に出発する設定。


(2) 車移動(自宅→職場)

<leg mode="car">
<route>2 7 12</route>
</leg>
  • mode="car" により車移動。

  • route は通過リンク列で、
    リンク 2 → 7 → 12 を通る経路を明示している。


(3) 職場活動 w(短い滞在)

<act type="w" ... link="20" dur="00:10" />
  • type="w" は work(職場)。

  • link="20" 上で活動。

  • dur="00:10" なので 10分だけ職場に滞在


(4) 車移動(職場→職場)

<leg mode="car">
<route> </route>
</leg>
  • 車移動だが route が空白。

  • これは 経路をMATSim側に再計算させる意図で置かれていると解釈できる。


(5) 職場活動 w(長い滞在)

<act type="w" ... link="20" dur="03:30" />
  • 同じ link="20" の職場で、
    3時間30分滞在する設定。


(6) 車移動(職場→自宅)

<leg mode="car">
<route>13 14 15 1</route>
</leg>
  • リンク 13 → 14 → 15 → 1 を通って帰宅する経路が明示されている。

  • ネットワークの外周ループ側を通る帰路と対応する。


(7) 自宅活動 h(帰宅後)

<act type="h" ... link="1" />
  • 最終活動は自宅(h)。

  • end_time や dur がないため、**その時点で計画終了(終日滞在)**の意味。


3. この plans.xml の特徴と用途

  • person が1名だけの 最小構成テスト用 plans

  • 経路が一部手動指定、一部自動再探索(空 route)という混合設定。

  • equil ネットワーク上で
    時間指定付きの通勤行動と、再経路探索の挙動を確認するための計画になっている。


総括

plans100.xml は、エージェント1名の1日行動(06:00 出発の通勤、職場での短時間/長時間滞在、外周経路で帰宅)を記述したテスト用 plans である。経路指定を明示する部分と MATSim に任せる部分が共存しており、ルート選択やリプランニングの動作確認に適した構成となっている。

さて、3つのファイルで

ebata@DESKTOP-1QS7OI7:~/matsim-example-project/scenarios/equil2/output$ ls
ITERS                      modestats.png              output_households.xml.gz  pkm_modestats.csv
logfile.log                modestats_stackedbar.png   output_legs.csv.gz        pkm_modestats.png
logfileWarningsErrors.log  modules.dot                output_links.csv.gz       scorestats.csv
modeChoiceCoverage10x.png  output_activities.csv.gz   output_network.xml.gz     scorestats.png
modeChoiceCoverage10x.txt  output_allVehicles.xml.gz  output_persons.csv.gz     stopwatch.csv
modeChoiceCoverage1x.png   output_config.xml          output_plans.xml.gz       stopwatch.png
modeChoiceCoverage1x.txt   output_config_reduced.xml  output_trips.csv.gz       tmp
modeChoiceCoverage5x.png   output_counts.xml.gz       output_vehicles.xml.gz    traveldistancestats.csv
modeChoiceCoverage5x.txt   output_events.xml.gz       ph_modestats.csv          traveldistancestatslegs.png
modestats.csv              output_facilities.xml.gz   ph_modestats.png          traveldistancestatstrips.png
ebata@DESKTOP-1QS7OI7:~/matsim-example-project/scenarios/equil2/output$

ができている。

ここにcsvファイル作成用のPythonプログラム(matsim_events_to_csv.py)を書き込む。

[matsim_events_to_csv.py]

import gzip
import xml.etree.ElementTree as ET
import csv
import math

EVENTS_FILE = "output_events.xml.gz"
NETWORK_FILE = "output_network.xml.gz"
OUT_CSV = "agents_positions.csv"
STEP_SEC = 1.0  # 1秒刻み


def load_network(network_file):
    nodes = {}
    links = {}

    with gzip.open(network_file, 'rb') as f:
        tree = ET.parse(f)
        root = tree.getroot()

        for node in root.find("nodes"):
            nid = node.attrib["id"]
            x = float(node.attrib["x"])
            y = float(node.attrib["y"])
            nodes[nid] = (x, y)

        for link in root.find("links"):
            lid = link.attrib["id"]
            fnode = link.attrib["from"]
            tnode = link.attrib["to"]
            length = float(link.attrib.get("length", "0"))
            freespeed = float(link.attrib.get("freespeed", "0"))
            links[lid] = (fnode, tnode, length, freespeed)

    return nodes, links


def interpolate_points(t0, t1, x0, y0, x1, y1, step=1.0):
    dt = t1 - t0
    if dt <= 0:
        return [(t0, x0, y0), (t1, x1, y1)]

    n_steps = int(math.floor(dt / step))
    pts = []

    for i in range(n_steps + 1):
        t = t0 + i * step
        if t > t1:
            break
        r = (t - t0) / dt
        x = x0 + r * (x1 - x0)
        y = y0 + r * (y1 - y0)
        pts.append((t, x, y))

    if not pts or pts[-1][0] < t1:
        pts.append((t1, x1, y1))

    return pts


def process_events(events_file, nodes, links, out_csv):
    # vehicle -> person 対応
    vehicle_to_person = {}

    # vehicleごとの entered 状態
    # in_progress[vehicle] = (link_id, enter_time)
    in_progress = {}

    with gzip.open(events_file, 'rb') as f, open(out_csv, "w", newline="", encoding="utf-8") as csvfile:
        writer = csv.writer(csvfile)
        writer.writerow(["time", "person", "x", "y", "link", "event_type"])

        for ev, elem in ET.iterparse(f, events=("end",)):
            if elem.tag != "event":
                continue

            a = elem.attrib
            etype = a.get("type", "")
            time = float(a.get("time", "0"))

            # 1) vehicle -> person 対応を作る
            if etype == "PersonEntersVehicle":
                person = a.get("person")
                vehicle = a.get("vehicle")
                if person and vehicle:
                    vehicle_to_person[vehicle] = person
                elem.clear()
                continue

            # 2) entered/left link は vehicle 単位で処理
            if etype in ("entered link", "left link"):
                vehicle = a.get("vehicle")
                link_id = a.get("link")
                if vehicle is None or link_id is None:
                    elem.clear()
                    continue
                if link_id not in links:
                    elem.clear()
                    continue
                if vehicle not in vehicle_to_person:
                    # person がまだ紐付いていない車両は無視
                    elem.clear()
                    continue

                fnode, tnode, length, freespeed = links[link_id]
                if fnode not in nodes or tnode not in nodes:
                    elem.clear()
                    continue

                if etype == "entered link":
                    in_progress[vehicle] = (link_id, time)

                elif etype == "left link":
                    if vehicle not in in_progress:
                        elem.clear()
                        continue

                    entered_link_id, t_enter = in_progress[vehicle]
                    if entered_link_id != link_id:
                        # 不整合対策:状態を更新してスキップ
                        in_progress[vehicle] = (link_id, time)
                        elem.clear()
                        continue

                    t_left = time
                    actual_dt = t_left - t_enter

                    expected_dt = length / freespeed if freespeed > 0 and length > 0 else None
                    if actual_dt <= 0:
                        if expected_dt is not None and expected_dt > 0:
                            actual_dt = expected_dt
                            t_left = t_enter + actual_dt
                        else:
                            actual_dt = 0

                    x0, y0 = nodes[fnode]
                    x1, y1 = nodes[tnode]

                    pts = interpolate_points(t_enter, t_left, x0, y0, x1, y1, step=STEP_SEC)

                    person = vehicle_to_person[vehicle]
                    for t, x, y in pts:
                        writer.writerow([t, person, x, y, link_id, "move"])

                    in_progress.pop(vehicle, None)

            elem.clear()


def main():
    nodes, links = load_network(NETWORK_FILE)
    process_events(EVENTS_FILE, nodes, links, OUT_CSV)
    print(f"CSV exported: {OUT_CSV}")


if __name__ == "__main__":
    main()

$ebata@DESKTOP-1QS7OI7:~/matsim-example-project/scenarios/equil2/output$ python matsim_events_to_csv.py
CSV exported: agents_positions.csv

このagents_positions.csvが、エージェントの軌跡となるが、面倒なので、時間と座標を出すプログラムを作成

[matsim_events_to_geo_csv.py]

import gzip
import xml.etree.ElementTree as ET
import csv
import math
from datetime import datetime, timedelta, timezone

try:
    from pyproj import Transformer
except ImportError as e:
    raise SystemExit(
        "pyproj が必要です。pip install pyproj を実行してください。"
    )

EVENTS_FILE = "output_events.xml.gz"
NETWORK_FILE = "output_network.xml.gz"
OUT_CSV = "agents_positions_geo.csv"
STEP_SEC = 1.0  # 1秒刻み

# シミュレーション開始日時(必要に応じて変更)
# 例: 日本時間で 2025-11-24 00:00:00 開始
SIM_START = datetime(2025, 11, 24, 0, 0, 0, tzinfo=timezone(timedelta(hours=9)))

# 座標変換: EPSG:6685 -> EPSG:4326 (lon, lat)
TRANSFORMER = Transformer.from_crs("EPSG:6685", "EPSG:4326", always_xy=True)


def load_network(network_file):
    nodes = {}
    links = {}

    with gzip.open(network_file, 'rb') as f:
        tree = ET.parse(f)
        root = tree.getroot()

        for node in root.find("nodes"):
            nid = node.attrib["id"]
            x = float(node.attrib["x"])
            y = float(node.attrib["y"])
            nodes[nid] = (x, y)

        for link in root.find("links"):
            lid = link.attrib["id"]
            fnode = link.attrib["from"]
            tnode = link.attrib["to"]
            length = float(link.attrib.get("length", "0"))
            freespeed = float(link.attrib.get("freespeed", "0"))
            links[lid] = (fnode, tnode, length, freespeed)

    return nodes, links


def interpolate_points(t0, t1, x0, y0, x1, y1, step=1.0):
    dt = t1 - t0
    if dt <= 0:
        return [(t0, x0, y0), (t1, x1, y1)]

    n_steps = int(math.floor(dt / step))
    pts = []

    for i in range(n_steps + 1):
        t = t0 + i * step
        if t > t1:
            break
        r = (t - t0) / dt
        x = x0 + r * (x1 - x0)
        y = y0 + r * (y1 - y0)
        pts.append((t, x, y))

    if not pts or pts[-1][0] < t1:
        pts.append((t1, x1, y1))

    return pts

def sec_to_datetime_str(sec):
    dt = SIM_START + timedelta(seconds=sec)
    # QGISで扱いやすい形式 → 2025-11-24 06:00:01
    return dt.strftime('%Y-%m-%d %H:%M:%S')

def xy_to_lonlat(x, y):
    lon, lat = TRANSFORMER.transform(x, y)
    return lon, lat


def process_events(events_file, nodes, links, out_csv):
    vehicle_to_person = {}
    in_progress = {}

    with gzip.open(events_file, 'rb') as f, open(out_csv, "w", newline="", encoding="utf-8") as csvfile:
        writer = csv.writer(csvfile)
        writer.writerow(["datetime", "time_sec", "person", "lat", "lon", "link", "event_type"])

        for ev, elem in ET.iterparse(f, events=("end",)):
            if elem.tag != "event":
                continue

            a = elem.attrib
            etype = a.get("type", "")
            time_sec = float(a.get("time", "0"))

            # vehicle -> person 対応付け
            if etype == "PersonEntersVehicle":
                person = a.get("person")
                vehicle = a.get("vehicle")
                if person and vehicle:
                    vehicle_to_person[vehicle] = person
                elem.clear()
                continue

            if etype in ("entered link", "left link"):
                vehicle = a.get("vehicle")
                link_id = a.get("link")
                if vehicle is None or link_id is None:
                    elem.clear()
                    continue
                if link_id not in links:
                    elem.clear()
                    continue
                if vehicle not in vehicle_to_person:
                    elem.clear()
                    continue

                fnode, tnode, length, freespeed = links[link_id]
                if fnode not in nodes or tnode not in nodes:
                    elem.clear()
                    continue

                if etype == "entered link":
                    in_progress[vehicle] = (link_id, time_sec)

                elif etype == "left link":
                    if vehicle not in in_progress:
                        elem.clear()
                        continue

                    entered_link_id, t_enter = in_progress[vehicle]
                    if entered_link_id != link_id:
                        in_progress[vehicle] = (link_id, time_sec)
                        elem.clear()
                        continue

                    t_left = time_sec
                    actual_dt = t_left - t_enter

                    expected_dt = length / freespeed if freespeed > 0 and length > 0 else None
                    if actual_dt <= 0:
                        if expected_dt is not None and expected_dt > 0:
                            actual_dt = expected_dt
                            t_left = t_enter + actual_dt
                        else:
                            actual_dt = 0

                    x0, y0 = nodes[fnode]
                    x1, y1 = nodes[tnode]

                    pts = interpolate_points(t_enter, t_left, x0, y0, x1, y1, step=STEP_SEC)

                    person = vehicle_to_person[vehicle]
                    for t, x, y in pts:
                        lon, lat = xy_to_lonlat(x, y)
                        dt_str = sec_to_datetime_str(t)
                        writer.writerow([dt_str, t, person, lat, lon, link_id, "move"])

                    in_progress.pop(vehicle, None)

            elem.clear()


def main():
    nodes, links = load_network(NETWORK_FILE)
    process_events(EVENTS_FILE, nodes, links, OUT_CSV)
    print(f"CSV exported: {OUT_CSV}")


if __name__ == "__main__":
    main()

QGISで動画表示する
レイヤ→属性テーブルを開く


これでdtというエントリーができる。
これで「プロパティ」→「時系列」で、

を投入する
これで
「プロジェクト」→「プロパティ」→「時系列」→「レイヤから計算」→「適用」

これもセットしないと出てこない

時系列コントロールを表示するには4つ設定しないと出てこない。
(1)そのレイヤ→"属性テーブル"によるdtのセット
(2)そのレイヤ→"プロパティ"によるセット
(3)メニューの"プロジェクト"→"プロパティ"→"時系列"によるセット
(4)メニューの"ビュー"→"パネル"→"時系列コントローラ"のチェック

こんな感じの動画がでます。

 

======

まず失敗から。

MATSim Docker image(https://github.com/maptic/matsim-docker)で動かせない。3日間くらいの時間を費やした結果、断念

-----

(1)WSLのUbuntuを起動

(2)matsim-example-project(https://github.com/matsim-org/matsim-example-project)にあるコンテンツをダウンロード

cd ~
git clone https://github.com/matsim-org/matsim-example-project.git

(3)ビルド

cd ~/matsim-example-project$

./mvnw clean package

(3-1) どの java が呼ばれているか確認

which -a java
readlink -f "$(which java)"
echo "$JAVA_HOME"
which -a で複数出たら、一番上が今使われている java です。

JAVA_HOME が 17 を指していれば、PATH 先頭に $JAVA_HOME/bin が来て 17 が優先されます。

~/.bashrc や ~/.profile に JAVA_HOME=/usr/lib/jvm/java-17... の行が残っていると、それが勝ちます。

(3-2) 一時的に 21 へ切り替え(すぐ試せます)

export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
export PATH="$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
hash -r # シェルのコマンドキャッシュをクリア
java -version
→ ここで openjdk version "21..." になれば OK。

(3-3) 恒久設定(ログイン時に毎回 21 になるように)

~/.bashrc または ~/.profile の中の 古い JAVA_HOME/PATH 行をコメントアウトし、下を追記:

# Java 21 を既定にする
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
export PATH="$JAVA_HOME/bin:$PATH"

保存後、反映:

exec $SHELL -l
java -version

(4)MATSim起動

cd ~/matsim-example-project$

java -jar matsim-example-project-0.0.1-SNAPSHOT.jar

(4)テスト起動

「Choose」を押す → リポジトリ内の
scenarios/equil/config.xml を選択。

ちなみに、Output Directoryのは、自動的に、
/home/ebata/matsim-example-project/scenarios/equil/output
が入っていた。

「Start MATSim」のボタンを押下

2~3分後に、こんな感じになった

コンソール画面も、こんな感じになって、入力できない状況

ただ、この段階で、データはできているので、コンソールをCtrl-Cで落しても良い。

で、ここから図示したかったのですが、すったもんだしたあげく失敗したので、via-appを使うようにしました。

で、WSLのUbuntuで、以下からダンロードします。

https://simunto.com/via/download

で、

$CPU=$(dpkg --print-architecture)
$wget https://www.simunto.com/data/via/release/debian/simunto-via-app_25.1.0_${CPU}.deb
$sudo apt install ./simunto-via-app_25.1.0_${CPU}.deb

を実施すると、

$via-app

で、viaが起動します。

ebata@DESKTOP-1QS7OI7:~/matsim-example-project$ export DISPLAY=:0
ebata@DESKTOP-1QS7OI7:~/matsim-example-project$ export LIBGL_ALWAYS_INDIRECT=1

ebata@DESKTOP-1QS7OI7:~/via-app

も必要かもしれない。

"output_network.xml.gz"を選択

同じ様に、

"output_events.xml.gz"

を選択する。

上図のように、"Load Data"ボタンを押して下さい。

上図のようにタイムラインが表示され、08:00から数分間のみ、自動車が表示されます。右側のインジケータを若干右に移動させると、移動の様子(といっても表われて消えているだけの様子)が見えます。

Windows版については
https://kobore.net/matsim/MATSim-begining.html
を参考にして下さい。
----
ちなみに、Ubuntuで作った
java -jar matsim-example-project-0.0.1-SNAPSHOT.jar
は、Windowsでも動きました。

======

もっとも簡単なMATSimの起動方法

~/matsim-example-project/simple-scenario というディレクトリを作り、さらに出力用にoutput/simple1 というディレクトリも掘っておく。

simple-scenario
├── config.xml
├── config.xml~
├── network.xml
├── network.xml~
├── output
└── simple1

[config.xml]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>
  <module name="controller">
    <param name="firstIteration" value="0"/>
    <param name="lastIteration"  value="0"/>
    <param name="overwriteFiles" value="overwriteExistingFiles"/>
    <param name="outputDirectory" value="output/simple1"/>
  </module>

  <module name="network">
    <param name="inputNetworkFile" value="network.xml"/>
  </module>

  <module name="plans">
    <param name="inputPlansFile" value="plans.xml"/>
  </module>

  <module name="qsim">
    <param name="startTime" value="00:00:00"/>
    <param name="endTime"   value="24:00:00"/>
  </module>

  <!-- 旧 strategy → replanning に修正済み -->
  <module name="replanning">
    <param name="maxAgentPlanMemorySize" value="1"/>
  </module>

  <!-- scoring に h / w を定義 -->
  <module name="scoring">
    <parameterset type="activityParams">
      <param name="activityType" value="h"/>
      <param name="typicalDuration" value="12:00:00"/>
    </parameterset>
    <parameterset type="activityParams">
      <param name="activityType" value="w"/>
      <param name="typicalDuration" value="08:00:00"/>
      <param name="openingTime" value="07:00:00"/>
      <param name="closingTime" value="18:00:00"/>
    </parameterset>
  </module>
</config>

この `config.xml` は、MATSim(Multi-Agent Transport Simulation)の実行設定を記述したファイルです。内容をセクションごとに整理すると次のようになります。

---

### 1. `<module name="controller">`

シミュレーション全体の制御に関する設定。

* `firstIteration=0`
最初のイテレーション番号を 0 に設定。
* `lastIteration=0`
最後のイテレーションも 0 にしているので、学習や繰り返しは行わず、初期の状態のみを実行する(ワンショットのシミュレーション)。
* `overwriteFiles=overwriteExistingFiles`
出力ディレクトリに既存のファイルがあっても上書きする設定。
* `outputDirectory=output/simple1`
シミュレーション結果の出力先フォルダ。

---

### 2. `<module name="network">`

利用する交通ネットワークデータの指定。

* `inputNetworkFile=network.xml`
道路やリンク構造が記載されたネットワーク定義ファイル。

---

### 3. `<module name="plans">`

エージェント(個人)の行動計画データの指定。

* `inputPlansFile=plans.xml`
各エージェントの出発地・目的地・活動スケジュールを記載したプランファイル。

---

### 4. `<module name="qsim">`

シミュレーション実行時間の設定。

* `startTime=00:00:00`
シミュレーション開始時刻を午前 0 時に設定。
* `endTime=24:00:00`
シミュレーション終了時刻を 24 時に設定(丸一日分を対象にする)。

---

### 5. `<module name="replanning">`

プラン修正(replanning)の設定。
※旧名称 `strategy` が `replanning` に変更されたもの。

* `maxAgentPlanMemorySize=1`
各エージェントが保持できるプランの数を 1 に制限(つまり再計画はせず、最初のプランをそのまま利用)。

---

### 6. `<module name="scoring">`

エージェントが行動を評価するためのスコアリング設定。ここでは活動(activity)のパラメータを定義している。

* `activityType=h`
「h」(home、自宅滞在)活動を 12 時間の典型的持続時間で設定。
* `activityType=w`
「w」(work、仕事)活動を 8 時間の典型的持続時間で設定。
また、開店時間を 7:00、閉店時間を 18:00 とすることで、仕事に従事できる時間帯の制約を表現。

---

### 総合説明

この設定ファイルは、**1日分の単発シミュレーション**を対象とし、ネットワークとプランデータを与え、再計画を行わずに実行するシンプルなケースを記述している。活動は「自宅(h)」と「仕事(w)」の2種類のみで、典型的な1日の行動(12時間の在宅と8時間の勤務)を再現する構成になっている。

---

?? 要するに、この `config.xml` は \*\*「network.xml」と「plans.xml」を入力として、エージェントが自宅と仕事の往復を行う1日シミュレーションを出力/simple1 に結果保存する」\*\*ための設定ファイルです。

[config.xml]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE network SYSTEM "http://www.matsim.org/files/dtd/network_v2.dtd">
<network name="tiny-net">
  <nodes>
    <node id="1" x="0.0"    y="0.0"/>
    <node id="2" x="1000.0" y="0.0"/>
  </nodes>

  <links>
    <!-- 1km、自由速度15m/s ≒ 54km/h、容量 1000veh/h、1車線 -->
    <link id="1_2" from="1" to="2" length="1000.0" freespeed="15.0"
          capacity="1000.0" permlanes="1" modes="car"/>
    <link id="2_1" from="2" to="1" length="1000.0" freespeed="15.0"
          capacity="1000.0" permlanes="1" modes="car"/>
  </links>
</network>

この `network.xml` は、MATSim で利用する交通ネットワークを記述したファイルで、最小限の「2ノード・2リンク」からなる非常にシンプルなネットワークを定義しています。内容を整理すると以下の通りです。

---

### 1. `<network name="tiny-net">`

ネットワーク全体の名前として `"tiny-net"` を定義。小規模なテスト用ネットワークであることを示す。

---

### 2. `<nodes>`

ノード(交差点や地点)を定義。ここでは2つのノードがある。

* `<node id="1" x="0.0" y="0.0"/>`
座標 (0,0) にあるノード。IDは `1`。
* `<node id="2" x="1000.0" y="0.0"/>`
座標 (1000,0) にあるノード。IDは `2`。
→ ノード間は直線で 1000m(=1km)離れている。

---

### 3. `<links>`

ノード間を結ぶリンク(道路)を定義。2本のリンクが双方向に設定されている。

* `<link id="1_2" from="1" to="2" ... />`
ノード1からノード2へ向かうリンク。

* 長さ:`1000.0` m (1km)
* 自由速度:`15.0` m/s ≒ 54 km/h
* 容量:`1000.0` 台/時 (1時間あたりの通過可能車両数)
* 車線数:`1`
* 利用可能モード:`car` のみ
* `<link id="2_1" from="2" to="1" ... />`
ノード2からノード1へ戻るリンク。条件は上記と同じ。

---

### まとめ

このファイルは、**1kmの直線道路を2ノードで表現し、車が双方向に走行できるようにした最小限の道路ネットワーク**を定義している。速度や容量も現実的な数値(片側1車線、時速54km、1000台/時)で設定されており、テストや学習用のシミュレーションに適したネットワーク構成になっている。

?? 要するに「**ノード1とノード2を結ぶ片側1車線の道路(往復2車線)だけのシンプルネットワーク**」です。

[plans.xml]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plans SYSTEM "http://www.matsim.org/files/dtd/plans_v4.dtd">
<plans>
  <person id="1">
    <plan selected="yes">
      <act type="h" link="1_2" x="0.0" y="0.0" end_time="08:00:00"/>
      <leg mode="car"/>
      <act type="w" link="2_1" x="1000.0" y="0.0" end_time="17:00:00"/>
      <leg mode="car"/>
      <act type="h" link="1_2" x="0.0" y="0.0"/>
    </plan>
  </person>
</plans>

この `plans.xml` は、MATSim におけるエージェント(人物)の行動計画を記述したファイルです。内容を整理すると以下のようになります。

---

### 1. `<plans>` ルート要素

計画ファイル全体を示すルート。内部に個々の人物(`<person>`)とその行動計画(`<plan>`)を記述。

---

### 2. `<person id="1">`

ID が `1` の人物を定義。ここでは 1 人だけ。

---

### 3. `<plan selected="yes">`

この人物の計画(行動スケジュール)を記述。

* `selected="yes"` → このプランが実行対象として選択されている。

---

### 4. 行動と移動の流れ

計画は **行動(`<act>`)と移動(`<leg>`)が交互に記述**される。ここでは1日の典型的な「自宅→仕事→自宅」往復を表現している。

#### (1) 自宅での行動

```xml
<act type="h" link="1_2" x="0.0" y="0.0" end_time="08:00:00"/>
```

* `type="h"`:自宅(home)活動。
* `link="1_2"`:ノード1→2のリンク上に自宅があると仮定。
* 座標 `(0.0, 0.0)`(ノード1の位置に対応)。
* `end_time="08:00:00"` → 午前8時まで自宅に滞在し、その後移動を開始。

#### (2) 通勤移動

```xml
<leg mode="car"/>
```

* `mode="car"` → 自動車で移動する。
* 出発地点は自宅(link="1\_2")、目的地は次の `<act>` で指定。

#### (3) 仕事での行動

```xml
<act type="w" link="2_1" x="1000.0" y="0.0" end_time="17:00:00"/>
```

* `type="w"`:仕事(work)活動。
* `link="2_1"`:ノード2→1のリンク上に職場があると仮定。
* 座標 `(1000.0, 0.0)`(ノード2の位置に対応)。
* `end_time="17:00:00"` → 午後5時まで仕事をして、その後帰宅移動。

#### (4) 帰宅移動

```xml
<leg mode="car"/>
```

* 仕事先から自動車で自宅へ戻る。

#### (5) 自宅での行動(帰宅後)

```xml
<act type="h" link="1_2" x="0.0" y="0.0"/>
```

* 再び自宅(link="1\_2")で活動。
* 終了時刻は未設定なので、そのまま夜間~翌日まで滞在。

---

### まとめ

この `plans.xml` は、**1人の人物(id=1)が「午前8時に自宅を出発 → 車で職場へ通勤 → 午後5時まで勤務 → 車で帰宅 → 以降は自宅で滞在」する一日の行動計画**を記述している。

ネットワーク(`network.xml`)と組み合わせると、ノード1(自宅)とノード2(職場)の間を往復する最小限の通勤シナリオが再現できる構成になっている。

---

 

 

 

 

 

kno

2025,江端さんの忘備録

転生モノコンテンツが氾濫している昨今ですが、その中でも、「織田信長」の転生モノは、ぶっちぎりに多いです(私のこの人物に関する評価はさておき)。
In recent years, reincarnation-themed content has been flooding the market. Still, among them, stories featuring “Oda Nobunaga” being reincarnated are overwhelmingly numerous (setting aside my personal evaluation of this figure).

最近、その中でも群を抜いて面白いのが、「戦国小町苦労譚(*1)」と「織田ちゃんと明智くん(*2)」です。
Recently, two works that stand out as especially interesting are “Sengoku Komachi Kuroutan” (*1) and “Oda-chan to Akechi-kun” (*2).

(*1)
原作小説の出版社:アース・スター エンターテイメント(レーベル「アース・スターノベル」)
コミカライズ(漫画版)の出版社:同じくアース・スター エンターテイメント(レーベル「アース・スターコミックス」)
漫画の掲載サイト:コミック アース・スター(Comic Earth Star)

(*2)
出版社:講談社
掲載誌・メディア:月刊誌『モーニングtwo』(Kodansha モーニングtwo誌)に連載中

「織田ちゃんと明智くん」の中の、このシーンに記載されている「立てば貧血、座れば腰痛、歩いた程度で筋肉痛」という、秀逸な"七音三句調"の言い回しが、私のツボにはまりました。
In “Oda-chan to Akechi-kun”, there is a scene that says, “When standing, anemia; when sitting, back pain; with just a bit of walking, muscle soreness.” This brilliant “seven-syllable, three-phrase style” expression really struck my funny bone.

(上記のコピペ、私は、著作権法32条の"引用"と言い張るつもりですが、問題ありましたらご指摘下さい)
(As for the above copy-paste, I intend to insist it falls under “quotation” as defined in Article 32 of the Copyright Act, but please point out if there is an issue.)


もちろん、これは、「立てば芍薬(しゃくやく)、座れば牡丹(ぼたん)、歩く姿は百合(ゆり)の花)」のパロディであることは、直ぐにご理解いただけると思います。
Of course, you can immediately recognize that this is a parody of the phrase: “When standing, a peony; when sitting, a tree peony; when walking, a lily blossom.”

このパロディ、もっとブラッシュアップできないかと考えて、昨日、ChatGPTと30分間に渡ってネタ出しを行っていました(本当)。というか、「ChatGPT案にネタ出しとして、私がそれに対案を出す」というブレストをしていました。
Wondering if this parody could be polished further, I actually spent 30 minutes yesterday brainstorming with ChatGPT (truly). More precisely, it was a kind of brainstorming session where ChatGPT provided suggestions, and I countered them with my own alternatives.

ヒマ、という訳ではないのですけど、この言い回しは、多分、近い未来に、私(江端)が頻用するハズだと思いまして、ちょっと頑張ってみました。
It’s not that I have too much free time, but I thought this phrasing would likely become something I (Ebata) will frequently use in the near future, so I put some effort into it.


江端版リメイク:
Ebata’s remake:

「立てば貧血、座れば腰痛、歩く姿は傷痍兵」
“When standing, anemia; when sitting, back pain; when walking, a wounded soldier.”

読了断念

2025,江端さんの忘備録

これまで中国の技術的革新(イノベーション)については、何度となく衝撃を受けてきました。
I have been repeatedly struck by the technological innovations emerging from China.

しかし、中国で今年開かれた「人型ロボットの大会(World Humanoid Robot Games/世界人形ロボット運動会)」のニュースを見て、私は、相当な衝撃を受けました。
However, when I saw the news about the "World Humanoid Robot Games" held in China this year, I was profoundly shocked.


かつての日本は、産業用ロボットにおける世界シェアNo.1を誇るロボット大国でした。
Once, Japan proudly held the number one share in the world for industrial robots, standing as a true robot superpower.

もちろん、今でも、超高性能なロボットは、世界の製造工業を牽引する大きな役割を果たしています。
Of course, even today, highly advanced robots continue to play a major role in driving global manufacturing industries.

しかし、中国が「人型ロボット」の分野で、世界大会を開いたということの意義は、とてつもなく大きいのです。
Yet the significance of China hosting a world competition in the field of humanoid robots is immeasurably great.

産業用ロボットは、製造現場の省人化を果たしますが、現在の日本のみならず世界で最も深刻な問題は「対人間に対するサービス分野の人不足」です。
Industrial robots contribute to labor reduction in manufacturing; however, the most serious problem facing not only Japan but the world today is the shortage of human labor in service sectors that deal directly with people.

つまり、接客、清掃、輸送、配膳、警備、案内、教育補助、医療支援、リハビリ、建設現場での補助、農作業、災害救助、
That is to say: customer service, cleaning, transportation, food delivery, security, guidance, educational assistance, medical support, rehabilitation, construction site assistance, farming, disaster rescue—

そして、"介護"と"兵士"です。
And above all, "caregiving" and "soldiers."

この"介護"と"兵士"は、おそらくこれからの世界中の国家を支える根幹になります。
These two domains—caregivers and soldiers—will likely become the very foundation supporting nations worldwide.


とりわけ「介護」における人型ロボットの導入は、単なる補助ではなく、国家的な持続可能性に直結するテーマです。
In particular, the introduction of humanoid robots in caregiving is not merely assistance, but a theme directly tied to the nation's sustainability.

高齢化が急速に進行する日本にとって、介護分野の人材不足は最優先課題であり、ここをロボットで埋められるかどうかが社会保障制度の存続そのものを左右します。
For Japan, where aging is progressing rapidly, the shortage of workers in caregiving is a top-priority issue, and whether robots can fill this gap will determine the very survival of the social security system.

また、「兵士」という役割は、より直接的に国家安全保障に結びつきます。
Meanwhile, the role of "soldiers" is even more directly connected to national security.

兵士型ロボットは、国防の人材不足を補うだけでなく、戦闘や治安維持の現場で“人間の死傷”を代替する存在となり得るのです。
Humanoid soldier robots could not only compensate for the shortage of defense personnel but also serve as substitutes for human casualties on the battlefield and in security operations.

この領域に中国が真剣に投資し、大会という形で成果を可視化したことは、世界のパワーバランスにも直結する話題といえるでしょう。
China’s serious investment in this area, and its decision to showcase the results through such a competition, can be seen as directly tied to the global balance of power.

つまり、ロボットはもはや「産業機械」ではなく、「社会インフラ」「国家戦略」の一部となりつつあるのです。
In short, robots are no longer merely "industrial machines," but are becoming part of "social infrastructure" and "national strategy."


中国がこの分野で大規模な大会を開催した背景には、単なる技術的ショーケースではなく、「国家戦略」としての強い意志があります。
Behind China’s decision to host such a large-scale competition lies not a simple technical showcase but a strong will as part of its national strategy.

すなわち、人型ロボットを未来の労働力、そして軍事・安全保障の担い手として位置づけ、その存在を国民と世界に誇示する狙いです。
In other words, China aims to position humanoid robots as the future workforce and as pillars of military and national security, while displaying their presence to both its citizens and the world.

これは単なる展示会ではなく、「中国は人型ロボットの社会実装を真剣に進める」という国際的メッセージなのです。
This is not merely an exhibition—it is an international message declaring, “China is serious about implementing humanoid robots in society.”

比べて、日本はどうでしょうか。
By comparison, how does Japan stand?

日本は依然として産業用ロボットの分野で圧倒的な地位を保っていますが、人型ロボットについては実証実験や研究段階に留まるものが多く、社会全体を巻き込むような「国家的プロジェクト」としては推進力に欠けています。
Japan still maintains an overwhelming position in the field of industrial robots, but in the case of humanoid robots, many efforts remain at the stage of experiments and research, lacking the momentum to drive them forward as national projects involving society as a whole.

ASIMOやAIBOといった日本の先駆的存在はあったものの、それを国家戦略に昇華する前にブームが沈静化し、今では研究室や企業内の試作機として細々と続く状況が目立ちます。
Although Japan had pioneering creations such as ASIMO and AIBO, the boom faded before these could be elevated into a national strategy, and today they largely survive only as prototypes in laboratories and corporations.

さらに重要なのは「倫理的課題」です。介護現場でロボットが人間に寄り添うことを受け入れられるか、兵士としてロボットを投入することが国際法や人道規範に反しないか、こうした問題は避けて通れません。
Equally important are the “ethical issues.” Can society accept robots providing care alongside humans, and would deploying robots as soldiers violate international law or humanitarian norms? These are questions that cannot be avoided.

中国は「まずは実行してしまう」姿勢で前進しますが、日本や欧米は「規範・倫理」を重視する傾向が強く、その違いが今後の技術実装のスピードにも大きく影響するでしょう。
China moves forward with a “just do it first” attitude, while Japan and Western countries place greater emphasis on norms and ethics. This difference will strongly affect the speed of technological implementation in the future.

この構図を考えると、私は強烈な危機感を覚えます。
Considering this structure, I feel a strong sense of crisis.

もし日本が「人材不足の解消」という現実課題に本気で取り組むのならば、人型ロボットの社会実装を避けて通ることはできません。
If Japan is truly serious about tackling the pressing issue of labor shortages, it cannot avoid the social implementation of humanoid robots.

介護、兵士だけでなく、物流や災害対応といった国の根幹を支える領域で、ロボットを積極的に導入するビジョンを示さなければ、やがて日本社会は「人手不足倒産」ならぬ「人手不足崩壊」に直面しかねないのです。
Not only in caregiving and the military but also in logistics and disaster response—areas fundamental to the nation, Japan must present a vision for actively introducing robots. Otherwise, Japanese society may face not a “labor shortage bankruptcy” but a “labor shortage collapse.”


ところが、その大会を報じるマスメディアの姿勢を目にして、私は一気に冷めた気持ちになりました。
Yet when I saw how the mass media reported on the competition, my enthusiasm suddenly cooled.

画面に映し出されるのは、ロボットが転んだり、バランスを崩して動けなくなったりする映像ばかり。
The screen was filled with scenes of robots falling, losing balance, or failing to move.

それにアナウンサーやタレントが笑い声を添えて「まだまだだねえ」などと軽口を叩く構成でした。
Announcers and TV personalities added laughter and light remarks like “Still a long way to go,” shaping the entire narrative.

私は、その光景に深い絶望を覚えました。
I felt a deep sense of despair at that sight.

なぜなら、それは「無様さ」を笑うことで、技術が持つ本質的な可能性を矮小化してしまう態度だからです。
Because laughing at the “clumsiness” reduces the essential potential of the technology itself.

あのぎこちない動作の裏には、制御工学、人工知能、センサー技術、材料工学といった多層の研究と試行錯誤が詰まっている。
Behind those awkward movements lie layers of research, trial, and error in control engineering, artificial intelligence, sensor technology, and materials science.

転んだ一歩は、やがて社会を支える千歩へとつながるかもしれない。
A single step that stumbles may one day lead to a thousand steps that support society.

にもかかわらず、それを笑いものとして消費してしまうのは、未来の価値を見ようとしない無知そのものです。
And yet, to consume it as a laughingstock is ignorance itself, refusing to see the value of the future.


この国では、かつてASIMOが歩いたときに世界が驚嘆した瞬間があったはずです。
In this country, there was once a moment when the world marveled as ASIMO walked.

その記憶を持つはずのメディアが、他国の挑戦に対して「欠点の揶揄」でしか語れないとすれば、日本は技術の未来を自ら閉ざすことになるでしょう。
If the media, which should still hold that memory, can speak of other nations’ challenges only through “mockery of shortcomings,” then Japan will close off its own technological future.

私は思うのです。
This is what I believe.

ロボットの歩みを笑うことは、実は自分たちの未来を笑い飛ばすことに他ならない、と。
To laugh at the steps of robots is, in truth, nothing other than laughing away our own future.

ただ、多くの場合、この「予測と制御」は上手く噛み合いません。一言で言えば、「難しい」。

未分類

あれ、変だな、と思ってしらべてみたら、

ん?

いきなり、計画が狂いました。

今朝、朝方、早朝に思いついたネタで、資料作っていたのですが(すぐ忘れるので、直ぐ資料に落すことにしている)、正直困っています。

2025,江端さんの忘備録

昨日、首都圏では豪雨災害が発生して、交通機能が麻痺状態になり、酷い浸水被害が出ていました。
Yesterday, in the Tokyo metropolitan area, a torrential rain disaster occurred, paralyzing transportation functions and causing severe flooding damage.

会社から立てつづけの安否確認メールが8通、いずれも「記録的短時間大雨情報」という題目がついていました。
I received eight consecutive safety confirmation emails from my company, all with the subject line “Record-Breaking Short-Term Heavy Rain Information.”

先日もお話しましたが、大地震による震災では通信インフラが壊滅するので、現地の情報がリアルタイムで伝わってこない、という話はしましたが、集中豪雨では、そこまでには至らず、結構な映像がマスメディアのニュースにも登場しています。
As I mentioned the other day, in the case of a major earthquake, the communication infrastructure is devastated, and local information does not reach us in real time. But with torrential rain, it does not go that far, and quite a few videos still appear in the mass media news.

とは言え「少ない」。
That said, they are still “few.”

どれだけの人間が、豪雨の状況のコンテンツを撮影したか分かりませんが、数千から数万のオーダーにはなると思います。
I don’t know how many people filmed the situation during the torrential rain, but I imagine it must have been on the order of several thousand to tens of thousands.

なのに昨夜見ていたニュースでは、4つの映像コンテンツを使い回しているという、貧弱さです。
Yet, in the news I watched last night, they kept reusing just four video clips—such a poverty of content.


これは、2つほど理由があるかな、と考えています。
I think there are about two reasons for this.

(1)場所の局地性
(1) The locality of the affected areas

大雨は広範囲で降っても、深刻な浸水や交通麻痺が発生するのは局所的。
Even if heavy rain falls over a wide area, severe flooding and traffic paralysis occur only in localized spots.

多くの人が「ただの強い雨」として経験する一方で、ごく限られた地点でだけ深刻な映像が撮れる。
While many people experience it as “just heavy rain,” only a minimal number of places provide footage of severe damage.

そのため映像供給は地震のように「街全体が壊れている」ケースに比べて圧倒的に少なくなります。
As a result, the supply of footage is overwhelmingly smaller compared to cases like earthquakes, where entire towns are destroyed.

(2)著作権や肖像権の問題
(2) Issues of copyright and portrait rights

実際にはSNS上に多数の映像が散在していたとしても、マスメディアがすべてを使えるわけではない。
Even if many videos are scattered across social media, mass media cannot use all of them.

著作権や肖像権の確認、真偽の検証、画質や内容の取捨選択が行われる結果、最終的に放送に耐える映像はごく少数に絞られます。
Because copyright and portrait rights must be cleared, authenticity verified, and quality/content filtered, the final number of broadcastable videos is reduced to a tiny fraction.

YouTubeの映像などを勝手に使うことはできませんし、顔が視認できて、声が入っているコンテンツも個人情報の観点からは問題となります。
They cannot freely use YouTube footage, and videos that show identifiable faces or contain voices also raise privacy concerns.

このような理由で、「数万のオーダーで撮られたはずの映像」が、視聴者に届くときには「4本の映像の使い回し」になってしまう訳です。
For these reasons, the “tens of thousands of videos that must have been taken” end up reaching viewers as just “four reused clips.”


「世界のびっくり動画」のような番組は、あの動画を放送するに、そこそこの値段で購入している訳です。
Programs like “World’s Amazing Videos” actually pay a decent price to broadcast those clips.

このお値段の相場を、ChatGPTに推測して貰いました。
I had ChatGPT estimate the market price of such videos.

=====

推定:スクープ映像・視聴者提供映像の“買い取り・使用料”相場
Estimation: Market rates for purchasing or licensing scoop videos and viewer-submitted footage

短いクリップ(5〜10秒程度)、顔・著作的問題なし、報道で一回だけ使う → ¥20,000 ~ ¥100,000
A short clip (around 5–10 seconds), no copyright or portrait issues, used once in a news report → ¥20,000 to ¥100,000

やや長め(10〜30秒)、内容がインパクトあり、複数回使われる・全国区番組 → ¥100,000 ~ ¥300,000〜¥500,000
Slightly longer (10–30 seconds), impactful content, used multiple times in a nationwide program → ¥100,000 to ¥300,000–¥500,000

高画質かつ希少性の高い映像、複数メディアで利用 → ¥500,000 ~ 数百万円
High-quality and rare footage, used across multiple media → ¥500,000 to several million yen

結論:今回「世界のびっくり動画」のような番組で“スクープ映像”を購入する場合のお値段予想
Conclusion: For a program like “World’s Amazing Videos,” the estimated prices would be—

非常にシンプルな短いクリップ → 約 ¥30,000〜¥100,000
Straightforward short clip → approx. ¥30,000–¥100,000

インパクトがあり、やや長めで複数用途あり → 約 ¥100,000〜¥300,000
Impactful, slightly longer, usable in multiple contexts → approx. ¥100,000–¥300,000

全国ネットで何度も使う・ウェブ配信含むなど利用範囲が広い → ¥300,000〜¥1,000,000あるいはそれ以上
Nationwide broadcast, reused multiple times, including online distribution → ¥300,000–¥1,000,000 or more

=====


なるほど、被災地の映像は『売れる』コンテンツになりえる訳ですね。あまり愉快な話ではないですが。
I see—footage from disaster areas can indeed become “sellable” content, though it’s hardly a pleasant thought.

これから、スマホで被災状況を撮影する人が、(A)人の顔が視認できないように、または、(B)人の声が入らないように、あるいは、(C)撮影場所が特定されにくいように、撮影をして、それを商材として売却する時代がくるのかもしれません。
From now on, people filming disaster situations with smartphones may start ensuring (A) no faces are visible, (B) no voices are recorded, or (C) the location cannot be easily identified—so they can sell the footage as a commodity.

そういう「金になるコンテンツ」の撮影方法を教える専門学校なども出てくるかもしれません。これは時間の問題だと思います。
We might even see vocational schools teaching how to shoot such “profitable content.” It may only be a matter of time.


これまで、一般大衆は、被害者や被災地のプライバシーを無視して報道を強行するマスコミを批判してきましたが、すでに、
Until now, the general public criticized mass media for forcing coverage while ignoring the privacy of victims and disaster areas, but already—

ーー マスコミの大衆化の時代
—the age of “the massification of mass media” has arrived.

は到来しているのかもしれません。
It may already be here.

もうこうなってると、誰が誰を非難できるか、分からなくなってきます。現在のマスコミも、その存在意義を問われるようになってくるでしょう。
At this point, it’s becoming unclear who can criticize whom. Even the mass media itself will have its raison d’être questioned.

私が、NHKを始めとして大手マスメディア(新聞社等を含む)に期待しているのは「ファクトチェック」という機能と、誤報を潔く認める「謝罪とその補償」という機能です。
What I expect from major media, including NHK and major newspapers, is the function of “fact-checking” and the function of “apologizing and compensating” by candidly admitting mistakes.

メディアが完璧であることはないし、そんなことは期待していませんが、メディアって、大抵の場合、誤報を認めた上での自己批判をしませんよね。
Media will never be perfect, and I don’t expect them to be. But in most cases, they don’t acknowledge their errors and self-criticize, do they?

誤報を認めない理由は、ブランド維持への恐怖、組織的責任の回避、法的リスクの懸念、そして文化的な自己批判の不在にありますが、SNS時代には一般市民も一次情報を発信できるため、誤報を隠蔽すること自体が困難になってきています。
The reasons for not admitting errors lie in fear of brand damage, avoidance of organizational responsibility, concerns over legal risks, and a cultural absence of self-criticism. But in the age of social media, ordinary citizens can transmit firsthand information, making it increasingly difficult to conceal errors.

結果として「誤報を認めないメディア」はかえって信頼を失い、長期的には自らの首を絞めることにもなりかねません。
As a result, “media that do not admit mistakes” end up losing trust and may strangle themselves in the long run.

まあ、実際に新聞の購読件数が激減しているのは、こういうメディアのタカビーな不遜な態度が、読者のカンにさわるからだと思います。
Well, the sharp decline in newspaper subscriptions is, I think, due to this kind of arrogant, high-handed attitude that rubs readers the wrong way.

メディアであろうが人間であろうが、「間違ったことを間違ったと認めない奴と付き合うのはゴメンだ」と思うんですよね。
Whether media or human beings, I don’t want to associate with anyone who refuses to admit when they’re wrong.


昨日の豪雨で、ニュースが繰り返し流したのは、局地性と権利の壁で切り落とされた残りのたった4本の映像でした。
In yesterday’s torrential rain, the news repeatedly aired just four remaining clips, pared down by the barriers of locality and rights.

とはいえ、今や、誰もが撮影者であり、誰もが報道者になる時代であり、マスコミの大衆化はすでに現実となっています。
That said, we are already in an era where anyone can be a filmer and anyone can be a reporter—the massification of mass media is reality.

では、既存メディアは何を武器に生き残るのか。
So, what weapons are left for existing media to survive?

映像の数では勝てない。スピードでも勝てない。
They cannot win by the number of videos. They cannot win by speed either.

残されたマスメディアの唯一の使命は、「事実を検証する力」と「誤報を正直に認める勇気」で、ファクトチェックと誠実な訂正だけが、マスメディアの最後の生存戦略だ、と私には思えます。
The only mission left for mass media is “the ability to verify facts” and “the courage to admit mistakes honestly.” Fact-checking and sincere correction seem to be their final survival strategy.

結局、メディアが最後に売れる商品は、ニュース映像じゃなくて“自分の信頼残高”ってことになるのかもしれません。
In the end, the last product the media can sell may not be news footage, but rather their “balance of trust.”

2025,江端さんの忘備録

『伊東市の市長が「解散権」を行使する可能性は低い』と思っていたのですが、いやー、やりましたねえ。
I thought, “The mayor of Ito City is unlikely to exercise the ‘right of dissolution, ’” but wow, she really did it.

結構、驚きました。
I was quite surprised.

でも、議会とはそういうルールで運用されているし、そのルールには正当な理由があります。
But the council operates under such rules, and those rules have legitimate reasons.

首長と議会との間で対立が深刻化した場合に、議会の解散権を行使できる仕組みを設けることで、双方が互いに抑止力を持ち、最終的には住民の意思を問う選挙に委ねられるという民主的な決着方法が担保されているのです。
By establishing a system in which the right of dissolution can be exercised when conflicts between the mayor and the council intensify, both sides are given mutual deterrence, and ultimately, a democratic resolution is secured by entrusting the decision to an election reflecting the will of the residents.

つまり、単なる政治的駆け引きではなく、行政府と議会のバランスを保つための制度的な安全弁として機能しているわけです。
In other words, it functions not as a mere political maneuver, but as an institutional safety valve to maintain the balance between the executive and the council.

そういう意味では、今回の市長による解散権の行使は、そのルールの趣旨に合致していると考えられます。
In that sense, the mayor’s exercise of the right of dissolution this time can be seen as consistent with the intent of the rule.


今回の一連の騒動の争点は大きく二つに見えます。
This series of events seems to have two main points of contention.

(1) メガソーラ反対派(市長派)と賛成派(議会派)の政争
(1) The political struggle between the anti-megasolar faction (the mayor’s side) and the pro-megasolar faction (the council’s side).

(2) 経歴(学歴)詐称問題
(2) The issue of falsified credentials (academic background).

ただ実際には、この二つは独立しているようでいて「メガソーラ導入」を巡る権力闘争の文脈に収束しているように思えます。
However, in reality, these two issues, though seemingly separate, appear to converge within the broader context of a power struggle over the introduction of the megasolar project.

学歴詐称は市長の信頼性に直結する論点ですが、それ自体が主題というより、政争を有利に進めるための副次的争点として強調されている側面が強いと思う。
Academic fraud directly affects the mayor’s credibility. Still, rather than being the main issue, it seems to be emphasized more as a subsidiary point used to gain an advantage in the political struggle.

権力闘争である以上、法を逸脱しない限り、相手を攻め落とす手段は何でも使われるし、そうでなければならない。
As long as it is a power struggle, any means to defeat the opponent is used—so long as it does not violate the law—and that is how it should be.

その意味では、市長が自らの権限を最大限に行使するのは当然とも言えるでしょう。
In that sense, it is natural for the mayor to exercise her authority to the fullest.

どのみち、来年の今ごろには世間の大半は、この事件を忘れています。
In any case, by this time next year, most of the public will have forgotten this incident.

権力闘争の世界では「勝つ」こと自体に意味があり、勝てば官軍という現実だけが残るのです。
In the world of power struggles, winning itself is what matters, and only the reality that “the victor becomes the legitimate authority” remains.


もっとも、私が注目しているのは学歴詐称問題の方です。
What I personally focus on, however, is the issue of academic fraud.

私は今回の件を「学歴偏重主義に対するアンチテーゼ」として眺めています。
I see this case as an antithesis to the ideology of academic elitism.

もちろん、学歴詐称は許されるものではありません。スペックの一つを偽る行為であり、信頼を損なう行為であるからです。
Of course, falsifying academic credentials is unacceptable. It is an act of falsifying one’s specifications and undermining trust.

しかし、それが直ちにその人物の実際のパフォーマンスや成果と結び付くのか、と問われれば疑問が残ります。
However, if asked whether it immediately correlates with the person’s actual performance or achievements, doubts remain.


製品の検査データを偽造して出荷する行為は、人命に関わる以上、絶対悪として一切許されません。
Falsifying product inspection data and shipping it is an absolute evil that cannot be tolerated, since human lives are at stake.

では、学歴はどうか。
But what about academic background?

確かに虚偽は問題ですが、人命を直接脅かすものではなく、実務能力に直結するわけでもない。
Certainly, falsehood is problematic, but it does not directly endanger lives, nor does it necessarily correspond to practical ability.

そう考えると「謝罪と修正で続投可」という選択肢もあり得るのではないかと思うのです。
From that perspective, I think the option of “apologize and correct, then continue in office” could be acceptable.

最終的には有権者が判断すればよい話であって、「即辞任」という反応にはどこか気持ち悪さを感じます。
Ultimately, it is a matter for the voters to decide, and the immediate call for resignation feels somewhat unsettling.


私は「石を3つも投げれば、東大や京大、あるいは国内の著名大学を出た人材にぶつけることができる」環境で仕事をしています。
I work in an environment where, if you threw three stones, you would likely hit graduates of the University of Tokyo, Kyoto University, or other prestigious Japanese universities.

ほぼ全員、私より有能で、年齢や役職にかかわらず敬意を払える人たちです。
Almost all of them are more capable than I am, and they are people I can respect regardless of age or position.

そのためか「学歴」という属性を特別に意識することは少なくなっているのかもしれません。
Perhaps for that reason, I have become less conscious of “academic background” as a significant attribute.

人間性についてはまあ色々言えますが、少なくとも若い研究員たちは礼儀正しい(あるいは、そのフリが抜群に上手い)ですが、私は「礼儀はフリで十分」と思っているので、それで全く問題ありません。
As for personality, there is much to be said, but at least the younger researchers are polite (or extremely skilled at pretending to be). Since I believe that “pretending politeness is enough,” I find no problem with that.

だからこそ、政治家に対しても
That is why, even for politicians,

『学歴を盛っちゃいました、すみません』
saying, “I exaggerated my academic background, I’m sorry,”

と謝罪し訂正すれば、業務を続けても構わないのではないか、と考えるのです。
And then correcting it should be sufficient to allow them to continue their work.

大事なのは「ゴメン」と言えるかどうかだけであって、学歴詐称を理由に即辞任を求める風潮は、どうにも違和感を感じます。
What truly matters is whether they can say “I’m sorry,” and the tendency to demand immediate resignation for academic fraud feels somehow off to me.

まあ、そういう意味で、伊東市の市長は『悪手』を取り続けているなぁ、とも思います。
In that sense, I find it rather amusing to watch the mayor of Ito City continue to play one “bad move” after another.


著名大学を出ていようが、修士や博士の称号を持っていようが、私にとってはどうでもいい話です。
Whether someone graduated from a prestigious university or holds a master’s or doctoral degree, it doesn’t matter to me.

私の判断基準は「私を助けてくれる人物か否か」ただそれだけです。
My sole criterion is whether the person helps me or not.

経験上、学歴や学位を持つ人の方が有能である確率が高いのは確かですが、それはあくまで確率論です。
From experience, those with academic credentials indeed tend to be more capable, but that is purely a matter of probability.

「使えん人」は、どんな肩書を持っていても「使えない」のです。
A “useless person” remains useless, no matter what title they hold.


とは言え、私にも拘るスペックはあります。
That said, there is a specification I care deeply about.

個人的には、「学歴」よりも「犯罪歴」の方が100万倍も重要です(先日も、そんな話しました)。
Personally, I consider “criminal record” to be a million times more important than “academic background” (as I mentioned the other day).

まあ、犯罪歴を、立候補届け出用紙に記載する人間がいるとも思えませんが。
Of course, I don’t imagine there would be anyone who would honestly write their criminal record on the candidacy registration form.

私は「学歴詐称」が"犯罪"であるとは思っていませんが、それでも、もし、伊東市の市長が、解散後の議会で解任されて、再度立候補することになった時は、選挙カーの上から
I don’t believe that “academic fraud” is a “crime,” but still, if the council dismissed the mayor of Ito City after dissolution and then ran for office again, I would want him to shout from the top of her campaign van:

『学歴詐称の田久保! 田久保でございます!!』
“I am Kubota, the academic fraudster! Takubo at your service!!”

と叫んで欲しい。
Yes, I would want her to say that.

私が伊東市の市民であれば、投票すると思う。
If I were a citizen of Ito City, I would definitely vote for her.

『小学生の女児の下着等の写真を盗撮して、それをグループで共有していた教師のグループが逮捕されたようです。最大限の努力で怒りを抑えつつ、質問します。彼らの行為を弁護する理(ロジック)があれば教えてください』とChatGPTに頼んでみた件

2025,江端さんの忘備録

ロングランをしているプログラムは、コンソールから目を離すとダウンする ーー こんなことは、まったくの根拠のないデタラメであることは、私だって、よくわかっています。
A long-running program will crash the moment you take your eyes off the console? I know perfectly well this is complete nonsense without any basis.

それでも、「コンソールを見張っていると、プログラムも踏ん張っているように見える」という気持ちは、だれしも経験しているのではないでしょうか。
Even so, hasn’t everyone felt that “if I keep watching the console, the program seems to hold on”?

自分がスクラッチから作ったプログラムであれば、いろいろ”仕込む”ことができるのですが、別の人が作ったプログラムを協力を得ながら動かす、というのはストレスがかかる仕事です。
If it’s a program I wrote from scratch, I can plant various checks and tricks. But running a program written by someone else, even with cooperation, is a stressful job.

プログラムのコンソールを見張っているときの自分の姿は、一見、「過保護な親」に近いようにも見えますが、実は、ちょっと違う。
When I’m staring at the program console, I may look like an overprotective parent, but in reality, it’s a bit different.

むしろ、『お前、ここまで面倒見たのに、よもや、ここで"落ちる"なんてことしないよなぁ』というような、因縁を付ける頭の悪いチンピラのガン見に近い ーー というか、そのもの。
It’s more like, “I’ve looked after you this much, you’re not seriously going to crash now, are you?”? A glare like a low-level thug picking a fight. In fact, that’s precisely what it is.


江端家では、不思議なジンクスがあります。
In the Ebata household, there is a strange jinx.

それは、嫁さんや娘では動かせなかった家電や機械が、私の操作であれば『動く』。
Appliances or machines that my wife or daughters couldn’t get to work will somehow work when I touch them.

残念ながら、これは思い込みではなくて、統計的に有意な確率で発生している現象です。
Unfortunately, this isn’t just in my head; it happens with statistically significant frequency.

この理由ですが、
The reason for this, I think, is:

「私は動かないお前(機械)を許さない」
“I will not forgive you, machine, for not working.”

「動かないお前(機械)は、バラバラに分解しても動かす」
“If you don’t work, I’ll take you apart piece by piece until you do.”

「原因が確定できたら、私の選択は、お前(機械)を『直すか捨てるか』の2択のみ」
“Once I’ve identified the cause, my only options are to fix you or throw you away.”

という、上から目線で機械を睨めつける、という点にあるように思えることがあります。
In short, it seems to come down to glaring at the machine from above with this mindset.

家族から「動かない」と言われたら、ドライバーとテスターを持って、機械の前に立ち塞がる私は、機械たちにとっては恐しい存在だと思うんですよ。
When my family says “it doesn’t work,” I stand in front of the machine armed with a screwdriver and tester. From the machine’s point of view, I must be terrifying.


"だから、動くのだ" ーー とは、正直私も思っていません。
So, no, I don’t really think the machine “moves out of fear.”

機械というのは、動かし方があるんですよね。例えば、このスイッチの前に、別のスイッチを稼働させておくとか、この原因に対しては、電源を遮断して10秒待つとか、機械の稼働のメカニズムが推定できると、機械というのは案外動くものなのです。
Machines have ways of being made to run. For example, turning on another switch first, or cutting the power and waiting ten seconds for a given issue. Once you infer the mechanism of operation, machines often work surprisingly well.

これを論理的に語るのは難しいです。これは、長年のカンという奴だと思います。
It’s hard to explain this logically. It’s something we call long-honed intuition.


で、冒頭に話が戻ります。
And so, back to the beginning.

私が、稼働中のプログラムを「ガン見」し続けるのは、こういう私の経験則に因るものです。
The reason I keep staring at a running program is precisely because of this personal rule of thumb.

「ガン見」でシステムが動くのであれば、私は、どんな形相の顔を作っても、それをコンピュータのコンソールに向けます。
If glaring makes the system run, I’ll pull any kind of face and direct it squarely at the console.

そして、それでも結局プログラムは落ちます。
And yet, the program crashes anyway.

そして、落ちた瞬間に映るのは、私の鬼の形相を映すモニタだけです。
The only thing left on the screen is my own demon-like expression reflected in the monitor.

本来、システム構築もプログラミングも楽しいものです ―― 締切とノルマさえなければ

 

2025,江端さんの忘備録

オバマ大統領が、広島の原爆式典に参加を検討している際に、アメリカ側から以下のような相談を持ちかけられた、という話を聞いたことがあります(*1)。
I once heard that, when President Obama was considering attending the Hiroshima atomic bomb memorial ceremony, the American side posed the following question (*1).

―― 日本人は、米国の元大統領に対して『謝罪』を要求しているのか?
— Do the Japanese demand an "apology" from a former U.S. president?

(*1)私、NHKの番組でこの話を聞いた記憶があるんですが、現時点でウラが取れていません。
(*1) I recall hearing this story on an NHK program, but I have not been able to verify it.

私たち日本からすれば、「は?」という感じだったと思うんですよね。
From the Japanese perspective, it must have felt like, "What?"

多くの日本人は"謝罪"などは、かなりどーでもよくて、『とにかく来て!』『原爆資料館だけでもいいから見て行って!』という気持ちだけだったと思うんですよ(*2)。
For many Japanese people, an "apology" didn’t really matter much; what they truly wanted was simply, "Just come! Even if only to see the Atomic Bomb Museum!" (*2).

(*2)世論調査(Japan Timesによる調査)では、62%の日本人が謝罪は必要ないと考え、「核軍縮へのコミットメント」を41%が期待していたとの調査結果あり。
(*2) A Japan Times poll found that 62% of Japanese thought an apology was unnecessary, while 41% expected a commitment to nuclear disarmament.

この日本人の気持ちが、米国には伝わっていないんだなぁ、と実感したものです。
It made me realize that this sentiment of the Japanese people was not being conveyed to the United States.


私の嫁さん、日常的には政治的な発言をしない人なのですが、先日、私抜きで、長女と広島に旅行に行った後で、『私(江端)を、原爆資料館に連れていく』ために、2回目の広島旅行を決定しました。
My wife, who usually does not make political statements, recently went to Hiroshima with our eldest daughter without me, and afterwards decided on a second trip to Hiroshima specifically to take me (Ebata) to the Atomic Bomb Museum.

私、結構、原爆に関しても様々な番組や文献などを見てきて、かなり詳しい方だと思う(見逃している番組の方が少ないと思う)のですが、「あんなに真剣な嫁さん」を見るのは初めてでした。
I have watched many programs and read various documents about the atomic bomb, and I consider myself reasonably knowledgeable (I think I have missed very few programs). But it was the first time I had ever seen my wife so serious about it.

嫁さんは、『政府の国民への広島に関するプレゼンスが足りない』とも言っていました。
She also said, "The government’s presence toward the citizens regarding Hiroshima is insufficient."

嫁さんにそこまで言わすということは、
For my wife to go so far as to say that—

―― たぶん、番組や文献では足りない、"何か"があるのだろう
—it must mean that there is "something" missing that programs and documents cannot fully provide.

と察しています。
That is how I interpret it.


正直なところ、我が国の「反原爆」に対するプレゼンスは、余り上手くいっていないように思います。
Frankly, I feel that Japan’s "anti-atomic bomb" presence has not been very effective.

2024年にノーベル平和賞を受賞した、被爆者団体・日本原水爆被害者団体協議会(日本被団協)は、長年にわたる証言活動を通じて核兵器廃絶を訴え続けてきました。
The Japan Confederation of A- and H-Bomb Sufferers Organizations (Nihon Hidankyo), which won the Nobel Peace Prize in 2024, has continued for many years to call for the abolition of nuclear weapons through testimony activities.

彼らの活動は国際的に高く評価されましたが、日本国政府は、この活動に対して正直「及び腰」であるのは、ご存知の通りです。
Their activities have been highly praised internationally, but as you know, the Japanese government has frankly been rather half-hearted toward them.

我が国の安全保障が、米国の核の傘の下にあるという事実が、政府にそういう「及び腰」にさせているのは理解できます。
I understand that the fact that Japan’s security rests under the U.S. nuclear umbrella makes the government take such a hesitant stance.

とすれば、政府を離れた団体(NPO)がやるしかないのですが、国家にできないプレゼンスをNPOにできるか、というと難しいですよね。
If so, only organizations outside the government (such as NGOs) can take action. But whether an NGO can achieve a presence that the state itself cannot is difficult to say.


そこで、以下のような定量化(KPI)を世界に発表してはどうかな、と思うんですよ。
That’s why I thought we might announce the following kinds of quantifications (KPIs) to the world.

(1)日本国籍を有しない旅行者の、国別の原爆資料館訪問人数を、毎年公表する。
(1) Announce each year the number of foreign visitors to the Atomic Bomb Museum, broken down by country.

(2)『A国訪問人数 / A国核兵器保有数』の比率も公表する。
(2) Publish the ratio of "number of visitors from Country A ÷ number of nuclear weapons held by Country A."

『原爆反対!』というスローガンではなく、国家または国民として原爆への意識の度合いを数値で明かにされることは、各国政府にとっては、"痛い"のではないかな、と思いまして。
Rather than a slogan like "No more atomic bombs!", I think revealing in numerical terms each nation’s or people’s degree of awareness of the bomb would be quite "painful" for governments.

もっともこの方法には問題があります。ざっと思いつくだけで、これだけ思いつきます。
Of course, this method has problems. Off the top of my head, I can think of these.

(A)訪問者データの収集困難性、(B)プライバシー・個人情報保護の問題、(C)「核兵器保有数」との比率の妥当性、(D)旅行者数に依存する偏り、(E)国民意識の代理指標としての限界、(F)政治的反発の可能性。
(A) Difficulty of collecting visitor data, (B) privacy and personal data protection issues, (C) questionable validity of ratios based on "number of nuclear weapons," (D) biases depending on tourism flows, (E) limitations of using this as a proxy for public awareness, (F) risk of political backlash.

で、もっとも面倒なことは『資料館の役割や目的との乖離』です。
And the most troublesome issue is "the divergence from the museum’s original role and purpose."

資料館の本来の目的は「来訪者に伝えること」であり、国際比較のKPI化を強調しすぎると教育・記憶継承の意義から外れてしまいます。
The museum’s original purpose is "to convey to its visitors." Overemphasizing KPIs for international comparison would stray from its mission of education and memory preservation.

それでも、「原爆反対!」と叫んでいるだけでは、足りないのではないかな、と。
However, I thought: maybe just shouting "No more atomic bombs!" is not enough.

「声」で届かないなら「数値」にして「叩きつける」というアプローチは、"あり"だと思うんですよ。
That said, if "voices" don’t reach, then the approach of turning them into "numbers" and "throwing them down" is, I think, a valid one.


もちろん、「良心」による核廃絶が一番いいです。
Of course, nuclear abolition through "conscience" is the best.

でも、「良心」が届きにくいのであれば、「数値(ノルマ)」による核廃絶というアプローチを考えていいと思います。
But if "conscience" is hard to reach, then an approach of atomic abolition through "numbers (quotas)" should also be considered.

そして、その数値や計算方法は、我が国が"独善的"に決めて良いはずです。
The numbers and calculation methods are something Japan is justified in deciding "self-righteously."

なぜなら我が国は、世界で唯一の原爆被爆国なのですから。
Because Japan is the world’s only nation to have suffered atomic bombings.

「伝えなければならない想い」と「受けとらなければならない想い」は、等価ではありません。

2025,江端さんの忘備録

自民党が「解党的出直し」をしたいのであれば、
If the Liberal Democratic Party truly wanted a “fresh start as if dissolving the party,”

『石破首相続投 → 衆議院解散 → 選挙での残滓も残らない程の自民党の惨敗』
It could have been: Prime Minister Ishiba continues → dissolves the House of Representatives → the LDP suffers such a crushing defeat that not even remnants remain.

でも良かったのではないか、と思っています。
I think that might have been just fine.

これなら、確実に「解党」できたはずなのに、と思うのは私だけでしょうか。
Am I the only one who thinks that this way, they could have achieved an actual “dissolution of the party”?

そもそも『解党的出直し』という言い方が、なんとも嫌らしい。
To begin with, the very phrase “fresh start as if dissolving the party” feels awfully disingenuous.

気持ちは「解党」だけど、組織と権力は「続投」という、覚悟のなさがミエミエです。
The intention is “dissolution,” but the organization and power remain “in place”—the lack of resolve is glaringly apparent.


まあ、私も自分のことを「消極的護憲派」という、訳の分からん自称をしているので、自民党のことをどうこう言えませんけどね。
Well, since I also call myself a “reluctant supporter of constitutional preservation,” which is a rather nonsensical self-label, I can’t really criticize the LDP too harshly.

私は、「もし憲法改正をやるなら、石破首相の下でやって欲しい」と思っていただけに残念です。
Personally, I was hoping that “if constitutional revision were to be attempted, it should be done under Prime Minister Ishiba,” so this is disappointing.

この人、ロジックで憲法9条を語れる、数少ない首相の一人だと思っていたので(誤解かもしれませんが)。
I thought he was one of the few prime ministers who could discuss Article 9 of the Constitution in logical terms (though perhaps I am mistaken).

それにしても、改憲議論がちっとも進みませんね。
The debate on constitutional revision isn’t moving forward at all.

まあ「護憲派」の一人としては都合はいいんですが、私は死ぬまでに一度は、憲法改正のための国民投票を見てみたいんですよ。
Well, as someone on the preservationist side, that works in my favor, but I would still like to see a national referendum on constitutional revision at least once in my lifetime.

その結果が憲法改正の実現であれ、否認であれ、それはどちらでも良いのです。
Whether the result is the realization of revision or its rejection, I don’t mind either way.

国の形を国民の直接投票で決定するという、憲政史上最初のイベントを見てみたい。
I want to witness the very first event in our constitutional history where a direct vote of the people decides the nation's shape.

国民を二分する大イベントになる――と思っているんです(案外そうでもないかな?)。
I imagine it would be a great event, dividing the nation into two camps—though perhaps it wouldn’t turn out that way.


改憲論は外交や内政よりも、どうしても後回しになります。
Discussions of constitutional revision inevitably get pushed behind diplomacy and domestic affairs.

あんなのがアメリカ大統領をやっていれば、我が国は改憲論なんぞやっている余裕ないでしょうし。
With someone like that serving as President of the United States, Japan would hardly have the leeway to be discussing constitutional revision.

私は、憲法改正(9条)は「台湾事変」発生から半年くらいで、バタバタとケリが付くだろうと予想しています。
I predict that constitutional revision (of Article 9) would be rushed through and settled in about six months after a “Taiwan incident” breaks out.

私としては「バタバタ」でない時に、じっくりと改憲論を皆で議論したいんですけど……無理かなぁ。
As for me, I’d prefer to have a thorough, deliberate national discussion on constitutional revision in calmer times…but maybe that’s just impossible.

憲法改正なんて、簡単だ ―― と、私が言ったら、多くの人はウソだと思うでしょう。