<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiro_takeda</author_name>
  <author_url>https://blog.hatena.ne.jp/shiro_takeda/</author_url>
  <blog_title>武田史郎のウェブログ</blog_title>
  <blog_url>https://shiro-takeda.hateblo.jp/</blog_url>
  <categories>
    <anon>GAMS</anon>
    <anon>研究</anon>
  </categories>
  <description>いつのバージョンからかははっきり覚えていませんが（22の後半から？）、GAMSにマクロの機能が実装されました。 マクロは以下のように$macro命令で定義します。 set i / 1*10 / ; parameter a(i) b(i) ; a(i) = ord(i); $macro f(i) a(i)**2 b(i) = f(i); display b; $macroから始まる行でマクロf(i)を定義しています。そして、そのf(i)というマクロはb(i)=f(i)という部分で利用されています。 マクロは（コンパイル時に）展開されるので、上のコードは実行時には次のようになります。 set i …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshiro-takeda.hateblo.jp%2Fentry%2F1588&quot; title=&quot;GAMSのマクロ機能（$macro） - 武田史郎のウェブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-10-09 04:44:20</published>
  <title>GAMSのマクロ機能（$macro）</title>
  <type>rich</type>
  <url>https://shiro-takeda.hateblo.jp/entry/1588</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
