Skip to content

Commit

Permalink
Problem ctor parameter rename for clairty
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcondon committed Jun 16, 2024
1 parent 07d1e6c commit a2b4245
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In this section, we use the ['blocks world'](https://en.wikipedia.org/wiki/Block
### Defining Problems as Code

```
using SCClassicalPlanning; // for Problem, HashSetState, Goal, Action, Effect
using SCClassicalPlanning; // for HashSetState, Goal, Action, Effect, Problem
using SCFirstOrderLogic; // for Constant, Term, Predicate, VariableDeclaration, EqualityIdentifier
using static SCFirstOrderLogic.SentenceCreation.OperableSentenceFactory; // for OperablePredicate
using Action = SCClassicalPlanning.Action; // an unfortunate clash with System.Action. I'd rather not rename it..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static AirCargoOneAtATimeDomain()
IsAt(Cargo1, Airport2)
& IsAt(Cargo2, Airport2)
& IsAt(Cargo3, Airport2)),
actions: actionSchemas);
actionSchemas: actionSchemas);
}

public static Problem Problem { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/SCClassicalPlanning/HashSetState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private class StateConstantFinder : RecursiveStateVisitor<HashSet<Constant>>
}

/// <summary>
/// Utility class to find <see cref="Constant"/> instances within the elements of a <see cref="SCClassicalPlanning.Goal"/>, and add them to a given <see cref="HashSet{T}"/>.
/// Utility class to find <see cref="Constant"/> instances within the elements of a <see cref="Goal"/>, and add them to a given <see cref="HashSet{T}"/>.
/// </summary>
private class GoalConstantFinder : RecursiveGoalVisitor<HashSet<Constant>>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using SCClassicalPlanning.Planning.GraphPlan;
using SCClassicalPlanning.ProblemManipulation;
using SCFirstOrderLogic;
using SCFirstOrderLogic.SentenceManipulation;
Expand Down
8 changes: 4 additions & 4 deletions src/SCClassicalPlanning/Problem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public class Problem
/// </summary>
/// <param name="initialState">The initial state of the problem.</param>
/// <param name="endGoal">The end goal of the problem.</param>
/// <param name="actions">The actions that are available within the problem.</param>
public Problem(IState initialState, Goal endGoal, IQueryable<Action> actions)
/// <param name="actionSchemas">The schemas of the actions that are available within the problem.</param>
public Problem(IState initialState, Goal endGoal, IQueryable<Action> actionSchemas)
{
InitialState = initialState;
EndGoal = endGoal;
ActionSchemas = actions;
ActionSchemas = actionSchemas;
}

/// <summary>
Expand All @@ -47,7 +47,7 @@ public Problem(IState initialState, Goal endGoal, IQueryable<Action> actions)
public Goal EndGoal { get; }

/// <summary>
/// Gets the actions that are available.
/// Gets the schemas of the actions that are available within the problem.
/// </summary>
public IQueryable<Action> ActionSchemas { get; }

Expand Down

0 comments on commit a2b4245

Please sign in to comment.