Merge pull request #2176 from github/2073-local

2073 local
This commit is contained in:
Arfon Smith
2015-02-27 14:16:03 -06:00
5 changed files with 39 additions and 0 deletions

3
.gitmodules vendored
View File

@@ -630,6 +630,9 @@
[submodule "vendor/grammars/Lean.tmbundle"] [submodule "vendor/grammars/Lean.tmbundle"]
path = vendor/grammars/Lean.tmbundle path = vendor/grammars/Lean.tmbundle
url = https://github.com/leanprover/Lean.tmbundle url = https://github.com/leanprover/Lean.tmbundle
[submodule "vendor/grammars/ampl"]
path = vendor/grammars/ampl
url = https://github.com/ampl/sublime-ampl
[submodule "vendor/grammars/openscad.tmbundle"] [submodule "vendor/grammars/openscad.tmbundle"]
path = vendor/grammars/openscad.tmbundle path = vendor/grammars/openscad.tmbundle
url = https://github.com/tbuser/openscad.tmbundle url = https://github.com/tbuser/openscad.tmbundle

View File

@@ -143,6 +143,8 @@ vendor/grammars/actionscript3-tmbundle:
- text.xml.flex-config - text.xml.flex-config
vendor/grammars/ada.tmbundle: vendor/grammars/ada.tmbundle:
- source.ada - source.ada
vendor/grammars/ampl:
- source.ampl
vendor/grammars/ant.tmbundle: vendor/grammars/ant.tmbundle:
- text.xml.ant - text.xml.ant
vendor/grammars/antlr.tmbundle: vendor/grammars/antlr.tmbundle:

View File

@@ -41,6 +41,14 @@ AGS Script:
tm_scope: source.c++ tm_scope: source.c++
ace_mode: c_cpp ace_mode: c_cpp
AMPL:
type: programming
color: "#00008B"
extensions:
- .ampl
tm_scope: source.ampl
ace_mode: text
ANTLR: ANTLR:
type: programming type: programming
color: "#9DC3FF" color: "#9DC3FF"

25
samples/AMPL/toy.ampl Normal file
View File

@@ -0,0 +1,25 @@
# A toy knapsack problem from the LocalSolver docs written in AMPL.
set I;
param Value{I};
param Weight{I};
param KnapsackBound;
var Take{I} binary;
maximize TotalValue: sum{i in I} Take[i] * Value[i];
s.t. WeightLimit: sum{i in I} Take[i] * Weight[i] <= KnapsackBound;
data;
param:
I: Weight Value :=
0 10 1
1 60 10
2 30 15
3 40 40
4 30 60
5 20 90
6 20 100
7 2 15;
param KnapsackBound := 102;

1
vendor/grammars/ampl vendored Submodule

Submodule vendor/grammars/ampl added at 2e399ebf4a