-
Notifications
You must be signed in to change notification settings - Fork 3
STMTS
Filipe Brandão edited this page Aug 26, 2015
·
16 revisions
There are three types of statements:
${python code}$
-
EVAL:
${python expression}$
$CMD{python parameters or code};
$CMD[AMPL parameters]{python arguments or code};
-
SET:
$SET[set_name]{values};
-
PARAM:
$PARAM[param_name]{values, i0=0};
-
VAR:
$VAR[var_name]{typ="", lb=None, ub=None, index_set=None};
-
CON:
$CON[constraint_name]{left, sign, right};
Additional statements:
- Statements for VPSolver:
-
VBP_LOAD:
$VBP_LOAD[name]{fname, i0=0, d0=0};
-
VBP_FLOW:
$VBP_FLOW[zvar]{W, w, b, bounds=None};
-
VBP_GRAPH:
$VBP_GRAPH[V_name, A_name]{W, w, labels, bounds=None};
- Statements for special ordered sets and piecewise linear functions:
- Statements for TSP:
-
ATSP_MTZ:
$ATSP_MTZ{xvars, DL=False, cuts=False};
-
ATSP_SCF:
$ATSP_SCF{xvars, cuts=False};
-
ATSP_MCF:
$ATSP_SCF{xvars, cuts=False};
- Statements for Lot-sizing (LS-LIB):
-
Wagner-Whitin models:
$WW_*{...};
-
Lot-sizing models:
$LS_{...};
Note: The values between []
are usually used to name new AMPL variables, constraints, sets, or parameters. Names starting with a ^
indicate that the corresponding AMPL element should not be defined by the command. This prefix is useful when the corresponding AMPL element was declared before and we do not want to declared it again.
Copyright © Filipe Brandão. All rights reserved.
E-mail: [email protected]. [Homepage]