Alumin_Hydro 487f350852 fix(templates): replace hardcoded total-pages with dynamic page count in en/mcm and en/default (#125)
Both English Typst templates hardcoded the total page count as "4" in the
page header, producing impossible headers like "Page 5 of 4" for any paper
longer than 4 pages (i.e. every real submission).

- en/mcm: total-pages now evaluates counter(page).final() minus the two
  front-matter pages (summary sheet + title page), matching the existing
  physical-page offset used for the current page number
- en/default: total-pages now evaluates counter(page).final() directly

Verified: both templates compile cleanly with typst 0.14 and produce
consistent "Page N of N" headers on the final page.

Co-authored-by: Alumin-Hydro <alumin@users.noreply.github.com>
2026-09-13 15:37:16 +08:00
2025-05-05 23:47:52 +08:00
2026-06-30 11:02:38 +08:00
2025-05-12 13:30:41 +08:00
2025-05-12 13:30:41 +08:00

🤖 MathModelAgent 📐

An agent designed for mathematical modeling
Automatically complete mathematical modeling and generate a ready-to-submit paper.

简体中文 | English

⬇️ Download the latest desktop app (recommended)

🎨 Sister project: sci-box — scientific figure & diagram SKILLs


Don't want to set up an environment? Download the desktop app and start right away.

👉 Get the latest release

The desktop app bundles Claude Code and the full set of MathModelAgent SKILLS. No Python / Node.js / Redis installation and no manual SKILL setup — install it, add one model API key, and start modeling.

OS File
macOS (Apple Silicon) mathmodel-<version>-arm64.dmg
macOS (Intel) mathmodel-<version>-x64.dmg
Windows 64-bit mathmodel-<version>-x64.exe

The macOS installers are signed with a Developer ID and notarized by Apple.

Warning

The Windows installer is not code-signed yet. Microsoft Defender SmartScreen may warn on first install or launch — choose "More info" → "Run anyway", and only download from the official Releases page.

The app checks for updates automatically (auto-update is live on macOS; Windows will be enabled once a code-signing certificate is in place).

If you'd rather deploy it yourself or contribute, keep reading below.


🌟 Vision

Turn 3 days of competition into 1 hour
Automatically generate an award-level modeling paper

Features

  • 🔍 Automatic problem analysis, mathematical modeling, code writing, error correction, and paper writing
  • 💻 Code Interpreter
    • Local Interpreter: Based on Jupyter, code saved as notebook for easy editing
    • Cloud Code Interpreter: E2B and daytona
  • 📝 Generate a well-formatted paper
  • 🤝 Multi-agents: modeling expert, coding expert, paper expert, etc.
  • 🔄 Multi-LLMs: Different models for each agent
  • 🤖 Support for all models: litellm
  • 💰 Low cost: workflow agentless, no dependency on agent framework
  • 🧩 Custom templates: prompt inject for setting requirements for each subtask separately

🎨 Sister Project: sci-box (Figures & Diagrams)

The scientific plotting and diagram templates now live in their own repository, jihe520/sci-box, and can be installed and used on their own:

SKILL Contents
scibox-figure Ready-to-run replication templates for SHAP, ROC, Taylor, raincloud, chord and circular heatmap plots (Python + Matplotlib, exports PNG / PDF / SVG)
scibox-diagram Editable draw.io templates: five-tier technical roadmap, three-column research framework, three-column process flow, horizontal task pipeline
npx skills add jihe520/sci-box

figure

🚀 Future Plans

  • Add and complete webui, cli
  • Comprehensive tutorials and documentation
  • Provide web service
  • English support (MCM/ICM)
  • LaTeX template integration
  • Vision model integration
  • Proper citation implementation
  • More test cases
  • Docker deployment
  • Human in loop: User interaction (model selection, @agent rewriting, etc.)
  • Feedback: evaluate the result and modify
  • Cloud integration for code interpreter (e.g., e2b providers)
  • Multi-language: R, Matlab
  • Drawing: napki, draw.io, plantuml, svg, mermaid.js
  • Add benchmark
  • Web search tool
  • RAG knowledge base
  • A2A hand off: Code expert reflects on errors multiple times, hands off to smarter model agent

Video Demo

Caution

The project is in experimental development stage, with many areas needing improvement and optimization. I (the project author) am busy but will update when time permits. Contributions are welcome.

For case references, check the demo folder. If you have good cases, please submit a PR to this directory

📖 Usage Guide

Three deployment options are available, choose the one that suits you best:

  1. Docker
  2. Local deployment
  3. Automated script deployment

If you want to run the CLI version, switch to the master branch. It's easier to deploy, but will not be updated in the future.

  1. Configure Environment Variables
cp backend/.env.dev.example backend/.env.dev
cp frontend/.env.example frontend/.env.development

Fill in the configuration in:

  • backend/.env.dev
  • frontend/.env.development
  1. Start Services
docker-compose up -d
  1. Access

You can now access:

💻 Option 2: Local Deployment

Make sure Python, Nodejs, and Redis are installed on your computer

  1. Configure Environment Variables

Copy /backend/.env.dev.example to /backend/.env.dev (remove the .example suffix)

Configure Environment Variables

It is recommended to use models with strong capabilities and large parameter counts.

Copy /frontend/.env.example to /frontend/.env.development (remove the .example suffix)

  1. Install Dependencies

Clone the project

git clone https://github.com/jihe520/MathModelAgent.git

Start backend

Start Redis

cd backend
pip install uv # Recommended: use uv to manage python projects
uv sync # Install dependencies
# Start backend
# Activate Python virtual environment
source .venv/bin/activate # MacOS or Linux
venv\Scripts\activate.bat # Windows
# Run this command for MacOS or Linux
ENV=DEV uvicorn app.main:app --host 0.0.0.0 --port 8000 --ws-ping-interval 60 --ws-ping-timeout 120 --reload
# Run this command for Windows
set ENV=DEV ; uvicorn app.main:app --host 0.0.0.0 --port 8000 --ws-ping-interval 60 --ws-ping-timeout 120

Start frontend

cd frontend
npm install -g pnpm
pnpm i # Make sure pnpm is installed
pnpm run dev

Tutorial

Results and outputs are generated in the backend/project/work_dir/xxx/* directory:

  • notebook.ipynb: code generated during execution
  • res.md: final results in markdown format

🚀 Option 3: Automated Script Deployment (Community Contribution)

Need an automatic deployment script? mmaAutoSetupRun

Need to customize prompt templates? Prompt Inject: prompt

🤝 Contribution & Development

DeepWiki

  • The project is in experimental development stage (updated when I have time), with frequent changes and some bugs being fixed.
  • Everyone is welcome to participate and make the project better.
  • PRs and issues are very welcome.
  • For requirements, refer to Future Plans.

After cloning the project, install the Todo Tree plugin to view all todo locations in the code.

.cursor/* contains overall architecture, rules, and mcp for easier development.

📄 License

Free for personal use. For commercial use, please contact me (the author).

License

🙏 Reference

Thanks to the following projects:

Others

💖 Sponsor

Buy Me a Coffee

Thanks to sponsors: danmo-tyc

👥 GROUP

For questions, join the group

QQ Group: 699970403

S
Description
2analysis-modeling: 数学建模赛题分析与建模设计合并阶段。用于读取题面和附件,完成子问题拆解、数据理解、假设预检、变量定义、模型公式、目标函数、约束条件、求解策略和可交给代码实现的建模报告。; 1start-mathmodel: 数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。; 4drawio: 数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。; 5writing: 数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和 figures/*.pdf 选择比赛模板、排版引擎、组织章节,并在论文正文中按章节直接…
Readme 103 MiB
Languages
Python 37.2%
Vue 21.2%
TeX 19.8%
Typst 13.2%
TypeScript 5.5%
Other 3%