@@ -30,7 +30,7 @@ This is the complete listing of the example. Please note that, for clarity of pr
3030 ampl$readData("models/diet.dat")
3131
3232 # Solve
33- ampl$solve("", "" )
33+ ampl$solve()
3434
3535 # Get objective entity by AMPL name
3636 totalcost <- ampl$getObjective("Total_Cost")
@@ -43,7 +43,7 @@ This is the complete listing of the example. Please note that, for clarity of pr
4343 cat("Increased costs of beef and ham.\n")
4444
4545 # Resolve and display objective
46- ampl$solve("", "" )
46+ ampl$solve()
4747 cat(sprintf("New objective value: %g\n", totalcost$value()))
4848
4949 # Reassign data - all instances
@@ -52,7 +52,7 @@ This is the complete listing of the example. Please note that, for clarity of pr
5252 cat("Updated all costs.\n")
5353
5454 # Resolve and display objective
55- ampl$solve("", "" )
55+ ampl$solve()
5656 cat(sprintf("New objective value: %g\n", totalcost$value()))
5757
5858 # Get the values of the variable Buy in a dataframe object
@@ -123,7 +123,7 @@ To solve the currently loaded problem instance, it is sufficient to issue the co
123123
124124.. code-block :: R
125125
126- ampl$solve("", "" )
126+ ampl$solve()
127127
128128
129129 Get an AMPL entity in the programming environment (get objective value)
@@ -175,7 +175,7 @@ values is overloaded, and is in both cases :meth:`Parameter.setValues()`.
175175 cost <- ampl$getParameter("cost")
176176 cost$setValues(data.frame(index=c("BEEF", "HAM"), value=c(5.01, 4.55)))
177177 cat("Increased costs of beef and ham.\n")
178- ampl$solve("", "" )
178+ ampl$solve()
179179 cat(sprintf("New objective value: %g\n", totalcost$value()))
180180
181181 The code above assigns the values 5.01 and 4.55 to the parameter cost for the objects beef and ham respectively.
@@ -186,7 +186,7 @@ both the index and the value. A collection of values is assigned to each of the
186186
187187 cost$setValues(c(3, 5, 5, 6, 1, 2, 5.01, 4.55))
188188 cat("Updated all costs.\n")
189- ampl$solve("", "" )
189+ ampl$solve()
190190 cat(sprintf("New objective value: %g\n", totalcost$value()))
191191
192192 The statements above produce the following output::
0 commit comments