Skip to content

Commit

Permalink
📝 Update html files
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Feb 28, 2025
1 parent ed8b072 commit 760e40a
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions html/ja/tutorials/se_concept.html
Original file line number Diff line number Diff line change
Expand Up @@ -7312,6 +7312,7 @@
processEnvironments: true
},
displayAlign: 'center',
messageStyle: 'none',
CommonHTML: {
linebreaks: {
automatic: true
Expand All @@ -7331,11 +7332,12 @@
if (!diagrams.length) {
return;
}
const mermaid = (await import("https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.6.0/mermaid.esm.min.mjs")).default;
const mermaid = (await import("https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.7.0/mermaid.esm.min.mjs")).default;
const parser = new DOMParser();

mermaid.initialize({
maxTextSize: 100000,
maxEdges: 100000,
startOnLoad: false,
fontFamily: window
.getComputedStyle(document.body)
Expand Down Expand Up @@ -7406,7 +7408,8 @@
let results = null;
let output = null;
try {
const { svg } = await mermaid.render(id, raw, el);
let { svg } = await mermaid.render(id, raw, el);
svg = cleanMermaidSvg(svg);
results = makeMermaidImage(svg);
output = document.createElement("figure");
results.map(output.appendChild, output);
Expand All @@ -7421,6 +7424,38 @@
parent.appendChild(output);
}


/**
* Post-process to ensure mermaid diagrams contain only valid SVG and XHTML.
*/
function cleanMermaidSvg(svg) {
return svg.replace(RE_VOID_ELEMENT, replaceVoidElement);
}


/**
* A regular expression for all void elements, which may include attributes and
* a slash.
*
* @see https://developer.mozilla.org/en-US/docs/Glossary/Void_element
*
* Of these, only `<br>` is generated by Mermaid in place of `\n`,
* but _any_ "malformed" tag will break the SVG rendering entirely.
*/
const RE_VOID_ELEMENT =
/<\s*(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\s*([^>]*?)\s*>/gi;

/**
* Ensure a void element is closed with a slash, preserving any attributes.
*/
function replaceVoidElement(match, tag, rest) {
rest = rest.trim();
if (!rest.endsWith('/')) {
rest = `${rest} /`;
}
return `<${tag} ${rest}>`;
}

void Promise.all([...diagrams].map(renderOneMarmaid));
});
</script>
Expand Down Expand Up @@ -7494,7 +7529,7 @@ <h1 id="Amplify-SE-%E5%85%A5%E9%96%80%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<p><a id="concept"></a></p>
<h2 id="Amplify-SE-%E3%81%A8%E3%81%AF">Amplify SE とは<a class="anchor-link" href="#Amplify-SE-%E3%81%A8%E3%81%AF">¶</a></h2><p>Fixstars Amplify Scheduling Engine (Amplify SE) は、多岐にわたるスケジュールの立案・最適化に特化した最適化エンジンです。どなたでも定式化不要で、最適化がなされた種々の計画立案が可能です。柔軟に設計された専用ライブラリにより、多品種少量や変種変量生産のような複雑で迅速、頻繁な立案が求められる生産計画立案に最適です。また、生産計画以外にも『<a href="https://amplify.fixstars.com/ja/scheduling/resources/example/vrp">配送計画</a>』や『シフト計画(今後サンプル追加予定)』といった種々の計画問題もカバーします。</p>
<h2 id="Amplify-SE-%E3%81%A8%E3%81%AF">Amplify SE とは<a class="anchor-link" href="#Amplify-SE-%E3%81%A8%E3%81%AF">¶</a></h2><p>Fixstars Amplify Scheduling Engine (Amplify SE) は、多岐にわたるスケジュールの立案・最適化に特化した最適化エンジンです。どなたでも定式化不要で、最適化がなされた種々の計画立案が可能です。柔軟に設計された専用ライブラリにより、多品種少量や変種変量生産のような複雑で迅速、頻繁な立案が求められる生産計画立案に最適です。また、生産計画以外にも『<a href="https://amplify.fixstars.com/ja/scheduling/resources/example/vrp">配送計画</a>』といった種々の計画問題もカバーします。</p>
<p>以下では、Amplify SE 及びそれを使った最適化実施をサポートするライブラリ <code>amplify-sched</code> について解説します。本ライブラリは、Python ライブラリであり、</p>
<div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>amplify-sched
</pre></div>
Expand Down

0 comments on commit 760e40a

Please sign in to comment.